列出工作區速率限制
GET/v1/organizations/workspaces/{workspace_id}/rate_limits
列出工作區的速率限制。
預設情況下,僅傳回具有工作區層級覆寫的群組與限制器類型。設定 include_inherited=true 時,會傳回工作區可見且具有組織層級限制的每個群組,並針對每個群組列出其從組織繼承的值以及其自身的覆寫值。每個值的 source 會指出其屬於哪一種。
省略 limit 時,所有符合的項目會在單一頁面中傳回;當 limit 截斷結果時,請依循 next_page 擷取其餘項目。
Parameters
Returns
列出工作區速率限制
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");
}
}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"
}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"
}