Claude Platform Docs

Obtenir les paramètres de conformité

client.Beta.Organization.ComplianceSettings.Get(ctx) (*BetaComplianceSettings, error)
GET/v1/organizations/compliance_settings

Récupère les paramètres de conformité (Compliance Settings) de votre organisation.

Compliance Settings est une ressource singleton : il en existe exactement une par organisation, adressée sans identifiant. Le champ state indique si l'API Compliance est activée. Une organisation ayant une organisation parente lit l'état hérité de la configuration de l'organisation parente.

Returns
type BetaComplianceSettings struct { Type: "compliance_settings"; State }
Type ComplianceSettings
defaultcompliance_settings

Whether the Compliance API is enabled for this organization.

One of the following:
type BetaComplianceSettingsStateEnabled struct { Type: "enabled" }
Type Enabled
defaultenabled
type BetaComplianceSettingsStateDisabled struct { Type: "disabled" }
Type Disabled
defaultdisabled
Obtenir les paramètres de conformité
package main

import (
	"context"
	"fmt"

	"github.com/anthropics/anthropic-sdk-go"
	"github.com/anthropics/anthropic-sdk-go/option"
)

func main() {
	client := anthropic.NewClient(
		option.WithAPIKey("my-anthropic-api-key"),
	)
	betaComplianceSettings, err := client.Beta.Organization.ComplianceSettings.Get(context.TODO())
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", betaComplianceSettings.State)
}
Returns Examples
Response 200
{
  "state": {
    "type": "enabled"
  },
  "type": "compliance_settings"
}