Skip to content

Restore an older version (non-destructive)

POST
/v1/artifacts/{id}/versions/{versionNo}/restore
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.

id
required
string

Artifact ID (e.g. art_abc123).

versionNo
required
integer
Media typeapplication/json
object
message

Change note for the new version.

string
<= 500 characters
Examplegenerated
{
"message": "example"
}

Restored as a new version

Media typeapplication/json
object
success
boolean
version_id
string
version_no
integer
restored_from_version_no
integer
staged
boolean
Examplegenerated
{
"success": true,
"version_id": "example",
"version_no": 1,
"restored_from_version_no": 1,
"staged": true
}

Access denied

Media typeapplication/json
object
success
required
boolean
error
required

Human-readable message.

string
code
required

Machine-readable error code.

string
request_id

Correlation id (also the X-Request-Id header). Quote it in support tickets.

string
reason

Finer cause under code. For UNAUTHORIZED: missing, invalid, revoked or expired.

string
hint

What to do next, in plain words.

string
suggestion
string
param

The request field at fault.

string
docs

Doc page for this error.

string
redirect_url
string
support

Present on 5xx — how to reach a human.

object
how
string
include
Array<string>
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)