Manage team lists
Team lists are user-defined, centralized lists, that can be used in queries to reference a list of saved values.
{"ds_accounts": "list.my_list_slug"}
- List team lists
- Get team list
- Add team list
- Update team list
- Remove team list
- Get list data for account IDs
- Set list data for account IDs
- Built-in lists
- Supported types
- Supported products
- Object reference
- Errors
List team lists
Response
Property | Type | Description |
meta > request_id | string | API request ID |
data | team_list[] | Team list objects |
HTTP 200 OK
{
"meta": {
"request_id": "WnjTGeKqOXTnkZQMbZCfVMdmswv2wAzx"
},
"data": [
{
"list_id": "tml_1",
"list_slug": "my_list_slug",
"list_name": "My list of accounts",
"list_type": "account_ids",
"ds_id": "",
"ds_name": "",
"show_in_products": [
"API"
]
},
{
"list_id": "tml_2",
"list_slug": "my_list_slug",
"list_name": "My list of accounts for Google Analytics",
"list_type": "account_ids",
"ds_id": "GA",
"ds_name": "Google Analytics",
"show_in_products": [
"API"
]
}
]
}
Permissions
team_lists_read
Get team list
-
list_id
string
Supermetrics team list ID
Response
Property | Type | Description |
meta > request_id | string | API request ID |
data | team_list | Team list object |
HTTP 200 OK
{
"meta": {
"request_id": "WnjTGeKqOXTnkZQMbZCfVMdmswv2wAzx"
},
"data": {
"list_id": "tml_2",
"list_slug": "my_list_slug",
"list_name": "My list of accounts for Google Analytics",
"list_type": "account_ids",
"ds_id": "GA",
"ds_name": "Google Analytics",
"show_in_products": [
"API"
]
}
}
Errors
Permissions
team_lists_read
Add team list
-
list_slug
string
Required. User-defined ID, used to reference list in queries. Restricted to characters A-Z, a-z, 0-9 and _.
-
list_name
string
Required. List name, used in product UI.
-
list_type
string
Required. List type, see supported types for more.
-
ds_id
string
Optional. Data source ID. See data sources for more. If not provided or an empty string, list is global, and available for all data sources.
-
show_in_products
string | string[]
Optional. List of Supermetrics products this list should be shown in. If not provided or an empty list, not shown in any product.
Request
POST https://api.supermetrics.com/enterprise/v2/team/list
Authorization: Bearer <your api key>
Content-Type: application/json
{
"list_slug": "my_list_slug",
"list_name": "My List Name",
"list_type": "account_ids",
"ds_id": "GA",
"show_in_products": "API"
}
Response
Errors
LIST_CREATE_FAILED, LIST_SLUG_EXISTS, LIST_SLUG_INVALID, LIST_SLUG_RESERVED
Permissions
team_lists_write
Update team list
-
list_name
string
Required. List name, used in product UI.
-
show_in_products
string | string[]
Optional. List of Supermetrics products this list should be shown in. If not provided or an empty list, not shown in any product.
Request
PATCH https://api.supermetrics.com/enterprise/v2/team/list/tml_2
Authorization: Bearer <your api key>
Content-Type: application/json
{
"show_in_products": "API, DWH"
}
Response
Errors
LIST_NOT_FOUND, LIST_UPDATE_FAILED
Permissions
team_lists_write
Remove team list
-
link_id
string
Supermetrics team list ID
Response
204 No Content
Errors
LIST_NOT_FOUND, LIST_UPDATE_FAILED
Permissions
team_lists_write
Get list data for account IDs
This endpoint applies only to list type account_ids.
-
list_id
string
Supermetrics team list ID
Response
Property | Type | Description |
meta > request_id | string | API request ID |
data | string | List source data |
HTTP 200 OK
{
"meta": {
"request_id": "WnjTGeKqOXTnkZQMbZCfVMdmswv2wAzx"
},
"data": "Database\nFacebook Public Data\nGoogle+ Public Data\nInstagram\n"
}
Errors
Permissions
team_lists_read
Set list data for account IDs
This endpoint applies only to list type account_ids.
-
list_id
string
Supermetrics team list ID
-
data
string
Required. List source data, where values are separated by line feeds. Data for query runtime is stored with trimmed and deduplicated values. When case-insensitive duplicates are found, first value is kept.
Request
PUT https://api.supermetrics.com/enterprise/v2/team/list/tml_2/data/account_ids
Authorization: Bearer <your api key>
Content-Type: application/json
{
"data": "Database\nFacebook Public Data\nGoogle+ Public Data\nInstagram\n"
}
Response
204 No Content
Permissions
team_lists_write
Built-in lists
The following team lists are automatically available, and their names are reserved for system use.
List reference | Description |
list.all_accounts | All accounts, only for data sources which receive a list of accounts from the data source API |
list.all_active_accounts | All active accounts. For the list to work as intended, data source must support setting exclude_inactive_accounts. |
Supported types
Team list behaviour depends on the list type.
account_ids
Data source account ID values. This list can appear in the account selection UI for selected Supermetrics products.
Query parameters
List can be referenced in queries as an account, by using the slug name and a list.-prefix. If multiple lists are found, data source specific one is preferred.
{"ds_accounts": "list.my_list_slug"}
Data endpoints
Supported products
Product ID | Description |
API | When list is shown for API, it's visible in Query Manager |
DWH | When list is shown for DWH, it's visible in the Data warehouse transfer create/edit pages |
MND | When list is shown for MND, it's visible in Monday.com integration |
Object reference
team_list
Property | Type | Description |
list_id | string | Supermetrics list ID |
list_slug | string | User-defined ID, used to reference list in queries |
list_name | string | List name |
list_type | string | List type. See list types for more. |
ds_id | string | Data source ID. See data sources for more. When value is an empty string, list is global, and available for all data sources. |
ds_name | string | Data source name. Empty string when list is global. |
show_in_products | string[] | List of Supermetrics products this list should be shown in. If empty, not shown in any product. See supported products for more. |
Errors
Status | Error | Description |
500 | LIST_CREATE_FAILED | Failed to create team list due to an internal error. Please try again. |
404 | LIST_NOT_FOUND | Requested team list was not found. |
409 | LIST_SLUG_EXISTS | Provided team list slug value already exists for specified data source ID. |
400 | LIST_SLUG_INVALID | Provided team list slug value contains invalid characters. |
409 | LIST_SLUG_RESERVED | Provided team list slug value is reserved for system use. |
500 | LIST_UPDATE_FAILED | Failed to update team list due to an internal error. Please try again. |