# Get a check's uptime report as CSV

`GET /api/v1/checks/{checkId}/sla.csv`

The same report as CSV: a header row, then one `check` row.

Sign-in: a dashboard session, an API token with `checks:read` or the `monitorly` CLI's sign-in with `checks:read`.

Section: Checks. Operation id in openapi.json: `get_check_sla_csv`.

## Parameters

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `checkId` | path | yes | string (uuid) | The check's id. |
| `month` | query | no | string | `YYYY-MM`: the calendar month in the workspace timezone. Without `month`, `from` and `to`, the current month. |
| `from` | query | no | string | RFC 3339, together with `to`; not with `month`. |
| `to` | query | no | string | RFC 3339, together with `from`; at most 367 days after it. |

## Responses

Errors are `application/problem+json` (`Problem`); branch on `type`.

### 200

RFC 4180 CSV, UTF-8

`text/csv`: string

### 400

Bad Request.

- `request.malformed`: the body or a parameter is not of the expected shape
- `auth.credentials_conflict`: the request carries both a session cookie and a token

### 401

Unauthorized.

- `auth.unauthenticated`, `auth.session_expired`: no session, or it ended
- `token.invalid`: the token is malformed, unknown, revoked or expired, or its creator left the workspace

### 403

Forbidden.

- `auth.forbidden`: your role is too low for this
- `token.scope_missing`: the token lacks the scope this needs; `detail` names it

### 404

Not Found.

- `request.not_found`: it does not exist, or you cannot see it

### 422

Unprocessable Entity.

- `field.invalid`, `field.required`: a parameter breaks a rule; `errors` points at it
- `request.invalid_range`: `from` is not earlier than `to`

### 429

Too Many Requests.

- `token.rate_limited`: more than 10 requests a second with this token

Schemas named above are listed with their fields in [the schema list](https://docs.monitorly.cloud/api/reference/schemas.md).
