# Health

Liveness checks that answer without an API key, outside the `/v1` prefix. Use them to tell whether the API is up.

## Ping the API

`GET /`

Answers at the API's root while it is up. It needs no API key and touches no data.

### Returns

Returns an object with these fields. The status is 200.

- `ok` (boolean, required): Always true: the API is up. Always `true`.
- `service` (string, required): The service that answered, always api. Always `api`.

### Request

```bash
curl https://api.qa.clankership.net/
```

### Response

```json
{
  "ok": true,
  "service": "api"
}
```

### Errors

- `400` `InvalidInput`: The request is malformed, or a value is not allowed.
- `403` `Forbidden`: The key's user or role may not do this.
- `404` `NotFound`: The workspace or object does not exist, or the caller cannot see it.
- `409` `Conflict`: The change conflicts with current data, such as a slug that is already in use.
- `500` `Internal`: Clanker Ship failed to handle the request. Retry, or report the response's x-request-id.

## Check the API's health

`GET /health`

Answers while the API is up, for monitors and load balancers. It needs no API key and touches no data.

### Returns

Returns an object with these fields. The status is 200.

- `ok` (boolean, required): Always true: the API is up. Always `true`.
- `service` (string, required): The service that answered, always api. Always `api`.

### Request

```bash
curl https://api.qa.clankership.net/health
```

### Response

```json
{
  "ok": true,
  "service": "api"
}
```

### Errors

- `400` `InvalidInput`: The request is malformed, or a value is not allowed.
- `403` `Forbidden`: The key's user or role may not do this.
- `404` `NotFound`: The workspace or object does not exist, or the caller cannot see it.
- `409` `Conflict`: The change conflicts with current data, such as a slug that is already in use.
- `500` `Internal`: Clanker Ship failed to handle the request. Retry, or report the response's x-request-id.
