Sign inGet Started

List workspace rate limits

GET
/v1/workspace/rate-limits
// Workspace limits matter with several workspaces, or one that kept a limit after a deletion.
const { data } = await bird.workspace.rateLimits.list();
for (const policy of data) {
  // Check usage.status first: workspace_remaining is also null when the
  // workspace has no limit of its own or its usage is not measured yet.
  console.log(policy.key, policy.limit, policy.usage.workspace_remaining);
}
Respons200
{
  "data": [
    {
      "key": "email_send",
      "workspace_limit": {
        "status": "active"
      },
      "limit_source": "manual",
      "attribution": {
        "status": "unavailable"
      },
      "usage": {
        "status": "available"
      }
    }
  ]
}

Only relevant to organizations with several workspaces, or one left with a workspace limit or enabled allocation after a deletion. When deleting workspaces leaves one, its manual limits apply until removed or expired, and enabled allocation continues. Without an active manual limit or allocation, one workspace uses the shared organization limit.

Returns every rate-limit policy as it applies to the current workspace: the organization limit shared by all workspaces, any manual or automatic workspace limit, and the remaining capacity observed in the current window.

A workspace limit is not reserved capacity. A request is refused when either the organization limit or the workspace limit is reached. When usage cannot be read, usage.status is unavailable and the remaining counts are null. usage.workspace_remaining is also null when neither a manual nor an automatic limit applies, or attribution.status is not ready, so check usage.status before treating null as a failed read.

Rate limits are served from the organization's home region. A request sent to another region returns 421 Misdirected Request; retry it on that region's host.

Payload Respons

data
array of object
wajib
Tampilkan atribut turunan