Diagram
Description
Download a diagram of a story as a PNG or SVG image. The diagram includes the story name, actions, and connections, preserving their positions on the storyboard. By default, it also includes notes and sections. Note labels use plain text rather than Markdown formatting.
See Get a story for more information about retrieving stories. To download a transferable story file instead of an image, use Export a story.
Request
HTTP Method: GET
| Path Parameter | Description |
|---|---|
| story_id | The ID of the story to diagram. |
| Query Parameter | Description |
|---|---|
| format | Optional The image format: png (default) or svg. |
| content | Optional The content to include: full (default) includes actions, connections, notes, and sections; actions includes only actions and connections. |
| draft_id | Optional The ID of a draft belonging to the story. Omit to diagram the live story. Find draft IDs with List drafts. |
Download a live story as PNG
curl --proto '=https' --tlsv1.2 --fail --silent --show-error \
'https://<tenant-domain>/api/v1/stories/<<story_id>>/diagram' \
-H 'Authorization: Bearer <<CREDENTIAL.tines_api_key>>' \
--output story.png
Download a draft's actions as SVG
curl --proto '=https' --tlsv1.2 --fail --silent --show-error \
'https://<tenant-domain>/api/v1/stories/<<story_id>>/diagram?format=svg&content=actions&draft_id=<<draft_id>>' \
-H 'Authorization: Bearer <<CREDENTIAL.tines_api_key>>' \
--output story-draft.svg
Response
A successful request returns 200 OK with the image data in the response body.
| Format | Content-Type |
|---|---|
| png | image/png |
| svg | image/svg+xml |
Use --output in the examples above to save the response to a file.
Export limits
Diagrams support up to 1,000 items and 2,000 connections. Items include actions and, when content=full, notes and sections. PNG images are scaled to fit within 2,000 by 2,000 pixels.
Stories that exceed the item, connection, content size, or layout limits return 422.
Errors
| Status | Meaning |
|---|---|
| 404 | The story does not exist or is not accessible to your API key, or the requested draft does not belong to the story or does not exist. |
| 422 | The format or content value is unsupported, or the story exceeds the export limits. |
| 503 | The diagram could not be rendered. Retry the request. |
Errors from this endpoint return a JSON array of messages. For example:
["Story diagram exceeds export limits."]