# Get a plan

`GET /api/v1/projects/{projectId}/config/plans/{planId}`

A stored plan as [Plan a configuration](https://docs.monitorly.cloud/api/reference/operations/plan-config.md) answered it, with `appliedAt` once applied. Kept for a day after it expires.

Sign-in: a dashboard session, any API token or the `monitorly` CLI's sign-in.

Section: Config plan and apply. Operation id in openapi.json: `get_config_plan`.

## Parameters

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `projectId` | path | yes | string (uuid) | The project's id. |
| `planId` | path | yes | string (uuid) | The plan's id, from the answer that made it. |

## Responses

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

### 200

The plan.

`application/json`: ConfigPlanView

| Field | Type | Required | Description |
|---|---|---|---|
| `appliedAt` | string \| null | no | When the plan was applied; null until then. Always sent; optional in the schema because it was added after the first clients. |
| `changes` | array of ConfigChange | yes |  |
| `expiresAt` | string | yes | Apply before this instant. |
| `planId` | string (uuid) | yes |  |
| `projectId` | string (uuid) | yes |  |
| `prune` | boolean | yes |  |
| `summary` | PlanSummary | yes |  |

### 400

Bad Request.

- `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

### 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).
