Usage history by month
GET
/v1/usage/history
const url = 'https://api.pomeloanalytics.com/v1/usage/history';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.pomeloanalytics.com/v1/usage/history \ --header 'Authorization: Bearer <token>'Requires usage:read scope. Tokens with metrics:read also
have implicit access to this endpoint.
Authorizations
Section intitulée « Authorizations »Parameters
Section intitulée « Parameters »Header Parameters
Section intitulée « Header Parameters »X-Request-Id
string
Optional idempotency/request correlation identifier.
Query Parameters
Section intitulée « Query Parameters »from
string format: date
Inclusive UTC start date (YYYY-MM-DD). Defaults to last 7 days.
to
string format: date
Inclusive UTC end date (YYYY-MM-DD). Defaults to today.
Responses
Section intitulée « Responses »OK
Media typeapplication/json
object
items
required
Array<object>
object
period
required
string
units_used
required
integer
units_included
required
integer
units_overage
required
integer
hard_cap_units
required
integer
Example
{ "items": [ { "period": "2026-01" } ]}X-Request-Id
string
Request identifier for troubleshooting.
Invalid or revoked API token.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
request_id
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "UNAUTHORIZED" }}X-Request-Id
string
Request identifier for troubleshooting.
Token scope/site/plan does not allow this request.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
request_id
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "UNAUTHORIZED" }}X-Request-Id
string
Request identifier for troubleshooting.
Request parameters are invalid.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
request_id
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "UNAUTHORIZED" }}X-Request-Id
string
Request identifier for troubleshooting.
Request was throttled.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
request_id
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "UNAUTHORIZED" }}X-Request-Id
string
Request identifier for troubleshooting.
X-RateLimit-Limit
integer
Maximum requests allowed during current short window.
X-RateLimit-Remaining
integer
Remaining requests in current short window.
X-RateLimit-Reset
integer
Unix timestamp when short window resets.