Get User list
OVERVIEW
Overview
Get a list of users from Publisher
This API call is used to retrieve a list of users from the system.
Since v4.6
HTTP Request
GET /api/2/users?{parameters}
URL Query Parameters
Parameter | Format | Description |
---|---|---|
organisations | String | Organisations, if more than one is specified, this should be in a comma separated list |
organisationgroups | String | Organisation Groups, if more than one is specified, this should be in a comma separated list |
usergroups | String | User Groups, if more than one is specified, this should be in a comma separated list |
departments | String | Departments, if more than one is specified, this should be in a comma separated list |
locations | String | Locations, if more than one is specified, this should be in a comma separated list. This will be a search across any of the fields within the Organisation location. |
search | String | Will search across all user fields for a matching string. This should be the same search. |
status | String | Status: active | archive | disable | suspended |
sort | String |
Allow ascending and descending sorting for a single field. GET /api/2/users?sort=-lastname This returns a list of users sorted by descending lastname. Possible fields: firstname, lastname, email, status, organisation, invited, last login, created, updated |
fields | String |
To reduce the network traffic for mobile devices, we can reduce the number of fields returned. If no fields are specified, a User summary Object will be returned for all users If "all" is specified, the full User Object will be returned for all users GET /api/2/users?fields=id,firstname,lastname,email |
limit | String |
Limits the number of users returned. GET /api/2/users?offset=10&limit=5 Default: 200 |
offset | String |
Allows paging of users. GET /api/2/users?offset=10&limit=5 Default: 0 |
createddate | String |
Date String within a range. Possible values are:
GET /api/2/users?createdDate=lastweek |
modifieddate | String |
Date String within a range. Possible values are:
GET /api/2/users?modifiedDate=lastweek |
inviteddate | String |
Date String within a range. Possible values are:
GET /api/2/users?invitedDate=lastweek |
lastLogindate | String |
Date String within a range. Possible values are:
GET /api/2/users?lastLoginDate=lastweek |
HTTP Headers
HTTP Request Header | Description | Example |
---|---|---|
Authorization | The API Authorisation token | "Bearer XXXXXXXXXXXXX" |
Accept |
The format of the expected response.
If no parameter is set, JSON is the default response given. |
"application/xml" |
Content-Type |
The format of the provided content.
If no parameter is set, JSON is the expected content by default. |
"application/json" |
HTTP Response
Success
HTTP response 200 with a list of User summary Objects
(Example below)
Error
Example HTTP Request & Response
Query: (Organisations == (HighQ OR Law Firm)) AND (Locations == (London OR New York OR Ahmedabad))
JSON Response
{
"total": 2,
"currentpage": 0,
"users": [
{
"id": 3,
"email": "user@domain.com",
"link": "https://example.com/context/api/2/users/3"
},
{
"id": 4,
"email": "user2@domain.com",
"link": "https://example.com/context/api/2/users/4"
}
]
}
XML Response
<users>
<total>2</total>
<currentpage>0</currentpage>
<user>
<id>3</id>
<email>user@domain.com</email>
<link>https://example.com/context/api/2/users/3</link>
</user>
<user>
<id>4</id>
<email>user2@domain.com</email>
<link>https://example.com/context/api/2/users/4</link>
</user>
<users>
Comments
0 Comments