The Quota is an object that displays the limit set to an account usage. It then shows as well the current usage in regard to that limit.
The Quota object
MUST contain the following fields:
-
id: Id
The unique identifier for this object.
-
resourceType: String
The resource type of the quota as defined in Section 3.2.
-
used: UnsignedInt
The current usage of the defined quota, using the "resourceType" defined as unit of measure. Computation of this value is handled by the server.
-
hardLimit: UnsignedInt
The hard limit set by this quota, using the "resourceType" defined as unit of measure. Objects in scope may not be created or updated if this limit is reached.
-
scope: String
The "Scope" of this quota as defined in Section 3.1.
-
name: String
The name of the quota. Useful for managing quotas and using queries for searching.
-
types: String[]
A list of all the type names as defined in the "JMAP Types Names" registry (e.g., Email, Calendar, etc.) to which this quota applies. This allows the quotas to be assigned to distinct or shared data types.
The server MUST filter out any types for which the client did not request the associated capability in the "using" section of the request. Further, the server MUST NOT return Quota objects for which there are no types recognized by the client.
The Quota object
MAY contain the following fields:
-
warnLimit: UnsignedInt|null
The warn limit set by this quota, using the "resourceType" defined as unit of measure. It can be used to send a warning to an entity about to reach the hard limit soon, but with no action taken yet. If set, it SHOULD be lower than the "softLimit" (if present and different from null) and the "hardLimit".
-
softLimit: UnsignedInt|null
The soft limit set by this quota, using the "resourceType" defined as unit of measure. It can be used to still allow some operations but refuse some others. What is allowed or not is up to the server. For example, it could be used for blocking outgoing events of an entity (sending emails, creating calendar events, etc.) while still receiving incoming events (receiving emails, receiving calendars events, etc.). If set, it SHOULD be higher than the "warnLimit" (if present and different from null) but lower than the "hardLimit".
-
description: String|null
Arbitrary, free, human-readable description of this quota. It might be used to explain where the different limits come from and explain the entities and data types this quota applies to. The description MUST be encoded in UTF-8 [RFC 3629] as described in RFC 8620, Section 1.5, and selected based on an Accept-Language header in the request (as defined in RFC 9110, Section 12.5.4) or out-of-band information about the user's language or locale.
The following JMAP methods are supported.
Standard "/get" method as described in
RFC 8620,
Section 5.1. The
id's argument may be "null" to fetch all quotas of the account at once, as demonstrated in
Section 5.1.
Standard "/changes" method as described in
RFC 8620,
Section 5.2, but with one extra argument in the response:
-
updatedProperties: String[]|null
If only the "used" Quota property has changed since the old state, this will be a list containing only that property. If the server is unable to tell if only "used" has changed, it MUST be null.
Since "used" frequently changes, but other properties are generally only changed rarely, the server can help the client optimize data transfer by keeping track of changes to quota usage separate from other state changes. The updatedProperties array may be used directly via a back-reference in a subsequent Quota/get call in the same request, so only these properties are returned if nothing else has changed.
Servers
MAY decide to add other properties to the list that they judge to be changing frequently.
This method's usage is demonstrated in
Section 5.2.
This is a standard "/query" method as described in
RFC 8620,
Section 5.5.
A FilterCondition object has the following properties, any of which may be included or omitted:
-
name: String
The Quota name property contains the given string.
-
scope: String
The Quota scope property must match the given value exactly.
-
resourceType: String
The Quota resourceType property must match the given value exactly.
-
type: String
The Quota types property contains the given value.
A Quota object matches the FilterCondition if, and only if, all the given conditions match. If zero properties are specified, it is automatically true for all objects.
The following Quota properties
MUST be supported for sorting: