Skip to main content
PUT
/
v1
/
workflows
/
revisions
/
{revision_id}
/
graph
Validate and manually replace a workflow revision's compiled graph
curl --request PUT \
  --url https://api-sandbox.featherhq.com/v1/workflows/revisions/{revision_id}/graph \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "compiled_graph": {}
}
'
{
  "updated": true,
  "validation": {
    "valid": true,
    "error_count": 123,
    "warning_count": 123,
    "suggestion_count": 123,
    "findings": [
      {
        "rule_id": "<string>",
        "category": "<string>",
        "message": "<string>",
        "node_id": "<string>",
        "edge_id": "<string>",
        "related_node_ids": [
          "<string>"
        ],
        "related_edge_ids": [
          "<string>"
        ],
        "source_span": {
          "start_line": 123,
          "start_col": 123,
          "end_line": 123,
          "end_col": 123,
          "raw_text_excerpt": "<string>"
        },
        "suggested_fix": "<string>",
        "related_spans": [
          {
            "start_line": 123,
            "start_col": 123,
            "end_line": 123,
            "end_col": 123,
            "raw_text_excerpt": "<string>"
          }
        ]
      }
    ],
    "normalized_graph": {}
  },
  "revision": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "workflow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "instructions": "<string>",
    "compilation_strategy": "<string>",
    "compilation_status": "<string>",
    "trigger_type": "<string>",
    "trigger_config": {},
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "description": "<string>",
    "system_prompt": "<string>",
    "compiled_graph": {},
    "quality_report": {},
    "compilation_errors": [
      "<string>"
    ],
    "compilation_task_id": "<string>",
    "compilation_input_hash": "<string>",
    "router_config_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "analyzer_model_settings": {
      "model": "<string>",
      "config": {
        "temperature": 123,
        "max_tokens": 123,
        "top_p": 123,
        "stop_sequences": [
          "<string>"
        ],
        "request_timeout_ms": 123,
        "thinking_budget": 2
      }
    },
    "router_model_settings": {
      "model": "<string>",
      "config": {
        "temperature": 123,
        "max_tokens": 123,
        "top_p": 123,
        "stop_sequences": [
          "<string>"
        ],
        "request_timeout_ms": 123,
        "thinking_budget": 2
      }
    },
    "policy_ids": [
      "<unknown>"
    ],
    "tool_input_defaults": {},
    "tools": [
      {
        "tool": {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "name": "<string>",
          "description": "<string>",
          "active_revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "created_at": "2023-11-07T05:31:56Z",
          "updated_at": "2023-11-07T05:31:56Z",
          "active_revision": {
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "tool_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "name": "<string>",
            "description": "<string>",
            "status": "<string>",
            "created_by": "<string>",
            "created_at": "2023-11-07T05:31:56Z",
            "updated_at": "2023-11-07T05:31:56Z",
            "default_count": 123,
            "pinned_count": 123,
            "stale_input_fields": [
              "<string>"
            ],
            "merged_input_preview": {},
            "configuration": {
              "url": "<string>",
              "method": "GET",
              "headers": [
                {
                  "key": "<string>",
                  "value": "<string>",
                  "secure": false
                }
              ],
              "query_params": [
                {
                  "key": "<string>",
                  "value": "<string>",
                  "secure": false
                }
              ],
              "body": {},
              "timeout": 30,
              "variables": [
                {
                  "name": "<string>",
                  "type": "str",
                  "description": "<string>",
                  "required": false
                }
              ],
              "retry": {
                "max_retries": 0,
                "base_delay_seconds": 1,
                "max_delay_seconds": 30,
                "jitter": true
              }
            },
            "transfer_target": {
              "destination": "<string>",
              "mode": "cold"
            },
            "response_schema": {
              "field_mappings": [
                {
                  "path": "<string>",
                  "alias": "<string>"
                }
              ]
            },
            "has_secrets": false,
            "input_defaults": {}
          },
          "metadata": {}
        },
        "tool_revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      }
    ],
    "knowledge_base_ids": [
      "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    ],
    "created_by": "<string>"
  }
}

Authorizations

x-api-key
string
header
required

Path Parameters

revision_id
string<uuid>
required

Body

application/json

Body for validating or manually replacing a revision's compiled graph.

compiled_graph
Compiled Graph · object
required

Response

Successful Response

Result of a manual graph update.

updated=False means validation failed and the revision was left unchanged; the response status is 422 and validation.findings explains why.

updated
boolean
required
validation
WorkflowGraphValidationResponse · object
required

Validation result for a submitted CompiledWorkflowGraph payload.

revision
WorkflowRevisionResponse · object

Full revision response — the compile-poll target (WF-08).

Clients poll GET /workflows/revisions/{id} and read compilation_status

  • compilation_errors + compiled_graph to determine whether an async compile job is done. compilation_task_id is the Celery task handle the conductor uses to cancel an in-flight compile.