Skip to main content
The Workflow Runs API allows you to get the details of a run.

Headers

Your unique API key for authentication. This key is required in the header of all API requests, to authenticate your account and access Draft & Goal’s services. Get your API key from the Draft & Goal Dashboard.

Path Parameters

The ID of the workflow run you want to get.

Query Parameters

Whether to include all completed steps in the response. Default is false.

During the workflow run

If the workflow run is still running, you will receive a 250 HTTP status code. Please wait a few minutes and poll the endpoint again.

Response

Whether the workflow run was successful. The data returned by the workflow run. The workflow run ID. The ID of the workflow that was run. The inputs of the workflow run. Each key in this object represents an input node ID from your workflow. The value of the input parameter. The type of the input value. Possible values: “text” The state of the workflow run. Available options: DONE, FAILED, USER_ABORTED The error that occurred during the workflow run. The date and time the workflow run was started. The date and time the workflow run was ended. The steps that were completed during the workflow run. You can use the node ID of a step to select a specific step to get the output. The ID of the step. The ID of the node. The state of the step. Available option: DONE Whether the step has a downloadable output. The output of the step if the step has a downloadable output. The date and time the step was started. The date and time the step was ended. The steps that failed or were aborted during the workflow run. The ID of the step. The ID of the node. You can use this ID to select a specific node to retrieve the output. The state of the step. Available options: FAILED, USER_ABORTED The error that occurred during the step. The date and time the step was started. The date and time the step was ended.
Response 200
{
  "success": true,
  "data": {
    "run_id": "0cf35172-859e-4b26-8ce9-6c2588a77b40",
    "workflow_id": "ab44401b-6947-46bc-8248-47aa2dacf856",
    "inputs": {
      "Text_0": {
        "value": "Hello world",
        "type": "text"
      }
    },
    "state": "DONE",
    "error": null,
    "started_at": "2025-02-17T13:33:45.575000",
    "ended_at": "2025-02-17T13:36:17.194000",
    "completed_steps": [
      {
        "step_id": "ee7d2258-8ff5-4176-8498-110f8dc8d264",
        "node_id": "LLM_0",
        "state": "DONE",
        "downloadable_output": true,
        "output": "Example output",
        "started_at": "2025-02-17T13:33:45.575000",
        "ended_at": "2025-02-17T13:34:17.194000"
      },
      {
        "step_id": "d5c913ab-0970-49f3-955a-eee4b2447276",
        "node_id": "LLM_1",
        "state": "DONE",
        "downloadable_output": false,
        "output":null,
        "started_at": "2025-02-17T13:35:45.575000",
        "ended_at": "2025-02-17T13:36:17.194000"
      }
    ],
    "failed_steps": []
  }
}
250
{
  "message": "Workflow Run generation on the way. Please wait a few minutes."
}
403
{
  "type": "error",
  "error": {
    "message": "You don't have access to this workflow run"
  }
}
404
{
  "type": "error",
  "error": {
    "message": "Invalid workflowrun id | Run deleted"
  }
}
Request Example
curl "https://agents-api.prod.dng.ai/api/v1/workflow-runs/$WORKFLOW_RUN_ID" \
          --header "x-api-key: $YOUR_API_KEY" \
          --header "content-Type: application/json"