# Workflow Diagram API

**Description:** Returns the workflow diagram in Mermaid format.  This can be used to visualize your workflow using Mermaid.

**Try it out:** [Swagger Reference](https://arcee.portal.swaggerhub.com/orchestra/default/arcee-orchestra-v-1-0-0#/default/workflowDiagram)

### **Request Syntax:**

```
GET /workflows/{workflow_id}/diagram
Authentication: Bearer <Your API key>
```

### **Response Syntax:**

```json
{
    "diagram": ""
}
```

<details>

<summary>Retrieve Diagram Response Example</summary>

{% code overflow="wrap" %}

```json
{
    "diagram": "graph TD\n    model[\"model<br/>Model node\"]\n    slack_integration[\"slack_integration<br/>\"]\n    START((START))\n    END((END))\n    slack_integration --> END\n    START --> model\n    model --> slack_integration\n    style model fill:#bbf,stroke:#333,stroke-width:1px,color:#fff\n    style slack_integration fill:#bbf,stroke:#333,stroke-width:1px,color:#fff\n    style START fill:#9f9,stroke:#333,stroke-width:2px,color:#fff\n    style END fill:#f99,stroke:#333,stroke-width:2px,color:#fff"
}
```

{% endcode %}

</details>

### **Response Syntax Variables**

* **Diagram**: a breakdown of the workflow diagram in Mermaid format


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.arcee.ai/arcee-orchestra/workflows/api-invocation/workflow-diagram-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
