The Perform & Engage 365 API enables you to:
Get a list of users
GET /api/v2/users/
This request enables you to get a list of users from your organization.
Optional query parameters
- name (string). The case-insensitive user's name or part of its name.
- department_name (string). The case-insensitive department name or part of its name.
- manager_name (string). The case-insensitive name or part of the name of the user's manager.
- is_active (boolean). It states if the user is active (true) or not (false).
- limit (integer). The maximum number of users in the response.
- offset (integer). The initial index from which the results are returned in the response.
Request example
GET /api/v2/users/?department_name=it&is_active=true&manager_name=Jamie& name=Adele%20Vance
Response body parameters
The response body includes:
- count (integer). The number of results.
- next and previous (strings). URLs to the next and previous pages (if you used pagination in the original request).
-
results (array). The list of users. Each user has these parameters:
- api_id (string). The user's ID. You can use this ID to get more details about the user.
- name (string). The user's full name.
- email (string). The user's email address.
-
departments (array). The list of departments to which the user belongs. Each department has these parameters:
- api_id (string). The department ID. You can use this ID to get more details about the department.
- name (string). The department name.
-
manager (object). The user's manager details have these parameters:
- name (string). The manager's full name.
- email (string). The manager's email address.
- api_id (string). The manager's ID. You can use this ID to get more details about the manager.
Response body example
The successful 200 response returns the body similar to this:
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"api_id": "c5b6c1bc-98a4-4e3b-ab17-54fa0c48b2a1",
"name": "Adele Vance",
"email": "adelevance@test.com",
"departments": [
{
"api_id": "6d0b534c-3d68-400c-a792-d7b88b2dac5b",
"name": "IT"
}
],
"manager": {
"name": "Jamie Jones",
"email": "test@test.com",
"api_id": "4c8c3ea5-d584-4ba2-b184-2280d53bbda3"
},
"is_active": true
}
]
}
Get the details of a particular user by their ID
GET /api/v2/users/{api_id}
After getting the user's api_id in the response to the previous request, you can use this ID to get more information about the user.
Required path parameter
- api_id (string). The user's ID you can get by sending the GET /api/v2/users/ request.
Request example
GET /api/v2/users/c5b6c1bc-98a4-4e3b-ab17-54fa0c48b2a1
Response body parameters
In addition to the same parameters as the results array in the GET /api/v2/users/ response includes, the GET api/v2/users/{api_id}/ response includes:
- person_properties (array). The user's properties as the name and value pairs of string parameters. For example, it could be the user's role at the company.
-
followed_by (array) and following (array). The list of users who follow the current user and whom the current user follows, respectively. Each user in these arrays has these parameters:
- name (string). The user's full name.
- email (string). The user's email address.
- api_id (string). The user's ID. You can use this ID to get more details about the user.
Response body example
The successful 200 response returns the body similar to this:
{
"api_id": "c5b6c1bc-98a4-4e3b-ab17-54fa0c48b2a1",
"name": "Adele Vance",
"email": "adelevance@test.com",
"departments": [
{
"api_id": "6d0b534c-3d68-400c-a792-d7b88b2dac5b",
"name": "IT"
}
],
"manager": {
"name": "Jamie Jones",
"email": "test@test.com",
"api_id": "4c8c3ea5-d584-4ba2-b184-2280d53bbda3"
},
"is_active": true,
"person_properties": [
{
"name": "Role",
"value": "Operations Manager"
}
],
"followed_by": [
{
"name": "Joanne Stefani",
"email": "jstefani@test.com",
"api_id": "69da2b54-eaa9-467d-9027-7e4597cbf785"
}
],
"following": [
{
"name": "Michael Testman",
"email": "mtestmann@test.com",
"api_id": "f88ab8b9-4e41-4025-ad77-519006ba855f"
}
]
}
Comments
Article is closed for comments.