Claude Platform Docs

列出工作區速率限制

RateLimitListPage organization().workspaces().rateLimits().list(params = RateLimitListParams.none(), requestOptions = RequestOptions.none())
GET/v1/organizations/workspaces/{workspace_id}/rate_limits

列出工作區的速率限制。

預設情況下,僅傳回具有工作區層級覆寫的群組與限制器類型。設定 include_inherited=true 時,會傳回工作區可見且具有組織層級限制的每個群組,並針對每個群組列出其從組織繼承的值以及其自身的覆寫值。每個值的 source 會指出其屬於哪一種。

省略 limit 時,所有符合的項目會在單一頁面中傳回;當 limit 截斷結果時,請依循 next_page 擷取其餘項目。

Parameters
RateLimitListParams params
Optional<String> workspaceId⁠Path parameter

The ID of the workspace.

Optional<GroupType> groupType⁠Query parameter

Filter by group type.

BATCH("batch")
FILES("files")
MODEL_GROUP("model_group")
SKILLS("skills")
TOKEN_COUNT("token_count")
WEB_SEARCH("web_search")
Optional<Boolean> includeInherited⁠Query parameter

Also list the limiter values the workspace inherits from the organization, including groups with no workspace-level override.

Optional<Long> limit⁠Query parameter

Maximum number of items to return per page. Ranges from 1 to 1000.

When omitted, every remaining entry is returned in a single page and next_page is null.

minimum1
maximum1000
Optional<String> page⁠Query parameter

Opaque cursor from a previous response's next_page.

Returns
class WorkspaceRateLimit { type = "workspace_rate_limit"; group; limits; /* 3 more */ }
列出工作區速率限制
package com.anthropic.example;

import com.anthropic.client.AnthropicClient;
import com.anthropic.client.okhttp.AnthropicOkHttpClient;
import com.anthropic.models.organization.workspaces.ratelimits.RateLimitListPage;
import com.anthropic.models.organization.workspaces.ratelimits.RateLimitListParams;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        AnthropicClient client = AnthropicOkHttpClient.fromEnv();

        RateLimitListPage page = client.organization().workspaces().rateLimits().list("workspace_id");
    }
}
Returns Examples
Response 200
{
  "data": [
    {
      "group": {
        "id": "id",
        "display_name": "display_name",
        "type": "model_group"
      },
      "group_type": "batch",
      "limits": [
        {
          "org_limit": 0,
          "source": {
            "type": "workspace"
          },
          "type": "type",
          "value": 0
        }
      ],
      "models": [
        "string"
      ],
      "rate_limit_id": "rate_limit_id",
      "type": "workspace_rate_limit",
      "workspace_id": "workspace_id"
    }
  ],
  "next_page": "next_page"
}