Skip to main content
GET
Get workflow version files

Authorizations

X-Api-Key
string
header
required

Path Parameters

workflowId
string<uuid>
required

The ID of the workflow

versionId
string<uuid>
required

The ID of the version

Query Parameters

contents
enum<string>

Which contents come inline: none (a pure manifest), structural (the default), or all (structural plus file bytes within the response budget). Which file contents a tree read carries inline.

Available options:
none,
structural,
all
paths
string[]

Return only the files at these exact tree paths. A path that names nothing yields no entry. The inline budget applies to the filtered set, so a narrow read can inline files a whole-tree read would have to skip.

variants
string

Narrow which variants// files the tree carries: "none" strips every variant, a comma-separated list keeps only those variant keys. Files outside variants/ are always kept, and the response's variantKeys still names every variant. Ignored unless the workflow has variant mode enabled; absent keeps every variant.

maxFileBytes
integer<int64>

Per-file ceiling, in bytes, for inlined file contents. Clamped to the server maximum. Files above the ceiling stay references.

maxTotalBytes
integer<int64>

Ceiling, in bytes, on the total inlined file contents in one response. Clamped to the server maximum. Files are admitted in path order until the ceiling is reached; the rest stay references.

Response

The request has succeeded.

A workflow version rendered as a directory of files. Structural files carry inline content; the workflow's own files are referenced by id.

files
object[]
required

The files in the workflow, sorted by path.

rev
integer
required

The revision the tree reflects. For the editable head, supply this as baseRev when patching. Agent-file-only patches overlay the current head if it has moved; structural-file patches are rejected with 409 when stale.

versionId
string<uuid>
required

The ID of the version this tree renders

workflowName
string
required

The name of the workflow. A client that lays the directory out under a per-workflow folder derives the folder from it.

contentHash
string

Hex-encoded SHA-256 over the workflow's whole file directory: every structural file's path and content, and every agent file's path and checksum. It covers the whole workflow regardless of any paths, variants or contents narrowing on the read, so two reads of the same workflow always agree. A client keeping the directory in version control compares this one string to answer "does the published agent still match my checkout?" instead of diffing every file. Absent when an agent file has no checksum yet, since the tree cannot then be hashed in full.

variantKeys
string[]

Every variant key the workflow's files carry, sorted, regardless of any variants filter on the read — a narrowed tree still names what it could ask for. Absent unless the workflow has variant mode enabled.

version
integer

The workflow's version number, absent for a draft that has never been published.