# Request Logs

Request Logs are a record of every inbound API request made to ODUS. Use them to debug integration issues, audit API usage, and inspect the exact payloads that were sent and received.

## Accessing Request Logs

In the ODUS Dashboard, navigate to **Developers > Request Logs**.

The page shows a paginated list of requests. Each row displays:

| Column   | Description                          |
| -------- | ------------------------------------ |
| Status   | HTTP response status code            |
| Method   | HTTP method (`POST`, `DELETE`, etc.) |
| Endpoint | The API path that was called         |
| Date     | Timestamp of the request             |

## Filtering logs

Use the filter bar at the top of the list to narrow results.

| Filter       | Type         | Description                                             |
| ------------ | ------------ | ------------------------------------------------------- |
| Method       | Select       | Filter by HTTP method (`POST` or `DELETE`)              |
| Status Code  | Number       | Filter by exact HTTP response status code               |
| API endpoint | Text         | Filter by a partial or full path (e.g. `/v2/payments`)  |
| Request ID   | Text         | Filter by the unique request ID                         |
| Initiator    | Multi-select | Filter by the key type used to authenticate the request |

The **Initiator** filter accepts the following values:

* `publishableKey` — requests made with a publishable key
* `secretKey` — requests made with a secret key
* `checkoutKey` — requests made during a checkout session
* `sessionKey` — requests made with a session key

## Viewing a log entry

Click any row in the list to open its detail panel on the right side of the page. The detail panel is divided into three sections.

### Request basic info

| Field        | Description                            |
| ------------ | -------------------------------------- |
| Request ID   | The unique identifier for this request |
| Timestamp    | When the request was received          |
| API endpoint | The full path that was called          |

### Request overview

| Field       | Description                                   |
| ----------- | --------------------------------------------- |
| Method      | HTTP method, shown as a colored label         |
| Status code | HTTP response code, shown as a colored label  |
| Client IP   | IP address of the caller                      |
| Initiator   | Key type used to authenticate the request     |
| User agent  | The `User-Agent` header sent with the request |

### Request & response details

The bottom section shows the full **Request Body** and **Response Body** as formatted JSON. This is useful for inspecting exactly what your integration sent and what ODUS returned.

## API reference

You can also retrieve request logs programmatically.

* [`GET /v2/logs`](https://docs.odus.com/docs/api/core/v2/request-log-controller-find-all-paginated) — retrieve a paginated list of request logs. Supports filtering by `method`, `statusCode`, `url`, `requestId`, `initiator`, `clientIp`, `createdAt`, and more.
* [`GET /v2/logs/{id}`](https://docs.odus.com/docs/api/core/v2/request-log-controller-find-one) — retrieve a single request log by its ID.

In v2, `initiator` on a log entry is an open string rather than a fixed set, so new values can appear. Handle a value you do not recognise instead of failing on it.

In v2, each log entry also carries `credentialId`, which tells you which credential made the request. For a key, it is the key's `id`, so you can match it against your list of keys. For a request made from the Dashboard, it is the ID of the signed-in user or of their session. `initiator` gives only the credential's type.

`credentialId` is `null` when no credential can be identified. That covers requests made without one, and entries recorded before the field was introduced — so do not treat a `null` on an older entry as an unauthenticated request.

### Refused credentials

A request refused because of its credential is logged with status `401`, including a read such as `GET /v2/payments`. That happens when the credential was deleted, deactivated or has expired, or when your account does not have access to the API. In v2, these entries carry `rejectionReason`:

* `invalid_credential` — the key or session was not accepted. Check `credentialId` to find which one, and replace it in your integration.
* `account_not_entitled` — the credential is valid, but your account does not currently have access to the API. Contact ODUS support.

`rejectionReason` is `null` on every other entry. A request refused for a credential that does not belong to your account, or for having no credential at all, does not appear in your logs. The entry for a refused request may have no request or response body.

In a log entry, the `Authorization` header, the key that authenticated the request and any key the request created appear as `[REDACTED]`.

Reading request logs is recorded too. Each call to `GET /v2/logs` or `GET /v2/logs/{id}` — including the ones the Dashboard makes when you open **Request Logs** — adds a log entry with the `GET` method, the URL that was read (with its filters) and the `credentialId` that read it. These entries have no response body. To list them through the API, filter by `method` with the value `GET`.

tip

The API supports range filters on `createdAt` (e.g. `createdAt[gte]` and `createdAt[lte]`), which lets you query logs for a specific time window — useful for automated audits or incident investigation.
