# Client API: Container Apps: Snapshots

> The 7 Client API operations for snapshots.

Source: https://docs.coritan.com/api/reference/client/container-apps/snapshots/

Part of [Container Apps](/api/reference/client/container-apps/).

## Operations

| Method | Path | Summary |
| --- | --- | --- |
| GET | [`/api/v1/client/snapshots`](#op-get-api-v1-client-snapshots) | Every snapshot this account holds, across every server it has had |
| GET | [`/api/v1/client/snapshots/allowance`](#op-get-api-v1-client-snapshots-allowance) | The account's snapshot meter |
| GET | [`/api/v1/client/snapshots/{snapshot_uuid}`](#op-get-api-v1-client-snapshots-snapshot-uuid) | One snapshot, for the order form that was handed its uuid in a link |
| DELETE | [`/api/v1/client/snapshots/{snapshot_uuid}`](#op-delete-api-v1-client-snapshots-snapshot-uuid) | Delete a snapshot and the archive behind it |
| GET | [`/api/v1/client/snapshots/{snapshot_uuid}/download`](#op-get-api-v1-client-snapshots-snapshot-uuid-download) | A signed URL for the archive itself |
| POST | [`/api/v1/client/snapshots/{snapshot_uuid}/lock`](#op-post-api-v1-client-snapshots-snapshot-uuid-lock) | Keep a snapshot, or release it |
| POST | [`/api/v1/client/snapshots/{snapshot_uuid}/restore`](#op-post-api-v1-client-snapshots-snapshot-uuid-restore) | Restore a snapshot onto one of this account's servers |

### Every snapshot this account holds, across every server it has had {#op-get-api-v1-client-snapshots}

`GET /api/v1/client/snapshots`

Every snapshot this account holds, across every server it has had.

Not scoped to a server on purpose, and the reason the table is owned by the
account: after a service ends there is no server to ask.

Authentication: an access token, sent as `Authorization: Bearer <token>`.

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |

A `200` response is a list; each item has these fields:

| Field | Type |
| --- | --- |
| `[].id` | integer |
| `[].uuid` | string |
| `[].name` | string |
| `[].kind` | string |
| `[].status` | string |
| `[].size_bytes` | integer |
| `[].is_locked` | boolean |
| `[].created_by` | string |
| `[].reason` | string or null |
| `[].region` | string or null |
| `[].checksum` | string or null |
| `[].checksum_type` | string or null |
| `[].error` | string or null |
| `[].hold_reason` | string or null |
| `[].source_id` | integer or null |
| `[].source_uuid` | string or null |
| `[].source_server_name` | string or null |
| `[].source_name` | string or null |
| `[].source_location` | string or null |
| `[].source_used_bytes` | integer or null |
| `[].source_deleted` | boolean |
| `[].egg_id` | integer or null |
| `[].software` | SnapshotSoftware or null |
| `[].software.slug` | string or null |
| `[].software.name` | string or null |
| `[].software.mcjars_type` | string or null |
| `[].software.loader` | string or null |
| `[].software.loader_family` | string or null |
| `[].software.game` | string or null |
| `[].software.edition` | string or null |
| `[].software.version` | string or null |
| `[].software.runtime_template_slug` | string or null |
| `[].software.docker_image` | string or null |
| `[].software.modpack` | object or null |
| `[].software.memory_mb` | integer or null |
| `[].software.disk_mb` | integer or null |
| `[].software.inferred` | boolean |
| `[].software_label` | string |
| `[].software_slug` | string or null |
| `[].software_version` | string or null |
| `[].compatibility` | SnapshotCompatibility or null |
| `[].compatibility.level` | string |
| `[].compatibility.reason` | string |
| `[].is_source` | boolean or null |
| `[].schedule_uuid` | string or null |
| `[].schedule_name` | string or null |
| `[].created_at` | string (date-time) |
| `[].completed_at` | string (date-time) or null |

### The account's snapshot meter {#op-get-api-v1-client-snapshots-allowance}

`GET /api/v1/client/snapshots/allowance`

The account's snapshot meter.

A write session because it recomputes and caches: the alternative is a
meter that disagrees with what a creation attempt will decide, which is
worse than the write.

Authentication: an access token, sent as `Authorization: Bearer <token>`.

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |

Fields of a `200` response:

| Field | Type |
| --- | --- |
| `allowance_bytes` | integer |
| `used_bytes` | integer |
| `available_bytes` | integer |
| `bonus_bytes` | integer |
| `over` | boolean |
| `cleanup_at` | string (date-time) or null |
| `over_since` | string (date-time) or null |
| `breakdown` | array of object |

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

`GET /api/v1/client/snapshots/{snapshot_uuid}`

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

Authentication: an access token, sent as `Authorization: Bearer <token>`.

#### Parameters

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

#### Responses

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

Fields of a `200` response:

| Field | Type |
| --- | --- |
| `id` | integer |
| `uuid` | string |
| `name` | string |
| `kind` | string |
| `status` | string |
| `size_bytes` | integer |
| `is_locked` | boolean |
| `created_by` | string |
| `reason` | string or null |
| `region` | string or null |
| `checksum` | string or null |
| `checksum_type` | string or null |
| `error` | string or null |
| `hold_reason` | string or null |
| `source_id` | integer or null |
| `source_uuid` | string or null |
| `source_server_name` | string or null |
| `source_name` | string or null |
| `source_location` | string or null |
| `source_used_bytes` | integer or null |
| `source_deleted` | boolean |
| `egg_id` | integer or null |
| `software` | SnapshotSoftware or null |
| `software.slug` | string or null |
| `software.name` | string or null |
| `software.mcjars_type` | string or null |
| `software.loader` | string or null |
| `software.loader_family` | string or null |
| `software.game` | string or null |
| `software.edition` | string or null |
| `software.version` | string or null |
| `software.runtime_template_slug` | string or null |
| `software.docker_image` | string or null |
| `software.modpack` | object or null |
| `software.memory_mb` | integer or null |
| `software.disk_mb` | integer or null |
| `software.inferred` | boolean |
| `software_label` | string |
| `software_slug` | string or null |
| `software_version` | string or null |
| `compatibility` | SnapshotCompatibility or null |
| `compatibility.level` | string |
| `compatibility.reason` | string |
| `is_source` | boolean or null |
| `schedule_uuid` | string or null |
| `schedule_name` | string or null |
| `created_at` | string (date-time) |
| `completed_at` | string (date-time) or null |

### Delete a snapshot and the archive behind it {#op-delete-api-v1-client-snapshots-snapshot-uuid}

`DELETE /api/v1/client/snapshots/{snapshot_uuid}`

Delete a snapshot and the archive behind it.

Authentication: an access token, sent as `Authorization: Bearer <token>`.

#### Parameters

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

#### Responses

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

### A signed URL for the archive itself {#op-get-api-v1-client-snapshots-snapshot-uuid-download}

`GET /api/v1/client/snapshots/{snapshot_uuid}/download`

A signed URL for the archive itself.

Never gated on owing money. "Pay to get your data" is legally
uncomfortable in the EU and reputationally worse, and the revenue it could
recover is one month of a plan the customer has already left.

Authentication: an access token, sent as `Authorization: Bearer <token>`.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `snapshot_uuid` | 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-client-snapshots-snapshot-uuid-lock}

`POST /api/v1/client/snapshots/{snapshot_uuid}/lock`

Keep a snapshot, or release it.

A lock stops rotation and an accidental delete. It does not exempt the
snapshot from the retention sweep, so it cannot be used to hold storage
after a downgrade.

Authentication: an access token, sent as `Authorization: Bearer <token>`.

#### Parameters

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

#### Responses

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

Fields of a `200` response:

| Field | Type |
| --- | --- |
| `id` | integer |
| `uuid` | string |
| `name` | string |
| `kind` | string |
| `status` | string |
| `size_bytes` | integer |
| `is_locked` | boolean |
| `created_by` | string |
| `reason` | string or null |
| `region` | string or null |
| `checksum` | string or null |
| `checksum_type` | string or null |
| `error` | string or null |
| `hold_reason` | string or null |
| `source_id` | integer or null |
| `source_uuid` | string or null |
| `source_server_name` | string or null |
| `source_name` | string or null |
| `source_location` | string or null |
| `source_used_bytes` | integer or null |
| `source_deleted` | boolean |
| `egg_id` | integer or null |
| `software` | SnapshotSoftware or null |
| `software.slug` | string or null |
| `software.name` | string or null |
| `software.mcjars_type` | string or null |
| `software.loader` | string or null |
| `software.loader_family` | string or null |
| `software.game` | string or null |
| `software.edition` | string or null |
| `software.version` | string or null |
| `software.runtime_template_slug` | string or null |
| `software.docker_image` | string or null |
| `software.modpack` | object or null |
| `software.memory_mb` | integer or null |
| `software.disk_mb` | integer or null |
| `software.inferred` | boolean |
| `software_label` | string |
| `software_slug` | string or null |
| `software_version` | string or null |
| `compatibility` | SnapshotCompatibility or null |
| `compatibility.level` | string |
| `compatibility.reason` | string |
| `is_source` | boolean or null |
| `schedule_uuid` | string or null |
| `schedule_name` | string or null |
| `created_at` | string (date-time) |
| `completed_at` | string (date-time) or null |

### Restore a snapshot onto one of this account's servers {#op-post-api-v1-client-snapshots-snapshot-uuid-restore}

`POST /api/v1/client/snapshots/{snapshot_uuid}/restore`

Restore a snapshot onto one of this account's servers.

Addressed by snapshot rather than by server because the target is a choice.
The permission is checked against the *target* server, because that is the
one being overwritten and the one a subuser was or was not trusted with.

Authentication: an access token, sent as `Authorization: Bearer <token>`.

#### Parameters

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