Workspaces einer Federation-Regel auflisten
GET/v1/organizations/federation_rules/{federation_rule_id}/workspaces
Erfordert ein OAuth-Zugriffstoken mit dem Scope org:admin, über ant auth login --scope org:admin oder eine Workload-Identity-Federation-Regel; Admin-API-Keys werden nicht akzeptiert. Siehe WIF mit der Admin API verwalten.
Listet Workspaces auf, in denen diese Federation-Regel aktiviert ist.
Gibt alle Workspace-Aktivierungen in einer einzigen Antwort zurück; die Parameter limit und
page werden akzeptiert, haben aber keine Wirkung, und next_page ist
immer null. Gibt nur explizite Aktivierungen pro Workspace zurück; bei
Regeln mit applies_to_all_workspaces oder einer veralteten einzelnen
workspace_id prüfe diese Felder direkt an der Regel.
Parameters
Returns
Workspaces einer Federation-Regel auflisten
package com.anthropic.example;
import com.anthropic.client.AnthropicClient;
import com.anthropic.client.okhttp.AnthropicOkHttpClient;
import com.anthropic.models.beta.organization.federation.rules.workspaces.WorkspaceListPage;
import com.anthropic.models.beta.organization.federation.rules.workspaces.WorkspaceListParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
AnthropicClient client = AnthropicOkHttpClient.fromEnv();
WorkspaceListPage page = client.beta().organization().federation().rules().workspaces().list("federation_rule_id");
}
}Response 200
{
"data": [
{
"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"
}
],
"next_page": "next_page"
}Returns Examples
Response 200
{
"data": [
{
"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"
}
],
"next_page": "next_page"
}