# Organization API: Customer Portal: Snapshots

> The 7 Organization API operations for snapshots.

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

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

## Operations

| Method | Path | Summary |
| --- | --- | --- |
| GET | [`/api/v1/orgs/{org_slug}/portal/snapshots`](#op-get-api-v1-orgs-org-slug-portal-snapshots) | Every snapshot this customer holds, across every server they have had |
| GET | [`/api/v1/orgs/{org_slug}/portal/snapshots/allowance`](#op-get-api-v1-orgs-org-slug-portal-snapshots-allowance) | Snapshot allowance |
| GET | [`/api/v1/orgs/{org_slug}/portal/snapshots/{snapshot_uuid}`](#op-get-api-v1-orgs-org-slug-portal-snapshots-snapshot-uuid) | One snapshot, for the order form that was handed its uuid in a link |
| DELETE | [`/api/v1/orgs/{org_slug}/portal/snapshots/{snapshot_uuid}`](#op-delete-api-v1-orgs-org-slug-portal-snapshots-snapshot-uuid) | Delete a snapshot the account owns, with or without its source server |
| GET | [`/api/v1/orgs/{org_slug}/portal/snapshots/{snapshot_uuid}/download`](#op-get-api-v1-orgs-org-slug-portal-snapshots-snapshot-uuid-download) | A signed URL for an archive whose server may no longer exist |
| POST | [`/api/v1/orgs/{org_slug}/portal/snapshots/{snapshot_uuid}/lock`](#op-post-api-v1-orgs-org-slug-portal-snapshots-snapshot-uuid-lock) | Keep or release a snapshot the account owns, with or without its server |
| POST | [`/api/v1/orgs/{org_slug}/portal/snapshots/{snapshot_uuid}/restore`](#op-post-api-v1-orgs-org-slug-portal-snapshots-snapshot-uuid-restore) | Restore an account snapshot onto one of the customer's servers |

### Every snapshot this customer holds, across every server they have had {#op-get-api-v1-orgs-org-slug-portal-snapshots}

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

Every snapshot this customer holds, across every server they have had.

Scoped by the customer rather than by a server, so a customer whose service
was terminated can still see what they can restore. This uses the
customer's own tuple instead of deriving one from a server, because there
may be no server left to derive it from, and that is the case that matters.

#### Parameters

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

#### Responses

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

### Snapshot allowance {#op-get-api-v1-orgs-org-slug-portal-snapshots-allowance}

`GET /api/v1/orgs/{org_slug}/portal/snapshots/allowance`

#### Parameters

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

#### Responses

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

### One snapshot, for the order form that was handed its uuid in a link {#op-get-api-v1-orgs-org-slug-portal-snapshots-snapshot-uuid}

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

One snapshot, for the order form that was handed its uuid in a link.

Registered after ``/snapshots/allowance`` on purpose: FastAPI matches in
declaration order, and a path parameter here would otherwise swallow it.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `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. |

### Delete a snapshot the account owns, with or without its source server {#op-delete-api-v1-orgs-org-slug-portal-snapshots-snapshot-uuid}

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

Delete a snapshot the account owns, with or without its source server.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `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. |

### A signed URL for an archive whose server may no longer exist {#op-get-api-v1-orgs-org-slug-portal-snapshots-snapshot-uuid-download}

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

A signed URL for an archive whose server may no longer exist.

The free-tier download gate reads the *source server's* plan, and a
snapshot whose server is gone has none to read, so it is treated as
paid. Refusing instead would strand the archives that matter most, and a
customer with no server is not using a free tier.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `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 or release a snapshot the account owns, with or without its server {#op-post-api-v1-orgs-org-slug-portal-snapshots-snapshot-uuid-lock}

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

Keep or release a snapshot the account owns, with or without its server.

The platform client had this and the portal did not, so a customer whose
server was deleted could see the snapshot the sweep was about to rotate
away and had no way to keep it.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `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 an account snapshot onto one of the customer's servers {#op-post-api-v1-orgs-org-slug-portal-snapshots-snapshot-uuid-restore}

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

Restore an account snapshot onto one of the customer's servers.

The target is required rather than defaulted. On this path there is no
server in the URL to fall back to, and guessing which server to overwrite
is the one mistake here that destroys data.

The permission is still checked against the target server, because that is
the one being overwritten and the one a subuser was or was not trusted with.

#### Parameters

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

#### Request body

`application/json` (required)

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