> ## Documentation Index
> Fetch the complete documentation index at: https://docs.langdock.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Workflow abrufen

> Lies Entwurf, veröffentlichten Graphen, Versionsverlauf und Limits eines Workflows

Gibt einen Workflow zurück, den der API-Key-User sehen kann. Die Antwort enthält den Entwurfsgraphen, den veröffentlichten Graphen falls vorhanden, den Versionsverlauf und die Ausführungslimits.

## Basis-URL

```
https://api.langdock.com/workflows/v1/get
```

<Warning>
  **Dedicated Deployments**

  Ersetze `api.langdock.com` durch `<your-deployment-url>/api/public` in allen Anfragen.
</Warning>

## Erforderliche Scopes

Dieser Endpoint erfordert den `WORKFLOW_API` Scope (**Workflow-Lese-API**).

## Parameter

| Parameter    | Typ    | Erforderlich | Beschreibung                                            |
| ------------ | ------ | ------------ | ------------------------------------------------------- |
| `workflowId` | string | Ja           | UUID des Workflows. Wird als Query-Parameter übergeben. |

## Beispiel

```javascript theme={null}
const axios = require("axios");

async function getWorkflow(workflowId) {
  const response = await axios.get(
    "https://api.langdock.com/workflows/v1/get",
    {
      params: { workflowId },
      headers: {
        Authorization: "Bearer YOUR_API_KEY"
      }
    }
  );

  console.log("Draft version:", response.data.workflow.version);
  return response.data.workflow;
}

getWorkflow("550e8400-e29b-41d4-a716-446655440000");
```

## Antwortformat

### Erfolgreiche Antwort (200 OK)

```typescript theme={null}
{
  workflow: object;
}
```

`workflow` entspricht dem Objekt in der [Workflow API Übersicht](/de/developer/workflow-api/workflows-overview). Geheimnisähnliche Felder werden redigiert. Wenn du diesen redigierten Graphen über [Aktualisieren](/de/developer/workflow-api/update-workflow) zurückschickst, bleiben die gespeicherten Secrets erhalten.

## Fehlerbehandlung

| Statuscode | Beschreibung                                                    |
| ---------- | --------------------------------------------------------------- |
| 400        | Ungültige Workflow-ID                                           |
| 401        | Ungültiger oder fehlender API-Key                               |
| 403        | Fehlender `WORKFLOW_API` Scope                                  |
| 404        | Workflow nicht gefunden, oder der Key-User darf ihn nicht sehen |
| 429        | Rate Limit überschritten                                        |
| 500        | Interner Serverfehler                                           |

<Info>
  Langdock blockiert bewusst Browser-basierte Anfragen, um deinen API-Schlüssel zu schützen und die Sicherheit deiner Anwendungen zu gewährleisten. Weitere Informationen findest du in unserem Guide zu [Best Practices für API-Schlüssel](/de/admin/ai-adoption-and-rollout/best-practices/api-key-best-practices).
</Info>


## OpenAPI

````yaml GET /workflows/v1/get
openapi: 3.0.0
info:
  title: Langdock API
  version: 3.0.0
servers:
  - url: https://api.langdock.com
    description: Production
security:
  - bearerAuth: []
paths:
  /workflows/v1/get:
    get:
      tags:
        - Workflows
      summary: Get a workflow
      description: >-
        Returns a workflow the API key user can view, including the draft graph,
        published graph, version history, and execution limits.
      operationId: getWorkflow
      parameters:
        - name: workflowId
          in: query
          required: true
          schema:
            type: string
            format: uuid
          description: UUID of the workflow.
      responses:
        '200':
          description: Workflow returned successfully
        '400':
          description: Invalid workflow ID
        '401':
          description: Invalid or missing API key
        '403':
          description: Missing WORKFLOW_API scope
        '404':
          description: Workflow not found, or the key user cannot view it
        '429':
          description: Rate limit exceeded
        '500':
          description: Internal server error
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: API key as Bearer token. Format "Bearer YOUR_API_KEY"

````