Site users management - Get all site users
OVERVIEW
Method to obtain a list of site users
Request URI
GET /api/3/sites/{siteid}/users
Request parameters
Parameter | Value | Description |
---|---|---|
siteid | integer | The ID of the site. The siteid can be obtained by calling the Get site list API |
invitationnotsent (optional) |
boolean (true/false) | A list of all users to whom an invitation is not sent |
unallocatedusers (optional) |
boolean (true/false) | A list of users who are not a member of any groups in the site |
notloggedin (optional) |
boolean (true/false) | A list of users who have never logged in to the site |
suspendedusers (optional) |
boolean (true/false) | A list of suspended users of the site |
groupid (optional) |
integer | A integer value representing a group, the group id can be obtained by calling the Get all site groups API |
organisationid (optional) |
integer | A integer value representing an organisation in the Collaborate instance, the ID can be obtained by calling the Get Organisations API. |
activeusers (optional) |
boolean (true/false) | A list of active users of the site |
orderby (optional) |
String | Can be ordered asc (ascending) or desc (descending). The default is ascending |
ordertype (optional) |
String | The order type is fullname, organisation, invited, lastlogin. The default is organisation |
limit (optional) |
integer | The number of items to return in an individual get call |
offset(starting position) (optional) |
integer | The starting position of the user list from when the user list should be returned. This is to allow pagination |
q (optional) | String | Text that will be searched against first name, last name, email and organisation to filter out users. Available from collaborate version 5.0 |
Notes
- The value of limit parameter behaves as follows:
limit =100 is the default value
if limit>0 then (number of items returned is equal to limit)
if limit=-1 then return all records
if limit <-1 then the system returns the default no of items i.e 100 - The value of the offset parameter behaves as below
(Default) offset =0
if the offset is higher than 0 then the records are returned from the offset value
if offset is lower than 0 then an offset value of 0 is set - Default value for orderby parameter is asc (ascending)
- Default value for ordertype parameter is organisation (organisation name)
- In limit parameter if the limit is 0, it will display a validation message stating that the "limit provided is invalid"
Response
The response contains a list of site users.
Mark Salamon Was just playing around with this to see if there was some hack I could get working along these lines.There is obviously no way of passing an array of org idsto the path parameter, and we cannot pass an 'OR' operator in the q param either. You would have to gather the orgids in advance and then make multiple calls to this endpoint (one for each org ID).
If you only had one internal org, you would be laughing, but I suspect you dont, as you probably wouldn't have asked otherwise!
Enhancement request for Imran Aziz :)
A useful filtering condition for this call would be the ability to limit the users returned to only internal or only external users (like internal=true|false). alternatively, to return all users except those in a specific organization.
Comments
2 Comments