Short URLs
Short URLs can be generated for queries that you have saved in the Supermetrics Query Manager. They can be accessed with a unique query ID, allowing you to run the query in real time without using all the normal query parameters.
Note that to use the short URL, you need to save the query first. Also, when you change the saved query in the Query Manager, the results of the future queries change.
Please read more about how to make requests.
Use cases
You want to embed the query results in another application and refresh the data daily, but do not want to include or expose your API key.
You want to provide temporary access to the query data. By removing the stored query, you
also disable any related short URLs.You would like to share a query but do not wish the recipients to make changes to the query.
You want to deploy a query and be able to change its parameters without redeploying the query.
Parameters
All query parameters default to the properties created with the original query. Only the following parameters are customizable:
-
date_range_type
string
Optional. Type of date range the query should use. Automatically set to custom if start_date and end_date are used. See date range type for more.
-
start_date
string
Optional. Fixed or relative start date for your query. See date strings for more.
-
end_date
string
Optional. Fixed or relative end date for your query. Future dates are allowed. See date strings for more.
-
max_columns
int
Optional. Maximum number of columns the query results should contain when fields that split by column are used.
-
max_rows
int
Optional. Maximum number of rows the query results should contain. Value is subject to license restrictions.
-
offset_start
int
Optional. Starting row index for paginated response. Defaults to 0.
-
offset_end
int
Optional. Ending row index for paginated response. Defaults to none for all data.
-
sync_timeout
int
Optional. Number of seconds the API should wait for query to finish before returning a response. Defaults to 1800 seconds (30 minutes). Default and maximum values are subject to license restrictions. See async queries for more.
Request
GET /enterprise/v2/query/9mK6hBesvFskWL...zeEiZDmL4F21Wt0/json?json={
"start_date": "yesterday",
"end_date": "today",
"offset_start": 0,
"offset_end": 99
}
Response
Response from Get data