Get usage analytics
Note: This API is currently in beta.
Get the account analytics data between two dates. The response covers the period from the start date to the end date, both dates inclusive. Both dates are interpreted as UTC calendar days.
The returned data is scoped to the requesting account only. Unlike /v1/accounts/usage, an agency account's analytics are not aggregated across its child accounts.
The response is cached for 5 minutes per account and date range. Use generatedAt to check how fresh the returned data is.
Query parameters
Specify a startDate in YYYY-MM-DD format, interpreted as a UTC calendar day. It should be before the endDate. The difference between startDate and endDate should be less than 90 days.
Specify an endDate in YYYY-MM-DD format, interpreted as a UTC calendar day. It should be after the startDate. The difference between startDate and endDate should be less than 90 days.
Response
Usage analytics for the requested date range.
Example response
{
"statusCodes": [
{
"name": "200"
}
],
"errorReasons": [
{
"name": "ENOENT - Resource not found at any upstream origin"
}
],
"top404Assets": [
{
"name": "https://ik.imagekit.io/demo/products/discontinued-sku-4421.jpg"
}
],
"extensions": [
{
"name": "remove-bg"
}
]
}