List workspace quotas
/v1/workspace/quotasconst { data } = await bird.workspace.quotas.list();
for (const quota of data) {
console.log(quota.key, quota.limit, quota.organization_limit);
}quotas = client.workspace.quotas.list()
for quota in quotas.data:
print(quota.key, quota.limit, quota.organization_limit)quotas, err := client.Workspace.Quotas.List(context.Background())
if err != nil {
log.Fatal(err)
}
for _, quota := range quotas.Data {
fmt.Println(quota.Key, quota.Limit, quota.OrganizationLimit)
}$quotas = $bird->workspace->quotas->list();
foreach ($quotas->getData() ?? [] as $quota) {
echo $quota->getKey() . ' ' . $quota->getLimit() . PHP_EOL;
}bird workspace quotas listcurl -X GET "https://us1.platform.bird.com/v1/workspace/quotas" \
-H "Authorization: Bearer $TOKEN"{
"data": [
{
"key": "email_mailboxes_max",
"unit": "count",
"label": "mailboxes",
"type": "integer",
"kind": "counted",
"enforcement": "create",
"organization_source": "default",
"workspace_limit": {
"status": "active"
},
"limit_source": "manual",
"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.
Contenu de la réponse
dataAfficher les attributs enfants
data.keyStable key of the quota.
data.namedata.descriptiondata.unitWhat the quota's limit is measured in. null for a quota whose type is boolean, because its limit is a switch rather than an amount. label names what is counted.
count: a plain number: a count of things, such as domains or mailboxes, or a ratio such as a percentage or multiple.bytes: stored data, in bytes.days: a period, in days.microunits: an amount of money in millionths of the billing currency's main unit.
Possible values (may grow over time): count, bytes, days, microunits
data.labelWhat the product calls the thing the limit applies to, such as domains or seed tests, for display next to the limit.
data.typeHow to read the quota's limit.
integer: a count or amount, measured inunit.boolean: a feature switch. A limit of1turns the feature on and0turns it off.
Possible values (may grow over time): integer, boolean
data.kindWhat the quota limits.
counted: an amount the workspace accumulates, such as mailboxes or stored bytes. Usage is reported.value: the largest setting a resource may be given, such as a retention period. No usage is counted.
Possible values: counted, value
data.enforcementWhen the limits are applied.
create: a request that would add more than the limits allow is refused, and nothing is created.outbound_send: sending is refused once the bytes already stored reach a limit. The size of the message being sent is not counted in advance, and incoming mail is still accepted.value: a setting above the limit is refused when it is chosen. Existing resources keep their settings.
Possible values: create, outbound_send, value
data.maximum_valueThe largest workspace limit this quota accepts, in its unit.
data.organization_limitThe organization's limit, shared by all its workspaces.
data.organization_sourceWhere the organization limit comes from.
default: Bird's standard limit.plan: the organization's plan.override: a limit Bird set for the organization.
Possible values (may grow over time): default, plan, override
data.workspace_limitThe workspace's own saved limit. null when none is saved; limit_source and automatic_limit then show whether an automatic share applies.
Afficher les attributs enfants
data.workspace_limit.valueThe workspace limit, in the quota's unit. It can exceed the organization limit. Zero allows nothing more.
data.workspace_limit.statusWhether the workspace limit applies.
active: the limit applies alongside the organization limit.expired: the limit passed its expiry and no longer applies. It stays visible until it is replaced or removed.
Possible values: active, expired
data.workspace_limit.expires_atWhen the workspace limit stops applying. null means it has no expiry.
data.workspace_limit.updated_atWhen the workspace limit was last set.
data.limitThe lower of the organization limit currently applied to requests and the workspace's active limit or automatic share. The applied organization limit can briefly differ from the configured organization_limit after a change. A request can still be refused below this value when other workspaces use the shared organization limit.
data.limit_sourceWhich limit bounds the workspace's own usage.
manual: the workspace's own active limit.automatic: the workspace's share of the organization limit under its automatic allocation.organization: no workspace limit applies; only the shared organization limit does. This includes an automatic allocation of an unlimited organization limit.
Possible values (may grow over time): manual, automatic, organization
data.automatic_limitThe workspace's share under the organization's automatic allocation. Set only when limit_source is automatic; it is never saved as a workspace limit.
data.allocation_enabledWhether the organization has an automatic allocation of this quota. It can be true while limit_source is manual, or organization when the organization limit is unlimited. When true, changing or removing this workspace's limit can change other workspaces' automatic shares.
data.usageCurrent usage. null for a value quota, which counts nothing.
configurationWhether 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
Ressources associées
Poursuivez avec la documentation, les guides et les exemples sur ce sujet.