Fetch index stats

Calculate usage metrics for an index.

GET https://api.jsonpad.io/lists/{listId}/indexes/{indexId}/stats

Example

cURL
12curl https://api.jsonpad.io/lists/b90ac992-c7c2-48cf-9835-d5f1ede98a1b/indexes/8377164b-5d0a-44f6-993e-96dce484e1b0/stats \ -H "x-api-token: <YOUR TOKEN>"

Parameters

  • required
    listIdstringA list id or path name.
  • required
    indexIdstringAn index id or path name.
  • optional
    daysnumberhttps://api.jsonpad.io/lists/9c56eba7-2a31-4561-bdfd-4c00005a7869/indexes/62231692-9afa-4c62-8155-98fc68dab53d/stats?days=7The number of days to collect stats for. The default value is 7 and the maximum is 90.

Request headers

  • required
    x-api-tokenstringYour API token.

Request body

No request body

Response body

200 OK
{
events: {
total: 4
totalThisPeriod: 4
metrics: [
0: {
date: "2026-10-05T22:12:31.594Z"
count: 3
types: {
index-created: 2
index-updated: 1
}
}
1: {
date: "2026-10-06T22:12:31.594Z"
count: 1
types: {
index-updated: 1
}
}
2: {
date: "2026-10-07T22:12:31.594Z"
count: 0
types: {
}
}
]
}
}
  • eventsobjectEvent metrics for this index.
    Events attributes
    • totalnumberThe total number of events for this index.
    • totalThisPeriodnumberThe total number of events for this index during the requested period.
    • metricsarrayA list of metrics objects for each day in the requested period.
    • metrics[].datestringThe date of this metrics entry in ISO 8601 format.
    • metrics[].countnumberThe total number of events on this date.
    • metrics[].typesobject

      The total number of events on this date, broken down by type.

Response headers

No response headers

2024-10-29