To enable the Compliance API, see the setup guide.
Set up the Compliance API获取生效的组织设置
GET/v1/compliance/organizations/{organization_id}/settings
检索组织的生效设置。
返回给定组织当前生效的设置——即应用所有策略后的强制执行状态,这可能与管理控制台中配置的内容不同。组织管理员无法更改的设置(例如,由 Anthropic 策略控制的设置或该组织不可用的设置)将从列表中省略。
该组织必须属于 API 密钥的组织层级结构;未知组织和层级结构之外的组织将返回 404。
Path parameters
Headers
Returns
获取生效的组织设置
cURL
curl https://api.anthropic.com/v1/compliance/organizations/$ORGANIZATION_ID/settings \
-H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"Response 200
{
"api_keys": [
{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"created_by_id": "created_by_id",
"is_active": true,
"name": "name",
"scopes": [
"string"
],
"expires_at": "2019-12-27T18:11:19.117Z",
"type": "compliance_api_key"
}
],
"organization_id": "organization_id",
"settings": [
{
"name": "ai_powered_artifacts_enabled",
"value": true,
"type": "boolean"
}
],
"type": "effective_organization_settings"
}Returns Examples
Response 200
{
"api_keys": [
{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"created_by_id": "created_by_id",
"is_active": true,
"name": "name",
"scopes": [
"string"
],
"expires_at": "2019-12-27T18:11:19.117Z",
"type": "compliance_api_key"
}
],
"organization_id": "organization_id",
"settings": [
{
"name": "ai_powered_artifacts_enabled",
"value": true,
"type": "boolean"
}
],
"type": "effective_organization_settings"
}