hosting
POST /v1/sites/{siteId}/cleaner/jobs/{jobId}/undo
Undo a clean (restore its backup).
Authentication
Send an API key as a bearer token. The key must carry the sites.view permission; a key without it is refused with 403, not 404.
This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.
Try it
Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.
curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/cleaner/jobs/{jobId}/undo \
-H "Authorization: Bearer zdk_live_…"Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console
Details
Puts back the files and the database a clean removed, from the backup it took first. Backups are kept 7 days (backup_expires_at); an expired one is 422. Needs the add-on. Requires sites.view and hosting.backup.manage.
Parameters
| Name | Type | Required | What it is |
|---|---|---|---|
siteId (path) | Uuid | Yes | Site ID (UUIDv7). |
jobId (path) | string | Yes | — |
Response
| Name | Type | Required | What it is |
|---|---|---|---|
id | string | Yes | — |
kind | string<scan, clean, undo> | Yes | — |
trigger | string<manual, schedule, staff> | Yes | — |
state | string<queued, running, done, nothing, restored, failed> | Yes | — |
cms | string | No | The application detected: wordpress, joomla, drupal, prestashop, opencart, grav, mediawiki or other. |
message | string | Yes | — |
totals | object | No | count, mb, files, rows of the selected (clean) or default-ticked (scan) items. |
selected | string[] | No | — |
saved_mb | number | No | — |
saved_files | integer | No | — |
saved_db_mb | number | No | — |
removed_count | integer | No | — |
has_backup | boolean | Yes | Whether a backup was taken before the clean. |
backup_expires_at | string | No | — |
undo_of | string | No | — |
created_at | string | Yes | — |
started_at | string | No | — |
finished_at | string | No | — |
items | SiteCleanerItem[] | No | — |
Errors this endpoint can return
401 · 403 · 404 · 422 · 429