EvoTrail API › Product metrics
Billing usage
Read through EvoTrail: the organization's metered usage, as the Billing console shows it. EvoTrail passes the query parameters on, asks the product for the key's own view (its teams and scopes), and returns the product's answer byte for byte, including its errors and status codes. A 401 from the product is turned into 403.
Permission (API-key scope): evotrail:metrics:read. The key also needs billing:usage:read.
Authorization
bearerAuth(evotrail:metrics:read)apiKeyHeader(evotrail:metrics:read)
Responses
200
The product's answer.
Whatever the product answers; see its own reference.
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 evotrail:metrics:read or the product's permission (FORBIDDEN), or the product refused it.
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.request_idstringThis request's id, also inX-Request-ID.
successboolean
404
EvoTrail does not read this product's metrics in this environment (PRODUCT_NOT_CONNECTED), or the id is not valid (NOT_FOUND). The product's own 404 is passed through as well.
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
502
The product did not answer (UPSTREAM_UNAVAILABLE, 502).
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.request_idstringThis request's id, also inX-Request-ID.
successboolean
504
The product took longer than 10 seconds (UPSTREAM_TIMEOUT).
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/metrics/billing/usage' \
-H 'Authorization: Bearer <TOKEN>'