Claude Platform Docs

To enable the Compliance API, see the setup guide.

Set up the Compliance API

删除代码 Artifact

DELETE/v1/compliance/apps/code/artifacts/{artifact_id}

永久删除代码 Artifact 及其所有版本。这是一个破坏性操作,无法撤销。200 响应表示删除已启动且该 Artifact 已被认领;内容移除将异步完成。

对于不存在或属于其他父组织的 Artifacts,返回 404。对已删除的 Artifact 重复执行删除操作时返回 404。

Path parameters
artifact_id: string

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

Headers
"x-api-key": optional string
Returns
id: string

The ID of the Artifact that was deleted

type: "code_artifact_deleted"

Constant string confirming deletion

defaultcode_artifact_deleted
删除代码 Artifact
cURL
curl https://api.anthropic.com/v1/compliance/apps/code/artifacts/$ARTIFACT_ID \
    -X DELETE \
    -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"
Returns Examples
Response 200
{
  "id": "cart_xyz789",
  "type": "code_artifact_deleted"
}