Skip to main content
POST
/
api
/
admin
/
histories
/
charts
/
user-stats
Long-format per-user-per-period usage extract
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
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.praxis-ai.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-access-token
string
header
required

JWT token passed in x-access-token header

Body

application/json
granularity
enum<string>
required

Bucket size for the period column.

Available options:
day,
week,
month
range
number

Number of time periods to look back (negative for past).

Example:

-7

daterange
object

Explicit start/end window. Takes precedence over range.

account
string

Space-separated account ids to scope the query.

institution
string

Space-separated institution ids to scope the query.

accountType
enum<string>
Available options:
user,
admin,
super
usersearch
string

Case-insensitive substring matched against email / fname / lname.

Response

Successful aggregation

success
boolean
granularity
enum<string>
Available options:
day,
week,
month
truncated
boolean

True when the row count hit the per-request cap (5000). Narrow the window for full results.

windowSource
enum<string>

How the date window was derived — explicit daterange tuple, relative range integer, or a granularity-based default applied because neither was supplied.

Available options:
daterange,
range,
default
defaultDaysApplied
number | null

When windowSource === "default", the number of days included in the auto-applied window.

windowStart
string<date-time>

Inclusive lower bound used for the created filter.

windowEnd
string<date-time>

Exclusive upper bound used for the created filter.

data
object[]