Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

Download Code Artifact Version Content changedapi/compliance/apps/code/artifacts/retrieve_version

Nearest release: v2.1.306, published 2 hours after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Recorded here
Lines+25added
Lines−21removed
From line 7 where the diff opens
First seen 15 Oct 2026 this site's first read of the page
Recorded edits3to this page, all time

The whole hunk

from line 7, old and new numbered
/
lines
from line 7
77 
88**GET** `/v1/compliance/apps/code/artifacts/{artifact_id}/versions/{version_id}`
99 
10Streams the content of one version of a Claude Code Artifact as the
11response body.
10Streams the content of one version of an Artifact as the response body, in chunks with no `Content-Length`. With `multi_file_format=zip`, a version with more than one file, other than a Claude Doc's (an Artifact whose `artifact_type` is `claude_docs`), comes back as a ZIP archive of its files.
1211 
13Returns 404 for Artifacts that don't exist or belong to another parent
14organization. A listed version id can start returning 404 if subsequent
15publishes rotated it out of retained history — re-list on 404. Returns
16503 while the version's content upload is still in flight or was
17abandoned — retry with backoff. Returns 422 with
18`error.details.error_code` `multi_file_unavailable` for a version that
19has more than one file, unless the request sets `multi_file_format=zip`,
20which returns those files as a ZIP archive. With `multi_file_format=zip`,
21a version with more than one file, one of them with a name the API cannot
22export, gets 422 `file_set_unavailable`. Do not retry a 422. A Claude
23Doc's versions hold only the web page that displays the Doc and never come
24back as a ZIP. That page usually has more than one file, so a Doc's version
25usually gets the 422 `multi_file_unavailable`. Download the Doc's text with
26`GET /v1/compliance/apps/code/artifacts/{artifact_id}/content?multi_file_format=zip`.
27Oversized encoded content aborts mid-stream: headers and initial bytes arrive
28but the body terminates early — an aborted chunked transfer is the
29only truncation signal for encoded content. `Content-MD5` is emitted
30only for identity-stored content; validate against it when present.
12Headers: `Content-Type` (`application/zip` for a ZIP archive, otherwise the stored MIME type), `Content-Disposition: attachment; filename*=utf-8''<name>` (RFC 5987), `Cache-Control: no-store, private` and, when available, `Content-MD5` (base64). `<name>` is `{artifact_id}-{version_id}.zip` for a ZIP archive, otherwise `{artifact_id}-{version_id}.txt`, whatever the content is. `Content-MD5` is only on a single file stored uncompressed, so it is never on a ZIP archive. Check the body against it when present.
3113 
14Errors specific to this download:
15 
16- `404`: the Artifact doesn't exist or the API key cannot read it, or the version is no longer kept. Older versions are dropped as new ones are published, so list the Artifact's versions again. You also get this when the organization's customer-managed encryption key can't be used. Retry once the key can be used again.
17- `503`: the content can't be served right now, for example because its upload is still in progress or was abandoned. Retry with backoff.
18- `422` with `error.details.error_code` `multi_file_unavailable`: the version has more than one file. Add `multi_file_format=zip`. A Claude Doc's version with more than one file gets this error either way, because it holds only the web page that displays the Doc. Download the Doc's text with `GET /v1/compliance/apps/code/artifacts/{artifact_id}/content?multi_file_format=zip`.
19- `422` with `file_set_unavailable`: the request sets `multi_file_format=zip`, the version has more than one file, and one of them has a path the API cannot export. Do not retry.
20 
21An error after the download has started stops the body early, with the `200` status already sent. For example, this happens to content stored compressed when it is over 16 MiB once decompressed. For a single file with no `Content-MD5`, the only sign is a transfer that aborts before its last chunk, so treat a download that aborts this way as failed.
22 
23A ZIP archive of a version's files holds one top-level folder, named for the Artifact and version. That folder holds a `files/` folder and an index, `files.json`. The index is written last, so treat an archive as incomplete if it cannot be opened or has no `files.json` in its top-level folder.
24 
25`files.json` has these fields:
26 
27- `artifact_id`: the Artifact ID, as in the request.
28- `version_id`: the version ID, as in the request.
29- `title`: the title of the version in the archive, or that version's ID when no title is kept.
30- `created_at`: when the version was published (RFC 3339, UTC), or null when that is not known.
31- `files`: one entry for each file under `files/`, with `original_path` (the file's path in the version), `exported_as` (its path in the archive), `sha256` (lowercase hex), `size_bytes` (before compression) and `mime_type`. `exported_as` is the top-level folder, then `files/`, then `original_path`. A name that could not be saved or opened safely on every operating system is changed. Use `exported_as`, not `original_path`, to find a file in the archive.
32- `omitted_files`: the files left out of the archive, each with `original_path`, `sha256`, `size_bytes` and `mime_type`. They include files the version uses from another Artifact. They also include files copied from the Artifact type the Artifact was made from, such as the app that displays it, when another organization owns that type.
33 
34`files` and `omitted_files` together list at most 4,096 files, their `size_bytes` add up to at most 1 GiB, and no file is over 20 MiB.
35 
3236## Path parameters
3337 
3438- `artifact_id: string`
from line 47
4347 
4448- `multi_file_format: optional string`
4549 
46 Set to `zip`, its only value, to receive a version that has more than one file as a ZIP archive of its files with an index, `files.json`. Files the Artifact copied from its type (the app that displays every Artifact of that type) are listed under `omitted_files` in the index, and left out of the archive, when an organization other than the Artifact's owns that type. Files the version uses from another Artifact are always listed there and left out. A Claude Doc's version never comes back as a ZIP: it is answered as without this parameter, except that a version with more than one file, one of them with a name the API cannot export, gets 422 `file_set_unavailable`. A version with one file is returned as that file, as without this parameter.
50 Set to `zip`, its only value, to receive a version that has more than one file as a ZIP archive of its files with an index, `files.json`. A version with one file is returned as that file. A Claude Doc's version never comes back as a ZIP.
4751 
4852## Headers
4953 
Feedback