Skip to main content

Restore an archived computer

POST 

/computers/archived/:targetComputerId/restore

Moves a retired (archived) computer back into the active inventory under its original id. By default the archived copy is deleted after a successful restore.

Required role: superadmin or admin.

The route does not check the id first, so a malformed id returns 422 rather than the plain-text 404.

The restored computer keeps its original id. Without preservecopy=true the archived record is deleted after the 200 is sent. Restoring an id whose archived copy is still present while an active computer already has that id returns 409 with the message Computer <id> is already active.; an id with no archived copy returns 409 with the message No stale computer with ID: <id>.

Request​

Responses​

The computer was restored.