Draw a revision of a design
const url = 'https://api.pixonaut.app/v1/designs/example/revisions/example/image?format=jpeg&fit=cover';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.pixonaut.app/v1/designs/example/revisions/example/image?format=jpeg&fit=cover' \ --header 'Authorization: Bearer <token>'Operation ID: designs.revisions.image.get
What the design’s revision revision prints, drawn as its proof is but unwatermarked, read with the credentials that read the design. width draws it no larger than the box it is shown in. A JPEG, as a proof is, unless format=png asks for a PNG that keeps the design’s transparency. A revision never changes but when the design’s personal data is erased, and it is drawn through the output profile of the machine its blank goes to, so the answer carries an etag naming the revision, that erasure, the format, the renderer and that profile, and asking again with it is answered 304 without drawing. A drawing that had to leave out a picture the document names is answered no-store. A revision whose document the current model cannot read is refused design_doc_unreadable.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”A revision number.
A revision number.
Query Parameters
Section titled “Query Parameters”png draws it as a PNG that keeps the design’s transparency; absent or jpeg, the proof’s JPEG.
png draws it as a PNG that keeps the design’s transparency; absent or jpeg, the proof’s JPEG.
The width in pixels the drawing is shown at. Its long edge is derived from the design’s declared ratio, and never larger than a proof’s for a key; a studio session is drawn up to 4096 px.
The width in pixels the drawing is shown at. Its long edge is derived from the design’s declared ratio, and never larger than a proof’s for a key; a studio session is drawn up to 4096 px.
cover when the image is cropped to fill its box: width is then its short edge.
cover when the image is cropped to fill its box: width is then its short edge.
Responses
Section titled “Responses”The drawing
Headers
Section titled “Headers”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.
Not modified: the If-None-Match etag still names this revision, its erasure, format and renderer
Headers
Section titled “Headers”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: invalid_id
object
Examples
invalid_id
{ "error": "invalid_id"}Headers
Section titled “Headers”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
object
Examples
unauthorized
{ "error": "unauthorized"}Headers
Section titled “Headers”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
object
The feature the tenant does not have. Always sent with feature_disabled.
Examples
feature_disabled
{ "error": "feature_disabled", "feature": "api"}forbidden
{ "error": "forbidden"}origin_forbidden
{ "error": "origin_forbidden"}workspace_suspended
{ "error": "workspace_suspended"}Headers
Section titled “Headers”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
object
Examples
not_found
{ "error": "not_found"}Headers
Section titled “Headers”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: design_doc_unreadable, asset_map_too_large, invalid_query
object
Always sent with asset_map_too_large.
Always sent with asset_map_too_large.
Examples
asset_map_too_large
{ "bytes": 0, "error": "asset_map_too_large", "maxBytes": 0}design_doc_unreadable
{ "error": "design_doc_unreadable"}invalid_query
{ "error": "invalid_query"}Headers
Section titled “Headers”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
object
Examples
rate_limited
{ "error": "rate_limited"}Headers
Section titled “Headers”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
Examples
db_error
{ "error": "db_error"}render_failed
{ "error": "render_failed"}Headers
Section titled “Headers”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
object
Examples
assets_unavailable
{ "error": "assets_unavailable"}Headers
Section titled “Headers”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].