Claude Platform Docs

Ajouter un espace de travail à une règle de fédération

$ ant beta:organization:federation:rules:workspaces add
POST/v1/organizations/federation_rules/{federation_rule_id}/workspaces

Nécessite un jeton d'accès OAuth avec la portée org:admin, obtenu via ant auth login --scope org:admin ou une règle de fédération d'identité de charge de travail ; les clés Admin API ne sont pas acceptées. Consultez Gérer WIF avec l'Admin API.

Activez une règle de fédération pour un espace de travail.

Idempotent ; une nouvelle activation renvoie l'activation existante. La règle et l'espace de travail doivent tous deux appartenir à votre organisation. L'appartenance du compte de service cible de la règle à cet espace de travail n'est pas vérifiée lors de l'activation : l'échange de jetons vers cet espace de travail est rejeté sauf si la cible en est membre (elle est implicitement membre de l'espace de travail par défaut). Les règles archivées sont rejetées avec une erreur 400. Les appelants OAuth ne peuvent gérer que les règles dont oauth_scope vaut workspace:developer ou workspace:inference ; les autres portées nécessitent une session Console.

Parameters
--federation-rule-id: string

Path param: ID of the federation rule.

--workspace-id: string

Body param: Tagged ID of the workspace to enable this rule for.

--beta: optional array of AnthropicBeta

Header param: Optional header to specify the beta version(s) you want to use.

Returns
beta_federation_rule_workspace: object{ created_at, created_by_actor_id, federation_rule_id, 3 more }
created_at: string

When this workspace was enabled for the rule.

formatdate-time
created_by_actor_id: string

Tagged ID (user_... or svac_...) of the actor that enabled this workspace for the rule, if known.

federation_rule_id: string

Tagged ID of the federation rule.

type: "federation_rule_workspace"
workspace_id: string

Tagged ID of the workspace this rule is enabled for.

workspace_name: string

Workspace display name. Populated when listing; null in the enable response.

Ajouter un espace de travail à une règle de fédération
ant beta:organization:federation:rules:workspaces add \
  --api-key my-anthropic-api-key \
  --federation-rule-id federation_rule_id \
  --workspace-id workspace_id
Returns Examples
Response 200
{
  "created_at": "2024-10-30T23:58:27.427722Z",
  "created_by_actor_id": "created_by_actor_id",
  "federation_rule_id": "federation_rule_id",
  "type": "federation_rule_workspace",
  "workspace_id": "workspace_id",
  "workspace_name": "workspace_name"
}