Artifacts API
Upload, list, download and delete files associated with a traverser.
Operations
getArtifact
GET /api/v2/artifacts/{id}
Requires: invoke role, worker role
Return the artifact metadata together with its data_base64 bytes. The server revalidates the stored digest, size and encoding before responding.
Generated Python client internals: atfgraph._generated.api.artifacts_api.ArtifactsApi.get_artifact()
Parameters
| Parameter | In | Required | Type |
|---|
id | path | yes | string |
lease_token | query | no | string |
task_id | query | no | string |
Responses
Example response 200
{
"content_type": "string",
"created_at": 0,
"data_base64": "string",
"id": "string",
"name": "string",
"sha256": "string",
"size_bytes": 0,
"traverser_id": "string"
}
deleteArtifact
DELETE /api/v2/artifacts/{id}
Requires: invoke role, worker role
Generated Python client internals: atfgraph._generated.api.artifacts_api.ArtifactsApi.delete_artifact()
Parameters
| Parameter | In | Required | Type |
|---|
id | path | yes | string |
lease_token | query | no | string |
task_id | query | no | string |
Responses
Example response 200
{
"deleted": false,
"id": "string"
}
listBriefArtifacts
GET /api/v2/sessions/{id}/artifacts
Requires: invoke role, worker role
Brief artifacts of a session in upload order with the bytes stored so far. The owner, an admin, or a worker whose leased task (task_id + lease_token in the query) runs in the session may list; the studio node uses this to stage the files into the harness workspace. Another principal's session is 404 session_not_found.
Generated Python client internals: atfgraph._generated.api.artifacts_api.ArtifactsApi.list_brief_artifacts()
Parameters
| Parameter | In | Required | Type |
|---|
id | path | yes | string |
lease_token | query | no | string |
step_id | query | no | string |
task_id | query | no | string |
Responses
Example response 200
{
"items": [
{
"content_type": "string",
"created_at": 0,
"id": "string",
"kind": "string",
"name": "string",
"session_id": "string",
"sha256": "string",
"size_bytes": 0
}
],
"total_bytes": 0
}
putBriefArtifact
POST /api/v2/sessions/{id}/artifacts
Requires: invoke role
Attach one file to a session before any run exists. The request body is the raw bytes (not JSON, not base64) with Content-Type on the allow list: image/png, image/jpeg, image/webp, application/pdf, text/*, application/json, application/yaml, application/x-yaml, application/zip (415 unsupported_media_type otherwise). X-Artifact-Name is the filename (one path segment, at most 256 bytes); X-Artifact-Kind is openapi, document, screenshot, sample, reference_node or other (default other); X-Artifact-Sha256, when sent, must match the bytes (409 sha256_mismatch). Bodies over brief_artifacts.max_file_bytes (default 25 MiB) are 413 artifact_too_large; a session total over brief_artifacts.max_session_bytes (default 100 MiB) is 413 session_artifacts_quota. Only the session owner or an admin may upload; a deleted session is 410 session_deleted.
Generated Python client internals: atfgraph._generated.api.artifacts_api.ArtifactsApi.put_brief_artifact()
Parameters
| Parameter | In | Required | Type |
|---|
id | path | yes | string |
X-Artifact-Kind | header | no | string |
X-Artifact-Name | header | yes | string |
X-Artifact-Sha256 | header | no | string |
Responses
Example response 201
{
"artifact": {
"content_type": "string",
"created_at": 0,
"id": "string",
"kind": "string",
"name": "string",
"session_id": "string",
"sha256": "string",
"size_bytes": 0
}
}
getBriefArtifact
GET /api/v2/sessions/{id}/artifacts/{artifact_id}
Requires: invoke role, worker role
Download one brief artifact. The default answer is the raw bytes with Content-Type, Content-Length, ETag (the quoted SHA-256), X-Artifact-Name and X-Artifact-Kind; the server revalidates size and digest before answering. With meta=1 the JSON metadata row is returned instead. Worker authority travels in the query as for listBriefArtifacts.
Generated Python client internals: atfgraph._generated.api.artifacts_api.ArtifactsApi.get_brief_artifact()
Parameters
| Parameter | In | Required | Type |
|---|
artifact_id | path | yes | string |
id | path | yes | string |
lease_token | query | no | string |
meta | query | no | boolean |
step_id | query | no | string |
task_id | query | no | string |
Responses
Example response 200
{
"content_type": "string",
"created_at": 0,
"id": "string",
"kind": "string",
"name": "string",
"session_id": "string",
"sha256": "string",
"size_bytes": 0
}
deleteBriefArtifact
DELETE /api/v2/sessions/{id}/artifacts/{artifact_id}
Requires: invoke role
Remove one brief artifact from a session. Owner or admin only; a worker cannot delete what it stages (403 forbidden). Unknown artifact is 404 artifact_not_found.
Generated Python client internals: atfgraph._generated.api.artifacts_api.ArtifactsApi.delete_brief_artifact()
Parameters
| Parameter | In | Required | Type |
|---|
artifact_id | path | yes | string |
id | path | yes | string |
Responses
Example response 200
{
"deleted": false,
"id": "string"
}
listArtifacts
GET /api/v2/traversers/{id}/artifacts
Requires: invoke role, worker role
Generated Python client internals: atfgraph._generated.api.artifacts_api.ArtifactsApi.list_artifacts()
Parameters
| Parameter | In | Required | Type |
|---|
id | path | yes | string |
lease_token | query | no | string |
task_id | query | no | string |
Responses
Example response 200
{
"items": [
{
"content_type": "string",
"created_at": 0,
"id": "string",
"name": "string",
"sha256": "string",
"size_bytes": 0,
"traverser_id": "string"
}
]
}
putArtifact
POST /api/v2/traversers/{id}/artifacts
Requires: invoke role, worker role
Attach a durable artifact to an authorized traverser. data_base64 must be canonical padded standard base64 of at most 524288 decoded bytes; larger payloads return 413. The owning invoker, an admin, or a worker holding an active lease on the traverser or an ancestor may write. id, sha256, size_bytes, created_at, namespace and principal are server assigned and rejected in the request.
Generated Python client internals: atfgraph._generated.api.artifacts_api.ArtifactsApi.put_artifact()
Parameters
| Parameter | In | Required | Type |
|---|
id | path | yes | string |
Request body
PutArtifact (required)
{
"content_type": "string",
"data_base64": "string",
"name": "string"
}
Responses
Example response 201
{
"content_type": "string",
"created_at": 0,
"id": "string",
"name": "string",
"sha256": "string",
"size_bytes": 0,
"traverser_id": "string"
}