Planfix API userGroup.getList: Difference between revisions
From Planfix
(Created page with "A function for obtaining a complete list of user groups in the account. Does not require admin rights. Request format: <source lang="xml"> <?xml version="1.0" encoding="UTF-8"?> <request method="userGroup.getList"> <account></account> <sid></sid> <sortType></sortType> <pageCurrent></pageCurrent> <pageSize></pageSize> <signature></signature> </request> </source> {| class="wikitable" style="margin-top: 1em; width:100% " !width="150"|Name !!width="200"| Type !!w...") |
No edit summary |
||
Line 18: | Line 18: | ||
| sid|| string(32) || session key|| | | sid|| string(32) || session key|| | ||
|- | |- | ||
|sortType ||enum ||sort type ||optional parameter. see the list of valid values in the [[Planfiix API: | |sortType ||enum ||sort type ||optional parameter. see the list of valid values in the [[Planfiix API:Sorting types for groups|sorting types for groups]] section | ||
|- | |- | ||
|pageCurrent || int|| pagination ||optional parameter. values less than 1 will initiate the procedure for counting the number of elements. | |pageCurrent || int|| pagination ||optional parameter. values less than 1 will initiate the procedure for counting the number of elements. |
Latest revision as of 13:24, 9 April 2024
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>