CopyHero

Get Time Series

GET
/api/v1/analytics/time-series

Get time-series analytics data with specified granularity.

Returns time-bucketed metrics including:

  • timestamp: Start of each time bucket
  • batch_count: Number of batches in this period
  • task_count: Number of tasks in this period
  • jobs_count: Number of jobs in this period (filtered by state if provided)

Access Control:

  • Regular users: See only their owned or employed stores
  • Superusers in a browser session: see all stores (API keys and MCP never act as superuser)

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Query Parameters

start_date?|

Start of time range (inclusive). Defaults to 30 days ago.

end_date?|

End of time range (inclusive). Defaults to now.

granularity?AnalyticsGranularity

Aggregation period: hourly, daily, weekly, monthly

Default"daily"
Value in"hourly""daily""weekly""monthly"
store_id?|

Filter to a specific store

state?|

Filter jobs_count by state (pending, running, finished, error, cancelled)

Response Body

Successful Response

application/json
  1. response

Response schema for GET /analytics/time-series endpoint.

period*

The overall time period

granularity*AnalyticsGranularity

The aggregation granularity

Value in"hourly""daily""weekly""monthly"
data*array<>

Time series data points

Example Request
curl -X GET 'https://app.copyhero.app/api/v1/analytics/time-series'
Example Response
{  "period": {    "start": "2019-08-24T14:15:22Z",    "end": "2019-08-24T14:15:22Z"  },  "granularity": "hourly",  "data": [    {      "timestamp": "2019-08-24T14:15:22Z",      "batch_count": 0,      "task_count": 0,      "jobs_count": 0    }  ]}