Hosting
Read one picture of the library as a PNG
The picture {id}.svg answers, painted as a PNG width pixels wide (1600 when left out) on the paper of its scheme, for places that take no SVG.
GET
/v1/library/{id}.pngTL;DR
| Question | Answer |
|---|---|
| What does it do? | Read one picture of the library as a PNG. |
| What does it take? | id in the path, and width, scheme in the query string. |
| What does it return? | Status 200 with no body. |
| What can go wrong? | 304 the picture has not changed; 400 the width or the scheme is not valid; 401 no key, or the key or token is not valid; 403 the token's grant does not hold library:read (oauth.insufficient_scope); 404 no such diagram the caller can see; 422 the picture is too big to paint (raster.too_large); 429 too many requests, or the daily limit is used up; 503 painting pictures is not available on this server (raster.unavailable). Every failure uses the one error envelope. |
What it does
The picture {id}.svg answers, painted as a PNG width pixels wide (1600 when left out) on the paper of its scheme, for places that take no SVG. Painted for each call and never kept, with a strong ETag; If-None-Match answers 304. An app's token needs library:read.
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes |
Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
width | integer | no | The width in pixels, 64 to 4000. 1600 when left out. Lowered to keep the picture under 25 megapixels. |
scheme | "light" | "dark" | no | For a picture that follows the reader's color scheme, the one to paint. A light or dark picture is painted as it was drawn. light when left out. |
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | The PNG. | none |
| 304 | The picture has not changed. | none |
| 400 | The width or the scheme is not valid. | ErrorResponse |
| 401 | No key, or the key or token is not valid. | ErrorResponse |
| 403 | The token's grant does not hold library:read (oauth.insufficient_scope). | ErrorResponse |
| 404 | No such diagram the caller can see. | ErrorResponse |
| 422 | The picture is too big to paint (raster.too_large). | ErrorResponse |
| 429 | Too many requests, or the daily limit is used up. | ErrorResponse |
| 503 | Painting pictures is not available on this server (raster.unavailable). | ErrorResponse |
See also
| Doc | Why |
|---|---|
| API reference | Every endpoint, and the error envelope |
| Schemas | Every request and response type |
| Tool reference | The operations as callable tools |