Usage_
Read organization usage, plan limits, and billing aggregation with the Partners Usage API for metering and reselling Appwrite.
2 min read
The Usage API lets partner platforms read organization-level consumption and plan context. Use it to show usage dashboards, enforce limits, or align your billing with Appwrite Cloud usage.
Access usage through sdk.forConsole.organizations with an organization API key or OAuth-delegated access that includes billing scopes.
Console SDK access
Common operations
| Operation | Use case |
|---|---|
getPlan | Read plan limits, features, and billing cycle for an organization |
listUsage | Fetch current usage metrics for the organization |
getAggregation | Paginate usage breakdown by project or resource |
listInvoices | Surface billing history in your platform UI |
updateSelectedProjects | Control which projects count toward plan limits |
Read organization usage
Use getPlan to understand limits before provisioning projects for a customer. Use listUsage to display consumption in your control plane or trigger alerts when thresholds are reached.
Usage aggregation
For per-project breakdowns, call getAggregation with the aggregation ID from your organization billing context:
Paginate with limit and offset when an organization has many projects. Map each project row to a customer in your platform database.
Plan limits and project selection
When your platform creates multiple projects per organization, use updateSelectedProjects to control which projects are active on the current plan:
Check plan limits from getPlan before creating new customer workspaces. See Provisioning.
Partner patterns
- Reselling: combine
listUsagewith your billing system to invoice customers based on Appwrite consumption - Multi-tenant dashboards: show each customer their project usage from aggregation breakdowns
- Quota enforcement: block provisioning when usage approaches plan limits from
getPlan
Usage and billing APIs are available on Appwrite Cloud. Self-hosted deployments do not expose organization billing or usage endpoints.
Related
Was this page helpful?
Share what worked or what we should fix. Once approved, our agents automatically apply suggested updates to the docs.