# System

## GET /api/v1/health

`GET /api/v1/health`

Returns 200 with status "ok" while running, or 503 with status "draining" once shutdown starts. The probe does not check database, RPC or indexer availability. The HTTP listener closes during shutdown, so new probes may fail to connect.

### Responses

#### `200`: Success

Headers:

- `X-Request-Id` `string`: HTTP attempt ID used by request logs. Exposed through CORS.
- `X-Trace-Id` `string`: Trace ID when supplied by the gateway. Exposed through CORS.

Body (`application/json`):

- `status` `string` *(required)*: "ok" while running, or "draining" once shutdown starts.
- `timestamp` `string` *(required)*: Server clock when the probe was answered, as an ISO 8601 UTC string.

#### `503`: Error

Headers:

- `X-Request-Id` `string`: HTTP attempt ID used by request logs. Exposed through CORS.
- `X-Trace-Id` `string`: Trace ID when supplied by the gateway. Exposed through CORS.

Body (`application/json`):

- `status` `string` *(required)*: "ok" while running, or "draining" once shutdown starts.
- `timestamp` `string` *(required)*: Server clock when the probe was answered, as an ISO 8601 UTC string.

### Example request

```bash
curl https://swap.symbiotic.fi/api/v1/health
```

```ts
fetch('https://swap.symbiotic.fi/api/v1/health')
```

## GET /api/v1/solver-logos/\{filename\}

`GET /api/v1/solver-logos/{filename}`

Public bundled solver PNG. Use the absolute metadata.logoUrl returned with each quote. Filenames include a SHA-256 digest and responses are immutable for one year.

### Path parameters

- `filename` `string` *(required)*

### Responses

#### `200`: Solver logo

#### `404`: Error

Headers:

- `X-Request-Id` `string`: HTTP attempt ID used by request logs. Exposed through CORS.
- `X-Trace-Id` `string`: Trace ID when supplied by the gateway. Exposed through CORS.

Body (`application/json`):

- `error` `object` *(required)*: Wrapper object present on every error response. It is the only top-level key in the body.
  - `code` `string` *(required)*: Machine-readable error code, such as badRequest, forbidden, notFound, conflict, internalError or approvalAllowanceUnavailable.
  - `message` `string` *(required)*: Human-readable explanation of the error.
  - `status` `number` *(required)*: HTTP status code, repeated inside the body so the envelope is self-describing.
  - `timestamp` `string` *(required)*: ISO 8601 UTC instant captured when the error was raised on the server.
  - `details` `object`: Sent only for request-validation failures: an issues\[] of \{path, message\}, one entry per failed check.

### Example request

```bash
curl https://swap.symbiotic.fi/api/v1/solver-logos/string
```

```ts
fetch('https://swap.symbiotic.fi/api/v1/solver-logos/string')
```
