Fetch item stats

Calculate usage metrics for an item.

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

Example

cURL
123curl https://api.jsonpad.io/lists/b44f160c-b2b6-490a-83b2-8c1bdd2b1fa7/items/a232b15e-7f13-4e4d-aed0-6f26c074e95f/stats \
  -H "Content-Type: application/json" \
  -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/2e64c8d1-8524-4126-bd20-d03e61a1cd17/items/89d278c5-609e-4aec-988a-7d8ac4b51e63/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:00.158Z"
count: 3
types: {
item-created: 2
item-updated: 1
}
}
1: {
date: "2026-09-04T11:30:00.158Z"
count: 1
types: {
item-updated: 1
}
}
2: {
date: "2026-09-05T11:30:00.158Z"
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