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/14e3e005-0432-42a1-89dd-58e51777b0a2/items/72964943-2f59-4de0-a42f-eef5aa10122b/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/02c20002-2700-4416-8d13-cd9defd94796/items/bad97f06-693b-4daa-8819-0b1bc56e72c8/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-05T22:12:15.360Z"
count: 3
types: {
item-created: 2
item-updated: 1
}
}
1: {
date: "2026-10-06T22:12:15.360Z"
count: 1
types: {
item-updated: 1
}
}
2: {
date: "2026-10-07T22:12:15.360Z"
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