Get People Directory filters
OVERVIEW
Overview
Get the list of available filters for a People Directory. This API call is used to retrieve a contextual link of available filters for a People Directory, and a subset of available filters when certain filter constraints are applied.
Since v4.7
HTTP Request
GET /api/2/people/<ID>/filters?{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 the 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 the 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 the 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 the 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. |
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 Directory Filter object
(Example below)
Error
Example HTTP Request & Response
GET http://example.com/context/api/2/people/1/filters
JSON Response
{
"filterset": {
"alphabets": [
"A",
"B",
"C",
"D",
"E",
"F",
"G",
"I",
"J",
"K",
"M",
"P",
"R",
"S",
"U",
"V",
"W"
],
"jobtitles": [
"IT Manager",
"UI Developer"
],
"departments": [
"HR",
"IT"
],
"organisations": [
"HighQ"
],
"locations": [
"London",
"Ahmedabad"
],
"specialities": [
"First Aid",
"French",
"UX Design",
"Litigation"
]
}
}
Comments
0 Comments