# Organization API: Customer Portal: Snapshots

> The 9 Organization API operations for snapshots.

Source: https://docs.coritan.com/api/reference/organizations/customer-portal/servers-snapshots/

Part of [Customer Portal](/api/reference/organizations/customer-portal/).

## Operations

| Method | Path | Summary |
| --- | --- | --- |
| GET | [`/api/v1/orgs/{org_slug}/portal/servers/{uuid}/snapshots`](#op-get-api-v1-orgs-org-slug-portal-servers-uuid-snapshots) | List snapshots |
| POST | [`/api/v1/orgs/{org_slug}/portal/servers/{uuid}/snapshots`](#op-post-api-v1-orgs-org-slug-portal-servers-uuid-snapshots) | Create snapshot |
| GET | [`/api/v1/orgs/{org_slug}/portal/servers/{uuid}/snapshots/estimate`](#op-get-api-v1-orgs-org-slug-portal-servers-uuid-snapshots-estimate) | How much of the allowance a snapshot of this server would use |
| GET | [`/api/v1/orgs/{org_slug}/portal/servers/{uuid}/snapshots/seed`](#op-get-api-v1-orgs-org-slug-portal-servers-uuid-snapshots-seed) | The restore a server ordered from a snapshot is waiting on, or got |
| POST | [`/api/v1/orgs/{org_slug}/portal/servers/{uuid}/snapshots/seed/retry`](#op-post-api-v1-orgs-org-slug-portal-servers-uuid-snapshots-seed-retry) | Run a failed seed again |
| DELETE | [`/api/v1/orgs/{org_slug}/portal/servers/{uuid}/snapshots/{snapshot_uuid}`](#op-delete-api-v1-orgs-org-slug-portal-servers-uuid-snapshots-snapshot-uuid) | Delete snapshot |
| GET | [`/api/v1/orgs/{org_slug}/portal/servers/{uuid}/snapshots/{snapshot_uuid}/download`](#op-get-api-v1-orgs-org-slug-portal-servers-uuid-snapshots-snapshot-uuid-download) | Download snapshot |
| POST | [`/api/v1/orgs/{org_slug}/portal/servers/{uuid}/snapshots/{snapshot_uuid}/lock`](#op-post-api-v1-orgs-org-slug-portal-servers-uuid-snapshots-snapshot-uuid-lock) | Keep a snapshot, or release it |
| POST | [`/api/v1/orgs/{org_slug}/portal/servers/{uuid}/snapshots/{snapshot_uuid}/restore`](#op-post-api-v1-orgs-org-slug-portal-servers-uuid-snapshots-snapshot-uuid-restore) | Restore onto this server, from any snapshot this customer owns |

### List snapshots {#op-get-api-v1-orgs-org-slug-portal-servers-uuid-snapshots}

`GET /api/v1/orgs/{org_slug}/portal/servers/{uuid}/snapshots`

Snapshots taken from this server or, with ``scope=account``, every
snapshot the account holds, each judged for restoring onto *this* server.

The account list is the owner's, since those are the only snapshots a
restore here would accept; a shared-server viewer asking for it gets this
server's own list, the same as the platform client surface.

#### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `uuid` | path | string | yes |  |
| `org_slug` | path | string | yes |  |
| `scope` | query | string | no | Default: `this`. |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Create snapshot {#op-post-api-v1-orgs-org-slug-portal-servers-uuid-snapshots}

`POST /api/v1/orgs/{org_slug}/portal/servers/{uuid}/snapshots`

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `uuid` | path | string | yes |
| `org_slug` | path | string | yes |

#### Request body

`application/json`

| Field | Type | Required |
| --- | --- | --- |
| `name` | string | yes |
| `ignored_files` | array of string or null | no |
| `is_locked` | boolean | no |

#### Responses

| Status | Meaning |
| --- | --- |
| `201` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### How much of the allowance a snapshot of this server would use {#op-get-api-v1-orgs-org-slug-portal-servers-uuid-snapshots-estimate}

`GET /api/v1/orgs/{org_slug}/portal/servers/{uuid}/snapshots/estimate`

How much of the allowance a snapshot of this server would use.

Its own endpoint rather than a field on the listing, because the figure is
read live from Wings: folding it into the list would make the snapshots tab
as slow as the slowest node on the fleet, on every load, to answer a
question only the create dialog asks.

Deliberately an over-estimate. It is the server's current *uncompressed*
disk usage, and an archive is never larger than what it archives, so a
creation that fits on this number cannot push the account over. The
retention policy depends on that. What the customer sees is therefore a
ceiling, and the dialog says so.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `uuid` | path | string | yes |
| `org_slug` | path | string | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### The restore a server ordered from a snapshot is waiting on, or got {#op-get-api-v1-orgs-org-slug-portal-servers-uuid-snapshots-seed}

`GET /api/v1/orgs/{org_slug}/portal/servers/{uuid}/snapshots/seed`

The restore a server ordered from a snapshot is waiting on, or got.

Null for a server ordered the ordinary way, which is nearly all of them.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `uuid` | path | string | yes |
| `org_slug` | path | string | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Run a failed seed again {#op-post-api-v1-orgs-org-slug-portal-servers-uuid-snapshots-seed-retry}

`POST /api/v1/orgs/{org_slug}/portal/servers/{uuid}/snapshots/seed/retry`

Run a failed seed again. A failed restore leaves the snapshot unharmed.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `uuid` | path | string | yes |
| `org_slug` | path | string | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Delete snapshot {#op-delete-api-v1-orgs-org-slug-portal-servers-uuid-snapshots-snapshot-uuid}

`DELETE /api/v1/orgs/{org_slug}/portal/servers/{uuid}/snapshots/{snapshot_uuid}`

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `uuid` | path | string | yes |
| `snapshot_uuid` | path | string | yes |
| `org_slug` | path | string | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Download snapshot {#op-get-api-v1-orgs-org-slug-portal-servers-uuid-snapshots-snapshot-uuid-download}

`GET /api/v1/orgs/{org_slug}/portal/servers/{uuid}/snapshots/{snapshot_uuid}/download`

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `uuid` | path | string | yes |
| `snapshot_uuid` | path | string | yes |
| `org_slug` | path | string | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Keep a snapshot, or release it {#op-post-api-v1-orgs-org-slug-portal-servers-uuid-snapshots-snapshot-uuid-lock}

`POST /api/v1/orgs/{org_slug}/portal/servers/{uuid}/snapshots/{snapshot_uuid}/lock`

Keep a snapshot, or release it. A locked snapshot is not rotated away.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `uuid` | path | string | yes |
| `snapshot_uuid` | path | string | yes |
| `org_slug` | path | string | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Restore onto this server, from any snapshot this customer owns {#op-post-api-v1-orgs-org-slug-portal-servers-uuid-snapshots-snapshot-uuid-restore}

`POST /api/v1/orgs/{org_slug}/portal/servers/{uuid}/snapshots/{snapshot_uuid}/restore`

Restore onto this server, from any snapshot this customer owns.

Addressed by the target server because that is what is being overwritten,
and what the permission is checked against.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `uuid` | path | string | yes |
| `snapshot_uuid` | path | string | yes |
| `org_slug` | path | string | yes |

#### Request body

`application/json`

| Field | Type | Required |
| --- | --- | --- |
| `target_server_uuid` | string or null | no |
| `truncate` | boolean | no |
| `allow_mismatch` | boolean | no |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |
