Workspace.Workflows.Media
Tags: automation, workflows
Endpoints
GET /{workflow_id}/diagram- DiagramGET /{workflow_id}/thumbnail- Thumbnail
Diagram
GET /api/v2/w/{workspace_uuid}/workflows/{workflow_id}/diagram
Description:
Workflow creation and management
Get a Mermaid diagram representation of a workflow.
Returns a Mermaid flowchart definition that can be rendered client-side. The diagram shows the workflow structure with tasks as nodes and their connections as edges.
By default only active tasks are rendered, matching the active task
list. Archived tasks (and edges touching them) are excluded so they don't
appear as live-but-orphaned nodes. Pass include_archived=true to render
archived tasks as well — they get a distinct dashed-grey style and an
"(archived)" label so they are never mistaken for active tasks.
Path Parameters:
workflow_id: Unique identifier of the workflow (integer)
Query Parameters:
include_archived: Render archived tasks (distinctly styled) in addition to active ones (optional, default: false)
Response: Returns an object containing:
mermaid: Mermaid diagram definition (string)taskCount: Total number of tasks in the workflow, active + archived (integer)archivedTaskCount: How many of those tasks are archived (integer)includeArchived: Whether archived tasks were rendered (boolean)
Permissions: Requires valid workspace membership and "use" permission on the workflow.
Error Responses:
401 Unauthorized: Authentication required or invalid session403 Forbidden: User lacks "use" permission404 Not Found: Workflow with specified ID does not exist
Authentication: Requires workspace member
Parameters:
workflow_id(Integer)include_archived(Boolean)
Thumbnail
GET /api/v2/w/{workspace_uuid}/workflows/{workflow_id}/thumbnail
Description:
Workflow creation and management
Get an SVG thumbnail representation of a workflow.
Returns a compact SVG diagram showing the workflow structure with tasks as nodes and their connections as edges, styled to match the React Flow workflow diagram.
Path Parameters:
workflow_id: Unique identifier of the workflow (integer)
Response: Returns SVG content with Content-Type: image/svg+xml
Permissions: Requires valid workspace membership and "use" permission on the workflow.
Error Responses:
401 Unauthorized: Authentication required or invalid session403 Forbidden: User lacks "use" permission404 Not Found: Workflow with specified ID does not exist
Authentication: Requires workspace member
Parameters:
workflow_id(Integer)