Planfix API userGroup.getList

From Planfix
Jump to: navigation, search

A function for obtaining a complete list of user groups in the account. Does not require admin rights. Request format:

<?xml version="1.0" encoding="UTF-8"?>
<request method="userGroup.getList">
  <account></account>
  <sid></sid>
  <sortType></sortType>
  <pageCurrent></pageCurrent>
  <pageSize></pageSize>
  <signature></signature>
</request>
Name Type Value Note
account string account name on which the function is performed
sid string(32) session key
sortType enum sort type optional parameter. see the list of valid values in the sorting types for groups section
pageCurrent int pagination optional parameter. values less than 1 will initiate the procedure for counting the number of elements.
pageSize int number of values returned as a result. cannot exceed 100 optional parameter. If left blank, the default value will be taken.
signature string(32) signature

Response:

<?xml version="1.0" encoding="UTF-8"?>
<response status="ok">
  <userGroups count="count" totalCount="totalCount">
    <userGroup>
      <id></id>
      <name></name>
      <userCount></userCount>
    </userGroup>
    <userGroup>
      <id></id>
      <name></name>
      <userCount></userCount>
    </userGroup>
    <!-- ... -->
  </userGroups>
</response>
Name Type Name Note
userGroups root element containing the list of groups
userGroups count int number of groups returned by the request
userGroups totalCount int number of groups satisfying the request
userGroup group element
userGroup.id int group identifier
userGroup.name string group name
userGroup.userCount int number of users in the group

For users without admin rights, the value of the userCount field will always be equal to 0 (zero).


Otherwise, a response with an error will be returned:

<?xml version="1.0" encoding="UTF-8"?>
<response status="error">
  <code></code>
</response>


Go To