Sign inGet Started

List workspace quotas

GET
/v1/workspace/quotas
const { data } = await bird.workspace.quotas.list();
for (const quota of data) {
  console.log(quota.key, quota.limit, quota.organization_limit);
}
Antwort200
{
  "data": [
    {
      "key": "email_mailboxes_max",
      "unit": "mailboxes",
      "kind": "counted",
      "enforcement": "create",
      "organization_source": "default",
      "workspace_limit": {
        "status": "active"
      },
      "usage": {
        "status": "available"
      }
    }
  ],
  "configuration": "available"
}

Returns each resource and value quota as it applies to the current workspace: the organization limit shared by all workspaces, the workspace's own limit when one is set, and this workspace's current usage. Organization usage and shared remaining capacity are withheld: organization_used, organization_remaining and remaining are always null on this endpoint.

A workspace limit is a ceiling, not reserved capacity. Each quota's enforcement says how both limits apply: create refuses a creation that would pass either one, outbound_send refuses outbound sends once the bytes already held reach either one, and value bounds a setting when it is chosen. usage is null for a value quota. When usage cannot be read, usage.status is unavailable and the counts are null.

Antwort-Payload

data
array of object
erforderlich
Untergeordnete Attribute anzeigen
configuration
string
erforderlich

Whether workspace limits can be set.

  • available: workspace limits can be set and changed.
  • unavailable: new workspace limits cannot be set in this region yet. Existing workspace limits still apply and can be removed.

Possible values: available, unavailable

Weiter mit der Dokumentation, Anleitungen und Beispielen zu diesem Thema.