Assignees endpoints

Assignees is a special object used in Gtmhub 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 Gtmhub). If needed, you can filter the response using ?filter={type:"user"} or ?filter={type:"team"}.

Gets all assignees in the current gtmhub account.
stringSpecifies the unique identifier (id) of the Gtmhub account.
expected in header, sample value:
fieldsstringList of fields to be retrieved, separated by comas (,).
expected in query, sample value:
sortstringList 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:
filterstringThe 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"]}}
skipintegerHow many entities to be skipped when executing a GET query. By default skip value is 0.
expected in query, sample value:
limitintegerThe max number of entities that can be returned by the GET query. By default take value is 100.
expected in query, sample value:
formattingstringThe formatting used for the description and custom fields of type text area. By default returned as 'mentionsMarkup'. Ex: "@[John Smith:[email protected]:602a65efc05575000123291b]". Use 'plainText' if you need the response to be returned without markdown and special markup. Ex: "@John Smith"
expected in query, sample value:
Expected response codes
400bad request error message.
500internal server error message.

curl -X GET ',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": ",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 = ""

requests.get(url, headers = headers)