To enable the Compliance API, see the setup guide.
Set up the Compliance API下載 Code 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
Headers
下載 Code Artifact 版本內容
cURL
curl https://api.anthropic.com/v1/compliance/apps/code/artifacts/$ARTIFACT_ID/versions/$VERSION_ID \
-H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"