FETCH and PATCH with Sensor Measurement Lists (SenML)
RFC 8790

Document Type RFC - Proposed Standard (June 2020; No errata)
Last updated 2020-09-10
Replaces draft-keranen-core-senml-fetch
Stream IETF
Formats plain text html xml pdf htmlized bibtex
Reviews
Additional Resources
- Working Group Repo
- Mailing list discussion
Stream WG state Submitted to IESG for Publication
Document shepherd Carsten Bormann
Shepherd write-up Show (last changed 2019-07-12)
IESG IESG state RFC 8790 (Proposed Standard)
Consensus Boilerplate Yes
Telechat date
Responsible AD Alexey Melnikov
Send notices to Carsten Bormann <cabo@tzi.org>
IANA IANA review state Version Changed - Review Needed
IANA action state RFC-Ed-Ack


Internet Engineering Task Force (IETF)                        A. Keränen
Request for Comments: 8790                                      Ericsson
Category: Standards Track                                     M. Mohajer
ISSN: 2070-1721                                                June 2020

         FETCH and PATCH with Sensor Measurement Lists (SenML)

Abstract

   The Sensor Measurement Lists (SenML) media type and data model can be
   used to send collections of resources, such as batches of sensor data
   or configuration parameters.  The Constrained Application Protocol
   (CoAP) FETCH, PATCH, and iPATCH methods enable accessing and updating
   parts of a resource or multiple resources with one request.  This
   document defines new media types for the CoAP FETCH, PATCH, and
   iPATCH methods for resources represented using the SenML data model.

Status of This Memo

   This is an Internet Standards Track document.

   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.

   Information about the current status of this document, any errata,
   and how to provide feedback on it may be obtained at
   https://www.rfc-editor.org/info/rfc8790.

Copyright Notice

   Copyright (c) 2020 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (https://trustee.ietf.org/license-info) 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 Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Table of Contents

   1.  Introduction
   2.  Terminology
   3.  Using FETCH and (i)PATCH with SenML
     3.1.  SenML FETCH
     3.2.  SenML (i)PATCH
   4.  Fragment Identification
   5.  Extensibility
   6.  Security Considerations
   7.  IANA Considerations
     7.1.  CoAP Content-Format Registration
     7.2.  senml-etch+json Media Type
     7.3.  senml-etch+cbor Media Type
   8.  References
     8.1.  Normative References
     8.2.  Informative References
   Acknowledgements
   Authors' Addresses

1.  Introduction

   The Sensor Measurement Lists (SenML) media type [RFC8428] and data
   model can be used to transmit collections of resources, such as
   batches of sensor data or configuration parameters.

   An example of a SenML collection is shown below:

   [
    {"bn":"2001:db8::2/3311/0/", "n":"5850", "vb":true},
    {"n":"5851", "v":42},
    {"n":"5750", "vs":"Ceiling light"}
   ]

   Here, three resources, "3311/0/5850", "3311/0/5851", and
   "3311/0/5750", of a dimmable light smart object [IPSO] are
   represented using a single SenML Pack with three SenML Records.  All
   resources share the same base name "2001:db8::2/3311/0/"; hence, full
   names for the resources are "2001:db8::2/3311/0/5850", etc.

   The CoAP [RFC7252] FETCH, PATCH, and iPATCH methods [RFC8132] enable
   accessing and updating parts of a resource or multiple resources with
   one request.

   This document defines two new media types, one using the JavaScript
   Object Notation (JSON) [RFC8259] and one using the Concise Binary
   Object Representation (CBOR) [RFC7049], which can be used with the
   CoAP FETCH, PATCH, and iPATCH methods for resources represented using
   the SenML data model (i.e., for both SenML and Sensor Streaming
   Measurement Lists (SenSML) data).  The rest of the document uses the
   term "(i)PATCH" when referring to both methods as the semantics of
   the new media types are the same for the CoAP PATCH and iPATCH
   methods.

2.  Terminology

   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 [RFC2119] [RFC8174] when, and only when, they appear in all
   capitals, as shown here.

   Readers should also be familiar with the terms and concepts discussed
   in [RFC8132] and [RFC8428].  The following additional terms are used
   in this document:

   Fetch Record:  One set of parameters that is used to match SenML
      Record(s).

   Fetch Pack:  One or more Fetch Records in an array structure.

   Patch Record:  One set of parameters similar to Fetch Record but also
      containing instructions on how to change existing SenML Pack(s).

   Patch Pack:  One or more Patch Records in an array structure.

   Target Record:  A Record in a SenML Pack that matches the selection
Show full document text