Cancel a running VPS backup or restore
DELETE /api/v2/vps/{id}/active-jobs
Stops the backup or restore jobs of a VPS that are running or queued. Send jobType to choose which. There is no cancel by job ID. See what is running with GET /api/v2/vps/{id}/active-jobs. The response has cancelled: true when a job was stopped or removed from the queue. It has cancelled: false and a reason when no job of that type was found.
Authentication: An API key with the scopes backup:vm and write:services. About keys and scopes
Request
Path parameters
idstringrequiredThe VPS ID (
vps_…).Body
jobTypestringrequiredWhich job to cancel:
backup or restore. One of backup, restore.Example
curl -X DELETE "https://cloud.hostup.se/api/v2/vps/vps_01hxa3b4c5d6e7f8g9h0j1k2m3/active-jobs" \ -H "Authorization: Bearer $HOSTUP_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "jobType": "backup" }'curl -X DELETE "https://cloud.hostup.se/api/v2/vps/vps_01hxa3b4c5d6e7f8g9h0j1k2m3/active-jobs" \ -H "Authorization: Bearer $HOSTUP_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "jobType": "restore" }'Responses
200 Whether a job was stopped.
{ "cancelled": true, "reason": null}Response fields
cancelledbooleanTrue when a running job was stopped.
reasonstring or nullWhy nothing was cancelled. Null when a job was stopped.
Errors
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 names the missing resource: vps_not_found, job_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. |