Skip to content

Restore an earlier revision of a design

POST
/v1/designs/{id}/revisions/{revision}/restore
curl --request POST \
--url https://api.pixonaut.app/v1/designs/example/revisions/example/restore \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "expectedRevision": 3 }'

Operation ID: designs.revisions.restore

A correction whose document is the named revision’s: it is added as the design’s next revision, and the design goes back to awaiting approval, as after any correction, with a proof of its own rendered now (proofId). Emits design.edited with restoredFrom. A revision whose document is the current one writes nothing, and answers restored: false. Refused once any print of the design has an order, and for a revision the current model can no longer read.

id
required
string
revision
required

A revision number.

string

A revision number.

Media typeapplication/json
object
expectedRevision
required

The design’s revision as the caller read it. When the design has been corrected since, the correction is refused revision_changed.

integer
> 0

Examples

Exampleexample

Example

{
"expectedRevision": 3
}

The design’s revision now

Media typeapplication/json
object
proofId
required

The design’s proof now: the one rendered of the revision this wrote, or, when nothing was written, the proof the design already had (null when it has none). Its image is GET /v1/designs/{id}/proof.

string | null
restored
required

Whether this restore wrote a revision. False when the named revision’s document already was the current one: nothing was written, and revision is the current one.

boolean
revision
required
integer

Examples

Exampleexample

Example

{
"proofId": "prf_7a8b9c0d1e2f3a4b5c6d7e8f",
"restored": true,
"revision": 4
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: bad_request, invalid_id

Media typeapplication/json
object
error
required
string

Examples

bad_request

{
"error": "bad_request"
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: unauthorized

Media typeapplication/json
object
error
required
string

Examples

Exampleunauthorized

unauthorized

{
"error": "unauthorized"
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: origin_forbidden, forbidden, feature_disabled, workspace_suspended

Media typeapplication/json
object
error
required
string
feature

The feature the tenant does not have. Always sent with feature_disabled.

string

Examples

feature_disabled

{
"error": "feature_disabled",
"feature": "api"
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: not_found

Media typeapplication/json
object
error
required
string

Examples

Examplenot_found

not_found

{
"error": "not_found"
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: not_editable, revision_changed

Media typeapplication/json
object
error
required
string
reason

ordered: a print of the design has an order, so it is what was made; duplicate it instead. erased: the design’s personal data was erased, and it takes nothing more. cut_from_layout: the design is one placement’s print cut from a panel layout’s canvas; commit a new design through the layout (POST /v1/designs/layout) instead. linked: the design is one placement’s print of a linked group, which one design drives; commit the group’s placements again instead. Always sent with not_editable.

string
revision

Always sent with revision_changed.

integer

Examples

not_editable

{
"error": "not_editable",
"reason": "erased"
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: asset_map_too_large, design_doc_unreadable, payload_too_large

Media typeapplication/json
object
bytes

Always sent with asset_map_too_large, and may be sent with payload_too_large.

number
error
required
string
maxBytes

Always sent with asset_map_too_large, payload_too_large.

number

Examples

asset_map_too_large

{
"bytes": 0,
"error": "asset_map_too_large",
"maxBytes": 0
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: rate_limited

Media typeapplication/json
object
error
required
string

Examples

Examplerate_limited

rate_limited

{
"error": "rate_limited"
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

The caller left before the render started

Media typeapplication/json
object
error
required
string

Examples

Exampleclient_closed_request

client_closed_request

{
"error": "client_closed_request"
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: db_error, render_failed. A request that failed unexpectedly answers as text instead.

object
error
required
string

Examples

db_error

{
"error": "db_error"
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: assets_unavailable, lock_timeout

Media typeapplication/json
object
error
required
string

Examples

assets_unavailable

{
"error": "assets_unavailable"
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Questions? Write to [email protected].

Status · Terms of service · Privacy policy · Subprocessors