Fetch identity stats

Calculate usage metrics for an identity.

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

Example

cURL
12curl https://api.jsonpad.io/identities/099d07f5-0bc7-4457-a76a-c594dd9bffc3/stats \ -H "x-api-token: <YOUR TOKEN>"

Parameters

  • required
    identityIdstringAn identity id.
  • optional
    daysnumberhttps://api.jsonpad.io/identities/8a62ae81-c04b-49c9-8bd2-54504cd2854e/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-21T21:08:43.442Z"
count: 3
types: {
identity-created: 2
identity-updated: 1
}
}
1: {
date: "2026-09-22T21:08:43.443Z"
count: 1
types: {
identity-updated: 1
}
}
2: {
date: "2026-09-23T21:08:43.443Z"
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