Claude Platform Docs

Obtenir les paramètres de conformité

client.Organization.ComplianceSettings.Get(ctx) (*OrganizationComplianceSettings, 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 OrganizationComplianceSettings struct { Type: "compliance_settings"; State }
Type ComplianceSettings
defaultcompliance_settings

Whether the Compliance API is enabled for this organization.

One of the following:
type ComplianceSettingsStateEnabled struct { Type: "enabled" }
Type Enabled
defaultenabled
type ComplianceSettingsStateDisabled 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"),
	)
	organizationComplianceSettings, err := client.Organization.ComplianceSettings.Get(context.TODO())
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", organizationComplianceSettings.State)
}
Returns Examples
Response 200
{
  "state": {
    "type": "enabled"
  },
  "type": "compliance_settings"
}