Claude Platform Docs

Обновление настроек соответствия требованиям

organization.compliance_settings.update(**kwargs) -> OrganizationComplianceSettings
POST/v1/organizations/compliance_settings

Обновление настроек соответствия требованиям (Compliance Settings) вашей организации.

Установка для state значения enabled включает Compliance API и запускает сбор событий активности организации. Установка значения disabled отключает и то, и другое. Исключение составляют события Access Transparency: они продолжают собираться, пока Compliance API отключён, и лента активности Compliance API возвращает их после его повторного включения. state отражает, включён ли Compliance API.

Запрос, устанавливающий для state его текущее значение, выполняется успешно и оставляет ресурс без изменений. Запрос disabled остаётся в силе до последующего запроса enabled или до следующего действия по подготовке (provisioning) организации, которое включает Access Transparency: включение Access Transparency также включает Compliance API, который предоставляет её события активности, поэтому такая подготовка (включая повторные запуски) снова включает Compliance API даже после запроса disabled. Автоматическая подготовка никогда не отключает настройки соответствия требованиям.

Parameters

Desired state. Accepts the string shorthand "enabled" or "disabled" in place of the object form; the response always returns the canonical object form.

One of the following:
class ComplianceSettingsStateEnabledParam { type: :enabled }
type: :enabled
class ComplianceSettingsStateDisabledParam { type: :disabled }
type: :disabled
Returns
class OrganizationComplianceSettings { type: :compliance_settings, state }
type: :compliance_settings

Whether the Compliance API is enabled for this organization.

One of the following:
class ComplianceSettingsStateEnabled { type: :enabled }
type: :enabled
class ComplianceSettingsStateDisabled { type: :disabled }
type: :disabled
Errors

Any method can also return the general HTTP errors.

SandboxEgressRestrictedErrorHTTP status 403error code sandbox_egress_restricted

The request came from a Claude sandbox with restricted network access, which is not allowed to make this request. Send it from outside the sandbox, or from a sandbox with unrestricted network access.

Обновление настроек соответствия требованиям
require "anthropic"

anthropic = Anthropic::Client.new(api_key: "my-anthropic-api-key")

organization_compliance_settings = anthropic.organization.compliance_settings.update(state: {type: :enabled})

puts(organization_compliance_settings)
Returns Examples
Response 200
{
  "state": {
    "type": "enabled"
  },
  "type": "compliance_settings"
}