Claude Platform Docs

コンプライアンス設定を取得

beta.organization.compliance_settings.retrieve() -> BetaComplianceSettings
GET/v1/organizations/compliance_settings

組織のコンプライアンス設定を取得します。

コンプライアンス設定はシングルトンリソースです。組織ごとに 1 つだけ存在し、識別子なしでアドレス指定されます。state フィールドは Compliance API が有効かどうかを示します。親組織を持つ組織では、親の構成から継承された状態が読み取られます。

Returns
class BetaComplianceSettings: type: "compliance_settings"; state
type: Literal["compliance_settings"]
defaultcompliance_settings

Whether the Compliance API is enabled for this organization.

One of the following:
class BetaComplianceSettingsStateEnabled: type: "enabled"
type: Literal["enabled"]
defaultenabled
class BetaComplianceSettingsStateDisabled: type: "disabled"
type: Literal["disabled"]
defaultdisabled
コンプライアンス設定を取得
import os
from anthropic import Anthropic

client = Anthropic(
    api_key=os.environ.get(
        "ANTHROPIC_API_KEY"
    ),  # This is the default and can be omitted
)
beta_compliance_settings = client.beta.organization.compliance_settings.retrieve()
print(beta_compliance_settings.state)
Returns Examples
Response 200
{
  "state": {
    "type": "enabled"
  },
  "type": "compliance_settings"
}