<?xml version="1.0" encoding="UTF-8"?>
  <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
  <!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.31 (Ruby 3.3.8) -->


<!DOCTYPE rfc  [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">

]>


<rfc ipr="trust200902" docName="draft-al-netconf-restconf-transaction-id-00" category="std" consensus="true" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true">
  <front>
    <title abbrev="RESTCONF Txid">Transaction ID Mechanism for RESTCONF</title>

    <author fullname="Per Andersson">
      <organization>Ionio Systems</organization>
      <address>
        <email>per.ietf@ionio.se</email>
      </address>
    </author>
    <author fullname="Jan Lindblad">
      <organization>All For Eco</organization>
      <address>
        <email>jan.lindblad+ietf@for.eco</email>
      </address>
    </author>

    <date year="2026" month="March" day="02"/>

    <area>ops</area>
    <workgroup>NETCONF</workgroup>
    <keyword>Internet-Draft</keyword>

    <abstract>


<?line 37?>

<t>This document defines additional mechanisms intended to extend the RESTCONF
Protocol's usability of Transaction ID Mechanism for NETCONF.</t>



    </abstract>



  </front>

  <middle>


<?line 43?>

<section anchor="introduction"><name>Introduction</name>

<t>The Transaction ID Mechanism for NETCONF <xref target="I-D.ietf-netconf-transaction-id"/>
defines the functionality in general, specifics for NETCONF, and some
specifics for RESTCONF. This document defines additional mechanisms needed to
make Transaction ID work over the RESTCONF Protocol <xref target="RFC8040"/>. The txid
mechanisms for the HTTP headers ETag and Last-Modified <xref target="RFC9110"/> are defined
in the NETCONF txid document.</t>

<t>This document defines how payload attributes for RESTCONF <xref target="payload-attrs"/>
would work and also specifics for each HTTP Method <xref target="http-methods"/>. The
payload attributes are encoded as metadata for YANG. <xref target="RFC7952"/></t>

</section>
<section anchor="conventions-and-definitions"><name>Conventions and Definitions</name>

<t>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"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>

<?line -18?>

<t>In addition, this document uses the following terms defined in
<xref target="I-D.ietf-netconf-transaction-id"/>:</t>

<t>Txid: Abbreviation of Transaction-id. A transaction-id is a UTF-8 string of
characters. The specific format depends on the protocol mechanism used (e.g.
ETag or Last-Modified).</t>

</section>
<section anchor="payload-attrs"><name>Payload Transaction ID Attributes</name>

<t>Analogous to the mechanism defined for NETCONF in
<xref target="I-D.ietf-netconf-transaction-id"/>, the txid can be supplied in the payload
as attributes. See section 5.3 in <xref target="RFC8040"/>.</t>

<t>Examples payload for XML</t>

<figure align="right" title="Txid values as attributes in XML over RESTCONF"><sourcecode type="xml"><![CDATA[
  <acls xmlns="urn:ietf:params:xml:ns:yang:ietf-access-control-list"
        xmlns:txid="urn:ietf:params:xml:ns:yang:ietf-netconf-txid"
        txid:etag="5152">
    <acl txid:etag="4711">
      <name>A1</name>
      <aces>
        <ace>
          <name>R1</name>
          ...
        </ace>
      </aces>
    </acl>
    <acl txid:etag="5152">
      <name>A2</name>
      <aces>
        <ace>
          <name>R7</name>
          ...
        </ace>
      </aces>
    </acl>
  </acls>
]]></sourcecode></figure>

<t>Examples payload for JSON</t>

<figure align="right" title="Txid values as attributes in JSON over RESTCONF"><sourcecode type="json"><![CDATA[
  {
    "ietf-access-control-list:acls": {
      "@": {
        "ietf-netconf-txid:etag": "5152"
      },
      "acl": [
        {
          "@": {
            "ietf-netconf-txid:etag": "4711"
          },
          "name": "A1",
          "aces": [
            {
              "name": "R1",
               ...
            }
          ]
        },
        {
          "@": {
            "ietf-netconf-txid:etag": "5152"
          },
          "name": "A2",
          "aces": [
            {
              "name": "R7",
               ...
            }
          ]
        }
      ]
    }
  }
]]></sourcecode></figure>

</section>
<section anchor="http-methods"><name>HTTP Methods</name>

<t>When the txid is supplied in the HTTP ETag header or when the Last-Modified
header is used, the rules from sections 4.1 and 4.2 in
<xref target="I-D.ietf-netconf-transaction-id"/> applies, respectively.</t>

<t>The priority and interaction together with txid as payload attributes are
defined as follows for the following HTTP methods.</t>

<section anchor="etag-and-if-match-headers"><name>ETag and If-Match headers</name>

<section anchor="get"><name>GET</name>

<t>For the retrieval GET method when an ETag header is supplied in conjunction
with txid values as payload attributes, the ETag header txid value is applied
as a default txid value where payload attributes are missing.</t>

</section>
<section anchor="post-put-delete-patch"><name>POST, PUT, DELETE, PATCH</name>

<t>For the state changing methods, POST, PUT, DELETE, and PATCH, when an If-Match
header is supplied, the entire request is rejected if the supplied txid value
in the request and any node in the target resource are different.</t>

<t>If the target resource tree have different txid values on different nodes,
using the If-Match header will always reject the result. Instead the payload
attributes need to be set for granular control over the txid matching.</t>

</section>
</section>
</section>
<section anchor="security-considerations"><name>Security Considerations</name>

<t>The security considerations in <xref target="I-D.ietf-netconf-transaction-id"/> applies
for this document as well.</t>

</section>
<section anchor="iana-considerations"><name>IANA Considerations</name>

<t>This document has no IANA actions.</t>

</section>


  </middle>

  <back>



    <references title='Normative References' anchor="sec-normative-references">




<reference anchor="I-D.ietf-netconf-transaction-id">
   <front>
      <title>Transaction ID Mechanism for NETCONF</title>
      <author fullname="Jan Lindblad" initials="J." surname="Lindblad">
         <organization>All For Eco</organization>
      </author>
      <date day="7" month="October" year="2025"/>
      <abstract>
	 <t>   NETCONF clients and servers often need to have a synchronized view of
   the server&#x27;s configuration datastores.  The volume of configuration
   data in a server may be very large, while datastore changes typically
   are small when observed at typical client resynchronization
   intervals.

   Rereading the entire datastore and analyzing the response for changes
   is inefficient for synchronization.  This document specifies a
   NETCONF extension that allows clients and servers to keep
   synchronized with a much smaller data exchange and without any need
   for servers to store information about the clients.

	 </t>
      </abstract>
   </front>
   <seriesInfo name="Internet-Draft" value="draft-ietf-netconf-transaction-id-11"/>
   
</reference>
<reference anchor="RFC7952">
  <front>
    <title>Defining and Using Metadata with YANG</title>
    <author fullname="L. Lhotka" initials="L." surname="Lhotka"/>
    <date month="August" year="2016"/>
    <abstract>
      <t>This document defines a YANG extension that allows for defining metadata annotations in YANG modules. The document also specifies XML and JSON encoding of annotations and other rules for annotating instances of YANG data nodes.</t>
    </abstract>
  </front>
  <seriesInfo name="RFC" value="7952"/>
  <seriesInfo name="DOI" value="10.17487/RFC7952"/>
</reference>
<reference anchor="RFC8040">
  <front>
    <title>RESTCONF Protocol</title>
    <author fullname="A. Bierman" initials="A." surname="Bierman"/>
    <author fullname="M. Bjorklund" initials="M." surname="Bjorklund"/>
    <author fullname="K. Watsen" initials="K." surname="Watsen"/>
    <date month="January" year="2017"/>
    <abstract>
      <t>This document describes an HTTP-based protocol that provides a programmatic interface for accessing data defined in YANG, using the datastore concepts defined in the Network Configuration Protocol (NETCONF).</t>
    </abstract>
  </front>
  <seriesInfo name="RFC" value="8040"/>
  <seriesInfo name="DOI" value="10.17487/RFC8040"/>
</reference>
<reference anchor="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>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>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>
<reference anchor="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>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="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>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>



    </references>




<?line 202?>

<section numbered="false" anchor="acknowledgments"><name>Acknowledgments</name>

<t>TODO acknowledge.</t>

</section>


  </back>

<!-- ##markdown-source:
H4sIAAAAAAAAA6VY3XbbNhK+x1Ng6Yv9E9nKdY4TnsSt1pIb9ViW15LPbk5P
LyASkhiDAAuAVrQ+2mfZZ9kn2xmAFElZab2JLhIAnBnMfPMLh2FIbGYFj2kw
10walthMSToe0glP1kxmJqdLpendaDa/nN5cBYQtFpo/An19ROefsjQgCbN8
pfQ2psamhKQqkSwHualmSxsyEUpuEyWXoebGL2xzYZiloQABxhJTLvLMGDi0
2wL4x6P5FZFlvuA6JinQxAS4DZemNDG1uuQEtPmOMM1ZTFVhyEbph5VWZRHT
m5FTkT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