Granite Upgrade Activates in11d:16h:54m:17s
Data API Usage Metrics

Get logs for requests made by client

Gets logs for requests made by client over a specified time interval for a specific organization.

GET
/v1/apiLogs
x-glacier-api-key<token>

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

orgId?string

Organization ID to fetch usage metrics for

startTimestamp?integer

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.

Range0 <= value
endTimestamp?integer

The end time of the range as a UNIX timestamp. The requested end time will be rounded down to 0:00 UTC of the day.

Range0 <= value
chainId?string

Filter data by chain ID.

responseCode?string

Filter data by response status code.

requestType?string

Filter data by request type.

Value in"data" | "rpc"
apiKeyId?string

Filter data by API key ID.

requestPath?string

Filter data by request path.

pageToken?string

A page token, received from a previous list call. Provide this to retrieve the subsequent page.

pageSize?integer

The maximum number of items to return.

Default10
Range1 <= value <= 100

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/apiLogs?startTimestamp=1739507200&endTimestamp=1739664000"
{
  "nextPageToken": "string",
  "orgId": "string",
  "logs": [
    {
      "orgId": "string",
      "logId": "string",
      "eventTimestamp": 0,
      "apiKeyId": "string",
      "apiKeyAlias": "string",
      "hostRegion": "string",
      "requestType": "rpc",
      "requestPath": "string",
      "apiCreditsConsumed": 0,
      "requestDurationMsecs": 0,
      "responseCode": 0,
      "chainId": "string",
      "rpcMethod": "string",
      "metadata": {
        "ipAddress": "string",
        "host": "string",
        "userAgent": "string"
      }
    }
  ]
}
{
  "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?