EvoTrail API › Usage
Get usage by product
For each product the key may read: actions and active people in the range,
compared with the previous period of the same length, a series (hourly for a
range of 48 hours or less with no team or person filter, daily otherwise), and
the top 10 actions and teams. Every number carries a drill: the audit-trail
filters that list the events behind it.
Permission (API-key scope): evotrail:metrics:read. Each product also needs one of its read permissions.
Authorization
bearerAuth(evotrail:metrics:read)apiKeyHeader(evotrail:metrics:read)
Parameters
Query parameters
productarray of ProductOnly these products; repeat it (product=oncall&product=uptime) or comma-separate. Products the key cannot read are dropped. Default: every product it can read.team_idstringOnly events on this team's resources.actor_idstringOnly this person's events. Owners and administrators only: an API key always gets 403.fromstringYYYY-MM-DD(UTC) or RFC 3339. Default 30 days beforeto.tostringYYYY-MM-DD(inclusive) or RFC 3339. Default now.
Responses
200
Usage.
dataUsageView requiredShow UsageView properties
fromstring (date-time)tostring (date-time)previous_fromstring (date-time)Start of the previous period of the same length, which deltas compare with.granularitystringtotalsobjectactionsintegerprevious_actionsintegerdelta_pctnumber | nullnullwhen the previous period had none.active_peopleintegerprevious_active_peopleintegerdrillDrillShow Drill properties
productarray of stringactionstringteam_idstringactor_idstringfromstring (date-time) requiredtostring (date-time) required
productsarray of objectproductProductactionsintegerprevious_actionsintegerdelta_pctnumber | nullactive_peopleintegerlast_active_daystring (date) | nullseriesarray of PointShow Point properties
tstring (date-time)countintegerdrillDrillShow Drill properties
productarray of stringactionstringteam_idstringactor_idstringfromstring (date-time) requiredtostring (date-time) required
drillDrillShow Drill properties
productarray of stringactionstringteam_idstringactor_idstringfromstring (date-time) requiredtostring (date-time) required
top_actionsarray of objectproductstringactionstringcountintegerdrillDrillShow Drill properties
productarray of stringactionstringteam_idstringactor_idstringfromstring (date-time) requiredtostring (date-time) required
top_teamsarray of objectteam_idstringactionsintegeractive_peopleintegerdrillDrillShow Drill properties
productarray of stringactionstringteam_idstringactor_idstringfromstring (date-time) requiredtostring (date-time) required
quiet_productsarray of objectReadable products with no action in the range.productstringlast_active_daystring (date) | null
successboolean required
400
A range or filter is not valid (VALIDATION_ERROR); the message names it.
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.request_idstringThis request's id, also inX-Request-ID.
successboolean
401
No API key was sent, or it is unknown, revoked or expired (UNAUTHORIZED).
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.request_idstringThis request's id, also inX-Request-ID.
successboolean
403
The key lacks the scope, may read none of the products asked for, or used actor_id (FORBIDDEN).
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.request_idstringThis request's id, also inX-Request-ID.
successboolean
429
Too many requests (RATE_LIMITED). Wait Retry-After seconds.
Retry-AfterintegerSeconds to wait.
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.request_idstringThis request's id, also inX-Request-ID.
successboolean
500
Something went wrong on EvoHub's side (INTERNAL_ERROR). Retry later.
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.request_idstringThis request's id, also inX-Request-ID.
successboolean
Example request
curl -X GET 'https://evohub.io/api/v1/evotrail/usage' \
-H 'Authorization: Bearer <TOKEN>'