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/d08e523e-25fb-4d5f-8f72-e049bed992a7/stats \ -H "x-api-token: <YOUR TOKEN>"

Parameters

  • required
    identityIdstringAn identity id.
  • optional
    daysnumberhttps://api.jsonpad.io/identities/1eb75191-87bb-447a-af51-6d1be75d5a71/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-10-31T13:23:37.018Z"
count: 3
types: {
identity-created: 2
identity-updated: 1
}
}
1: {
date: "2026-11-01T13:23:37.018Z"
count: 1
types: {
identity-updated: 1
}
}
2: {
date: "2026-11-02T13:23:37.018Z"
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