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/61f95a0f-d31d-4133-b0ae-7e300779b8d2/indexes/b5610406-c5de-4f0a-9d0d-ea255d205c5b/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/25dcea25-982b-480f-ac26-38976b8f1445/indexes/6e308639-7192-400b-8e58-8e2a8f4c44f8/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-31T13:23:26.351Z"
count: 3
types: {
index-created: 2
index-updated: 1
}
}
1: {
date: "2026-11-01T13:23:26.351Z"
count: 1
types: {
index-updated: 1
}
}
2: {
date: "2026-11-02T13:23:26.351Z"
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