Get usage metrics for the Data API
Gets metrics for Data API usage over a specified time interval aggregated at the specified time-duration granularity.
Api keys provide higher access to rate limits. To obtain an api key, sign up for an account at https://build.avax.network/console/utilities/data-api-keys.
In: header
Query Parameters
Organization ID to fetch usage metrics for
The start time of the range as a UNIX timestamp. The requested start time will be rounded down to 0:00 UTC of the day.
0 <= valueThe end time of the range as a UNIX timestamp. The requested end time will be rounded down to 0:00 UTC of the day.
0 <= valueTime interval granularity for data aggregation
"minute" | "hourly" | "daily" | "weekly" | "monthly"Query param for the criterion used for grouping metrics
"requestPath" | "responseCode" | "chainId" | "apiKeyId" | "requestType"Filter data by chain ID.
Filter data by response status code.
Filter data by request type.
"data" | "rpc"Filter data by API key ID.
Filter data by request path.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://data-api.avax.network/v1/apiUsageMetrics?startTimestamp=1739507200&endTimestamp=1739664000&timeInterval=daily&groupBy=requestPath"{
"aggregateDuration": "string",
"orgId": "string",
"metrics": [
{
"timestamp": 0,
"values": [
{
"groupedBy": "requestPath",
"groupValue": "string",
"totalRequests": 0,
"requestsPerSecond": 0,
"successRatePercent": 0,
"medianResponseTimeMsecs": 0,
"invalidRequests": 0,
"apiCreditsUsed": 0,
"apiCreditsWasted": 0
}
]
}
]
}{
"message": "string",
"statusCode": 400,
"error": "Bad Request"
}{
"message": "string",
"statusCode": 401,
"error": "Unauthorized"
}{
"message": "string",
"statusCode": 403,
"error": "Forbidden"
}{
"message": "string",
"statusCode": 404,
"error": "Not Found"
}{
"message": "string",
"statusCode": 429,
"error": "Too Many Requests"
}{
"message": "string",
"statusCode": 500,
"error": "Internal Server Error"
}{
"message": "string",
"statusCode": 502,
"error": "Bad Gateway"
}{
"message": "string",
"statusCode": 503,
"error": "Service Unavailable"
}Is this guide helpful?