curl --request POST \
--url https://pria.praxislxp.com/api/admin/histories/charts/user-stats \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"range": -7,
"daterange": {
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z"
},
"account": "<string>",
"institution": "<string>",
"usersearch": "<string>"
}
'{
"success": true,
"truncated": true,
"defaultDaysApplied": 123,
"windowStart": "2023-11-07T05:31:56Z",
"windowEnd": "2023-11-07T05:31:56Z",
"data": [
{
"user": "<string>",
"email": "<string>",
"fname": "<string>",
"lname": "<string>",
"institution": "<string>",
"instanceName": "<string>",
"aiName": "<string>",
"periodStart": "2023-11-07T05:31:56Z",
"queryCount": 123,
"creditsUsed": 123,
"lifetimeUsed": 123,
"capLimit": 123,
"capUsedPct": 123,
"atCap": true
}
],
"summary": {
"meanCreditsPerUserAccount": 123,
"meanCreditsPerUserInstitution": 123,
"usersAtCap": 123
}
}Long-format per-user-per-period usage extract
Aggregates query count and credit usage per (user, institution, period) for admin reporting / CSV export. One row per non-zero usage bucket. Capped at 5000 rows; the response sets truncated: true when the cap is reached. Excludes histories that the user has flagged as forgotten.
curl --request POST \
--url https://pria.praxislxp.com/api/admin/histories/charts/user-stats \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"range": -7,
"daterange": {
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z"
},
"account": "<string>",
"institution": "<string>",
"usersearch": "<string>"
}
'{
"success": true,
"truncated": true,
"defaultDaysApplied": 123,
"windowStart": "2023-11-07T05:31:56Z",
"windowEnd": "2023-11-07T05:31:56Z",
"data": [
{
"user": "<string>",
"email": "<string>",
"fname": "<string>",
"lname": "<string>",
"institution": "<string>",
"instanceName": "<string>",
"aiName": "<string>",
"periodStart": "2023-11-07T05:31:56Z",
"queryCount": 123,
"creditsUsed": 123,
"lifetimeUsed": 123,
"capLimit": 123,
"capUsedPct": 123,
"atCap": true
}
],
"summary": {
"meanCreditsPerUserAccount": 123,
"meanCreditsPerUserInstitution": 123,
"usersAtCap": 123
}
}Authorizations
JWT token passed in x-access-token header
Body
Bucket size for the period column.
day, week, month Number of time periods to look back (negative for past).
-7
Explicit start/end window. Takes precedence over range.
Show child attributes
Show child attributes
Space-separated account ids to scope the query.
Space-separated institution ids to scope the query.
user, admin, super Case-insensitive substring matched against email / fname / lname.
Response
Successful aggregation
day, week, month True when the row count hit the per-request cap (5000). Narrow the window for full results.
How the date window was derived — explicit daterange tuple, relative range integer, or a granularity-based default applied because neither was supplied.
daterange, range, default When windowSource === "default", the number of days included in the auto-applied window.
Inclusive lower bound used for the created filter.
Exclusive upper bound used for the created filter.
Show child attributes
Show child attributes
Aggregate statistics over the distinct users in the result set.
Show child attributes
Show child attributes
Was this page helpful?