# API monitoring endpoints

Source: https://docs.settlemint.com/docs/api-reference/observability/api-monitoring
Query API traffic, latency, errors, request logs, and real-time API activity from the DALP monitoring API.



## Overview [#overview]

The API monitoring endpoints expose tenant-scoped request metrics and logs for DALP administrators and organization owners. Use them to see which REST or RPC endpoints are busy, which calls fail, how latency changes over time, and what happened during one captured API request.

The surface is read-only. It reports captured API activity for your active organization and does not change token, participant, wallet, or compliance state.

## Access and scope [#access-and-scope]

API monitoring calls require an authenticated DALP account with the administrator role or the owner role for the active organization. List and metric endpoints return data scoped to your organization. Log detail returns a not-found error when the entry is not visible in the active organization.

Captured logs can include caller metadata, route templates, status codes, durations, trace IDs, and idempotency keys. The detail endpoint exposes redacted request and response bodies.

## Requirements [#requirements]

Before calling these endpoints:

* Authenticate with a DALP account that has administrator access for the active organization.
* Send timestamps as ISO 8601 values.
* Keep request ranges inside the endpoint-specific range limit.
* Use the API reference for generated client method names and exact transport details.

## Endpoint summary [#endpoint-summary]

| Purpose             | Method and path                                         | Range limit | Pagination or limit     | Use it for                                                                                |
| ------------------- | ------------------------------------------------------- | ----------- | ----------------------- | ----------------------------------------------------------------------------------------- |
| Summary metrics     | `GET /api/v2/monitoring/api/request-metrics/summary`    | 7 days      | N/A                     | Total request volume, error rate, 4xx/5xx error counts, average latency, and p95 latency. |
| Timeline            | `GET /api/v2/monitoring/api/request-metrics/timeline`   | 31 days     | N/A                     | Hourly or daily buckets split by REST/RPC traffic and status class.                       |
| Endpoint metrics    | `GET /api/v2/monitoring/api/endpoint-metrics`           | 7 days      | `limit` 1-100, `offset` | Per-endpoint request count, latency, error rate, filters, sorting, and pagination.        |
| Request logs        | `GET /api/v2/monitoring/api/request-logs`               | 7 days      | `limit` 1-100, `cursor` | Paginated log rows with filters and facets.                                               |
| Request log detail  | `GET /api/v2/monitoring/api/request-logs/{id}`          | N/A         | N/A                     | One log entry with redacted request and response detail.                                  |
| Top errors          | `GET /api/v2/monitoring/api/request-metrics/top-errors` | 30 days     | `limit` 1-20            | Endpoints with the highest error counts and their dominant error status code.             |
| Live request stream | `GET /api/v2/monitoring/api/request-logs/stream`        | N/A         | N/A                     | Server-sent events for new API log entries in the active organization.                    |

## Get summary metrics [#get-summary-metrics]

The summary endpoint gives a compact health snapshot for a time range. Administrators use it to check error rates and latency before digging into individual endpoints.

```bash
curl -G "$DALP_API_URL/api/v2/monitoring/api/request-metrics/summary" \
  --header "X-Api-Key: ${DALP_API_TOKEN}" \
  --data-urlencode "from=2026-05-15T00:00:00.000Z" \
  --data-urlencode "to=2026-05-15T12:00:00.000Z" \
  --data-urlencode "requestType=rest"
```

The response includes:

* `totalRequests`
* `errorRate`, expressed as a fraction from `0` to `1`
* `serverErrorRate` for 5xx responses, when present
* `clientErrorRate` for 4xx responses, when present
* `avgDurationMs`
* `p95DurationMs`, which can be `null`
* `error4xxCount`
* `error5xxCount`

## Build a traffic timeline [#build-a-traffic-timeline]

The timeline endpoint lets you chart API activity over time. Operators use it to spot traffic spikes or latency shifts across a multi-day window. Set `granularity` to `hour` or `day`. Pass `endpointId` to scope the timeline to one route.

```bash
curl -G "$DALP_API_URL/api/v2/monitoring/api/request-metrics/timeline" \
  --header "X-Api-Key: ${DALP_API_TOKEN}" \
  --data-urlencode "from=2026-05-01T00:00:00.000Z" \
  --data-urlencode "to=2026-05-08T00:00:00.000Z" \
  --data-urlencode "granularity=day"
```

Each bucket returns a timestamp plus REST and RPC success counts, 4xx counts, 5xx counts, and average duration in milliseconds.

## Find slow or erroring endpoints [#find-slow-or-erroring-endpoints]

Endpoint metrics returns a ranked list of route templates. Use it when you need to prioritize investigation across many routes.

```bash
curl -G "$DALP_API_URL/api/v2/monitoring/api/endpoint-metrics" \
  --header "X-Api-Key: ${DALP_API_TOKEN}" \
  --data-urlencode "from=2026-05-15T00:00:00.000Z" \
  --data-urlencode "to=2026-05-15T12:00:00.000Z" \
  --data-urlencode "orderBy=errorRate" \
  --data-urlencode "limit=20"
```

Supported filters include `method`, `endpoint`, `tag`, and `requestType`. Supported sort fields are `requestCount`, `avgDurationMs`, and `errorRate`. The response includes `items`, `totalCount`, and server-computed `facets` for filterable columns. Each item includes `endpointId`, `method`, `routeTemplate`, `requestType`, `tag`, `requestCount`, `avgDurationMs`, and `errorRate`.

## Review request logs [#review-request-logs]

Request logs let you inspect individual API calls. The log list supports keyset pagination through `cursor` and returns `nextCursor` when more rows are available.

```bash
curl -G "$DALP_API_URL/api/v2/monitoring/api/request-logs" \
  --header "X-Api-Key: ${DALP_API_TOKEN}" \
  --data-urlencode "from=2026-05-15T00:00:00.000Z" \
  --data-urlencode "to=2026-05-15T12:00:00.000Z" \
  --data-urlencode "statusClass=5xx" \
  --data-urlencode "limit=50"
```

Supported filters include:

* `endpointId`
* `statusCode`
* `statusClass`: `2xx`, `4xx`, or `5xx`
* `endpoint`, matched against the route template
* `method`
* `requestType`: `rest` or `rpc`
* `cursor`
* `limit`, from 1 to 100

Each log row includes `id`, `method`, `routeTemplate`, `requestType`, `statusCode`, `durationMs`, `requestedAt`, caller information, IP address, user agent, trace ID, and idempotency key when available. The response also includes `totalCount`, `nextCursor`, and facets for `method`, `statusClass`, and `requestType`.

## Open a request log detail [#open-a-request-log-detail]

The detail endpoint gives full context for one log row. The response includes the core log fields plus request and response sizes, a short failure message, redacted headers and bodies, request URL, structured error details, trace ID, and idempotency key.

```bash
curl "$DALP_API_URL/api/v2/monitoring/api/request-logs/$LOG_ID" \
  --header "X-Api-Key: ${DALP_API_TOKEN}"
```

If the log entry is not visible in the active organization, the API returns a not-found error.

## Identify top erroring endpoints [#identify-top-erroring-endpoints]

Top errors ranks routes by failure count. Use it to focus incident investigation on the most impactful endpoints first. The response includes total count, error count, error rate, and the dominant status code for each route.

```bash
curl -G "$DALP_API_URL/api/v2/monitoring/api/request-metrics/top-errors" \
  --header "X-Api-Key: ${DALP_API_TOKEN}" \
  --data-urlencode "from=2026-05-01T00:00:00.000Z" \
  --data-urlencode "to=2026-05-15T00:00:00.000Z" \
  --data-urlencode "limit=5"
```

The optional `requestType` filter narrows the result to REST or RPC traffic. `limit` can be from 1 to 20.

## Stream new request logs [#stream-new-request-logs]

The stream endpoint delivers live activity to an operations console. The server-sent event stream yields one log entry for each new captured API request in the active organization.

```bash
curl -N "$DALP_API_URL/api/v2/monitoring/api/request-logs/stream" \
  --header "X-Api-Key: ${DALP_API_TOKEN}"
```

The stream does not accept server-side filters. DALP scopes events to the active organization before emitting them; apply method, endpoint, request-type, or status-class filters in the client.

## Operational notes [#operational-notes]

* `from` must be before `to`; `from` is inclusive and `to` is exclusive.
* Summary, endpoint metrics, and request logs accept a 7-day maximum range.
* Top errors accepts a 30-day maximum.
* Timeline accepts a 31-day maximum.
* `errorRate` values are fractions. Multiply by 100 when displaying percentages.
* Request and response bodies in log detail are redacted before they are returned.
* Log and metric data is scoped to the active organization.

## Related guides [#related-guides]

* [API reference](/docs/api-reference/reference/openapi) for the generated OpenAPI specification.
* [Error handling](/docs/api-reference/errors/error-handling) for retry and failure-handling patterns.
* [Blockchain monitoring](/docs/developers/operations/blockchain-monitoring) for chain and transaction monitoring workflows.
