---
title: "Get logs for requests made by client"
method: GET
path: "/v1/apiLogs"
tags: ["Data API Usage Metrics"]
---

# Get logs for requests made by client

`GET /v1/apiLogs`

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

## Query parameters

- `orgId` string
- `startTimestamp` integer
- `endTimestamp` integer
- `chainId` string
- `responseCode` string
- `requestType` 'data' | 'rpc'
- `apiKeyId` string
- `requestPath` string
- `pageToken` string
- `pageSize` integer

## Response `200`

Successful response

- LogsResponseDTO
  - `nextPageToken` string — A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
  - `orgId` string, required — The organization id of the request.
  - `logs` LogsFormat[], required — An array of logs representing the requests made by clients.
    - `orgId` string, required — The organization id of the request.
    - `logId` string, required — The unique log id of the request.
    - `eventTimestamp` number, required — The timestamp of the request.
    - `apiKeyId` string, required — The apiKey used to make the request.
    - `apiKeyAlias` string, required — The alias of the apiKey used to make the request.
    - `hostRegion` string, required — The region of the host for the request made by the client.
    - `requestType` 'data' | 'rpc', required — The type of request made by the client.
    - `requestPath` string, required — The path of the request made by the client.
    - `apiCreditsConsumed` number, required — The number of API credits consumed by the request.
    - `requestDurationMsecs` number, required — The duration of the request in milliseconds.
    - `responseCode` number, required — The response code of the request.
    - `chainId` string — The chain id of the request.
    - `rpcMethod` string — The rpc method of the request.
    - `metadata` LogsFormatMetadata, required
      - `ipAddress` string, required — The IP address of the client that made the request.
      - `host` string, required — The host for the request made by the client.
      - `userAgent` string, required — The user agent of the client that made the request.

## Other responses

- `400` — Bad requests generally mean the client has passed invalid or malformed parameters. Error messages in the response could help in evaluating the error.
- `401` — When a client attempts to access resources that require authorization credentials but the client lacks proper authentication in the request, the server responds with 401.
- `403` — When a client attempts to access resources with valid credentials but doesn't have the privilege to perform that action, the server responds with 403.
- `404` — The error is mostly returned when the client requests with either mistyped URL, or the passed resource is moved or deleted, or the resource doesn't exist.
- `429` — This error is returned when the client has sent too many, and has hit the rate limit.
- `500` — The error is a generic server side error that is returned for any uncaught and unexpected issues on the server side. This should be very rare, and you may reach out to us if the problem persists for a longer duration.
- `502` — This is an internal error indicating invalid response received by the client-facing proxy or gateway from the upstream server.
- `503` — The error is returned for certain routes on a particular Subnet. This indicates an internal problem with our Subnet node, and may not necessarily mean the Subnet is down or affected.

---

[API](https://skmtc.net/avax/apis/data-api.md) · [All operations](https://skmtc.net/avax/apis/data-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/avax/data-api/revisions/745a94fa47f5/schema)
