curl --request GET \
--url https://alpha.api.trycaesar.com/v1/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://alpha.api.trycaesar.com/v1/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://alpha.api.trycaesar.com/v1/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"endpoints": [
{
"errors": 123,
"label": "<string>",
"p95_duration_ms": 123,
"requests": 123,
"route": "<string>"
}
],
"headline": {
"avg_duration_ms": 123,
"error_rate": 123,
"errors": 123,
"p95_duration_ms": 123,
"requests": 123,
"spend_cents": 123
},
"keys": [
{
"api_key_id": "<string>",
"errors": 123,
"key_prefix": "<string>",
"last_used_at": "<string>",
"name": "<string>",
"p95_duration_ms": 123,
"requests": 123,
"spend_cents": 123,
"status": "active"
}
],
"latency_series": [
{
"avg_duration_ms": 123,
"bucket": "<string>",
"p95_duration_ms": 123
}
],
"products": [
{
"label": "<string>",
"product": "<string>",
"requests": 123,
"spend_cents": 123
}
],
"range": {
"from": "<string>",
"interval": "hour",
"timezone": "<string>",
"to": "<string>"
},
"series": [
{
"bucket": "<string>",
"errors": 123,
"group_id": "<string>",
"group_label": "<string>",
"requests": 123
}
],
"$schema": "https://alpha.api.trycaesar.com/UsageOverviewResponse.json"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"request_id": "<string>",
"type": "error",
"$schema": "https://alpha.api.trycaesar.com/ErrorEnvelope.json"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"request_id": "<string>",
"type": "error",
"$schema": "https://alpha.api.trycaesar.com/ErrorEnvelope.json"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"request_id": "<string>",
"type": "error",
"$schema": "https://alpha.api.trycaesar.com/ErrorEnvelope.json"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"request_id": "<string>",
"type": "error",
"$schema": "https://alpha.api.trycaesar.com/ErrorEnvelope.json"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"request_id": "<string>",
"type": "error",
"$schema": "https://alpha.api.trycaesar.com/ErrorEnvelope.json"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"request_id": "<string>",
"type": "error",
"$schema": "https://alpha.api.trycaesar.com/ErrorEnvelope.json"
}Get organization usage
Usage analytics for the API key’s organization: request and error totals, latency, per-key and per-endpoint breakdowns, and billable product spend. Defaults to the last 30 days in day buckets (UTC).
curl --request GET \
--url https://alpha.api.trycaesar.com/v1/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://alpha.api.trycaesar.com/v1/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://alpha.api.trycaesar.com/v1/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"endpoints": [
{
"errors": 123,
"label": "<string>",
"p95_duration_ms": 123,
"requests": 123,
"route": "<string>"
}
],
"headline": {
"avg_duration_ms": 123,
"error_rate": 123,
"errors": 123,
"p95_duration_ms": 123,
"requests": 123,
"spend_cents": 123
},
"keys": [
{
"api_key_id": "<string>",
"errors": 123,
"key_prefix": "<string>",
"last_used_at": "<string>",
"name": "<string>",
"p95_duration_ms": 123,
"requests": 123,
"spend_cents": 123,
"status": "active"
}
],
"latency_series": [
{
"avg_duration_ms": 123,
"bucket": "<string>",
"p95_duration_ms": 123
}
],
"products": [
{
"label": "<string>",
"product": "<string>",
"requests": 123,
"spend_cents": 123
}
],
"range": {
"from": "<string>",
"interval": "hour",
"timezone": "<string>",
"to": "<string>"
},
"series": [
{
"bucket": "<string>",
"errors": 123,
"group_id": "<string>",
"group_label": "<string>",
"requests": 123
}
],
"$schema": "https://alpha.api.trycaesar.com/UsageOverviewResponse.json"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"request_id": "<string>",
"type": "error",
"$schema": "https://alpha.api.trycaesar.com/ErrorEnvelope.json"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"request_id": "<string>",
"type": "error",
"$schema": "https://alpha.api.trycaesar.com/ErrorEnvelope.json"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"request_id": "<string>",
"type": "error",
"$schema": "https://alpha.api.trycaesar.com/ErrorEnvelope.json"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"request_id": "<string>",
"type": "error",
"$schema": "https://alpha.api.trycaesar.com/ErrorEnvelope.json"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"request_id": "<string>",
"type": "error",
"$schema": "https://alpha.api.trycaesar.com/ErrorEnvelope.json"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"request_id": "<string>",
"type": "error",
"$schema": "https://alpha.api.trycaesar.com/ErrorEnvelope.json"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Window start (ISO 8601). Default: 30 days before to.
Window end (ISO 8601). Default: now.
Bucket size for the series. Default day; hour requires a range of at most 8 days.
, hour, day Comma-separated API key uuids to filter by (at most 50).
Optional grouping of the request series.
, none, api_key, endpoint, status_class Response
Organization usage overview.
Per-route breakdown, requests desc.
Show child attributes
Show child attributes
Window totals.
Show child attributes
Show child attributes
Per-API-key breakdown, requests desc.
Show child attributes
Show child attributes
Latency per bucket, ungrouped.
Show child attributes
Show child attributes
Billable products and spend.
Show child attributes
Show child attributes
The resolved query window.
Show child attributes
Show child attributes
Requests per bucket, zero-filled.
Show child attributes
Show child attributes
A URL to the JSON Schema for this object.
"https://alpha.api.trycaesar.com/UsageOverviewResponse.json"