Fetch identity stats

Calculate usage metrics for an identity.

GET https://api.jsonpad.io/identities/{identityId}/stats

Example

cURL
123curl https://api.jsonpad.io/identities/fc65a933-c450-46b6-8b79-c787976227f9/stats \
  -H "Content-Type: application/json" \
  -H "x-api-token: <YOUR TOKEN>"

Parameters

  • required
    identityIdstringAn identity id.
  • optional
    daysnumberhttps://api.jsonpad.io/identities/faa48b1d-c818-4eda-9a89-f5763c62028a/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:32.459Z"
count: 3
types: {
identity-created: 2
identity-updated: 1
}
}
1: {
date: "2026-09-04T11:30:32.460Z"
count: 1
types: {
identity-updated: 1
}
}
2: {
date: "2026-09-05T11:30:32.460Z"
count: 0
types: {
}
}
]
}
}
  • eventsobjectEvent metrics for this identity.
    Events attributes
    • totalnumberThe total number of events for this identity.
    • totalThisPeriodnumberThe total number of events for this identity 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-12-12