Restore an older version (non-destructive)
const url = 'https://shareout.site/v1/artifacts/example/versions/1/restore';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"message":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://shareout.site/v1/artifacts/example/versions/1/restore \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "message": "example" }'Creates a new version (latest_version + 1, source: restore) with the files of version versionNo and makes it live, or stages it when blocking tests are on. Every earlier version stays in the history. Replaces the deprecated POST /v1/artifacts/{id}/rollback. Editor or owner.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Artifact ID (e.g. art_abc123).
Request Body
Section titled “Request Body”object
Change note for the new version.
Examplegenerated
{ "message": "example"}Responses
Section titled “Responses”Restored as a new version
object
Examplegenerated
{ "success": true, "version_id": "example", "version_no": 1, "restored_from_version_no": 1, "staged": true}Access denied
object
Human-readable message.
Machine-readable error code.
Correlation id (also the X-Request-Id header). Quote it in support tickets.
Finer cause under code. For UNAUTHORIZED: missing, invalid, revoked or expired.
What to do next, in plain words.
The request field at fault.
Doc page for this error.
Present on 5xx — how to reach a human.
object
Example
{ "success": false, "support": { "how": "POST /v1/support/tickets", "include": [ "request_id" ] }}Artifact not found, or VERSION_NOT_FOUND
CONFLICT (someone published at the same moment) or ASSET_NOT_FOUND (that version has no files)
