Skip to main content
POST
/
v1
/
workflows
/
{workflow_id}
/
spec
/
plan
from retab import Retab

client = Retab()

plan = client.workflows.create_plan(
    "wf_abc123",
    yaml_definition,
)

print(plan.workflow_id)
print(plan.rendered_plan)
{
  "workflow_id": "<string>",
  "block_count": 123,
  "edge_count": 123,
  "diagnostics": {},
  "format_version": "workflows-plan/v1",
  "summary": {
    "add": 0,
    "change": 0,
    "destroy": 0,
    "replace": 0,
    "noop": 0,
    "total": 0,
    "has_changes": false
  },
  "resource_changes": [],
  "rendered_plan": "No changes. Workflow spec is up to date."
}
Compute the reconcile plan for a declarative workflow YAML spec against a specific existing workflow draft. This does not mutate workflow state. The workflow_id in the URL is the plan target. If the YAML includes metadata.id, Retab treats it as source context and does not use it to choose a different workflow.
from retab import Retab

client = Retab()

plan = client.workflows.create_plan(
    "wf_abc123",
    yaml_definition,
)

print(plan.workflow_id)
print(plan.rendered_plan)

Authorizations

Api-Key
string
header
required

Path Parameters

workflow_id
string
required

Body

application/json

Body carrying a workflow's full YAML definition for validate, plan, apply, or export.

yaml_definition
string
required

Workflow YAML definition

Response

Successful Response

A preview of the changes a workflow YAML definition would make, with a per-resource diff and a human-readable rendered_plan.

workflow_id
string
required
action
enum<string>
required
Available options:
create,
update,
noop
block_count
integer
required
edge_count
integer
required
diagnostics
Diagnostics · object
required
format_version
string
default:workflows-plan/v1
summary
DeclarativePlanSummary · object
resource_changes
DeclarativePlanResourceChange · object[]
rendered_plan
string
default:No changes. Workflow spec is up to date.