# Backup Schedules endpoints (Admin API)

> 10 FeatherPanel Admin API endpoints from admin/backup-schedules.php: methods, paths, auth, permissions, rate limits, parameters and responses.

Source: https://featherpanel.com/docs/api/reference/admin/backup-schedules/

Defined in [`backend/app/routes/admin/backup-schedules.php`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/backup-schedules.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/backup-schedules`

- Auth: Admin
- Permission: `admin.backup_schedules.view`
- Route name: `admin-backup-schedules`
- Controller: [`BackupSchedulesController::index`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/BackupSchedulesController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/backup-schedules.php#L26)

**List admin backup schedules**

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

Responses: `200` OK

### GET `/api/admin/backup-schedules/calendar`

- Auth: Admin
- Permission: `admin.backup_schedules.view`
- Route name: `admin-backup-schedules-calendar`
- Controller: [`BackupSchedulesController::calendar`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/BackupSchedulesController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/backup-schedules.php#L36)

**Backup schedule calendar** Planned runs of active backup schedules and recorded runs for one month (month=YYYY-MM, UTC).

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

Responses: `200` Calendar retrieved

### POST `/api/admin/backup-schedules/preview-targets`

- Auth: Admin
- Permission: `admin.backup_schedules.view`
- Route name: `admin-backup-schedules-preview-targets`
- Controller: [`BackupSchedulesController::previewTargets`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/BackupSchedulesController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/backup-schedules.php#L46)

**Preview target servers for a backup schedule scope**

```bash
curl -X POST "$PANEL_URL/api/admin/backup-schedules/preview-targets" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Responses: `200` OK

### GET `/api/admin/backup-schedules/{id}`

- Auth: Admin
- Permission: `admin.backup_schedules.view`
- Route name: `admin-backup-schedules-show`
- Controller: [`BackupSchedulesController::show`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/BackupSchedulesController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/backup-schedules.php#L57)

**Get admin backup schedule**

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

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

Responses: `200` OK

### PUT `/api/admin/backup-schedules`

- Auth: Admin
- Permission: `admin.backup_schedules.create`
- Route name: `admin-backup-schedules-create`
- Controller: [`BackupSchedulesController::create`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/BackupSchedulesController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/backup-schedules.php#L72)

**Create admin backup schedule**

```bash
curl -X PUT "$PANEL_URL/api/admin/backup-schedules" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Plugin events: [`featherpanel:admin:backup_policy:created`](https://featherpanel.com/docs/plugins/events/backup-policy/#backup-policy-created)

Responses: `201` Created

### PATCH `/api/admin/backup-schedules/{id}`

- Auth: Admin
- Permission: `admin.backup_schedules.edit`
- Route name: `admin-backup-schedules-update`
- Controller: [`BackupSchedulesController::update`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/BackupSchedulesController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/backup-schedules.php#L83)

**Update admin backup schedule**

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

```bash
curl -X PATCH "$PANEL_URL/api/admin/backup-schedules/$ID" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Plugin events: [`featherpanel:admin:backup_policy:updated`](https://featherpanel.com/docs/plugins/events/backup-policy/#backup-policy-updated)

Responses: `200` OK

### DELETE `/api/admin/backup-schedules/{id}`

- Auth: Admin
- Permission: `admin.backup_schedules.delete`
- Route name: `admin-backup-schedules-delete`
- Controller: [`BackupSchedulesController::delete`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/BackupSchedulesController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/backup-schedules.php#L99)

**Delete admin backup schedule**

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

```bash
curl -X DELETE "$PANEL_URL/api/admin/backup-schedules/$ID" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Plugin events: [`featherpanel:admin:backup_policy:deleted`](https://featherpanel.com/docs/plugins/events/backup-policy/#backup-policy-deleted)

Responses: `200` OK

### POST `/api/admin/backup-schedules/{id}/run`

- Auth: Admin
- Permission: `admin.backup_schedules.run`
- Route name: `admin-backup-schedules-run`
- Controller: [`BackupSchedulesController::runNow`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/BackupSchedulesController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/backup-schedules.php#L115)

**Run admin backup schedule now**

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

```bash
curl -X POST "$PANEL_URL/api/admin/backup-schedules/$ID/run" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Plugin events: [`featherpanel:admin:backup_policy:run:completed`](https://featherpanel.com/docs/plugins/events/backup-policy/#backup-policy-run-completed), [`featherpanel:admin:backup_policy:run:started`](https://featherpanel.com/docs/plugins/events/backup-policy/#backup-policy-run-started)

Responses: `200` OK

### GET `/api/admin/backup-schedules/{id}/runs`

- Auth: Admin
- Permission: `admin.backup_schedules.view`
- Route name: `admin-backup-schedules-runs`
- Controller: [`BackupSchedulesController::runs`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/BackupSchedulesController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/backup-schedules.php#L131)

**List backup schedule runs**

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

```bash
curl -X GET "$PANEL_URL/api/admin/backup-schedules/$ID/runs" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Responses: `200` OK

### GET `/api/admin/backup-schedules/{id}/runs/{runId}`

- Auth: Admin
- Permission: `admin.backup_schedules.view`
- Route name: `admin-backup-schedules-run-show`
- Controller: [`BackupSchedulesController::runShow`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/BackupSchedulesController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/backup-schedules.php#L146)

**Get backup schedule run details**

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | \- | yes |  |
| `runId` | path | \- | yes |  |

```bash
curl -X GET "$PANEL_URL/api/admin/backup-schedules/$ID/runs/$RUN_ID" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Responses: `200` OK
