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 |
401 | unauthorized |
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 |
401 | unauthorized |
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 |
400 | bad request |
401 | unauthorized |
403 | forbidden |
404 | not found |
500 | internal server error |
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 |
401 | unauthorized |
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,
"supportedOperators": [
"string value 1",
"string value 2"
]
}
],
"customFieldsTotalCount": 2,
"fields": [
{
"dataType": "string value",
"defaultOperator": "string value",
"displayName": "string value",
"fieldName": "string value",
"isCustom": false,
"isFilterable": false,
"isSelectable": false,
"isSortable": false,
"supportedOperators": [
"string value 1",
"string value 2"
]
}
],
"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 |
401 | unauthorized |
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 |
401 | unauthorized |
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)
{}
Loads the list data using the filter, 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.
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 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 |
401 | unauthorized |
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 |
401 | unauthorized |
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