Claude Platform Docs

To enable the Compliance API, see the setup guide.

Set up the Compliance API

下载代码 Artifact 版本内容

GET/v1/compliance/apps/code/artifacts/{artifact_id}/versions/{version_id}

将 Claude Code Artifact 的某个版本的内容作为响应正文进行流式传输。

对于不存在或属于其他父组织的 Artifacts,返回 404。如果后续发布将某个已列出的版本 id 轮换出保留历史记录,该 id 可能开始返回 404——遇到 404 时请重新列出。当该版本的内容上传仍在进行中或已被放弃时,返回 503——请使用退避策略重试。超大的编码内容会在流式传输中途中止:标头和初始字节会到达,但正文会提前终止——中止的分块传输是编码内容被截断的唯一信号。Content-MD5 仅针对以原始方式(identity)存储的内容发出;如果存在,请据此进行验证。

Path parameters
artifact_id: string

The Artifact ID (tagged ID, e.g., cart_abc123)

version_id: string

Opaque version identifier from the Artifact's versions list

Headers
"x-api-key": optional string
下载代码 Artifact 版本内容
cURL
curl https://api.anthropic.com/v1/compliance/apps/code/artifacts/$ARTIFACT_ID/versions/$VERSION_ID \
    -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"