Skip to content

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

idstringrequired
The VPS ID (vps_…).

Body

jobTypestringrequired
Which job to cancel: backup or restore. One of backup, restore.

Example

DELETE /api/v2/vps/{id}/active-jobs
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"
}'

Responses

200 Whether a job was stopped.

Response 200
{
"cancelled": true,
"reason": null
}
Response fields
cancelledboolean
True when a running job was stopped.
reasonstring or null
Why 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.

400Invalid request. The response body is an RFC 7807 Problem Details document.
401Unauthorized. Authentication is required.
403Forbidden. The caller lacks a required scope or does not own the resource.
404Not found. The resource does not exist or is not owned by the caller; code names the missing resource: vps_not_found, job_not_found.
429Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers.
500Internal error. Retry later or contact support if the issue persists.