Developer docs · Problems
Already current
HTTP 422 · https://impartire.com/problems/already-current
What it means
The file version named to restore is already its chain's current version, so there is nothing to restore; GET /api/v1/assets/{id}/files/{file_id} lists the chain's versions.
What to do
Nothing to do: that version is the file's current one. To bring back an earlier version, restore one whose is_current is false in the file's versions.
Example
Sent as application/problem+json with status 422. detail varies with the request; branch on type.
{
"type": "https://impartire.com/problems/already-current",
"title": "Already current",
"status": 422,
"detail": "File 3fb8b1ca-0d6e-4a59-9b1e-8c2f7d4e5a61 is already the current version of its chain; restore an earlier version from its versions.",
"instance": "/api/v1/assets/6f1c2a4e-0b7d-4f7e-9a51-2d3c4b5a6e7f/files/3fb8b1ca-0d6e-4a59-9b1e-8c2f7d4e5a61/restore",
"request_id": "01JB8Z5W6Q4N3X2V1T0S9R8P7M"
}