Get People Directory people list
OVERVIEW
Overview
Get a list of users from a People Directory. This API call is used to retrieve a list of people from a People Directory.
Since v4.7
HTTP Request
GET /api/2/people/<ID>?{parameters}
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the people directory to retrieve (Currently must be set to "1" - this allows for future scope of having multiple people directories) |
URL Query Parameters
Parameter | Format | Description |
---|---|---|
alphabets | Char |
Filters the list of people based on the first character of their last name, only accepts a single character a-z. GET /api/2/people/1?alphabets=c This will get the people whose last name starts with 'C' |
jobTitle | String |
Filters the users in people directory based on their Job Title by performing an exact search on the jobtitle field, if more than one is specified, this should be in a comma separated list GET /api/2/people/1?jobTitle=IT%20Manager,PM This will get the users who either have Job Title 'IT Manager' or 'PM'. |
organisations | String |
Filters the users in people directory based on the organisations by performing an exact search on the organisations field, if more than one is specified, this should be in a comma separated list GET /api/2/people/1?organisations=highq This will get the users from the people directory who belong to the HighQ Organisation. |
departments | String |
Filters the users in the people directory based on their department by performing an exact search on the department field, if more than one is specified, this should be in a comma separated list GET /api/2/people/1?departments=HR,IT This will get the users from the people directory that are in the 'HR' or 'IT' departments |
locations | String |
Filters the users in people directory based on their location. This performs an exact search on the location value in the city field of the users address, if more than one location is specified, this should be in a comma separated list GET /api/2/people/1?locations=ahmedabad,london This will get the users from the people directory who are located in Ahmedabad or in London. |
specialities | String |
Filters the users in people directory based on their specialities, if more than one speciality is specified, this should be in a comma separated list. GET /api/2/people/1?specialities=finance This will get the users from the people directory who have 'finance' in his/her specialities. |
offset | String |
Allows paging of users. GET /api/2/users?offset=10 Default: 0 |
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" |
HTTP Response
Success
HTTP response 200 with People object list
(Example below)
Error
Example HTTP Request & Response
GET http://example.com/context/api/2/people/1?alphabets=n
JSON Response
{
"total": 1,
"currentpage": 0,
"users": [
{
"id": 3,
"name": {
"firstname": "User",
"lastname": "Name",
"title": "Dr"
},
"email": "user.name@domain.com",
"organisation": {
"orgname": "Organisation Pty Ltd",
"organisationimage": "https://example.com/context/organisationLogoDownload.action?orgId=10&logoSize=120×tamp=1522748798365"
},
"location": {
"addressid": 0,
"addressline1": "2nd Floor",
"addressline2": "55 King William Street",
"city": "London",
"country": "United Kingdom"
},
"img": "https://example.com/context/images/v4/common/emptyUserAvatar/emptyUserAvatar128_128.png",
"profilelink": "https://example.com/context/user/username",
"minicardlink": "showUserMiniCard(this,'BdrzDO5TGpg%3D');return false;"
}
]
}
Comments
0 Comments