Organisations
Share an organisation diagram at a public link
Gives the diagram a stable public address on the CDN host: a copy of its picture, without its source, that follows its edits and never changes.
PUT
/orgs/{org}/diagrams/{id}/shareTL;DR
| Question | Answer |
|---|---|
| What does it do? | Share an organisation diagram at a public link. |
| What does it take? | org, id in the path. |
| What does it return? | Status 200 with a body of type SharedOrganisationDiagram. |
| What can go wrong? | 401 not signed in; 403 public sharing is off (orgs.sharing_off), the role may not share this diagram (orgs.forbidden), the plan has no room for another link (hosting.quota_exceeded, reason stablelinks), or the request came from an origin that may not make changes; 404 no such organisation or diagram, or the caller is not a member, or the diagram is in a folder the caller may not use; 409 the diagram's label does not allow a public link (orgs.share_classified), or it is waiting for approval (orgs.diagram_pending); 429 too many requests; 502 the public copy could not be written; no link was made; 503 organisations or hosting are not set up on this server. Every failure uses the one error envelope. |
What it does
Gives the diagram a stable public address on the CDN host: a copy of its picture, without its source, that follows its edits and never changes. Only while the owner allows public sharing. The owner and admins share any diagram, a member only one they published.
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 diagram was already shared; its link is kept and its copy written again. | SharedOrganisationDiagram |
| 201 | The link was made. | SharedOrganisationDiagram |
| 202 | "Public sharing needs approval" held the link: no link yet, and the request it waits on. | HeldOrganisationShare |
| 401 | Not signed in. | ErrorResponse |
| 403 | Public sharing is off (orgs.sharing_off), the role may not share this diagram (orgs.forbidden), the plan has no room for another link (hosting.quota_exceeded, reason stableLinks), or the request came from an origin that may not make changes. | ErrorResponse |
| 404 | No such organisation or diagram, or the caller is not a member, or the diagram is in a folder the caller may not use. | ErrorResponse |
| 409 | The diagram's label does not allow a public link (orgs.share_classified), or it is waiting for approval (orgs.diagram_pending). | ErrorResponse |
| 429 | Too many requests. | ErrorResponse |
| 502 | The public copy could not be written; no link was made. | ErrorResponse |
| 503 | Organisations or hosting are not set up on this server. | ErrorResponse |
Response body
A 200 answer has the type SharedOrganisationDiagram.
| Field | Type | Required | Description |
|---|---|---|---|
diagramId | string | yes | |
url | string | yes | The public address. Paste it as an image, or give it to GET /oembed. |
sharedAt | integer | yes | When the diagram was first shared, in milliseconds since the epoch. |
updatedAt | integer | yes | When the public copy was last written, in milliseconds since the epoch. |
sharedBy | string | null | yes | The account that first shared it, or null once that account is deleted. |
created | boolean | yes | True when this call made the link; false when the diagram was already shared and kept its address. |
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 |