Fetch a design's proof image
const url = 'https://api.pixonaut.app/v1/designs/example/proof?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/proof?fit=cover' \ --header 'Authorization: Bearer <token>'Operation ID: designs.proof.get
The design’s proof, as the customer was shown it, read with the credentials that read the design: the proof of its newest revision that has one. A commit from a proof gives revision 1 that proof, and each correction and restore renders a proof of the revision it writes, so a corrected design’s proof shows what it says now. v, the design’s proofId, names the image’s bytes in the URL itself, so the answer is cached immutable; a v naming any other proof (a URL made by hand, or for another design) is refused proof_changed rather than served under the wrong name. Without v, the proof’s id is the answer’s etag. Once the proof’s file is gone (a rejected design’s proof is released), the answer is proof_not_found. width serves it no larger than the box it is drawn in; each resize asked for with a key or through a link spends the tenant’s render budget, and is refused rate_limited once it is spent.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”The design’s proofId, which names bytes that never change. When it matches, the answer is cached immutable; when it names any other proof, it is refused proof_changed.
The design’s proofId, which names bytes that never change. When it matches, the answer is cached immutable; when it names any other proof, it is refused proof_changed.
The width in pixels the image is drawn at. The long edge served is derived from the image’s own ratio, never larger than the stored image, and clamped to the sizes the api serves.
The width in pixels the image is drawn at. The long edge served is derived from the image’s own ratio, never larger than the stored image, and clamped to the sizes the api serves.
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 proof image
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, the proof’s id, still holds
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, proof_not_found, proof_changed
object
Examples
not_found
{ "error": "not_found"}proof_changed
{ "error": "proof_changed"}proof_not_found
{ "error": "proof_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: invalid_query
object
Examples
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. A request that failed unexpectedly answers as text instead.
object
Examples
db_error
{ "error": "db_error"}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].