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/f23e7996-78c0-4585-98af-90ad1951e6df/indexes/a8d7dcbc-a0ec-4ed0-8bf8-9aae9b0c4a35/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/56fbd257-a484-45d0-80bb-2ff569a4d448/indexes/6428c111-d35a-4b85-ac5e-92327fc0137c/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-09-21T21:08:34.826Z"
count: 3
types: {
index-created: 2
index-updated: 1
}
}
1: {
date: "2026-09-22T21:08:34.826Z"
count: 1
types: {
index-updated: 1
}
}
2: {
date: "2026-09-23T21:08:34.827Z"
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