List saved reports
const url = 'https://apibase.ecomweb.app/api/v1/stores/example/reports';const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://apibase.ecomweb.app/api/v1/stores/example/reports \ --header 'x-api-key: <x-api-key>'Returns every report saved in the store, without pagination. Each item carries who saved it and, for the user the API key acts as, last_viewed_at and pinned.
Required scopes: read:analytics
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The store’s ref, as returned by GET /stores.
Responses
Section titled “Responses”object
The saved reports.
object
The saved definition.
object
Dimensions to group by.
object
Time grain for a date dimension: day, week, month, quarter or year.
Key of a dimension of the report’s dataset.
Conditions that narrow the rows.
object
How the values are compared.
Key of a filter of the report’s dataset.
The values to compare with. is and is_not match any of the values.
The days the report covers.
object
First day, inclusive, as YYYY-MM-DD in the store’s time zone.
Last day, inclusive, as YYYY-MM-DD in the store’s time zone.
How the rows are sorted.
object
Sort direction.
Key of a selected measure or dimension.
How the dashboard draws the report. It does not change the rows.
Version of the definition format.
Key of the dataset the report reads, such as orders.
Keys of the measures to calculate.
Maximum number of rows.
Who saved the report, or null when that user no longer exists.
object
Name of the author.
Email address of the author.
When the user behind the key last viewed the report, as an ISO 8601 timestamp, or null.
Whether that user pinned the report.
Saved report ID, as a decimal string.
ID of the user who saved the report, or whose API key saved it.
Report name.
When the report was saved, as an ISO 8601 timestamp.
When the report was last changed, as an ISO 8601 timestamp.
Example
{ "data": [ { "definition": { "dimensions": [ { "grain": "day" } ], "filters": [ { "operator": "is" } ], "sort": [ { "order": "asc" } ], "visualization": "table" } } ]}The key is missing, invalid, revoked or expired.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}The key may not do this: a missing scope, a readonly key, a publishable key on a Store API route, or a disallowed origin.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}