curl --request GET \
--url https://odyssey.asteroid.ai/agents/v2/workflows/{workflowId}/versions/{versionId}/files \
--header 'X-Api-Key: <api-key>'import requests
url = "https://odyssey.asteroid.ai/agents/v2/workflows/{workflowId}/versions/{versionId}/files"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://odyssey.asteroid.ai/agents/v2/workflows/{workflowId}/versions/{versionId}/files', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://odyssey.asteroid.ai/agents/v2/workflows/{workflowId}/versions/{versionId}/files",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://odyssey.asteroid.ai/agents/v2/workflows/{workflowId}/versions/{versionId}/files"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://odyssey.asteroid.ai/agents/v2/workflows/{workflowId}/versions/{versionId}/files")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://odyssey.asteroid.ai/agents/v2/workflows/{workflowId}/versions/{versionId}/files")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"files": [
{
"kind": "structural",
"path": "<string>",
"size": 123,
"checksum": "<string>",
"content": "<string>",
"contentBase64": "<string>",
"downloadUrl": "<string>",
"fileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mimeType": "<string>",
"storageObjectKey": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"rev": 123,
"versionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workflowName": "<string>",
"contentHash": "<string>",
"variantKeys": [
"<string>"
],
"version": 123
}{
"code": 400,
"message": "<string>"
}{
"code": 401,
"message": "<string>"
}{
"code": 403,
"message": "<string>"
}{
"code": 404,
"message": "<string>"
}{
"code": 500,
"message": "<string>"
}Get workflow version files
Get a workflow version rendered as a directory of files. Structural files carry inline content; the workflow’s own files are referenced by id.
curl --request GET \
--url https://odyssey.asteroid.ai/agents/v2/workflows/{workflowId}/versions/{versionId}/files \
--header 'X-Api-Key: <api-key>'import requests
url = "https://odyssey.asteroid.ai/agents/v2/workflows/{workflowId}/versions/{versionId}/files"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://odyssey.asteroid.ai/agents/v2/workflows/{workflowId}/versions/{versionId}/files', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://odyssey.asteroid.ai/agents/v2/workflows/{workflowId}/versions/{versionId}/files",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://odyssey.asteroid.ai/agents/v2/workflows/{workflowId}/versions/{versionId}/files"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://odyssey.asteroid.ai/agents/v2/workflows/{workflowId}/versions/{versionId}/files")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://odyssey.asteroid.ai/agents/v2/workflows/{workflowId}/versions/{versionId}/files")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"files": [
{
"kind": "structural",
"path": "<string>",
"size": 123,
"checksum": "<string>",
"content": "<string>",
"contentBase64": "<string>",
"downloadUrl": "<string>",
"fileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mimeType": "<string>",
"storageObjectKey": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"rev": 123,
"versionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workflowName": "<string>",
"contentHash": "<string>",
"variantKeys": [
"<string>"
],
"version": 123
}{
"code": 400,
"message": "<string>"
}{
"code": 401,
"message": "<string>"
}{
"code": 403,
"message": "<string>"
}{
"code": 404,
"message": "<string>"
}{
"code": 500,
"message": "<string>"
}Authorizations
Path Parameters
The ID of the workflow
The ID of the version
Query Parameters
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.
none, structural, all 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.
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.
Per-file ceiling, in bytes, for inlined file contents. Clamped to the server maximum. Files above the ceiling stay references.
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.
The files in the workflow, sorted by path.
Show child attributes
Show child attributes
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.
The ID of the version this tree renders
The name of the workflow. A client that lays the directory out under a per-workflow folder derives the folder from it.
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.
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.
The workflow's version number, absent for a draft that has never been published.

