更新合规设置
POST/v1/organizations/compliance_settings
更新您组织的合规设置。
将 state 设置为 enabled 会开启 Compliance API 并开始捕获组织活动事件。将其设置为 disabled 会同时关闭两者。访问透明度事件是一个例外:即使 Compliance API 处于禁用状态,这些事件仍会被捕获,并且在 Compliance API 重新启用后,其活动源会返回这些事件。state 反映 Compliance API 是否已启用。
将 state 设置为其当前值的请求会成功,且资源保持不变。disabled 请求会一直有效,直到后续出现 enabled 请求,或组织下一次启用访问透明度的配置操作:启用访问透明度也会启用 Compliance API(由其提供活动事件),因此即使在 disabled 请求之后,此类配置操作(包括重新运行)也会重新启用 Compliance API。自动配置永远不会禁用合规设置。
Parameters
Returns
更新合规设置
<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Anthropic\Client;
$client = new Client(apiKey: 'my-anthropic-api-key');
$organizationComplianceSettings = $client
->organization
->complianceSettings
->update(state: ['type' => 'enabled']);
var_dump($organizationComplianceSettings);Response 200
{
"state": {
"type": "enabled"
},
"type": "compliance_settings"
}Returns Examples
Response 200
{
"state": {
"type": "enabled"
},
"type": "compliance_settings"
}