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 https://api.supermetrics.com/enterprise/v2/team/lists
Response
PropertyTypeDescription
meta > request_idstring API request ID
datateam_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

GET https://api.supermetrics.com/enterprise/v2/team/list/:list_id
  • list_id string
    Supermetrics team list ID
Response
PropertyTypeDescription
meta > request_idstring API request ID
datateam_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

LIST_NOT_FOUND

Permissions

team_lists_read


Add team list

POST https://api.supermetrics.com/enterprise/v2/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

HTTP 201 Created
Response from Get team list

Errors

LIST_CREATE_FAILED, LIST_SLUG_EXISTS, LIST_SLUG_INVALID, LIST_SLUG_RESERVED

Permissions

team_lists_write


Update team list

PATCH https://api.supermetrics.com/enterprise/v2/team/list/:list_id
  • 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

HTTP 200 OK
Response from Get team list

Errors

LIST_NOT_FOUND, LIST_UPDATE_FAILED

Permissions

team_lists_write


Remove team list

DELETE https://api.supermetrics.com/enterprise/v2/team/list/:list_id
  • 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.

GET https://api.supermetrics.com/enterprise/v2/team/list/:list_id/data/account_ids
  • list_id string
    Supermetrics team list ID
Response
PropertyTypeDescription
meta > request_idstring API request ID
datastring List source data
HTTP 200 OK
{
    "meta": {
        "request_id": "WnjTGeKqOXTnkZQMbZCfVMdmswv2wAzx"
    },
    "data": "Database\nFacebook Public Data\nGoogle+ Public Data\nInstagram\n"
}
Errors

LIST_NOT_FOUND

Permissions

team_lists_read


Set list data for account IDs

This endpoint applies only to list type account_ids.

PUT https://api.supermetrics.com/enterprise/v2/team/list/:list_id/data/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 referenceDescription
list.all_accountsAll accounts, only for data sources which receive a list of accounts from the data source API
list.all_active_accountsAll 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 IDDescription
APIWhen list is shown for API, it's visible in Query Manager
DWHWhen list is shown for DWH, it's visible in the Data warehouse transfer create/edit pages
MNDWhen list is shown for MND, it's visible in Monday.com integration

Object reference

team_list
PropertyTypeDescription
list_idstring Supermetrics list ID
list_slugstring User-defined ID, used to reference list in queries
list_namestring List name
list_typestring List type. See list types for more.
ds_idstring Data source ID. See data sources for more. When value is an empty string, list is global, and available for all data sources.
ds_namestring Data source name. Empty string when list is global.
show_in_productsstring[] List of Supermetrics products this list should be shown in. If empty, not shown in any product. See supported products for more.

Errors

StatusErrorDescription
500LIST_CREATE_FAILEDFailed to create team list due to an internal error. Please try again.
404LIST_NOT_FOUNDRequested team list was not found.
409LIST_SLUG_EXISTSProvided team list slug value already exists for specified data source ID.
400LIST_SLUG_INVALIDProvided team list slug value contains invalid characters.
409LIST_SLUG_RESERVEDProvided team list slug value is reserved for system use.
500LIST_UPDATE_FAILEDFailed to update team list due to an internal error. Please try again.
Last updated 2022-10-19 UTC.