Files

Patch workflow head files

Patch the editable head's file representation in place: apply file writes and deletes, re-derive the structured workflow, and persist it. Structural-file writes require a matching baseRev. When the head is frozen (published or executed) the edit forks a fresh version behind the scenes.

patch/agents/v2/workflows/{workflowId}/head/files

Request

  • Base URL
    https://odyssey.asteroid.ai
  • URL
    https://odyssey.asteroid.ai/agents/v2/workflows/{workflowId}/head/files
  • Auth
    API key in header X-Api-Key

Path parameters

workflowIdstring uuid required

Request body

baseRevinteger required

The revision this edit is based on. Agent-file-only patches overlay the current head even when this is stale. A structural-file patch is rejected with 409 when it does not match the stored head revision.

deletesstring[] required

Response

The request has succeeded.

authorstring

The email of the user who created this workflow.

createdAtstring date-time required

When this workflow was created. For the editable head this is restamped on each in-place edit, so it doubles as the last-edited time.

idstring uuid required
isPublishedboolean required

Whether this is the workflow's published version (the API default). At most one version per workflow is published.

parentIdstring uuid
revinteger required

Monotonic optimistic-concurrency revision. Only meaningful for the editable head: supply it as baseRev on the next head patch. Agent-file-only patches overlay the current head if it has moved; structural-file patches are rejected with 409 when stale. Frozen snapshots never receive in-place patches.

rulesstring required
versioninteger required

The monotonic per-workflow version number.

workflowIdstring uuid required

Changes

No recorded changes to this operation across all 1 revision of this API.