# Server Backups endpoints (Admin API)

> 5 FeatherPanel Admin API endpoints from admin/server-backups.php: methods, paths, auth, permissions, rate limits, parameters and responses.

Source: https://featherpanel.com/docs/api/reference/admin/server-backups/

Defined in [`backend/app/routes/admin/server-backups.php`](https://github.com/MythicalLTD/FeatherPanel/blob/8318da2dee6f7facc161af39e305be7d97407929/backend/app/routes/admin/server-backups.php). Authentication used here: **Admin**. Read [Authentication](https://featherpanel.com/docs/api/authentication/) for how to send credentials and [Rate limits and errors](https://featherpanel.com/docs/api/rate-limits-and-errors/) for the response envelope.

Paths, methods, permissions and rate limits come from the route file. Summaries, parameters and response codes come from the OpenAPI annotations on the controllers; endpoints without annotations show only what the route file declares.

## Endpoints

### GET `/api/admin/server-backups`

- Auth: Admin
- Permission: `admin.backups.view`
- Route name: `admin-server-backups`
- Controller: [`ServerBackupsController::index`](https://github.com/MythicalLTD/FeatherPanel/blob/8318da2dee6f7facc161af39e305be7d97407929/backend/app/Controllers/Admin/ServerBackupsController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/8318da2dee6f7facc161af39e305be7d97407929/backend/app/routes/admin/server-backups.php#L35)

**List server backups** Backups of all servers, newest first. scope=kept lists only backups kept after their server was deleted.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `page` | query | integer | no |  |
| `limit` | query | integer | no |  |
| `scope` | query | string | no |  |
| `search` | query | string | no |  |
| `node_id` | query | integer | no |  |

```bash
curl -X GET "$PANEL_URL/api/admin/server-backups" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Responses: `200` Backups · `401` Unauthorized · `403` Forbidden

### GET `/api/admin/servers/{id}/keep-backups`

- Auth: Admin
- Permission: `admin.servers.view`
- Route name: `admin-server-keep-backups`
- Controller: [`ServerBackupsController::keepInfo`](https://github.com/MythicalLTD/FeatherPanel/blob/8318da2dee6f7facc161af39e305be7d97407929/backend/app/Controllers/Admin/ServerBackupsController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/8318da2dee6f7facc161af39e305be7d97407929/backend/app/routes/admin/server-backups.php#L45)

**What keeping backups would do when deleting a server** Whether the node can keep local and PBS backups, and how many finished backups the server has on the node and in remote storage.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes |  |

```bash
curl -X GET "$PANEL_URL/api/admin/servers/$ID/keep-backups" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Responses: `200` Keep information · `404` Server not found

### GET `/api/admin/server-backups/{uuid}/download`

- Auth: Admin
- Permission: `admin.backups.download`
- Route name: `admin-server-backups-download`
- Controller: [`ServerBackupsController::download`](https://github.com/MythicalLTD/FeatherPanel/blob/8318da2dee6f7facc161af39e305be7d97407929/backend/app/Controllers/Admin/ServerBackupsController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/8318da2dee6f7facc161af39e305be7d97407929/backend/app/routes/admin/server-backups.php#L60)

**Download link for a backup** A short-lived download link, also for backups kept after their server was deleted.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `uuid` | path | string | yes |  |

```bash
curl -X GET "$PANEL_URL/api/admin/server-backups/$UUID/download" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Responses: `200` Download link · `400` Not downloadable · `404` Backup not found

### GET `/api/admin/server-backups/{uuid}`

- Auth: Admin
- Permission: `admin.backups.view`
- Route name: `admin-server-backups-show`
- Controller: [`ServerBackupsController::show`](https://github.com/MythicalLTD/FeatherPanel/blob/8318da2dee6f7facc161af39e305be7d97407929/backend/app/Controllers/Admin/ServerBackupsController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/8318da2dee6f7facc161af39e305be7d97407929/backend/app/routes/admin/server-backups.php#L70)

**Get a backup for the create-server wizard** The backup, the nodes a server can be created on from it and the settings to prefill (from the settings stored with the backup, or the current settings of its server).

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `uuid` | path | string | yes |  |

```bash
curl -X GET "$PANEL_URL/api/admin/server-backups/$UUID" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Responses: `200` Backup and prefill · `404` Backup not found

### DELETE `/api/admin/server-backups/{uuid}`

- Auth: Admin
- Permission: `admin.backups.delete`
- Route name: `admin-server-backups-delete`
- Controller: [`ServerBackupsController::delete`](https://github.com/MythicalLTD/FeatherPanel/blob/8318da2dee6f7facc161af39e305be7d97407929/backend/app/Controllers/Admin/ServerBackupsController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/8318da2dee6f7facc161af39e305be7d97407929/backend/app/routes/admin/server-backups.php#L80)

**Delete a kept backup** Delete a backup kept after its server was deleted, on the node or in remote storage. Backups of existing servers are deleted from the server.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `uuid` | path | string | yes |  |

```bash
curl -X DELETE "$PANEL_URL/api/admin/server-backups/$UUID" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Responses: `200` Deleted · `404` Backup not found · `422` Not a kept backup · `423` Locked
