JMAP for QuotasLinagora100 Terrasse Boieldieu – Tour FranklinParis - La Défense CEDEX92042Francercordier@linagora.comhttps://www.linagora.comLinagora100 Terrasse Boieldieu – Tour FranklinParis - La Défense CEDEX92042Francembailly@linagora.comhttps://www.linagora.com
Applications
JMAPJMAPJSONemailquotasThis document specifies a data model for handling quotas on accounts with a server using JMAP.
JMAP ( – JSON Meta Application Protocol) is a generic protocol for synchronising data, such as mails,
calendars or contacts, between a client and a server. It is optimised for mobile and web environments, and aims
to provide a consistent interface to different data types.
This specification defines a data model for handling mail quotas over JMAP, allowing you to read and explain quota information.
This specification does not address quota administration, which should be handled by other means.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in BCP
14 when, and only when, they appear in all
capitals, as shown here.
Type signatures, examples and property descriptions in this document follow the conventions established in section 1.1
of . Data types defined in the core specification are also used in this document.
Servers MUST support all properties specified for the new data types defined in this document.
A quota is a numeric upper limit that the server is enforcing. Quotas are applied to accounts.
The capabilities object is returned as part of the JMAP Session object; see , section 2.
This document defines one additional capability URI.
This represents support for the Quota data type and associated API methods. The value of this property in the JMAP
session capabilities property is an empty object.
The value of this property in an account’s accountCapabilities property is an object that MUST contain the following
information on server capabilities and permissions for that account:
quotaIds:Id[] (default: []) A list of quota ids bound to that account, or [] if that account has no quota
restrictions.Servers MUST support the JMAP push mechanisms, as specified in Section 7, to receive notifications when
the state changes for the Quota type defined in this specification.
The quota is an object that displays the limit set to an account usage as well as the current usage in regard to that limit.
The Scope is a String from an enumeration defined list of values, handled by the server.
It explains the entities this value applies to. Some custom specifications might provide some additional values. If the
client does not specify custom scope specifications in the "using" parameter of the request, the server should respond
the JSON value null, instead of answering a scope value that the client does not support. Standard values are:
account: Applies for this accountdomain: All users of this domain share this part of the quotaglobal: All users of this mail server share this part of the quotaThe ResourceType is a String from an enumeration defined list of values, handled by the server.
A resource type is like an unit of measure for the quota usage. Some custom specifications might provide some additional
values. If the client does not specify custom resource type specifications in the "using" parameter of the request,
the server should respond the JSON value null, instead of answering a resource type value that the client does not
support. Standard values are:
count: The quota is measured in number of data type objects. For example, a quota can have a limit of 50 Mail objects.size: The quota is measured in size. The default unit is in bytes, but a server can decide of the unit it wants
to use (like in octets). For example, a quota can have a limit of 25000 bytesThe quota object MUST contain the following fields:
id: Id The unique identifier for this object. It should respect the JMAP ID datatype defined in section 1.2 of resourceType: ResourceType The resource type of the quota.used: UnsignedInt The current usage of the mailbox. Computation of this value is handled by the server.limit: UnsignedInt The hard limit set by this quota object. No more outgoing and ingoing messages should be
allowed if we reach this limit. It should higher than the warnLimit and the softLimit.scope: Scope The Scope of this quota.name: String The name of the quota object. Useful for managing quotas and use queries for searching.datatypes: String[] A list of all the data types values that are applying to this quota. This allows to assign
quotas to separated or shared data types. This MAY include data types the client does not recognise. Clients MUST
ignore any unknown data type in the list.The quota object MAY contain the following field:
warnLimit: UnsignedInt|null The warn limit set by this quota object. It can be used to send a warning to an
user that he is going to reach the hard limit soon, but no action is taken. If set, it should be lower than the
softLimit and the limit.softLimit: UnsignedInt|null The soft limit set by this quota object. It can be used to block outgoing messages,
but still allowing incoming messages. If set, it should be higher than the warnLimit but lower than the limit.description: String|null Arbitrary free, human readable, description of this quota. Might be used to explain
where the limit comes from and explain the entities this quota applies to.Standard “/get” method as described in section 5.1. The ids argument may be null to fetch all at once.
Request fetching all quotas related to an account :
With response :
Standard “/changes” method as described in section 5.2 but with one extra argument to the response:
updatedProperties: String[]|null If only the “used” Quota properties has changed since the old state, this
will be the list of properties that may have changed. If the server is unable to tell if only "used" has changed, it
MUST just be null.Since "used" frequently changes but other properties are generally only changed rarely, the server can help the client
optimise 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 changing frequently.
Request:
Response:
This is a standard “/query” method as described in , Section 5.5.
A FilterCondition object has the following properties, any of which may be omitted:
name: String The Quota name property contains the given string.scopes: Scope[] The Quota scope property must be in this list to match the condition.resourceTypes: ResourceType[] The Quota resourceType property must be in this list to match the condition.datatypes: String[] The Quota datatypes property must contain the elements in this list to match the condition.A Quota object matches the FilterCondition if and only if all of 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:
nameusedThis is a standard “/queryChanges” method as described in , Section 5.6.
All security considerations of JMAP () apply to this specification.
IANA will register the "quota" JMAP Capability as follows:
Capability Name: urn:ietf:params:jmap:quotaSpecification document: this document
Intended use: common
Change Controller: IETF
Security and privacy considerations: this document, section 4.