Archive Federation Rule

Changed on

Requires an OAuth access token with the org:admin scope, from ant auth login --scope org:admin or a workload identity federation rule; Admin API keys are not accepted. See Manage WIF with the Admin API.

Archive a federation rule.

Token exchange through this rule stops immediately. Idempotent; re-archiving returns the rule with its original archived_at. Archiving clears the rule's workspace targeting (workspace_id and workspace_ids are emptied). Tokens already minted before archive remain valid until they expire. OAuth callers may only manage rules whose oauth_scope is workspace:developer or workspace:inference; other scopes require a Console session.

post/v1/organizations/federation_rules/{federation_rule_id}/archive

Request

  • Base URL
    https://api.anthropic.com
  • Auth
    none declared

Path parameters

federation_rule_idstring required

ID of the federation rule to archive.

Headers

anthropic-versionstring

The version of the Claude API you want to use.

Read more about versioning and our version history here.

Response

Successful Response

applies_to_all_workspacesboolean required

When true, this rule is enabled for every workspace in the org (including ones created after the rule). workspace_ids is ignored at exchange time.

archived_atstring date-time nullable required

If set, this rule is archived and rejects token exchange.

archived_by_actor_idstring nullable required

Tagged ID (user_/svac_) of the actor that archived this rule.

attributesobject nullable required

CEL expressions extracting named values from claims. Not yet supported; always null.

created_atstring date-time required

When this rule was created.

created_by_actor_idstring nullable required

Tagged ID (user_/svac_) of the actor that created this rule.

descriptionstring nullable required

Optional free-text description.

idstring required

Tagged ID of the federation rule.

issuer_idstring required

Tagged ID of the issuer whose tokens this rule accepts.

issuer_namestring nullable required

Issuer's display name at read time.

namestring required

Admin-chosen slug identifier.

oauth_scopestring required

Space-separated OAuth scopes granted on the minted token.

token_lifetime_secondsinteger required

Lifetime in seconds of access tokens minted via this rule. Minted tokens are capped at max(60, min(this value, 2 × remaining assertion validity)) seconds.

type'federation_rule' required
updated_atstring date-time required

When this rule was last updated.

updated_by_actor_idstring nullable required

Tagged ID (user_/svac_) of the actor that last updated this rule.

workspace_idstring nullable required

Legacy single-workspace binding. Prefer workspace_ids and the /federation_rules/{federation_rule_id}/workspaces sub-resource for managing workspace enablement.

workspace_idsstring[] required

Tagged IDs of the workspaces this rule is enabled for. May be empty for older rules that only carry the legacy workspace_id binding. Ignored at exchange time when applies_to_all_workspaces is true (the list may still be non-empty).

Example response

{
  "created_at": "2024-10-30T23:58:27.427722Z",
  "id": "fdrl_01SDCCSbTxrXDpWc1phhtcfK",
  "name": "prod-deploy-pipeline",
  "target": {
    "service_account_id": "svac_01SDCCSbTxrXDpWc1phhtcfK"
  },
  "updated_at": "2024-10-30T23:58:27.427722Z"
}

Changes