Assignees endpoints
Assignees is a special object used in Quantive Results to represent ownership. Working with the Assignees endpoints is the recommended approach when you need to set the OwnerIds property of an Objective, Key Result, or Task to be the assignee Id. The Id of an assignee is the same as the Id of the user or team it represents. For example, when you select to assign an OKR or Task to someone in the UI, the selector is populated by a GET on the /assignees endpoint.
By default when you work with the Assignees endpoints, the response will contain both users and teams (as they can both be owners of an item in Quantive Results). If needed, you can filter the response using ?filter={type:"user"} or ?filter={type:"team"}.
Gets all assignees in the current gtmhub account.
Parameters
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | Specifies the unique identifier (id) of the Quantive Results account. expected in header, sample value: 5be26318e5274a0007f17f61 |
fields | string | List of fields to be retrieved, separated by comas (,). expected in query, sample value: name,description |
sort | string | List of fields separated by comas (,).
To invert a field's sort, you can prefix its name with a minus (-).
For example, the following expression: sort=-name,dateCreated would return entities in reverse lexicographical order and then ordered by dateCreated. expected in query, sample value: -name,dateCreated |
filter | string | The format of the parameter is inspired by the MongoDB query format.
For example, the following expression {name: {$in: ["sales", "marketing"]}} would return all the entities that have name either "sales" or "marketing".
This expression {"name":{$regex:".*Sales.*"}} would return entities that contain "Sales" in their names. expected in query, sample value: {name: {$in: ["sales", "marketing"]}} |
skip | integer | How many entities to be skipped when executing a GET query.
By default skip value is 0. expected in query, sample value: 5 |
limit | integer | The max number of entities that can be returned by the GET query.
By default take value is 100. expected in query, sample value: 10 |
formatting | string | The formatting used for the description and custom fields of type text area.
By default returned as 'mentionsMarkup'.
Ex: "@[John Smith:john.smith@okrs.tech:602a65efc05575000123291b]".
Use 'plainText' if you need the response to be returned without markdown and special markup.
Ex: "@John Smith" expected in query, sample value: plainText |
Expected response codes
200 | assigneesResponse |
400 | bad request |
401 | unauthorized |
500 | internal server error |
curl -X GET 'https://app.quantive.com/results/api/v2/assignees?fields=name,description&sort=-name,dateCreated&filter={name: {$in: ["sales", "marketing"]}}&skip=5&limit=10&formatting=plainText' \ -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/assignees?fields=name,description&sort=-name,dateCreated&filter={name: {$in: ["sales", "marketing"]}}&skip=5&limit=10&formatting=plainText", "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/assignees"
requests.get(url, headers = headers)
{
"items": [
{
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dateDeactivated": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"items": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"items": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"items": [
{
"createdBy": "ID",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"items": [
"tagResponse"
],
"name": "string value",
"title": "string value"
}
],
"name": "string value",
"title": "string value"
}
],
"name": "string value",
"title": "string value"
}
],
"name": "string value",
"title": "string value"
}
],
"type": "string value"
}
],
"totalCount": 2
}
Oops! Looks like there are no API calls of that type for this Endpoint