# Client API: Container Apps: Backups

> The 6 Client API operations for backups.

Source: https://www.coritan.com/docs/api/reference/client/container-apps/servers-backups/

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

## Operations

| Method | Path | Summary |
| --- | --- | --- |
| GET | [`/api/v1/client/servers/{uuid}/backups`](#op-get-api-v1-client-servers-uuid-backups) | List backups for a server |
| POST | [`/api/v1/client/servers/{uuid}/backups`](#op-post-api-v1-client-servers-uuid-backups) | Create a new backup |
| DELETE | [`/api/v1/client/servers/{uuid}/backups/{backup_uuid}`](#op-delete-api-v1-client-servers-uuid-backups-backup-uuid) | Delete a backup |
| GET | [`/api/v1/client/servers/{uuid}/backups/{backup_uuid}/download`](#op-get-api-v1-client-servers-uuid-backups-backup-uuid-download) | A short-lived signed URL the browser fetches the archive from directly |
| POST | [`/api/v1/client/servers/{uuid}/backups/{backup_uuid}/lock`](#op-post-api-v1-client-servers-uuid-backups-backup-uuid-lock) | Keep a backup, or release it |
| POST | [`/api/v1/client/servers/{uuid}/backups/{backup_uuid}/restore`](#op-post-api-v1-client-servers-uuid-backups-backup-uuid-restore) | Restore from a backup |

### List backups for a server {#op-get-api-v1-client-servers-uuid-backups}

`GET /api/v1/client/servers/{uuid}/backups`

List backups for a server.

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

#### Parameters

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

#### Responses

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

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

| Field | Type |
| --- | --- |
| `[].id` | integer |
| `[].uuid` | string |
| `[].server_id` | integer |
| `[].name` | string |
| `[].ignored_files` | array of string or null |
| `[].is_locked` | boolean |
| `[].size_bytes` | integer |
| `[].status` | string |
| `[].created_at` | string (date-time) |
| `[].updated_at` | string (date-time) |

### Create a new backup {#op-post-api-v1-client-servers-uuid-backups}

`POST /api/v1/client/servers/{uuid}/backups`

Create a new backup.

Closed once snapshots are on. Kept as a route rather than removed so an
existing integration gets an explanation instead of a 404 that reads as a
bug in their own code.

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

#### Parameters

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

#### Request body

`application/json` (required)

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

Fields of a `201` response:

| Field | Type |
| --- | --- |
| `id` | integer |
| `uuid` | string |
| `server_id` | integer |
| `name` | string |
| `ignored_files` | array of string or null |
| `is_locked` | boolean |
| `size_bytes` | integer |
| `status` | string |
| `created_at` | string (date-time) |
| `updated_at` | string (date-time) |

### Delete a backup {#op-delete-api-v1-client-servers-uuid-backups-backup-uuid}

`DELETE /api/v1/client/servers/{uuid}/backups/{backup_uuid}`

Delete a backup.

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

#### Parameters

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

#### Responses

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

### A short-lived signed URL the browser fetches the archive from directly {#op-get-api-v1-client-servers-uuid-backups-backup-uuid-download}

`GET /api/v1/client/servers/{uuid}/backups/{backup_uuid}/download`

A short-lived signed URL the browser fetches the archive from directly.

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

#### Parameters

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

#### Responses

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

### Keep a backup, or release it {#op-post-api-v1-client-servers-uuid-backups-backup-uuid-lock}

`POST /api/v1/client/servers/{uuid}/backups/{backup_uuid}/lock`

Keep a backup, or release it. A locked backup cannot be deleted.

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

#### Parameters

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

#### Responses

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

### Restore from a backup {#op-post-api-v1-client-servers-uuid-backups-backup-uuid-restore}

`POST /api/v1/client/servers/{uuid}/backups/{backup_uuid}/restore`

Restore from a backup.

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

#### Parameters

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

#### Responses

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