Update VPS backup settings
PATCH /api/v2/vps/{id}/backup-schedules
Changes the backup settings of a VPS. It does not change the schedule. Use POST /api/v2/vps/{id}/backup-schedules for that. Send at least one field. With autoDeleteOldest: true, a scheduled backup that needs room first deletes the oldest scheduled backups. Those backups are gone for good. Manual backups are never deleted this way. With autoDeleteOldest: false, a scheduled backup is skipped when there is no room. maxTotalBackups does not raise the backup allowance of the plan. When the plan includes an allowance, the next GET /api/v2/vps/{id}/backup-schedules sets totalBackupLimit back to it.
Authentication: An API key with the scopes write:vm and vm:write. About keys and scopes
Request
Path parameters
idstringrequiredvps_…).Body
maxTotalBackupsnumberautoDeleteOldestbooleanExample
curl -X PATCH "https://cloud.hostup.se/api/v2/vps/vps_01hxa3b4c5d6e7f8g9h0j1k2m3/backup-schedules" \ -H "Authorization: Bearer $HOSTUP_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "autoDeleteOldest": true }'Responses
200 The updated backup settings.
{ "settings": { "totalBackupLimit": 5, "manualBackupsActive": 1, "scheduledBackupsActive": 2, "availableScheduledSlots": 2, "autoDeleteOldest": true }}Response fields
settingsobjecttotalBackupLimitintegermanualBackupsActiveintegerscheduledBackupsActiveintegeravailableScheduledSlotsintegerautoDeleteOldestbooleanErrors
Errors are Problem Details with a stable code. Branch on the code, not on the text.
| 400 | Invalid request. The response body is an RFC 7807 Problem Details document. |
| 401 | Unauthorized. Authentication is required. |
| 403 | Forbidden. The caller lacks a required scope or does not own the resource. |
| 404 | Not found. The resource does not exist or is not owned by the caller; code is vps_not_found. |
| 429 | Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers. |
| 500 | Internal error. Retry later or contact support if the issue persists. |
| 502 | Upstream failure. A dependent provider request failed; the Problem Details code is upstream_failed. Retry later or contact support if the issue persists. |