Hanzo AI
OpenapiExec

Get files

Lists the files in an execution session. Everything the session's sandbox holds — the uploads a run can read and the artifacts it produced — each then…

GET /v1/exec/files/{sid}

Addresshttps://api.hanzo.ai/v1/exec/files/{sid}
MethodGET
Operationget_exec_files_by_sid
AuthAuthorization: Bearer $HANZO_API_KEY

Lists the files in an execution session.

Everything the session's sandbox holds — the uploads a run can read and the artifacts it produced — each then fetched from GET /v1/exec/download.

The answer is a BARE JSON ARRAY of {name, lastModified}, where name is the same {session_id}/{fileId} identifier download takes, because that is what the client matches on. The obvious typed shape, {files: […]}, would have been a silent wire change: the request still succeeds and response.data.find(...) finds nothing, which reads as a session holding no files.

The NAME of this handler is what the published summary is cut from, and it used to leak: the comment opened "Files lists …", which is not this function's identifier, so zipdoc's exact-match strip left it and every SDK, tool list and CLI help line opened with a Go symbol no caller can see. An openapi.Describe stated a better summary beside the route and was DISCARDED — Fold replaces a structural operation with the typed one — so the declaration read as landed and rendered nowhere. The comment is the one home for this sentence.

One recursive find, the same traversal the artifact sweep makes. It used to be ls -1A — top level only — while the sweep collected with find, so a run that wrote a nested artifact reported it in its reply and then omitted it here, and the client's prefix match read the file as expired. Two traversals of one directory is two answers about what a session holds; there is one now.

Request

1 field.

FieldInTypeRequiredDescription
sidpathstringyesSID is the session identifier — the sandbox this listing is of.

Response

StatusBodyMeaning
200listing[]ok

200 body — 2 fields.

FieldInTypeAlwaysDescription
[].lastModifiedbodystringLastModified is when the BYTES last changed, as RFC 3339 in UTC to the second — 2026-01-02T03:04:05Z, the sandbox's own date -u -r on the file.
[].namebodystringName is the file's IDENTIFIER, {session_id}/{fileId} whole — never the bare filename, and never URL-escaped.

Failure carries the platform error shape — see Errors.

Examples

hanzo exec files get <sid>

Exec API · All Hanzo APIs · Interactive reference

How is this guide?

On this page