Organisations
Preview a custom icon in a diagram
Draws one icon on a box of a small fixed diagram, in light and dark, in the organisation's brand while it is active.
GET
/orgs/{org}/icons/{name}/previewTL;DR
| Question | Answer |
|---|---|
| What does it do? | Preview a custom icon in a diagram. |
| What does it take? | org, name in the path. |
| What does it return? | Status 200 with a body of type IconPreview. |
| What can go wrong? | 401 not signed in; 404 no such organisation, the caller is not a member of it, or no such icon; 429 too many requests; 503 organisations are not set up on this server, or the drawing engine is not available (engine.unavailable). Every failure uses the one error envelope. |
What it does
Draws one icon on a box of a small fixed diagram, in light and dark, in the organisation's brand while it is active. Every member may. Stores nothing.
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
org | string | yes | The organisation's id or its slug. |
name | string | yes | The name after org:, lowercase words joined by hyphens. |
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | The source and the pictures. | IconPreview |
| 401 | Not signed in. | ErrorResponse |
| 404 | No such organisation, the caller is not a member of it, or no such icon. | ErrorResponse |
| 429 | Too many requests. | ErrorResponse |
| 503 | Organisations are not set up on this server, or the drawing engine is not available (engine.unavailable). | ErrorResponse |
Response body
A 200 answer has the type IconPreview.
| Field | Type | Required | Description |
|---|---|---|---|
ref | string | yes | What a diagram writes to use the icon. |
source | string | yes | The diagram source the preview draws, which uses the icon on one box. |
light | string | yes | The preview drawn on light, as SVG text. |
dark | string | yes | The preview drawn on dark, as SVG text. |
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 |