Claude Platform Docs

Compliance-Einstellungen aktualisieren

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

Aktualisiert die Compliance-Einstellungen deiner Organisation.

Wenn du state auf enabled setzt, wird die Compliance API aktiviert und die Erfassung von Aktivitätsereignissen der Organisation beginnt. Wenn du es auf disabled setzt, wird beides deaktiviert. Access-Transparency-Ereignisse sind eine Ausnahme: Sie werden weiterhin erfasst, während die Compliance API deaktiviert ist, und der Aktivitäts-Feed der Compliance API gibt sie zurück, sobald sie wieder aktiviert ist. state gibt an, ob die Compliance API aktiviert ist.

Eine Anfrage, die state auf seinen aktuellen Wert setzt, ist erfolgreich und lässt die Ressource unverändert. Eine disabled-Anfrage bleibt wirksam bis zu einer späteren enabled-Anfrage oder der nächsten Provisionierungsaktion der Organisation, die Access Transparency aktiviert: Das Aktivieren von Access Transparency aktiviert auch die Compliance API, die deren Aktivitätsereignisse bereitstellt, sodass eine solche Provisionierung (einschließlich erneuter Ausführungen) die Compliance API auch nach einer disabled-Anfrage wieder aktiviert. Automatisierte Provisionierung deaktiviert die Compliance-Einstellungen niemals.

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.

Compliance-Einstellungen aktualisieren
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"
}