Fetch item stats

Calculate usage metrics for an item.

GET https://api.jsonpad.io/lists/{listId}/items/{itemId}/stats

Example

cURL
12curl https://api.jsonpad.io/lists/5f0beebe-34e6-4b57-878a-86149af242cd/items/e6a69879-1360-4201-bedc-ed4ec6de6c3f/stats \ -H "x-api-token: <YOUR TOKEN>"

Parameters

  • required
    listIdstringA list id or path name.
  • required
    itemIdstringAn item id or alias.
  • optional
    daysnumberhttps://api.jsonpad.io/lists/3955449d-b999-403b-a0f8-94b7f3290d11/items/ac19ce3a-c25b-484c-b771-f5cdeca8d7c8/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.
  • optional
    x-identity-tokenstringAn identity token.
  • optional
    x-identity-groupstringAn identity group.

Request body

No request body

Response body

200 OK
{
events: {
total: 4
totalThisPeriod: 4
metrics: [
0: {
date: "2026-10-31T13:23:10.007Z"
count: 3
types: {
item-created: 2
item-updated: 1
}
}
1: {
date: "2026-11-01T13:23:10.007Z"
count: 1
types: {
item-updated: 1
}
}
2: {
date: "2026-11-02T13:23:10.007Z"
count: 0
types: {
}
}
]
}
}
  • eventsobjectEvent metrics for this item.
    Events attributes
    • totalnumberThe total number of events for this item.
    • totalThisPeriodnumberThe total number of events for this item 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