<?xml version='1.0' encoding='utf-8'?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" ipr="trust200902" docName="draft-ietf-jmap-quotas-12" number="9425" submissionType="IETF" category="std" consensus="true" xml:lang="en" tocInclude="true" sortRefs="true" symRefs="true" updates="" obsoletes="" prepTime="2023-06-20T22:43:01" indexInclude="true" scripts="Common,Latin" tocDepth="3">
  <link href="https://datatracker.ietf.org/doc/draft-ietf-jmap-quotas-12" rel="prev"/>
  <link href="https://dx.doi.org/10.17487/rfc9425" rel="alternate"/>
  <link href="urn:issn:2070-1721" rel="alternate"/>
  <front>
    <title abbrev="JMAP Quotas">JSON Meta Application Protocol (JMAP) for Quotas</title>
    <seriesInfo name="RFC" value="9425" stream="IETF"/>
    <author role="editor" initials="R." surname="Cordier" fullname="René Cordier">
      <organization showOnFrontPage="true">Linagora Vietnam</organization>
      <address>
        <postal>
          <street>5 Dien Bien Phu</street>
          <city>Hanoi</city>
          <code>10000</code>
          <country>Vietnam</country>
        </postal>
        <email>rcordier@linagora.com</email>
        <uri>https://linagora.vn</uri>
      </address>
    </author>
    <date month="06" year="2023"/>
    <area>art</area>
    <workgroup>jmap</workgroup>
    <keyword>JMAP</keyword>
    <keyword>JSON</keyword>
    <keyword>email</keyword>
    <keyword>quotas</keyword>
    <abstract pn="section-abstract">
      <t indent="0" pn="section-abstract-1">This document specifies a data model for handling quotas on accounts with a server using the JSON Meta Application Protocol (JMAP).</t>
    </abstract>
    <boilerplate>
      <section anchor="status-of-memo" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.1">
        <name slugifiedName="name-status-of-this-memo">Status of This Memo</name>
        <t indent="0" pn="section-boilerplate.1-1">
            This is an Internet Standards Track document.
        </t>
        <t indent="0" pn="section-boilerplate.1-2">
            This document is a product of the Internet Engineering Task Force
            (IETF).  It represents the consensus of the IETF community.  It has
            received public review and has been approved for publication by
            the Internet Engineering Steering Group (IESG).  Further
            information on Internet Standards is available in Section 2 of 
            RFC 7841.
        </t>
        <t indent="0" pn="section-boilerplate.1-3">
            Information about the current status of this document, any
            errata, and how to provide feedback on it may be obtained at
            <eref target="https://www.rfc-editor.org/info/rfc9425" brackets="none"/>.
        </t>
      </section>
      <section anchor="copyright" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.2">
        <name slugifiedName="name-copyright-notice">Copyright Notice</name>
        <t indent="0" pn="section-boilerplate.2-1">
            Copyright (c) 2023 IETF Trust and the persons identified as the
            document authors. All rights reserved.
        </t>
        <t indent="0" pn="section-boilerplate.2-2">
            This document is subject to BCP 78 and the IETF Trust's Legal
            Provisions Relating to IETF Documents
            (<eref target="https://trustee.ietf.org/license-info" brackets="none"/>) in effect on the date of
            publication of this document. Please review these documents
            carefully, as they describe your rights and restrictions with
            respect to this document. Code Components extracted from this
            document must include Revised BSD License text as described in
            Section 4.e of the Trust Legal Provisions and are provided without
            warranty as described in the Revised BSD License.
        </t>
      </section>
    </boilerplate>
    <toc>
      <section anchor="toc" numbered="false" removeInRFC="false" toc="exclude" pn="section-toc.1">
        <name slugifiedName="name-table-of-contents">Table of Contents</name>
        <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1">
          <li pn="section-toc.1-1.1">
            <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.1"><xref derivedContent="1" format="counter" sectionFormat="of" target="section-1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-introduction">Introduction</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.1.2">
              <li pn="section-toc.1-1.1.2.1">
                <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.2.1.1"><xref derivedContent="1.1" format="counter" sectionFormat="of" target="section-1.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-notational-conventions">Notational Conventions</xref></t>
              </li>
              <li pn="section-toc.1-1.1.2.2">
                <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.2.2.1"><xref derivedContent="1.2" format="counter" sectionFormat="of" target="section-1.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-terminology">Terminology</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.2">
            <t indent="0" pn="section-toc.1-1.2.1"><xref derivedContent="2" format="counter" sectionFormat="of" target="section-2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-addition-to-the-capabilitie">Addition to the Capabilities Object</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.2.2">
              <li pn="section-toc.1-1.2.2.1">
                <t indent="0" pn="section-toc.1-1.2.2.1.1"><xref derivedContent="2.1" format="counter" sectionFormat="of" target="section-2.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-urnietfparamsjmapquota">urn:ietf:params:jmap:quota</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.3">
            <t indent="0" pn="section-toc.1-1.3.1"><xref derivedContent="3" format="counter" sectionFormat="of" target="section-3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-sub-types-of-the-quota-data">Sub-types of the Quota Data Type</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.3.2">
              <li pn="section-toc.1-1.3.2.1">
                <t indent="0" pn="section-toc.1-1.3.2.1.1"><xref derivedContent="3.1" format="counter" sectionFormat="of" target="section-3.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-scope">Scope</xref></t>
              </li>
              <li pn="section-toc.1-1.3.2.2">
                <t indent="0" pn="section-toc.1-1.3.2.2.1"><xref derivedContent="3.2" format="counter" sectionFormat="of" target="section-3.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-resourcetype">ResourceType</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.4">
            <t indent="0" pn="section-toc.1-1.4.1"><xref derivedContent="4" format="counter" sectionFormat="of" target="section-4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-quota">Quota</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.4.2">
              <li pn="section-toc.1-1.4.2.1">
                <t indent="0" pn="section-toc.1-1.4.2.1.1"><xref derivedContent="4.1" format="counter" sectionFormat="of" target="section-4.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-properties-of-the-quota-obj">Properties of the Quota Object</xref></t>
              </li>
              <li pn="section-toc.1-1.4.2.2">
                <t indent="0" pn="section-toc.1-1.4.2.2.1"><xref derivedContent="4.2" format="counter" sectionFormat="of" target="section-4.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-quota-get">Quota/get</xref></t>
              </li>
              <li pn="section-toc.1-1.4.2.3">
                <t indent="0" pn="section-toc.1-1.4.2.3.1"><xref derivedContent="4.3" format="counter" sectionFormat="of" target="section-4.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-quota-changes">Quota/changes</xref></t>
              </li>
              <li pn="section-toc.1-1.4.2.4">
                <t indent="0" pn="section-toc.1-1.4.2.4.1"><xref derivedContent="4.4" format="counter" sectionFormat="of" target="section-4.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-quota-query">Quota/query</xref></t>
              </li>
              <li pn="section-toc.1-1.4.2.5">
                <t indent="0" pn="section-toc.1-1.4.2.5.1"><xref derivedContent="4.5" format="counter" sectionFormat="of" target="section-4.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-quota-querychanges">Quota/queryChanges</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.5">
            <t indent="0" pn="section-toc.1-1.5.1"><xref derivedContent="5" format="counter" sectionFormat="of" target="section-5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-examples">Examples</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.5.2">
              <li pn="section-toc.1-1.5.2.1">
                <t indent="0" pn="section-toc.1-1.5.2.1.1"><xref derivedContent="5.1" format="counter" sectionFormat="of" target="section-5.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-fetching-quotas">Fetching Quotas</xref></t>
              </li>
              <li pn="section-toc.1-1.5.2.2">
                <t indent="0" pn="section-toc.1-1.5.2.2.1"><xref derivedContent="5.2" format="counter" sectionFormat="of" target="section-5.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-requesting-latest-quota-cha">Requesting Latest Quota Changes</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.6">
            <t indent="0" pn="section-toc.1-1.6.1"><xref derivedContent="6" format="counter" sectionFormat="of" target="section-6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-push">Push</xref></t>
          </li>
          <li pn="section-toc.1-1.7">
            <t indent="0" pn="section-toc.1-1.7.1"><xref derivedContent="7" format="counter" sectionFormat="of" target="section-7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-iana-considerations">IANA Considerations</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.7.2">
              <li pn="section-toc.1-1.7.2.1">
                <t indent="0" pn="section-toc.1-1.7.2.1.1"><xref derivedContent="7.1" format="counter" sectionFormat="of" target="section-7.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-jmap-capability-registratio">JMAP Capability Registration for "quota"</xref></t>
              </li>
              <li pn="section-toc.1-1.7.2.2">
                <t indent="0" pn="section-toc.1-1.7.2.2.1"><xref derivedContent="7.2" format="counter" sectionFormat="of" target="section-7.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-jmap-data-type-registration">JMAP Data Type Registration for "Quota"</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.8">
            <t indent="0" pn="section-toc.1-1.8.1"><xref derivedContent="8" format="counter" sectionFormat="of" target="section-8"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-security-considerations">Security Considerations</xref></t>
          </li>
          <li pn="section-toc.1-1.9">
            <t indent="0" pn="section-toc.1-1.9.1"><xref derivedContent="9" format="counter" sectionFormat="of" target="section-9"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-normative-references">Normative References</xref></t>
          </li>
          <li pn="section-toc.1-1.10">
            <t indent="0" pn="section-toc.1-1.10.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.a"/><xref derivedContent="" format="title" sectionFormat="of" target="name-acknowledgements">Acknowledgements</xref></t>
          </li>
          <li pn="section-toc.1-1.11">
            <t indent="0" pn="section-toc.1-1.11.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.b"/><xref derivedContent="" format="title" sectionFormat="of" target="name-authors-address">Author's Address</xref></t>
          </li>
        </ul>
      </section>
    </toc>
  </front>
  <middle>
    <section anchor="introduction" numbered="true" removeInRFC="false" toc="include" pn="section-1">
      <name slugifiedName="name-introduction">Introduction</name>
      <t indent="0" pn="section-1-1">The JSON Meta Application Protocol (JMAP) <xref target="RFC8620" format="default" sectionFormat="of" derivedContent="RFC8620"/> is a
generic protocol for synchronizing data, such as mails, calendars, or contacts
between a client and a server. It is optimized for mobile and web environments
and aims to provide a consistent interface to different data types.</t>
      <t indent="0" pn="section-1-2">This specification defines a data model for handling quotas over JMAP,
allowing a user to obtain details about a certain quota.</t>
      <t indent="0" pn="section-1-3">This specification does not address quota administration, which should be handled by other means.</t>
      <section anchor="notational-conventions" numbered="true" removeInRFC="false" toc="include" pn="section-1.1">
        <name slugifiedName="name-notational-conventions">Notational Conventions</name>
        <t indent="0" pn="section-1.1-1">
    The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>",
    "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>",
    "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
    "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are
    to be interpreted as described in BCP 14 <xref target="RFC2119" format="default" sectionFormat="of" derivedContent="RFC2119"/>
          <xref target="RFC8174" format="default" sectionFormat="of" derivedContent="RFC8174"/> when, and only when, they appear in all capitals,
    as shown here.
        </t>
        <t indent="0" pn="section-1.1-2">Type signatures, examples, and property descriptions in this document
follow the conventions established in <xref target="RFC8620" sectionFormat="of" section="1.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8620#section-1.1" derivedContent="RFC8620"/>. Data types defined in the core
specification are also used in this document.</t>
      </section>
      <section anchor="terminology" numbered="true" removeInRFC="false" toc="include" pn="section-1.2">
        <name slugifiedName="name-terminology">Terminology</name>
        <t indent="0" pn="section-1.2-1">This document reuses the terminology from the core JMAP specification established in <xref target="RFC8620" sectionFormat="of" section="1.6" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8620#section-1.6" derivedContent="RFC8620"/>.</t>
        <t indent="0" pn="section-1.2-2">The term "Quota" (when capitalized) is used to refer to the data type
defined in <xref target="quota" format="default" sectionFormat="of" derivedContent="Section 4"/> and instance of that
data type.</t>
      </section>
    </section>
    <section anchor="addition-to-the-capabilities-object" numbered="true" removeInRFC="false" toc="include" pn="section-2">
      <name slugifiedName="name-addition-to-the-capabilitie">Addition to the Capabilities Object</name>
      <t indent="0" pn="section-2-1">The capabilities object is returned as part of the JMAP Session object; see <xref target="RFC8620" sectionFormat="comma" section="2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8620#section-2" derivedContent="RFC8620"/>.</t>
      <t indent="0" pn="section-2-2">This document defines one additional capability URI.</t>
      <section anchor="urn-ietf-params-jmap-quota" numbered="true" removeInRFC="false" toc="include" pn="section-2.1">
        <name slugifiedName="name-urnietfparamsjmapquota">urn:ietf:params:jmap:quota</name>
        <t indent="0" pn="section-2.1-1">This represents support for the Quota data type and associated API methods. Servers supporting this specification <bcp14>MUST</bcp14> add a property called "urn:ietf:params:jmap:quota" to the capabilities object.</t>
        <t indent="0" pn="section-2.1-2">The value of this property is an empty object in both the JMAP Session capabilities property and an account's accountCapabilities property.</t>
      </section>
    </section>
    <section anchor="sub-types-of-the-quota-data-type" numbered="true" removeInRFC="false" toc="include" pn="section-3">
      <name slugifiedName="name-sub-types-of-the-quota-data">Sub-types of the Quota Data Type</name>
      <t indent="0" pn="section-3-1">There are two fields within the Quota data type, which have an enumerated set of possible values.  These are:</t>
      <section anchor="scope" numbered="true" removeInRFC="false" toc="include" pn="section-3.1">
        <name slugifiedName="name-scope">Scope</name>
        <t indent="0" pn="section-3.1-1">The Scope data type is used to represent the entities the quota applies to. It is defined as a "String" with values from the following set:</t>
        <ul bare="false" empty="false" indent="3" spacing="normal" pn="section-3.1-2">
          <li pn="section-3.1-2.1">
            <t indent="0" pn="section-3.1-2.1.1">account: The quota information applies to just the client's account.</t>
          </li>
          <li pn="section-3.1-2.2">
            <t indent="0" pn="section-3.1-2.2.1">domain: The quota information applies to all accounts sharing this domain.</t>
          </li>
          <li pn="section-3.1-2.3">
            <t indent="0" pn="section-3.1-2.3.1">global: The quota information applies to all accounts belonging to the server.</t>
          </li>
        </ul>
      </section>
      <section anchor="resourcetype" numbered="true" removeInRFC="false" toc="include" pn="section-3.2">
        <name slugifiedName="name-resourcetype">ResourceType</name>
        <t indent="0" pn="section-3.2-1">The ResourceType data type is used to act as a unit of measure for the quota usage. It is defined as a "String" with values from the following set:</t>
        <ul bare="false" empty="false" indent="3" spacing="normal" pn="section-3.2-2">
          <li pn="section-3.2-2.1">
            <t indent="0" pn="section-3.2-2.1.1">count: The quota is measured in a number of data type objects. For example, a
  quota can have a limit of 50 "Mail" objects.</t>
          </li>
          <li pn="section-3.2-2.2">
            <t indent="0" pn="section-3.2-2.2.1">octets: The quota is measured in size (in octets). For example, a quota can have a limit of 25000 octets.</t>
          </li>
        </ul>
      </section>
    </section>
    <section anchor="quota" numbered="true" removeInRFC="false" toc="include" pn="section-4">
      <name slugifiedName="name-quota">Quota</name>
      <t indent="0" pn="section-4-1">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.</t>
      <section anchor="properties-of-the-quota-object" numbered="true" removeInRFC="false" toc="include" pn="section-4.1">
        <name slugifiedName="name-properties-of-the-quota-obj">Properties of the Quota Object</name>
        <t indent="0" pn="section-4.1-1">The Quota object <bcp14>MUST</bcp14> contain the following fields:</t>
        <ul bare="false" empty="false" indent="3" spacing="normal" pn="section-4.1-2">
          <li pn="section-4.1-2.1">
            <t indent="0" pn="section-4.1-2.1.1">id: <tt>Id</tt></t>
            <t indent="0" pn="section-4.1-2.1.2">The unique identifier for this object.</t>
          </li>
          <li pn="section-4.1-2.2">
            <t indent="0" pn="section-4.1-2.2.1">resourceType: <tt>String</tt></t>
            <t indent="0" pn="section-4.1-2.2.2">The resource type of the quota as defined in <xref target="resourcetype" format="default" sectionFormat="of" derivedContent="Section 3.2"/>.</t>
          </li>
          <li pn="section-4.1-2.3">
            <t indent="0" pn="section-4.1-2.3.1">used: <tt>UnsignedInt</tt></t>
            <t indent="0" pn="section-4.1-2.3.2">The current usage of the defined quota, using the "resourceType" defined as
  unit of measure.  Computation of this value is handled by the
  server.</t>
          </li>
          <li pn="section-4.1-2.4">
            <t indent="0" pn="section-4.1-2.4.1">hardLimit: <tt>UnsignedInt</tt></t>
            <t indent="0" pn="section-4.1-2.4.2">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.</t>
          </li>
          <li pn="section-4.1-2.5">
            <t indent="0" pn="section-4.1-2.5.1">scope: <tt>String</tt></t>
            <t indent="0" pn="section-4.1-2.5.2">The "Scope" of this quota as defined in <xref target="scope" format="default" sectionFormat="of" derivedContent="Section 3.1"/>.</t>
          </li>
          <li pn="section-4.1-2.6">
            <t indent="0" pn="section-4.1-2.6.1">name: <tt>String</tt></t>
            <t indent="0" pn="section-4.1-2.6.2">The name of the quota. Useful for managing quotas and using queries for searching.</t>
          </li>
          <li pn="section-4.1-2.7">
            <t indent="0" pn="section-4.1-2.7.1">types: <tt>String[]</tt></t>
            <t indent="0" pn="section-4.1-2.7.2">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.</t>
            <t indent="0" pn="section-4.1-2.7.3">The server <bcp14>MUST</bcp14> filter out any types for which the client did not request the associated capability in the "using" section of the request.
  Further, the server <bcp14>MUST NOT</bcp14> return Quota objects for which there are no types recognized by the client.</t>
          </li>
        </ul>
        <t indent="0" pn="section-4.1-3">The Quota object <bcp14>MAY</bcp14> contain the following fields:</t>
        <ul bare="false" empty="false" indent="3" spacing="normal" pn="section-4.1-4">
          <li pn="section-4.1-4.1">
            <t indent="0" pn="section-4.1-4.1.1">warnLimit: <tt>UnsignedInt|null</tt></t>
            <t indent="0" pn="section-4.1-4.1.2">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
  <bcp14>SHOULD</bcp14> be lower than the "softLimit" (if present and
  different from null) and the "hardLimit".</t>
          </li>
          <li pn="section-4.1-4.2">
            <t indent="0" pn="section-4.1-4.2.1">softLimit: <tt>UnsignedInt|null</tt></t>
            <t indent="0" pn="section-4.1-4.2.2">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 <bcp14>SHOULD</bcp14> be higher
  than the "warnLimit" (if present and different from null) but lower
  than the "hardLimit".</t>
          </li>
          <li pn="section-4.1-4.3">
            <t indent="0" pn="section-4.1-4.3.1">description: <tt>String|null</tt></t>
            <t indent="0" pn="section-4.1-4.3.2">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 <bcp14>MUST</bcp14> be
  encoded in UTF-8 <xref target="RFC3629" format="default" sectionFormat="of" derivedContent="RFC3629"/> as described in <xref target="RFC8620" sectionFormat="comma" section="1.5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8620#section-1.5" derivedContent="RFC8620"/>, and selected based on an
  Accept-Language header in the request (as defined in <xref target="RFC9110" sectionFormat="comma" section="12.5.4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc9110#section-12.5.4" derivedContent="RFC9110"/>) or out-of-band information about the
  user's language or locale.</t>
          </li>
        </ul>
        <t indent="0" pn="section-4.1-5">The following JMAP methods are supported.</t>
      </section>
      <section anchor="quota-get" numbered="true" removeInRFC="false" toc="include" pn="section-4.2">
        <name slugifiedName="name-quota-get">Quota/get</name>
        <t indent="0" pn="section-4.2-1">Standard "/get" method as described in <xref target="RFC8620" sectionFormat="comma" section="5.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8620#section-5.1" derivedContent="RFC8620"/>. The <em>id</em>'s argument may be "null"
to fetch all quotas of the account at once, as demonstrated in <xref target="fetching-quotas" format="default" sectionFormat="of" derivedContent="Section 5.1"/>.</t>
      </section>
      <section anchor="quota-changes" numbered="true" removeInRFC="false" toc="include" pn="section-4.3">
        <name slugifiedName="name-quota-changes">Quota/changes</name>
        <t indent="0" pn="section-4.3-1">Standard "/changes" method as described in <xref target="RFC8620" sectionFormat="comma" section="5.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8620#section-5.2" derivedContent="RFC8620"/>, but with one extra argument in the response:</t>
        <ul bare="false" empty="false" indent="3" spacing="normal" pn="section-4.3-2">
          <li pn="section-4.3-2.1">
            <t indent="0" pn="section-4.3-2.1.1">updatedProperties: <tt>String[]|null</tt></t>
            <t indent="0" pn="section-4.3-2.1.2">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 <bcp14>MUST</bcp14> be
  null.</t>
          </li>
        </ul>
        <t indent="0" pn="section-4.3-3">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.</t>
        <t indent="0" pn="section-4.3-4">Servers <bcp14>MAY</bcp14> decide to add other properties to the list that
they judge to be changing frequently.</t>
        <t indent="0" pn="section-4.3-5">This method's usage is demonstrated in <xref target="requesting-latest-quota-changes" format="default" sectionFormat="of" derivedContent="Section 5.2"/>.</t>
      </section>
      <section anchor="quota-query" numbered="true" removeInRFC="false" toc="include" pn="section-4.4">
        <name slugifiedName="name-quota-query">Quota/query</name>
        <t indent="0" pn="section-4.4-1">This is a standard "/query" method as described in <xref target="RFC8620" sectionFormat="comma" section="5.5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8620#section-5.5" derivedContent="RFC8620"/>.</t>
        <t indent="0" pn="section-4.4-2">A FilterCondition object has the following properties, any of which may be included or  omitted:</t>
        <ul bare="false" empty="false" indent="3" spacing="normal" pn="section-4.4-3">
          <li pn="section-4.4-3.1">
            <t indent="0" pn="section-4.4-3.1.1">name: <tt>String</tt></t>
            <t indent="0" pn="section-4.4-3.1.2">The Quota <em>name</em> property contains the given string.</t>
          </li>
          <li pn="section-4.4-3.2">
            <t indent="0" pn="section-4.4-3.2.1">scope: <tt>String</tt></t>
            <t indent="0" pn="section-4.4-3.2.2">The Quota <em>scope</em> property must match the given value exactly.</t>
          </li>
          <li pn="section-4.4-3.3">
            <t indent="0" pn="section-4.4-3.3.1">resourceType: <tt>String</tt></t>
            <t indent="0" pn="section-4.4-3.3.2">The Quota <em>resourceType</em> property must match the given value exactly.</t>
          </li>
          <li pn="section-4.4-3.4">
            <t indent="0" pn="section-4.4-3.4.1">type: <tt>String</tt></t>
            <t indent="0" pn="section-4.4-3.4.2">The Quota <em>types</em> property contains the given value.</t>
          </li>
        </ul>
        <t indent="0" pn="section-4.4-4">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.</t>
        <t indent="0" pn="section-4.4-5">The following Quota properties <bcp14>MUST</bcp14> be supported for sorting:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4.4-6">
          <li pn="section-4.4-6.1">name</li>
          <li pn="section-4.4-6.2">used</li>
        </ul>
      </section>
      <section anchor="quota-querychanges" numbered="true" removeInRFC="false" toc="include" pn="section-4.5">
        <name slugifiedName="name-quota-querychanges">Quota/queryChanges</name>
        <t indent="0" pn="section-4.5-1">This is a standard "/queryChanges" method as described in <xref target="RFC8620" sectionFormat="comma" section="5.6" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8620#section-5.6" derivedContent="RFC8620"/>.</t>
      </section>
    </section>
    <section anchor="examples" numbered="true" removeInRFC="false" toc="include" pn="section-5">
      <name slugifiedName="name-examples">Examples</name>
      <section anchor="fetching-quotas" numbered="true" removeInRFC="false" toc="include" pn="section-5.1">
        <name slugifiedName="name-fetching-quotas">Fetching Quotas</name>
        <t indent="0" pn="section-5.1-1">Request fetching all quotas related to an account:</t>
        <sourcecode type="json" markers="false" pn="section-5.1-2">
[[ "Quota/get", {
  "accountId": "u33084183",
  "ids": null
}, "0" ]]
</sourcecode>
        <t indent="0" pn="section-5.1-3">With response:</t>
        <sourcecode type="json" markers="false" pn="section-5.1-4">
[[ "Quota/get", {
  "accountId": "u33084183",
  "state": "78540",
  "list": [{
    "id": "2a06df0d-9865-4e74-a92f-74dcc814270e",
    "resourceType": "count",
    "used": 1056,
    "warnLimit": 1600,
    "softLimit": 1800,
    "hardLimit": 2000,
    "scope": "account",
    "name": "bob@example.com",
    "description": "Personal account usage. When the soft limit is
                    reached, the user is not allowed to send mails or
                    create contacts and calendar events anymore.",
    "types" : [ "Mail", "Calendar", "Contact" ]
  }, {
    "id": "3b06df0e-3761-4s74-a92f-74dcc963501x",
    "resourceType": "octets",
    ...
  }, ...],
  "notFound": []
}, "0" ]]
</sourcecode>
      </section>
      <section anchor="requesting-latest-quota-changes" numbered="true" removeInRFC="false" toc="include" pn="section-5.2">
        <name slugifiedName="name-requesting-latest-quota-cha">Requesting Latest Quota Changes</name>
        <t indent="0" pn="section-5.2-1">Request fetching the changes for a specific quota:</t>
        <sourcecode type="json" markers="false" pn="section-5.2-2">
[[ "Quota/changes", {
  "accountId": "u33084183",
  "sinceState": "78540",
  "maxChanges": 20
}, "0" ],
[ "Quota/get", {
  "accountId": "u33084183",
  "#ids": {
    "resultOf": "0",
    "name": "Quota/changes",
    "path": "/updated"
  },
  "#properties": {
    "resultOf": "0",
    "name": "Quota/changes",
    "path": "/updatedProperties"
  }
}, "1" ]]
</sourcecode>
        <t indent="0" pn="section-5.2-3">With response:</t>
        <sourcecode type="json" markers="false" pn="section-5.2-4">
[[ "Quota/changes", {
  "accountId": "u33084183",
  "oldState": "78540",
  "newState": "78542",
  "hasMoreChanges": false,
  "updatedProperties": ["used"],
  "created": [],
  "updated": ["2a06df0d-9865-4e74-a92f-74dcc814270e"],
  "destroyed": []
}, "0" ],
[ "Quota/get", {
  "accountId": "u33084183",
  "state": "10826",
  "list": [{
    "id": "2a06df0d-9865-4e74-a92f-74dcc814270e",
    "used": 1246
  }],
  "notFound": []
}, "1" ]]
</sourcecode>
      </section>
    </section>
    <section anchor="push" numbered="true" removeInRFC="false" toc="include" pn="section-6">
      <name slugifiedName="name-push">Push</name>
      <t indent="0" pn="section-6-1">Servers <bcp14>MUST</bcp14> support the JMAP push mechanisms, as specified
in <xref target="RFC8620" sectionFormat="comma" section="7" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8620#section-7" derivedContent="RFC8620"/>, to allow
clients to receive notifications when the state changes for the Quota type
defined in this specification.</t>
    </section>
    <section anchor="iana-considerations" numbered="true" removeInRFC="false" toc="include" pn="section-7">
      <name slugifiedName="name-iana-considerations">IANA Considerations</name>
      <section anchor="jmap-capability-registration-for-quota" numbered="true" removeInRFC="false" toc="include" pn="section-7.1">
        <name slugifiedName="name-jmap-capability-registratio">JMAP Capability Registration for "quota"</name>
        <t indent="0" pn="section-7.1-1">IANA has registered the "quota" JMAP Capability as follows:</t>
        <dl spacing="normal" newline="false" indent="3" pn="section-7.1-2">
          <dt pn="section-7.1-2.1">Capability Name:</dt>
          <dd pn="section-7.1-2.2">urn:ietf:params:jmap:quota</dd>
          <dt pn="section-7.1-2.3">Reference:</dt>
          <dd pn="section-7.1-2.4">RFC 9425</dd>
          <dt pn="section-7.1-2.5">Intended Use:</dt>
          <dd pn="section-7.1-2.6">common</dd>
          <dt pn="section-7.1-2.7">Change Controller:</dt>
          <dd pn="section-7.1-2.8">IETF</dd>
          <dt pn="section-7.1-2.9">Security and Privacy Considerations:</dt>
          <dd pn="section-7.1-2.10">RFC 9425, <xref target="security-considerations" format="default" sectionFormat="of" derivedContent="Section 8"/></dd>
        </dl>
      </section>
      <section anchor="jmap-datatype-registration-for-quota" numbered="true" removeInRFC="false" toc="include" pn="section-7.2">
        <name slugifiedName="name-jmap-data-type-registration">JMAP Data Type Registration for "Quota"</name>
        <t indent="0" pn="section-7.2-1">IANA has registered the "Quota" Data Type as follows:</t>
        <dl spacing="normal" newline="false" indent="3" pn="section-7.2-2">
          <dt pn="section-7.2-2.1">Type Name:</dt>
          <dd pn="section-7.2-2.2">Quota</dd>
          <dt pn="section-7.2-2.3">Can Reference Blobs:</dt>
          <dd pn="section-7.2-2.4">No</dd>
          <dt pn="section-7.2-2.5">Can Use for State Change:</dt>
          <dd pn="section-7.2-2.6">Yes</dd>
          <dt pn="section-7.2-2.7">Capability:</dt>
          <dd pn="section-7.2-2.8">urn:ietf:params:jmap:quota</dd>
          <dt pn="section-7.2-2.9">Reference:</dt>
          <dd pn="section-7.2-2.10">RFC 9425</dd>
        </dl>
      </section>
    </section>
    <section anchor="security-considerations" numbered="true" removeInRFC="false" toc="include" pn="section-8">
      <name slugifiedName="name-security-considerations">Security Considerations</name>
      <t indent="0" pn="section-8-1">All security considerations of JMAP <xref target="RFC8620" format="default" sectionFormat="of" derivedContent="RFC8620"/> apply to this
specification.</t>
      <t indent="0" pn="section-8-2">Implementors should be careful to make sure the implementation of the
extension specified in this document does not violate the site's security
policy. The resource usage of other users is likely to be considered
confidential information and should not be divulged to unauthorized
persons.</t>
      <t indent="0" pn="section-8-3">As for any resource shared across users (for example, a quota with the
"domain" or "global" scope), a user that can consume the resource can affect
the resources available to the other users. For example, a user could spam
themselves with events and make the shared resource hit the limit and unusable
for others (implementors could mitigate that with some rate-limiting
implementation on the server).</t>
      <t indent="0" pn="section-8-4">Also, revealing domain and global quota counts to all users may cause
privacy leakage of other sensitive data, or at least the existence of other
sensitive data. For example, some users are part of a private list belonging
to the server, so they shouldn't know how many users are in there. However, by
comparing the quota count before and after sending a message to the list, it
could reveal the number of people of the list, as the domain or global quota
count would go up by the number of people subscribed. In order to limit those
attacks, quotas with "domain" or "global" scope <bcp14>SHOULD</bcp14> only be
visible to server administrators and not to general users.</t>
    </section>
  </middle>
  <back>
    <references pn="section-9">
      <name slugifiedName="name-normative-references">Normative References</name>
      <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" quoteTitle="true" derivedAnchor="RFC2119">
        <front>
          <title>Key words for use in RFCs to Indicate Requirement Levels</title>
          <author fullname="S. Bradner" initials="S." surname="Bradner"/>
          <date month="March" year="1997"/>
          <abstract>
            <t indent="0">In many standards track documents several words are used to signify the requirements in the specification.  These words are often capitalized.  This document defines these words as they should be interpreted in IETF documents.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="2119"/>
        <seriesInfo name="DOI" value="10.17487/RFC2119"/>
      </reference>
      <reference anchor="RFC3629" target="https://www.rfc-editor.org/info/rfc3629" quoteTitle="true" derivedAnchor="RFC3629">
        <front>
          <title>UTF-8, a transformation format of ISO 10646</title>
          <author fullname="F. Yergeau" initials="F." surname="Yergeau"/>
          <date month="November" year="2003"/>
          <abstract>
            <t indent="0">ISO/IEC 10646-1 defines a large character set called the Universal Character Set (UCS) which encompasses most of the world's writing systems.  The originally proposed encodings of the UCS, however, were not compatible with many current applications and protocols, and this has led to the development of UTF-8, the object of this memo.  UTF-8 has the characteristic of preserving the full US-ASCII range, providing compatibility with file systems, parsers and other software that rely on US-ASCII values but are transparent to other values.  This memo obsoletes and replaces RFC 2279.</t>
          </abstract>
        </front>
        <seriesInfo name="STD" value="63"/>
        <seriesInfo name="RFC" value="3629"/>
        <seriesInfo name="DOI" value="10.17487/RFC3629"/>
      </reference>
      <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" quoteTitle="true" derivedAnchor="RFC8174">
        <front>
          <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
          <author fullname="B. Leiba" initials="B." surname="Leiba"/>
          <date month="May" year="2017"/>
          <abstract>
            <t indent="0">RFC 2119 specifies common key words that may be used in protocol specifications.  This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="8174"/>
        <seriesInfo name="DOI" value="10.17487/RFC8174"/>
      </reference>
      <reference anchor="RFC8620" target="https://www.rfc-editor.org/info/rfc8620" quoteTitle="true" derivedAnchor="RFC8620">
        <front>
          <title>The JSON Meta Application Protocol (JMAP)</title>
          <author fullname="N. Jenkins" initials="N." surname="Jenkins"/>
          <author fullname="C. Newman" initials="C." surname="Newman"/>
          <date month="July" year="2019"/>
          <abstract>
            <t indent="0">This document specifies a protocol for clients to efficiently query, fetch, and modify JSON-based data objects, with support for push notification of changes and fast resynchronisation and for out-of- band binary data upload/download.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="8620"/>
        <seriesInfo name="DOI" value="10.17487/RFC8620"/>
      </reference>
      <reference anchor="RFC9007" target="https://www.rfc-editor.org/info/rfc9007" quoteTitle="true" derivedAnchor="RFC9007">
        <front>
          <title>Handling Message Disposition Notification with the JSON Meta Application Protocol (JMAP)</title>
          <author fullname="R. Ouazana" initials="R." role="editor" surname="Ouazana"/>
          <date month="March" year="2021"/>
          <abstract>
            <t indent="0">This document specifies a data model for handling Message Disposition Notifications (MDNs) (see RFC 8098) in the JSON Meta Application Protocol (JMAP) (see RFCs 8620 and 8621).</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="9007"/>
        <seriesInfo name="DOI" value="10.17487/RFC9007"/>
      </reference>
      <reference anchor="RFC9110" target="https://www.rfc-editor.org/info/rfc9110" quoteTitle="true" derivedAnchor="RFC9110">
        <front>
          <title>HTTP Semantics</title>
          <author fullname="R. Fielding" initials="R." role="editor" surname="Fielding"/>
          <author fullname="M. Nottingham" initials="M." role="editor" surname="Nottingham"/>
          <author fullname="J. Reschke" initials="J." role="editor" surname="Reschke"/>
          <date month="June" year="2022"/>
          <abstract>
            <t indent="0">The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document describes the overall architecture of HTTP, establishes common terminology, and defines aspects of the protocol that are shared by all versions. In this definition are core protocol elements, extensibility mechanisms, and the "http" and "https" Uniform Resource Identifier (URI) schemes.</t>
            <t indent="0">This document updates RFC 3864 and obsoletes RFCs 2818, 7231, 7232, 7233, 7235, 7538, 7615, 7694, and portions of 7230.</t>
          </abstract>
        </front>
        <seriesInfo name="STD" value="97"/>
        <seriesInfo name="RFC" value="9110"/>
        <seriesInfo name="DOI" value="10.17487/RFC9110"/>
      </reference>
    </references>
    <section anchor="acknowledgements" numbered="false" toc="include" removeInRFC="false" pn="section-appendix.a">
      <name slugifiedName="name-acknowledgements">Acknowledgements</name>
      <t indent="0" pn="section-appendix.a-1">Thank you to <contact fullname="Michael Bailly"/>, who co-wrote the first
draft version of this document, before deciding to turn to other matters.</t>
      <t indent="0" pn="section-appendix.a-2">Thank you to <contact fullname="Benoit Tellier"/> for his constant help and
support on writing this document.</t>
      <t indent="0" pn="section-appendix.a-3">Thank you to <contact fullname="Raphael Ouazana"/> for sharing his own
experience on how to write an RFC after finalizing his own document: <xref target="RFC9007" format="default" sectionFormat="of" derivedContent="RFC9007"/>.</t>
      <t indent="0" pn="section-appendix.a-4">Thank you to <contact fullname="Bron Gondwana"/>, <contact fullname="Neil Jenkins"/>, <contact fullname="Alexey Melnikov"/>, <contact fullname="Joris Baum"/>, and the people from the IETF JMAP working group in general, who
helped with extensive discussions, reviews, and feedback.</t>
      <t indent="0" pn="section-appendix.a-5">Thank you to the people in the IETF organization, who took the time to
read, understand, comment, and give great feedback in the last rounds.</t>
    </section>
    <section anchor="authors-addresses" numbered="false" removeInRFC="false" toc="include" pn="section-appendix.b">
      <name slugifiedName="name-authors-address">Author's Address</name>
      <author role="editor" initials="R." surname="Cordier" fullname="René Cordier">
        <organization showOnFrontPage="true">Linagora Vietnam</organization>
        <address>
          <postal>
            <street>5 Dien Bien Phu</street>
            <city>Hanoi</city>
            <code>10000</code>
            <country>Vietnam</country>
          </postal>
          <email>rcordier@linagora.com</email>
          <uri>https://linagora.vn</uri>
        </address>
      </author>
    </section>
  </back>
</rfc>
