Skip to main content
POST
/
api
/
admin
/
histories
/
charts
/
totals
Get totals chart data for histories
curl --request POST \
  --url https://pria.praxislxp.com/api/admin/histories/charts/totals \
  --header 'Content-Type: application/json' \
  --header 'x-access-token: <api-key>' \
  --data '
{
  "range": -3,
  "dimension": "count",
  "institution": "<string>",
  "account": "<string>",
  "granularity": "month",
  "aggregate": false,
  "topsearch": 5
}
'
{
  "success": true,
  "data": [
    {
      "_id": {
        "institution": "<string>"
      },
      "dimension": 123
    }
  ]
}

Authorizations

x-access-token
string
header
required

JWT token passed in x-access-token header

Body

application/json
range
integer
required

Time range (negative values for past periods)

Example:

-3

dimension
enum<string>
required

Metric to aggregate

Available options:
count,
credits,
usage,
cached,
price
Example:

"count"

institution
string

Institution ID

account
string

Account ID

granularity
enum<string>

Used only for date range calculation (dayFactor)

Available options:
day,
week,
month,
hour
Example:

"month"

aggregate
boolean

When true, aggregates across all institutions

Example:

false

topsearch
integer

Number of top institutions to return

Example:

5

Response

Successfully retrieved totals chart data

success
boolean
data
object[]