Get database analytics
GET
/v1/databases/{databaseId}/analyticsRetrieve database usage and volume analytics for the selected time period.
How to call this endpoint
Every ACP API request uses bearer authentication. The examples here show the actual request path, auth header, and body shape that the platform expects.
Path, query, and header parameters
These parameters control which ACP object the endpoint acts on and how the request is processed.
Path parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
| databaseId | path | string | Yes | Database ID |
Query parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
| period | query | day | week | month | No | Analytics window. Day data uses hourly buckets; week and month data use daily buckets. |
Body schema
This endpoint does not require a request body.
None.
What the API returns
Each response code below includes the documented payload shape for the ACP API.
200Database analyticsapplication/json
| Field | Type | Required | Description |
|---|---|---|---|
| analytics | object | No | — |
| analytics.period | day | week | month | No | — |
| analytics.summary | object | No | — |
| analytics.summary.totalCollections | integer | No | — |
| analytics.summary.totalDocuments | integer | No | — |
| analytics.summary.reads | integer | No | Reads in the selected period. |
| analytics.summary.writes | integer | No | Writes in the selected period. |
| analytics.summary.deletes | integer | No | Deletes in the selected period. |
| analytics.summary.reads24h | integer | No | — |
| analytics.summary.writes24h | integer | No | — |
| analytics.summary.deletes24h | integer | No | — |
| analytics.summary.location | string | No | — |
| analytics.summary.updatedAt | string | No | ISO 8601 timestamp. |
| analytics.summary.largestCollection | object | No | — |
| analytics.summary.largestCollection.id | string | No | Unique identifier. |
| analytics.summary.largestCollection.name | string | No | Human-readable name. |
| analytics.summary.largestCollection.documentCount | integer | No | — |
| analytics.charts | object | No | — |
| analytics.charts.operations | object[] | No | Operation buckets for the selected period. |
| analytics.charts.operations[].timestamp | string | No | — |
| analytics.charts.operations[].reads | integer | No | — |
| analytics.charts.operations[].writes | integer | No | — |
| analytics.charts.operations[].deletes | integer | No | — |
| analytics.charts.volume | object[] | No | Volume buckets for the selected period. |
| analytics.charts.volume[].timestamp | string | No | — |
| analytics.charts.volume[].collections | integer | No | — |
| analytics.charts.volume[].documents | integer | No | — |
| analytics.charts.operations24h | object[] | No | — |
| analytics.charts.operations24h[].timestamp | string | No | — |
| analytics.charts.operations24h[].reads | integer | No | — |
| analytics.charts.operations24h[].writes | integer | No | — |
| analytics.charts.operations24h[].deletes | integer | No | — |
| analytics.charts.volume24h | object[] | No | — |
| analytics.charts.volume24h[].timestamp | string | No | — |
| analytics.charts.volume24h[].collections | integer | No | — |
| analytics.charts.volume24h[].documents | integer | No | — |