Supermetrics

App · 25 actions

Query marketing data and discover Supermetrics data sources, fields, accounts and saved queries.

Actions

ActionWhat it does
Create a new account tagCreate an account tag.
Delete an account tagDelete an account tag.
Get accountsList the data source logins available to you and the accounts each one can reach.
Get available sourcesList the data sources and destinations available for a Hub transfer.
Get fieldsList the standard and custom fields available for a data source.
Get loginGet the details of one data source login.
Get queryGet one saved query.
Get query resultsGet the results of a recently run query, in the format it was requested in.
Get query statusGet the status and results of a query running in the background.
Get release statusesList the release statuses you can filter a data source search by.
Get search categoriesList the categories you can filter a data source search by.
Get search tagsList the tags you can filter a data source search by.
Get segmentsList your team's data source logins and the segments available for each.
Get transfer configurationGet the full configuration of an existing Hub transfer.
Get transfer optionsGet the settings available for a Hub transfer from a given data source to a given destination.
Get transfer run detailsGet one run of a transfer that belongs to your team, with its status, timing, row counts and the details of each query it ran.
List all account tags in a teamList all of your team's account tags.
List login accountsList the stored accounts for a data source login.
List loginsList all of your team's data source logins.
List queriesList your saved queries.
List transfer runsList the runs of one of your team's transfers between a start and end date, 100 a page by default and up to 10,000.
List transfersList your team's transfers that haven't been deleted, with basic details for each.
Query dataRun a query against a data source and return the data.
Search data sourcesSearch the publicly available Supermetrics data sources.
Update an account tagUpdate an account tag.

Create a new account tag

Create an account tag.

Inputs

Team idsupermetrics_team_idnumber
Leave empty to use the Team ID saved with your connection.From 1 to 9.223372036854776e+18.
Display namedisplay_nametextRequired
Display name for the new account tag
ColorcolortextRequired
Color for the new account tag
Data sourcesdata_sourceslistRequired
Array of data sources and connections

Outputs

dataobject
Response.
Example output
{
  "data": {
    "data": {
      "color": "example",
      "data_sources": [],
      "display_name": "example",
      "name": "example"
    },
    "meta": {
      "request_id": "example"
    }
  }
}

Delete an account tag

Delete an account tag.

Inputs

Team idsupermetrics_team_idnumber
Leave empty to use the Team ID saved with your connection.From 1 to 9.223372036854776e+18.
NamenametextRequired
The unique name of the account tag

Outputs

dataobject
Response.
Example output
{
  "data": {
    "data": {
      "result": false
    },
    "meta": {
      "request_id": "example"
    }
  }
}

Get accounts

List the data source logins available to you and the accounts each one can reach.

Inputs

Ds idds_idtextRequired
Data source ID
Ds usersds_userstext
Comma-separated list of usernames. Defaults to all available.
Cache minutescache_minutesnumber
Maximum allowed age of the cached accounts in minutes. Defaults to none for last fetched data.From 60 to 1440.

Outputs

dataobject
Output object containing fetched account data and metadata.
Example output
{
  "data": {
    "data": [],
    "meta": {
      "query": {
        "cache_minutes": 1
      },
      "request_id": "example"
    }
  }
}

Get available sources

List the data sources and destinations available for a Hub transfer. You need permission to view transfers. Your team can call it at most once every 200 milliseconds.

Inputs

Team idsupermetrics_team_idnumber
Leave empty to use the Team ID saved with your connection.From 1 to 9.223372036854776e+18.

Outputs

dataobject
Available data sources and destinations for Hub transfers
Example output
{
  "data": {
    "data_sources": [],
    "destination_types": [],
    "destinations": []
  }
}

Get fields

List the standard and custom fields available for a data source.

Inputs

Ds idds_idtextRequired
Data source ID
Ds accountsds_accountstext
Comma-separated list of account IDs to target. Required to return custom fields.
Ds usersds_userstext
Comma-separated list of usernames. Required when ds_accounts is provided to return custom fields.

Outputs

dataobject
Response.
Example output
{
  "data": {
    "data": [],
    "meta": {
      "request_id": "example"
    }
  }
}

Get login

Get the details of one data source login.

Inputs

Loginlogin_idtextRequired
Entity login ID

Outputs

dataobject
Response envelope containing a single data source login
Example output
{
  "data": {
    "data": {
      "@type": "ds_login",
      "additional_scopes": [],
      "auth_time": "example",
      "auth_user_info": {
        "@type": "user",
        "email": "example",
        "user_id": "example"
      },
      "default_scopes": [],
      "display_name": "example",
      "ds_info": {
        "@type": "ds",
        "ds_id": "example",
        "name": "example"
      },
      "expiry_time": "example",
      "is_refreshable": false,
      "is_shared": false,
      "login_id": "example",
      "login_type": "example",
      "revoked_time": "example",
      "username": "example"
    },
    "meta": {
      "request_id": "example"
    }
  }
}

Get query

Get one saved query.

Inputs

Queryquery_idtextRequired
Entity query ID

Outputs

dataobject
Response envelope containing a single saved query
Example output
{
  "data": {
    "data": {
      "@type": "query",
      "ds_info": {
        "@type": "ds",
        "ds_id": "example",
        "name": "example"
      },
      "group_info": {
        "@type": "query_group",
        "group_id": "example",
        "name": "example"
      },
      "modified_time": "example",
      "name": "example",
      "query_id": "example",
      "query_params": {},
      "slug": "example"
    },
    "meta": {
      "request_id": "example"
    }
  }
}

Get query results

Get the results of a recently run query, in the format it was requested in.

Inputs

Schedule idschedule_idtextRequired
Query schedule ID
Offsetoffsetnumber
Pagination offset for the number of result rows to return. Defaults to 0.From 0 to 1000000. Default: 0.
Limitlimitnumber
Maximum number of result rows to return.From 1 to 100000. Default: 100.

Outputs

dataobject
The query results in the requested output format.
Example output
{
  "data": {}
}

Get query status

Get the status and results of a query running in the background.

Inputs

Schedule idschedule_idtextRequired
Query schedule ID
Offset startoffset_startnumber
Starting row index for a paginated response. Defaults to 0.From 0 to 1000000. Default: 0.
Offset endoffset_endnumber
Ending row index for a paginated response. Defaults to none for all the data.From 0 to 1000000.

Outputs

dataobject
Response.
Example output
{
  "data": {
    "data": [],
    "meta": {
      "progress": {
        "queries_ready": 1,
        "queries_total": 1
      },
      "request_id": "example",
      "schedule_id": "example",
      "status_code": "SCHEDULED",
      "workflow": {
        "tasks_running": 1,
        "tasks_scheduled": 1
      }
    }
  }
}

Get release statuses

List the release statuses you can filter a data source search by.

Inputs

None.

Outputs

dataobject
Response envelope listing data source release statuses for search filtering.
Example output
{
  "data": {
    "data": {
      "list": {}
    },
    "meta": {
      "request_id": "example"
    }
  }
}

Get search categories

List the categories you can filter a data source search by.

Inputs

None.

Outputs

dataobject
Response envelope listing data source categories for search filtering.
Example output
{
  "data": {
    "data": {
      "list": {}
    },
    "meta": {
      "request_id": "example"
    }
  }
}

Get search tags

List the tags you can filter a data source search by.

Inputs

None.

Outputs

dataobject
Response envelope listing data source tags for search filtering.
Example output
{
  "data": {
    "data": {
      "list": {}
    },
    "meta": {
      "request_id": "example"
    }
  }
}

Get segments

List your team's data source logins and the segments available for each.

Inputs

Ds idds_idtextRequired
Data source ID
Ds usersds_userstext
Comma-separated list of usernames. Defaults to all available.
Cache minutescache_minutesnumber
Maximum allowed age of the cached segments in minutes. Defaults to none for last fetched data.From 60 to 1440.

Outputs

dataobject
List of data source segments and metadata.
Example output
{
  "data": {
    "data": [],
    "meta": {
      "query": {
        "cache_minutes": 1
      },
      "request_id": "example"
    }
  }
}

Get transfer configuration

Get the full configuration of an existing Hub transfer. You need permission to view transfers. Your team can call it at most once every 200 milliseconds.

Inputs

Team idsupermetrics_team_idnumber
Leave empty to use the Team ID saved with your connection.From 1 to 9.223372036854776e+18.
Transfer idtransfer_idnumberRequired
Unique identifier for the transferAt least 1.

Outputs

dataobject
Full transfer configuration
Example output
{
  "data": {
    "accounts": [],
    "data_source": {
      "data_source_id": "example",
      "service_name": "example",
      "service_provider": "example",
      "settings": []
    },
    "destination_id": 1,
    "display_name": "example",
    "external_url": "example",
    "license": {
      "end_date": "example",
      "features": {},
      "id": 1,
      "is_expired": false,
      "is_trial": false,
      "license_title": "example",
      "product_title": "example"
    },
    "notification_recipients": [],
    "schedule": [],
    "schema_id": 1,
    "segments": [],
    "transfer_id": 1
  }
}

Get transfer options

Get the settings available for a Hub transfer from a given data source to a given destination. You need permission to view transfers. Your team can call it at most once every 200 milliseconds.

Inputs

Team idsupermetrics_team_idnumber
Leave empty to use the Team ID saved with your connection.From 1 to 9.223372036854776e+18.
Source idsource_idtextRequired
Data source identifier
Destination iddestination_idnumberRequired
Destination identifier

Outputs

dataobject
Transfer configuration options for a given source/destination combination
Example output
{
  "data": {
    "accounts": [],
    "data_source": {
      "data_source_id": "example",
      "service_name": "example",
      "settings": []
    },
    "license": {},
    "logins": [],
    "schedule_options": [],
    "schemas": [],
    "segments": []
  }
}

Get transfer run details

Get one run of a transfer that belongs to your team, with its status, timing, row counts and the details of each query it ran. You need permission to view transfers. Your team can call it at most once every 200 milliseconds.

Inputs

Team idsupermetrics_team_idnumber
Leave empty to use the Team ID saved with your connection.From 1 to 9.223372036854776e+18.
Transfer run idtransfer_run_idnumberRequired
Unique identifier of the transfer runAt least 1.

Outputs

dataobject
Response envelope containing a single transfer run detail.
Example output
{
  "data": {
    "data": {
      "created_time": "example",
      "data_date": "example",
      "ended_time": "example",
      "external_id": "example",
      "failed_query_amount": 1,
      "id": 1,
      "message": "example",
      "query_amount": 1,
      "query_details": [],
      "queued_time": "example",
      "started_time": "example",
      "status": "example",
      "total_duration": 1.0,
      "total_rows": 1
    },
    "meta": {
      "request_id": "example"
    }
  }
}

List all account tags in a team

List all of your team's account tags.

Inputs

Team idsupermetrics_team_idnumber
Leave empty to use the Team ID saved with your connection.From 1 to 9.223372036854776e+18.

Outputs

dataobject
Response.
Example output
{
  "data": {
    "data": {
      "items": []
    },
    "meta": {
      "request_id": "example"
    }
  }
}

List login accounts

List the stored accounts for a data source login.

Inputs

Loginlogin_idtextRequired
Entity login ID
Offsetoffsetnumber
Pagination offset for the number of items to return. Defaults to 0.From 0 to 1000000. Default: 0.
Limitlimitnumber
Maximum number of items to return. Defaults to 100, maximum of 1000 is enforced.From 1 to 1000. Default: 100.

Outputs

dataobject
Paginated response envelope containing a list of stored data source accounts for a login
Example output
{
  "data": {
    "data": [],
    "meta": {
      "paginate": {
        "limit": 1,
        "offset": 1,
        "total": 1
      },
      "request_id": "example"
    }
  }
}

List logins

List all of your team's data source logins.

Inputs

None.

Outputs

dataobject
Response envelope containing a list of data source logins
Example output
{
  "data": {
    "data": [],
    "meta": {
      "request_id": "example"
    }
  }
}

List queries

List your saved queries.

Inputs

None.

Outputs

dataobject
Response envelope containing a list of saved queries
Example output
{
  "data": {
    "data": [],
    "meta": {
      "request_id": "example"
    }
  }
}

List transfer runs

List the runs of one of your team's transfers between a start and end date, 100 a page by default and up to 10,000. You can filter by issues and sort the results. Your team can call it at most once every 200 milliseconds.

Inputs

Team idsupermetrics_team_idnumber
Leave empty to use the Team ID saved with your connection.From 1 to 9.223372036854776e+18.
Transfer idtransfer_idnumberRequired
Unique identifier of the transferAt least 1.
Start datestart_datedate and timeRequired
Start date for filtering runs (inclusive)
End dateend_datedate and timeRequired
End date for filtering runs (inclusive)
Filter issues onlyfilter_issues_onlytrue/false
Filter to show only runs with issues
Sort fieldsort_fieldtext
Field to sort byOne of: created_time (Created time), ended_time (Ended time), data_date (Data date).
Sort directionsort_directiontext
Sort directionOne of: ASC, DESC.
Limitlimitnumber
Maximum number of results to return (default 100, max 10000)At least 1. Default: 100.
Offsetoffsetnumber
Number of results to skip for paginationAt least 0. Default: 0.

Outputs

dataobject
Response envelope containing a list of transfer runs.
Example output
{
  "data": {
    "data": [],
    "meta": {
      "request_id": "example"
    }
  }
}

List transfers

List your team's transfers that haven't been deleted, with basic details for each. You need permission to view transfers. Your team can call it at most once every 200 milliseconds.

Inputs

Team idsupermetrics_team_idnumber
Leave empty to use the Team ID saved with your connection.From 1 to 9.223372036854776e+18.
Limitlimitnumber
Maximum number of transfers to return. When omitted, all transfers are returned (backward compatible). Capped at 5000.From 1 to 5000.
Offsetoffsetnumber
Number of transfers to skip before returning results. Only applies when limit is also provided. When omitted, defaults to 0.At least 0.
Include total countinclude_total_counttrue/false
When true, include total count in the pagination object. Requires an additional COUNT query. Omit for better performance when total is not needed ; use `has_more` and `next_offset` for efficient pagination.

Outputs

dataobject
Response envelope containing a list of transfers.
Example output
{
  "data": {
    "data": [],
    "meta": {
      "request_id": "example"
    },
    "pagination": {
      "has_more": false,
      "limit": 1,
      "next_offset": 1,
      "total": 1
    }
  }
}

Query data

Run a query against a data source and return the data.

Inputs

Schedule idschedule_idtext
Custom query schedule ID
Sync timeoutsync_timeoutnumber
Wait up to 20 seconds for results. Check the returned schedule ID with Get query status and Get query results if it is still running.From 0 to 20. Default: 20.
Api linksapi_linkslist
Types of resource links to return. Not in use.
Ds idds_idtextRequired
Data source ID
Ds accountsds_accountstext
List of data source account IDs to query
Ds segmentsds_segmentstext
List of data source segment IDs to query
Ds userds_usertext
Shorthand parameter to provide one value for ds_users
Ds usersds_userstext
List of data source usernames we should target
Date range typedate_range_typetext
Type of date range the query should use
Start datestart_datedate
Fixed or relative query start date
End dateend_datedate
Fixed or relative query end date
Compare typecompare_typetext
Date range comparison type
Compare showcompare_showtext
Display type for comparison values
Compare start datecompare_start_datetext
Fixed or relative start date for comparison date range
Compare end datecompare_end_datetext
Fixed or relative end date for comparison date range
Fieldsfieldstext
List of metric and dimension field IDs or field objects for the query
Filterfiltertext
Query filter string
Settingssettingslist
Additional settings for query in key-value pairs
Order rowsorder_rowstext
List of fields and their sorting directions for the results
Order columnsorder_columnstext
Order policy for fields that are split by column
Offset startoffset_startnumber
Starting row index for a paginated response. Defaults to 0.From 0 to 1000000. Default: 0.
Offset endoffset_endnumber
Ending row index for a paginated response. Defaults to none for all the data.From 0 to 1000000.
Max columnsmax_columnsnumber
Maximum number of columns the query should return when fields are split by columnFrom 0 to 2147483647. Default: 20.
Max rowsmax_rowsnumber
Maximum number of rows the query should return. Defaults to 1000.From 0 to 2147483647. Default: 1000.
Cache minutescache_minutesnumber
Maximum allowed age of query results cache in minutes. Defaults to none for no explicit policy.From 0 to 2147483647.

Outputs

dataobject
Response.
Example output
{
  "data": {
    "data": [],
    "meta": {
      "paginate": {
        "next": "example",
        "prev": "example"
      },
      "query": {
        "cache_minutes": 1,
        "compare_end_date": "example",
        "compare_show": "example",
        "compare_start_date": "example",
        "compare_type": "example",
        "ds_accounts": [],
        "ds_segments": [],
        "end_date": "example",
        "fields": [],
        "settings": {},
        "start_date": "example"
      },
      "request_id": "example",
      "result": {
        "cache_time": "example",
        "cache_used": false,
        "data_sampled": false,
        "run_seconds": 1.0,
        "total_columns": 1,
        "total_rows": 1
      },
      "schedule_id": "example",
      "status_code": "example"
    }
  }
}

Search data sources

Search the publicly available Supermetrics data sources.

Inputs

Filter keywordfilter_keywordtext
Fuzzy search by keyword in connector ID, name, marketing name, description, categories, aliases, and tags.
Filter categoryfilter_categorytext
Filter by category.One of: AD_VERIFICATION (Ad verification), AFFILIATE, ANALYTICS, BRAND_REPUTATION (Brand reputation), CRM_SALES (Crm sales), DATA_WAREHOUSES (Data warehouses), DSP, ECOMMERCE, FILES, MARKETING_ATTRIBUTION (Marketing attribution), and 9 more.
Filter statusfilter_statustext
Filter by release status.One of: DEVELOPMENT, INVITE_ONLY (Invite only), EARLY_ACCESS (Early access), RELEASED, SUNSETTED.
Filter productfilter_producttext
Filter by product.One of: EXCEL, SHEETS, DS, API, HUB.
Filter tagfilter_tagtext
Filter by tag.
Filter is newfilter_is_newtext
Filter only new connectors (release date within the last 90 days).One of: true, false.
Filter is shown websitefilter_is_shown_websitetext
Filter only connectors shown on the website.One of: true, false.

Outputs

dataobject
Response envelope containing data source search results.
Example output
{
  "data": {
    "data": {
      "list": []
    },
    "meta": {
      "request_id": "example"
    }
  }
}

Update an account tag

Update an account tag.

Inputs

Team idsupermetrics_team_idnumber
Leave empty to use the Team ID saved with your connection.From 1 to 9.223372036854776e+18.
NamenametextRequired
The unique name of the account tag
Display namedisplay_nametextRequired
Display name for the account tag
ColorcolortextRequired
Color for the account tag

Outputs

dataobject
Response.
Example output
{
  "data": {
    "data": {
      "color": "example",
      "data_sources": [],
      "display_name": "example",
      "name": "example"
    },
    "meta": {
      "request_id": "example"
    }
  }
}

On this page