Read everything that can refuse a create or a wake
The plan, the trust tier and its caps, the organization's and the project's limits (staff's), the end user's (with `end_user`), the free plan's allowance left, the spend caps reached this month, and for each size whether a create would be refused now and why (`blocked_reason`).
The plan, the trust tier and its caps, the organization's and the project's limits (staff's), the end user's (with end_user), the free plan's allowance left, the spend caps reached this month, and for each size whether a create would be refused now and why (blocked_reason). Read from the organization's signed standing entry, exactly as the gateway enforces it. A key reads its own project; a person names one (project) or reads the organization's alone. How many sandboxes are held and awake now (counts) is the registry's, and is null until the account service reads it; quota_exceeded is then named only for a limit of 0. With the usage store down the allowance's numbers are null and everything else still answers.
A key with the usage:read scope.
Request
curl "https://api.pod.mapier.ai/v1/limits" \
-H "Authorization: Bearer $POD_API_KEY"Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
project | query | string | No | The project whose limits to read. A key's own by default, and the only one it may name. |
end_user | query | string | No | Also the limits, policy and state of this end user of the project. |
Pod-End-User | header | string | No | Narrows a project key to one of its end users: the call sees only that end user's sandboxes and usage, any other answering not_found, and a create is labelled with it. An end user of another project, or one that is not there, is not_found; a suspended one refuses creates and wakes (account_restricted). |
Answer
200. The limits.
{
"organisation": "org_3ahrz6dmv29gqy5ckt18fp",
"project": null,
"plan": "invited",
"trust_tier": "new",
"standing": "good",
"tier_caps": null,
"organisation_limits": {
"max_sandboxes": null,
"max_awake": null
},
"project_limits": null,
"end_user": null,
"counts": {
"held": null,
"awake": null
},
"allowance": null,
"spend_caps_reached": [
{
"scope": "organisation",
"target": "example",
"on_reach": "refuse",
"period": "example"
}
],
"sizes": [
{
"size": "small",
"blocked_reason": null
}
]
}| Field | Type | Always | What it is |
|---|---|---|---|
organisation | string | Yes | |
project | string | null | Yes | |
plan | "invited" | "free" | "pro" | Yes | |
trust_tier | "new" | "verified" | "established" | "contract" | Yes | |
standing | "good" | "past_due" | "suspended" | "closed" | Yes | The organization's standing; past due and suspended answer account_restricted on creates and wakes, and closed (its owner closed it) on every call. |
tier_caps | TierCaps | null | Yes | The trust tier's caps; null on an invited or contract organization, whose limits staff set. |
organisation_limits | CountLimits | Yes | Sandboxes held and awake; null is no limit of this scope. |
project_limits | CountLimits | null | Yes | |
end_user | AccountLimitsEndUser | null | Yes | |
counts | SandboxCounts | Yes | How many sandboxes are held and awake now; null until the account service reads the registry. |
allowance | BillingAllowance | null | Yes | The free plan's allowance this month, with what is left; null on any other plan. |
spend_caps_reached | ReachedSpendCap[] | Yes | Spend caps reached this month that count for this project, end user and caller. |
sizes | SizeAvailability[] | Yes | Each size, and why a create of it would be refused now. |
Errors
The refusals this call is known for: invalid, forbidden, not_found. Any call can also answer unauthorized, rate_limited, unavailable or internal; the error list says what each means and when to send the call again.
In the SDKs
| Client | Call |
|---|---|
| TypeScript | pod.limits.get({ … }) |
| Python | pod.limits.get(…) |