Employees endpoints
The Employees endpoints enable you to retrieve a list of all Quantive Results employees or get the details of a single employee by their Id. The employee object extends the Quantive Results user object with additional information about any badges, team membership or teams the employee manages. The employee Id is equal to the User Id.
Returns a list of employees.
Supports filtering, sorting and field projection.
Parameters
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | Specifies the unique identifier (id) of the Quantive Results account. expected in header, sample value: 5be26318e5274a0007f17f61 |
filter | string | Specifies the filter in Mongo syntax.
For example, to get a single employee by their Id, use filter={"_id":"611fce386400780001b19e1e"}. expected in query, sample value: {"_id":"611fce386400780001b19e1e"} |
sort | string | Specifies the sort expression.
For example, to sort employees by their creation date user sort=dateCreated or sort=-dateCreated (to sort in descending order). expected in query, sample value: dateCreated |
fields | string | Specifies the list of fields to be returned in the response.
For example, to get only the employee's email, first and last name use fields=email,firstName,lastName expected in query, sample value: email,firstName,lastName |
skip | string | Specifies how many items to skip from the beginning of the collection.
Use this to implement paging.
For example, if you want to get employees 5-10 use skip=5&take=5.
Always sort your response to ensure that you're paging through the collection in the same order, for example sort=dateCreated&skip=5&take=5. expected in query, sample value: 5 |
take | string | Specifies how many items to take from the collection.
Use this to implement paging.
For example, if you want to get the first 10 employees use take=10.
Always sort your response to ensure that you're paging through the collection in the same order, for example sort=dateCreated&take=10. expected in query, sample value: 10 |
Expected response codes
200 | employeesResponse |
400 | bad request |
401 | unauthorized |
500 | internal server error |
curl -X GET 'https://app.quantive.com/results/api/v2/employees?filter={"_id":"611fce386400780001b19e1e"}&sort=dateCreated&fields=email,firstName,lastName&skip=5&take=10' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
var settings = { "url": "https://app.quantive.com/results/api/v2/employees?filter={"_id":"611fce386400780001b19e1e"}&sort=dateCreated&fields=email,firstName,lastName&skip=5&take=10", "method": "GET", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
}
}; $.ajax(settings).done(function (response) { console.log(response); });
NOTE: You must install the module requests.
In a terminal window do: pip install requests
import requests, json
headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };
url = "https://app.quantive.com/results/api/v2/employees"
requests.get(url, headers = headers)
{
"items": [
{
"badges": [
{
"background": "string value",
"icon": "string value",
"id": "string value",
"name": "string value",
"pattern": "string value"
}
],
"dateCreated": "string value",
"dateDeactivated": "string value",
"email": "string value",
"firstName": "string value",
"id": "string value",
"isActive": false,
"isManager": false,
"lastName": "string value",
"managedTeamIds": [
"string value 1",
"string value 2"
],
"picture": "string value",
"roles": [
{
"accountId": "string",
"description": "string value",
"id": "string",
"name": "string value",
"team": {
"ExternalTeamMapping": {
"ExternalId": "string value",
"ExternalSystem": "string value"
},
"accountId": "string",
"avatar": "string value",
"badges": [
{
"assigneeIds": [
"ID"
],
"badge": {
"accountId": "ID",
"assignmentCondition": "string value",
"background": "string value",
"icon": "string value",
"id": "ID",
"name": "string value",
"pattern": "string value",
"summary": "string value",
"type": "string value"
},
"id": "string"
}
],
"color": "string value",
"createdById": "string",
"dateCreated": "string value",
"description": "string value",
"dynamicMetricCount": 2,
"id": "string",
"isActive": {
"DateDeactivated": "string value",
"IsActive": false
},
"manager": "string",
"manualMetricCount": 2,
"members": [
"string"
],
"membersGoalCount": 2,
"mentions": {},
"modifiedById": "string",
"movedExternalMembers": [
"string"
],
"name": "string value",
"parentId": "string",
"picture": "string value",
"tags": [
{
"id": "string",
"isActive": {
"DateDeactivated": "string value",
"IsActive": false
},
"name": "string value",
"title": "string value"
}
],
"teamGoalCount": 2
}
}
],
"teamIds": [
"string value 1",
"string value 2"
]
}
],
"totalCount": 2
}
Gets an employee by its unique identifier (id).
Parameters
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | Specifies the unique identifier (id) of the Quantive Results account. expected in header, sample value: 5be26318e5274a0007f17f61 |
employeeId * | string | Specifies the employee unique identifier (id). expected in path
|
Expected response codes
200 | employeeDetailResponse |
400 | bad request |
401 | unauthorized |
402 | payment required |
403 | forbidden |
404 | not found |
500 | internal server error |
curl -X GET 'https://app.quantive.com/results/api/v1/employees/{employeeId}' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
var settings = { "url": "https://app.quantive.com/results/api/v1/employees/{employeeId}", "method": "GET", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
}
}; $.ajax(settings).done(function (response) { console.log(response); });
NOTE: You must install the module requests.
In a terminal window do: pip install requests
import requests, json
headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };
url = "https://app.quantive.com/results/api/v1/employees/{employeeId}"
requests.get(url, headers = headers)
{
"info": {
"badges": [
{
"background": "string value",
"icon": "string value",
"id": "string value",
"name": "string value",
"pattern": "string value"
}
],
"dateCreated": "string value",
"dateDeactivated": "string value",
"email": "string value",
"firstName": "string value",
"id": "string value",
"isActive": false,
"isManager": false,
"lastName": "string value",
"managedTeamIds": [
"string value 1",
"string value 2"
],
"picture": "string value",
"roles": [
{
"accountId": "string",
"description": "string value",
"id": "string",
"name": "string value",
"team": {
"ExternalTeamMapping": {
"ExternalId": "string value",
"ExternalSystem": "string value"
},
"accountId": "string",
"avatar": "string value",
"badges": [
{
"assigneeIds": [
"ID"
],
"badge": {
"accountId": "ID",
"assignmentCondition": "string value",
"background": "string value",
"icon": "string value",
"id": "ID",
"name": "string value",
"pattern": "string value",
"summary": "string value",
"type": "string value"
},
"id": "string"
}
],
"color": "string value",
"createdById": "string",
"dateCreated": "string value",
"description": "string value",
"dynamicMetricCount": 2,
"id": "string",
"isActive": {
"DateDeactivated": "string value",
"IsActive": false
},
"manager": "string",
"manualMetricCount": 2,
"members": [
"string"
],
"membersGoalCount": 2,
"mentions": {},
"modifiedById": "string",
"movedExternalMembers": [
"string"
],
"name": "string value",
"parentId": "string",
"picture": "string value",
"tags": [
{
"id": "string",
"isActive": {
"DateDeactivated": "string value",
"IsActive": false
},
"name": "string value",
"title": "string value"
}
],
"teamGoalCount": 2
}
}
],
"teamIds": [
"string value 1",
"string value 2"
]
}
}
Oops! Looks like there are no API calls of that type for this Endpoint