Organisations
List a diagram's embed links for chosen websites
Whether the organisation may put this diagram on other websites, whether the caller may manage its links, and the links for the people who may.
GET
/orgs/{org}/diagrams/{id}/embed-linksTL;DR
| Question | Answer |
|---|---|
| What does it do? | List a diagram's embed links for chosen websites. |
| What does it take? | org, id in the path. |
| What does it return? | Status 200 with a body of type EmbedLinksOfDiagram. |
| What can go wrong? | 401 not signed in; 404 no such organisation, diagram or link, or the caller is not a member, or the diagram is in a folder the caller may not use; 429 too many requests; 503 organisations are not set up on this server. Every failure uses the one error envelope. |
What it does
Whether the organisation may put this diagram on other websites, whether the caller may manage its links, and the links for the people who may.
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
org | string | yes | The organisation's id or its slug. |
id | string | yes |
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | The links. | EmbedLinksOfDiagram |
| 401 | Not signed in. | ErrorResponse |
| 404 | No such organisation, diagram or link, or the caller is not a member, or the diagram is in a folder the caller may not use. | ErrorResponse |
| 429 | Too many requests. | ErrorResponse |
| 503 | Organisations are not set up on this server. | ErrorResponse |
Response body
A 200 answer has the type EmbedLinksOfDiagram.
| Field | Type | Required | Description |
|---|---|---|---|
included | boolean | yes | The organisation's plan includes allowed sites (Enterprise). |
enabled | boolean | yes | The owner turned on "Allow diagrams on chosen websites". |
eligible | boolean | yes | The diagram may have a link: it is not labelled Confidential and not waiting for approval. |
mayManage | boolean | yes | The caller may make, change and end its links. False means links is empty. |
links | EmbedLink[] | yes | |
links[].id | string | yes | |
links[].diagramId | string | yes | |
links[].url | string | null | yes | The address, {EMBED_URL}/o/<token>.svg. A page on one of sites that shows it as an image gets the picture, without its source; anything else gets a placeholder. Null when the server cannot show it again: rotate the link for a new one. |
links[].label | string | null | yes | An optional name for the page it is for. |
links[].sites | string[] | yes | The websites a page must be on, lower case. |
links[].proxiedSites | string[] | yes | Sites in sites whose images reach Plotwork through a proxy that names no page (GitHub), so the link shows them the placeholder. |
links[].expiresAt | integer | null | yes | When it stops, in milliseconds since the epoch, or null for never. |
links[].expired | boolean | yes | |
links[].createdBy | string | null | yes | |
links[].createdAt | integer | yes | |
links[].updatedAt | integer | yes | |
links[].rotatedAt | integer | null | yes | |
max | integer | yes | The most links one diagram may have. |
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 |