Workspaces
api/admin/federation_rules/workspaces
Nearest release: v2.1.245, published an hour after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
api/admin/federation_rules/workspaces Changed · +38 / -33 lines
### Path parameters ### Query parameters ### Headers #### Response (200) ### Path parameters ### Headers ### Body parameters #### Response (200) ### Path parameters ### Headers #### Response (200) ## Domain types ### Path Parameters ### Query Parameters ### Header Parameters #### Response ### Path Parameters ### Header Parameters ### Body Parameters #### Response ### Path Parameters ### Header Parameters #### Response ## Domain Types
---- -title: Workspaces -url: https://platform.claude.com/docs/en/api/admin/federation_rules/workspaces ---- - # Workspaces ## List Federation Rule Workspaces -**get** `/v1/organizations/federation_rules/{federation_rule_id}/workspaces` +**GET** `/v1/organizations/federation_rules/{federation_rule_id}/workspaces` List workspaces where this federation rule is enabled.
rules with `applies_to_all_workspaces` or a legacy single `workspace_id`, check those fields on the rule itself. -### Path Parameters +### Path parameters - `federation_rule_id: string` ID of the federation rule. -### Query Parameters +### Query parameters - `limit: optional number` Number of results per page. + default: 20, maximum: 100, minimum: 1 + - `page: optional string` Opaque cursor from a previous response's `next_page`. -### Header Parameters +### Headers - `"anthropic-beta": optional array of string`
### Returns -- `data: array of object { created_at, created_by_actor_id, federation_rule_id, 3 more }` +- `data: array of object` - `created_at: string` When this workspace was enabled for the rule. + format: date-time + - `created_by_actor_id: string or null` Tagged ID (`user_...` or `svac_...`) of the actor that enabled this workspace for the rule, if known.
- `type: "federation_rule_workspace"` - - `"federation_rule_workspace"` + default: federation_rule_workspace - `workspace_id: string`
### Example -```http +```bash curl https://api.anthropic.com/v1/organizations/federation_rules/$FEDERATION_RULE_ID/workspaces \ -H 'anthropic-version: 2023-06-01' \ -H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN" ``` -#### Response +#### Response (200) ```json {
## Add Federation Rule Workspace -**post** `/v1/organizations/federation_rules/{federation_rule_id}/workspaces` +**POST** `/v1/organizations/federation_rules/{federation_rule_id}/workspaces` Enable a federation rule for a workspace.
`oauth_scope` is `workspace:developer` or `workspace:inference`; other scopes require a Console session. Admin API keys are not accepted. -### Path Parameters +### Path parameters - `federation_rule_id: string` ID of the federation rule. -### Header Parameters +### Headers - `"anthropic-beta": optional array of string`
To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta. -### Body Parameters +### Body parameters - `workspace_id: string`
When this workspace was enabled for the rule. + format: date-time + - `created_by_actor_id: string or null` Tagged ID (`user_...` or `svac_...`) of the actor that enabled this workspace for the rule, if known.
- `type: "federation_rule_workspace"` - - `"federation_rule_workspace"` + default: federation_rule_workspace - `workspace_id: string`
### Example -```http +```bash curl https://api.anthropic.com/v1/organizations/federation_rules/$FEDERATION_RULE_ID/workspaces \ -H 'Content-Type: application/json' \ -H 'anthropic-version: 2023-06-01' \
}' ``` -#### Response +#### Response (200) ```json {
## Remove Federation Rule Workspace -**delete** `/v1/organizations/federation_rules/{federation_rule_id}/workspaces/{workspace_id}` +**DELETE** `/v1/organizations/federation_rules/{federation_rule_id}/workspaces/{workspace_id}` Disable a federation rule for a workspace.
`workspace:developer` or `workspace:inference`; other scopes require a Console session. Admin API keys are not accepted. -### Path Parameters +### Path parameters - `federation_rule_id: string`
ID of the workspace to disable for. -### Header Parameters +### Headers - `"anthropic-beta": optional array of string`
- `type: "federation_rule_workspace_deleted"` - - `"federation_rule_workspace_deleted"` + default: federation_rule_workspace_deleted - `workspace_id: string`
### Example -```http +```bash curl https://api.anthropic.com/v1/organizations/federation_rules/$FEDERATION_RULE_ID/workspaces/$WORKSPACE_ID \ -X DELETE \ -H 'anthropic-version: 2023-06-01' \
-H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN" ``` -#### Response +#### Response (200) ```json {
} ``` -## Domain Types +## Domain types ### Workspace List Response -- `WorkspaceListResponse object { created_at, created_by_actor_id, federation_rule_id, 3 more }` +- `WorkspaceListResponse object` - `created_at: string` When this workspace was enabled for the rule. + format: date-time + - `created_by_actor_id: string or null` Tagged ID (`user_...` or `svac_...`) of the actor that enabled this workspace for the rule, if known.
- `type: "federation_rule_workspace"` - - `"federation_rule_workspace"` + default: federation_rule_workspace - `workspace_id: string`
### Workspace Create Response -- `WorkspaceCreateResponse object { created_at, created_by_actor_id, federation_rule_id, 3 more }` +- `WorkspaceCreateResponse object` - `created_at: string` When this workspace was enabled for the rule. + format: date-time + - `created_by_actor_id: string or null` Tagged ID (`user_...` or `svac_...`) of the actor that enabled this workspace for the rule, if known.
- `type: "federation_rule_workspace"` - - `"federation_rule_workspace"` + default: federation_rule_workspace - `workspace_id: string`
### Workspace Delete Response -- `WorkspaceDeleteResponse object { federation_rule_id, type, workspace_id }` +- `WorkspaceDeleteResponse object` - `federation_rule_id: string`
- `type: "federation_rule_workspace_deleted"` - - `"federation_rule_workspace_deleted"` + default: federation_rule_workspace_deleted - `workspace_id: string`