Skip to main content
POST
/
v1
/
workflows
/
spec
/
apply
from retab import Retab

client = Retab()

result = client.workflows.spec.apply(yaml_definition)

print(result.workflow_id)
print(result.created)
print(result.summary.has_changes)
{
  "workflow_id": "wf_abc123",
  "created": false,
  "block_count": 2,
  "edge_count": 1,
  "diagnostics": {
    "issues": []
  },
  "format_version": "workflows-plan/v1",
  "summary": {
    "add": 0,
    "change": 0,
    "destroy": 0,
    "replace": 0,
    "noop": 1,
    "total": 0,
    "has_changes": false
  },
  "resource_changes": [],
  "rendered_plan": "No changes. Infrastructure is up-to-date."
}

Documentation Index

Fetch the complete documentation index at: https://docs.retab.com/llms.txt

Use this file to discover all available pages before exploring further.

Apply a declarative workflow YAML spec to draft workflow state. apply() writes the canonical draft graph represented by the YAML spec. It does not publish. Call the workflow publish method separately when the draft is ready to become the live version.
from retab import Retab

client = Retab()

result = client.workflows.spec.apply(yaml_definition)

print(result.workflow_id)
print(result.created)
print(result.summary.has_changes)
{
  "workflow_id": "wf_abc123",
  "created": false,
  "block_count": 2,
  "edge_count": 1,
  "diagnostics": {
    "issues": []
  },
  "format_version": "workflows-plan/v1",
  "summary": {
    "add": 0,
    "change": 0,
    "destroy": 0,
    "replace": 0,
    "noop": 1,
    "total": 0,
    "has_changes": false
  },
  "resource_changes": [],
  "rendered_plan": "No changes. Infrastructure is up-to-date."
}

Authorizations

Api-Key
string
header
required

Body

application/json
yaml_definition
string
required

Workflow YAML definition

Response

Successful Response

workflow_id
string
required
action
enum<string>
required
Available options:
create,
update,
noop
created
boolean
required
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.