Skip to main content
GET
Get workflow version files

Authorizations

X-Asteroid-Agents-Api-Key
string
header
required

Path Parameters

agentId
string<uuid>
required

The ID of the agent

workflowId
string<uuid>
required

The ID of the workflow

Query Parameters

contents
enum<string>

Which contents come inline: none (a pure manifest), structural (the default), or all (structural plus agent-file bytes within the response budget). Supersedes includeAgentFileContents when both are sent. 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.

includeAgentFileContents
boolean

Fetch user agent-file bytes from storage and inline them as contentBase64, so the whole directory can be materialised in one request. Off by default, in which case agent files are returned as references. Files exceeding the per-file or per-response budget stay references even when this is set. Deprecated: superseded by contents.

maxFileBytes
integer<int64>

Per-file ceiling, in bytes, for inlined agent-file contents. Clamped to the server maximum; a caller with tighter limits of its own passes them here so the response does not carry bytes it will discard. Files above the ceiling stay references.

maxTotalBytes
integer<int64>

Ceiling, in bytes, on the total inlined agent-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 rendered as a directory of files. Structural files are derived from the structured workflow and carry inline content; user agent files are referenced by id.

agentName
string
required

The owning agent's name. The directory is rendered relative to the workflow root, so a client that lays it out under a per-agent folder needs the name to derive that folder — and would otherwise have to fetch the agent for it.

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; a stale value is rejected with 409.

workflowId
string<uuid>
required

The id of the workflow this tree renders. Lets a client that materialises the directory record what it holds without a second fetch.

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.