Docs
Contents

Limits and Quotas

Overview and use cases

The platform imposes two kinds of limits on projects/accounts:

Prerequisites

The APPBASE_ENDPOINT in the examples includes /v1; APPBASE_SESSION_COOKIE is the full Cookie (name and value) obtained after login, loaded from a controlled local environment. The Cookie may also be replaced with a X-Appwrite-JWT short-term user JWT; do not mix in the business project Key at the same time.

Usage workflow

  1. Read the current quota: use the Console SDK (Node.js / Java) or REST to read GET /projects/:projectId/quota-limits, which returns quota / sources / accountLimit / globalLimit—sources explains whether each field value comes from the project override, the account ceiling, or the global default.

  2. Update the project quota: use the Console SDK (Node.js / Java) or REST to call PATCH /projects/:projectId/quota-limits—a partial update; omitted fields are unchanged; 0 means unlimited (requires the parent ceiling to allow it).

  3. Account-level quota: account.getQuotaLimits() / updateQuotaLimits(...) / deleteQuotaLimits(...) (deleting the override falls back to the inherited value); listLimitsProjects() is exposed only in some SDKs—see SDK differences for details.

  4. Rate-limit tuning: PATCH /projects/:projectId/limits, with a body of 5 flat rate-limit fields + 4 quota fields; the response contains rateLimit / quota / accountLimit / overrides. When the Console SDK has no typed wrapper for this API, use client.call('patch', ...), or use REST.

Key parameters and returns

Errors and boundaries

SDK Category Differences

Examples by language

The following gives examples by language item by item according to the usage workflow; each card can switch invocation methods; project quota and rate-limit cards share a selection, while the account quota card has its own credential path selection.

Project Quota Read/Write

Project-level Quota four-field read/write: reads return quota / sources / accountLimit / globalLimit, writes are partial updates (omitted fields unchanged). The Node.js Console SDK and Java Console SDK provide project quota methods; the Server SDK, Python / Go Console SDK, and Web SDK have no project-level typed methods, so use REST.

// Projects in agentbase-node-sdk@2.10.0 has no project-level getQuotaLimits / updateQuotaLimits.
// For project quota, use the Console SDK tab or REST below; the Server SDK's Account only manages account-level quota.

Account-Level Quota (Account Quota)

Account-level read/write of /account/quota-limits determines the account from the user identity in the request; permissions cannot be inferred from the SDK type alone. The Web Client can use the current user's Session; when managing platform accounts, use the Console context and that account's Session/JWT.

Server-side automation uses this path only when the target environment has issued and confirmed valid an Account API Key for the platform account; the Key must have the account scope, and you must also provide X-Appwrite-Project: console, X-Appwrite-Key, and the X-Appwrite-User of the user who owns the Key. The scope set of ordinary project Keys does not include account; you cannot substitute a project ID for a user ID, nor call only setKey while omitting the user header. Account Keys and Session/JWT are used separately and are not mixed in the same Client; credentials are loaded only from controlled environments and are never written to documentation, repositories, or logs. This page does not assume the target deployment has account Key issuance available; when there is no confirmed valid account Key, use the Console Session/JWT.

updateQuotaLimits partially updates the four fields; deleteQuotaLimits deletes the override and falls back to the inherited value. Client Web, Server Node, and Server/Console Java also provide listLimitsProjects; Console Node has quota read/write but not that list method, and Server Python/Go also provide their own language's account-level quota APIs. The existence of generation methods does not mean ordinary project Keys can call them, and the account-level capabilities above are not equivalent to project-level quota support.

For Client SDK read examples, see client-sdk/web.md and JavaScript examples; this page's Console and REST tabs show the account management path.

// Account level uses Console Session/JWT (not a project API Key)
await sdk.forConsole.account.getQuotaLimits();
await sdk.forConsole.account.updateQuotaLimits({ tablesPerProject: 120 });   // Partial update of the four quota fields
await sdk.forConsole.account.deleteQuotaLimits();   // Delete the override and fall back to the inherited value
// The Console Node SDK does not provide listLimitsProjects()

Rate Limit Tuning (Comprehensive /limits: rate limits + quotas)

/limits reads and writes 5 rate-limit fields + 4 quota fields in one call; rate-limit fields must be a positive integer (there is no 0=不限 semantic), and the response contains rateLimit / quota / accountLimit / overrides. The Web Client only provides account-level quota, not project-level quota or rate-limit management; typed methods for project-level /limits exist only in console-java Projects (getLimits(projectId) / updateLimits(projectId, 5 个限频字段 + 4 个配额字段) / deleteLimits(projectId, keys)); server-java / server-python / server-go all lack Projects, so use REST uniformly (use client.call when the Console has no typed wrapper, see inside the card); account-level /account/limits has typed methods in Server/Console SDK versions Account that provide the feature.

// Projects in agentbase-node-sdk@2.10.0 has no getLimits / updateLimits.
// For project rate limits, use the Console tab or REST below; the Account method of the same name is an account-level interface.

Example Guide