Fetch index stats

Calculate usage metrics for an index.

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

Example

cURL
123curl https://api.jsonpad.io/lists/e03e3347-21cc-4fbc-b4d4-095a43a5bec7/indexes/3f7d7d3d-16a0-4a57-b13c-92bb6ef1f8db/stats \
  -H "Content-Type: application/json" \
  -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/48e48d12-6266-45e9-baea-4b7c67214ce2/indexes/272dbda7-3094-4605-a742-9dd53eb6479a/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-03T11:30:20.383Z"
count: 3
types: {
index-created: 2
index-updated: 1
}
}
1: {
date: "2026-09-04T11:30:20.383Z"
count: 1
types: {
index-updated: 1
}
}
2: {
date: "2026-09-05T11:30:20.383Z"
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