Claude Platform Docs

To enable the Compliance API, see the setup guide.

Set up the Compliance API

Code Artifact コンテンツのダウンロード

GET/v1/compliance/apps/code/artifacts/{artifact_id}/content

Artifact の現在の内容をレスポンス本文としてストリーミングします。Claude Doc の場合、これは Doc のテキストをテキストタブごとに 1 つの Word ファイルとしてまとめた ZIP アーカイブであり、リクエストで multi_file_format=zip を設定する必要があります。その他の Artifact の場合は、GET /v1/compliance/apps/code/artifacts/{artifact_id}/versions/{version_id} が返すのと同じ形式で最新バージョンが返されます。

存在しない Artifact、または API キーで読み取れない Artifact に対しては 404 が返されます。組織の顧客管理暗号化キーが使用できない場合(たとえば、無効化または取り消されている場合)は、error.details.error_code が cmek_key_disabled の 400 が返されます。内容を現在生成できない場合は 503 が返されます。Retry-After ヘッダーに示された秒数だけ待つか、ヘッダーがない場合はバックオフを使用して再試行してください。Claude Doc の場合、422 の error.details.error_code は、リクエストで multi_file_format=zip が設定されていない場合は multi_file_unavailable、Doc にエクスポートするテキストがない場合(たとえば、テキストタブがない、またはゴミ箱にある場合)は document_unavailable、エクスポートが 16 MiB を超える場合は document_too_large、組織が顧客管理暗号化キーを使用しており現在そのエクスポートを提供できない場合は cmek_org_unsupported になります。その他の Artifact の場合、422 はバージョンのダウンロードと同じです。

Path parameters
artifact_id: string

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

Query parameters
multi_file_format: optional string

Set to zip, its only value. A Claude Doc downloads only this way, as a ZIP archive of Word files, one per text tab. For any other Artifact it works as on the version download: when the latest version has more than one file, it comes back as a ZIP archive of its files with an index, files.json.

Headers
"anthropic-version": optional string

The version of the Claude API you want to use.

Read more about versioning and our version history here.

"x-api-key": optional string
Code Artifact コンテンツのダウンロード
cURL
curl https://api.anthropic.com/v1/compliance/apps/code/artifacts/$ARTIFACT_ID/content \
    -H 'anthropic-version: 2023-06-01' \
    -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"