Lists endpoints
Gets all lists in the current Gtmhub account.
Parameters
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | Specifies the unique identifier (id) of the Gtmhub account. expected in header, sample value: 5be26318e5274a0007f17f61 |
Expected response codes
200 | listsResponse |
400 | bad request |
401 | unauthorized |
402 | payment required |
403 | forbidden |
500 | internal server error |
curl -X GET 'https://app.gtmhub.com/api/v1/lists' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
var settings = { "url": "https://app.gtmhub.com/api/v1/lists", "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.gtmhub.com/api/v1/lists"
requests.get(url, headers = headers)
{
"items": {},
"totalCount": 2
}
Gets all types that are supported by the lists api.
Parameters
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | Specifies the unique identifier (id) of the Gtmhub account. expected in header, sample value: 5be26318e5274a0007f17f61 |
Expected response codes
200 | supportedTypesResponse |
400 | bad request |
401 | unauthorized |
402 | payment required |
403 | forbidden |
500 | internal server error |
curl -X GET 'https://app.gtmhub.com/api/v1/lists/supported-types' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
var settings = { "url": "https://app.gtmhub.com/api/v1/lists/supported-types", "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.gtmhub.com/api/v1/lists/supported-types"
requests.get(url, headers = headers)
{
"supportedTypes": [
"string value 1",
"string value 2"
]
}
Gets a list by its ID in the current Gtmhub account.
Parameters
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | Specifies the unique identifier (id) of the Gtmhub account. expected in header, sample value: 5be26318e5274a0007f17f61 |
Expected response codes
200 | listResponse |
401 | unauthorized |
curl -X GET 'https://app.gtmhub.com/api/v1/lists/{listId}' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
var settings = { "url": "https://app.gtmhub.com/api/v1/lists/{listId}", "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.gtmhub.com/api/v1/lists/{listId}"
requests.get(url, headers = headers)
{}
Gets the schema for specified target type.
Parameters
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | Specifies the unique identifier (id) of the Gtmhub account. expected in header, sample value: 5be26318e5274a0007f17f61 |
Expected response codes
200 | schemaResponse |
400 | bad request |
401 | unauthorized |
402 | payment required |
403 | forbidden |
500 | internal server error |
curl -X GET 'https://app.gtmhub.com/api/v1/lists/{targetType}/schema' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
var settings = { "url": "https://app.gtmhub.com/api/v1/lists/{targetType}/schema", "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.gtmhub.com/api/v1/lists/{targetType}/schema"
requests.get(url, headers = headers)
{
"customFieldsProperties": [
{
"dataType": "string value",
"defaultOperator": "string value",
"displayName": "string value",
"fieldName": "string value",
"isCustom": false,
"isFilterable": false,
"isSelectable": false,
"isSortable": false,
"operationalType": "string value",
"supportedOperators": [
"string value 1",
"string value 2"
],
"targetIds": [
"string"
]
}
],
"customFieldsTotalCount": 2,
"fields": [
{
"dataType": "string value",
"defaultOperator": "string value",
"displayName": "string value",
"fieldName": "string value",
"isCustom": false,
"isFilterable": false,
"isSelectable": false,
"isSortable": false,
"operationalType": "string value",
"supportedOperators": [
"string value 1",
"string value 2"
],
"targetIds": [
"string"
]
}
],
"totalCount": 2,
"type": "string value"
}
Creates a new list in the current Gtmhub account.
To get an example how to specify a list filter, load an existing list using the /lists/{id}/load endpoint and inspect its filter definition.
Parameters
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | Specifies the unique identifier (id) of the Gtmhub account. expected in header, sample value: 5be26318e5274a0007f17f61 |
Expected response codes
201 | listResponse |
400 | bad request |
401 | unauthorized |
402 | payment required |
403 | forbidden |
500 | internal server error |
curl -X POST 'https://app.gtmhub.com/api/v1/lists' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
var settings = { "url": "https://app.gtmhub.com/api/v1/lists", "method": "POST", "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.gtmhub.com/api/v1/lists"
requests.post(url, headers = headers)
{}
Clones a list with the specified ID into a new list.
Parameters
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | Specifies the unique identifier (id) of the Gtmhub account. expected in header, sample value: 5be26318e5274a0007f17f61 |
Expected response codes
201 | listResponse |
400 | bad request |
401 | unauthorized |
402 | payment required |
403 | forbidden |
404 | not found |
500 | internal server error |
curl -X POST 'https://app.gtmhub.com/api/v1/lists/{id}/clone' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
var settings = { "url": "https://app.gtmhub.com/api/v1/lists/{id}/clone", "method": "POST", "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.gtmhub.com/api/v1/lists/{id}/clone"
requests.post(url, headers = headers)
{}
DEPRECATED
Loads the list data using the filters, sort and projection expressions coming from the request body. If there are no query expressions in the request body those that are saved in the list are applied.
This endpoint is deprecated.
Use GET Goals V2 instead for objectives.
Use GET Metrics V2 instead for key results.
Use GET Tasks V2 instead for tasks.
Use GET Employees V2 instead for employees.
Use GET Teams V2 instead for teams.
Parameters
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | Specifies the unique identifier (id) of the Gtmhub account. expected in header, sample value: 5be26318e5274a0007f17f61 |
Expected response codes
200 | listResponse |
400 | bad request |
401 | unauthorized |
402 | payment required |
403 | forbidden |
500 | internal server error |
curl -X POST 'https://app.gtmhub.com/api/v1/lists/{id}/load' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
var settings = { "url": "https://app.gtmhub.com/api/v1/lists/{id}/load", "method": "POST", "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.gtmhub.com/api/v1/lists/{id}/load"
requests.post(url, headers = headers)
{}
Updates fields of a list, specified by its ID
Parameters
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | Specifies the unique identifier (id) of the Gtmhub account. expected in header, sample value: 5be26318e5274a0007f17f61 |
Expected response codes
200 | listResponse |
400 | bad request |
401 | unauthorized |
402 | payment required |
403 | forbidden |
404 | not found |
500 | internal server error |
curl -X PATCH 'https://app.gtmhub.com/api/v1/lists/{id}' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
var settings = { "url": "https://app.gtmhub.com/api/v1/lists/{id}", "method": "PATCH", "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.gtmhub.com/api/v1/lists/{id}"
requests.patch(url, headers = headers)
{}
Deletes a list with the specified ID.
Parameters
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | Specifies the unique identifier (id) of the Gtmhub account. expected in header, sample value: 5be26318e5274a0007f17f61 |
Expected response codes
204 | no content |
400 | bad request |
401 | unauthorized |
402 | payment required |
403 | forbidden |
500 | internal server error |
curl -X DELETE 'https://app.gtmhub.com/api/v1/lists/{id}' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
var settings = { "url": "https://app.gtmhub.com/api/v1/lists/{id}", "method": "DELETE", "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.gtmhub.com/api/v1/lists/{id}"
requests.delete(url, headers = headers)
Oops! Looks like there are no API calls of that type for this Endpoint