draft-ietf-core-senml-etch-00.txt   draft-ietf-core-senml-etch-01.txt 
Network Working Group A. Keranen Network Working Group A. Keranen
Internet-Draft Ericsson Internet-Draft Ericsson
Intended status: Standards Track M. Mohajer Intended status: Standards Track M. Mohajer
Expires: April 25, 2019 u-blox UK Expires: August 16, 2019 u-blox UK
October 22, 2018 February 12, 2019
FETCH & PATCH with Sensor Measurement Lists (SenML) FETCH & PATCH with Sensor Measurement Lists (SenML)
draft-ietf-core-senml-etch-00 draft-ietf-core-senml-etch-01
Abstract Abstract
The Sensor Measurement Lists (SenML) media type and data model can be The Sensor Measurement Lists (SenML) media type and data model can be
used to send collections of resources, such as batches of sensor data used to send collections of resources, such as batches of sensor data
or configuration parameters. The CoAP iPATCH, PATCH, and FETCH or configuration parameters. The CoAP iPATCH, PATCH, and FETCH
methods enable accessing and updating parts of a resource or multiple methods enable accessing and updating parts of a resource or multiple
resources with one request. This document defines semantics for the resources with one request. This document defines new media types
CoAP iPATCH, and FETCH methods for resources represented with the for the CoAP iPATCH, and FETCH methods for resources represented with
SenML data model. the SenML data model.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on April 25, 2019. This Internet-Draft will expire on August 16, 2019.
Copyright Notice Copyright Notice
Copyright (c) 2018 IETF Trust and the persons identified as the Copyright (c) 2019 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3
3. Using FETCH and iPATCH with SenML . . . . . . . . . . . . . . 3 3. Using FETCH and iPATCH with SenML . . . . . . . . . . . . . . 3
3.1. SenML FETCH . . . . . . . . . . . . . . . . . . . . . . . 3 3.1. SenML FETCH . . . . . . . . . . . . . . . . . . . . . . . 3
3.2. SenML iPATCH . . . . . . . . . . . . . . . . . . . . . . 4 3.2. SenML iPATCH . . . . . . . . . . . . . . . . . . . . . . 4
4. Security Considerations . . . . . . . . . . . . . . . . . . . 5 4. Security Considerations . . . . . . . . . . . . . . . . . . . 5
5. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 5 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5
6. References . . . . . . . . . . . . . . . . . . . . . . . . . 5 5.1. CoAP Content-Format Registration . . . . . . . . . . . . 5
6.1. Normative References . . . . . . . . . . . . . . . . . . 5 5.2. senml-etch+json Media Type . . . . . . . . . . . . . . . 6
6.2. Informative References . . . . . . . . . . . . . . . . . 6 5.3. senml-etch+cbor Media Type . . . . . . . . . . . . . . . 7
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 6 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 8
7. References . . . . . . . . . . . . . . . . . . . . . . . . . 8
7.1. Normative References . . . . . . . . . . . . . . . . . . 8
7.2. Informative References . . . . . . . . . . . . . . . . . 9
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 9
1. Introduction 1. Introduction
The Sensor Measurement Lists (SenML) media type {{RFC8428} and data The Sensor Measurement Lists (SenML) media type {{RFC8428} and data
model can be used to transmit collections of resources, such as model can be used to transmit collections of resources, such as
batches of sensor data or configuration parameters. batches of sensor data or configuration parameters.
Example of a SenML collection is shown below: Example of a SenML collection is shown below:
[ [
skipping to change at page 2, line 46 skipping to change at page 2, line 50
Here three resources "3306/0/5850", "3306/0/5851", and "3306/0/5750", Here three resources "3306/0/5850", "3306/0/5851", and "3306/0/5750",
of an IPSO dimmable light smart object [IPSO] are represented using a of an IPSO dimmable light smart object [IPSO] are represented using a
single SenML Pack with three SenML Records. All resources share the single SenML Pack with three SenML Records. All resources share the
same base name "2001:db8::2/3306/0/", hence full names for resources same base name "2001:db8::2/3306/0/", hence full names for resources
are "2001:db8::2/3306/0/5850", etc. are "2001:db8::2/3306/0/5850", etc.
The CoAP [RFC7252] iPATCH and FETCH methods [RFC8132] enable The CoAP [RFC7252] iPATCH and FETCH methods [RFC8132] enable
accessing and updating parts of a resource or multiple resources with accessing and updating parts of a resource or multiple resources with
one request. one request.
This document defines semantics for the CoAP iPATCH and FETCH methods This document defines two new media types, one using the JavaScript
for resources represented with the SenML data model. Same semantics Object Notation (JSON) [RFC8259] and one using the Concise Binary
apply also for the CoAP PATCH method. Object Representation (CBOR) [RFC7049], that can be used with the
CoAP iPATCH, PATCH, and FETCH methods for resources represented with
the SenML data model. The semantics of the new media types are the
same for the CoAP PATCH and iPATCH methods.
2. Terminology 2. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in BCP "OPTIONAL" in this document are to be interpreted as described in BCP
14 [RFC2119] [RFC8174] when, and only when, they appear in all 14 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here. capitals, as shown here.
Readers should also be familiar with the terms and concepts discussed Readers should also be familiar with the terms and concepts discussed
in [RFC8132] and [RFC8428]. Also the following terms are used in in [RFC8132] and [RFC8428]. Also the following terms are used in
this document: this document:
Fetch Record: One set of parameters that is used to match SenML Fetch Record: One set of parameters that is used to match SenML
Record(s). Record(s).
Fetch Pack: One or more Fetch Records in an array structure. Fetch Pack: One or more Fetch Records in an array structure.
Presented using the SenML media type.
Patch Record: One set of parameters similar to Fetch Record but also Patch Record: One set of parameters similar to Fetch Record but also
containing instructions on how to change existing SenML Pack(s). containing instructions on how to change existing SenML Pack(s).
Patch Pack: One or more Patch Records in an array structure. Patch Pack: One or more Patch Records in an array structure.
Target Record: A Record in a SenML Pack that is matching the Target Record: A Record in a SenML Pack that is matching the
selection criteria of a Fetch or Patch Record and hence is a selection criteria of a Fetch or Patch Record and hence is a
target for a Fetch or Patch operation. target for a Fetch or Patch operation.
3. Using FETCH and iPATCH with SenML 3. Using FETCH and iPATCH with SenML
The FETCH and iPATCH methods use the same SenML media type to enable The FETCH/iPATCH media types for SenML are modeled as extensions to
re-use of existing SenML parsers and generators, in particular on the SenML media type to enable re-use of existing SenML parsers and
constrained devices. generators, in particular on constrained devices. Unless mentioned
otherwise, FETCH and PATCH Packs are constructed with the same rules
NOTE: it is currently under consideration whether new media types and constraints as SenML Packs. The only difference to SenML media
should be registered for FETCH/iPATCH instead of re-using the SenML type is allowing the use of "null" value for removing records with
media types. the iPATCH method.
3.1. SenML FETCH 3.1. SenML FETCH
The FETCH method can be used to select and return parts of one or The FETCH method can be used to select and return parts of one or
more SenML Packs. The SenML Records are selected by giving the more SenML Packs. The SenML Records are selected by giving the
name(s) of the resources using the SenML "name" and/or "base name" name(s) of the resources using the SenML "name" and/or "base name"
Fields. Fields.
For example, to select resources "5850" and "5851" from the example For example, to select resources "5850" and "5851" from the example
in Section 1, the following Fetch Pack can be used: in Section 1, the following Fetch Pack can be used:
skipping to change at page 5, line 33 skipping to change at page 5, line 37
In FETCH and iPATCH requests, the client can pass arbitrary names to In FETCH and iPATCH requests, the client can pass arbitrary names to
the target resource for manipulation. The resource implementer must the target resource for manipulation. The resource implementer must
take care to only allow access to names that are actually part of (or take care to only allow access to names that are actually part of (or
accessible through) the target resource. accessible through) the target resource.
If the client is not allowed to do a GET or PUT on the full target If the client is not allowed to do a GET or PUT on the full target
resource (and thus all the names accessible through it), access resource (and thus all the names accessible through it), access
control rules must be evaluated for each record in the pack. control rules must be evaluated for each record in the pack.
5. Acknowledgements 5. IANA Considerations
This document registers two new media types and CoAP Content-Format
IDs for both media types.
Note to RFC Editor: Please replace all occurrences of "RFC-AAAA" with
the RFC number of this document.
5.1. CoAP Content-Format Registration
IANA is requested to assign CoAP Content-Format IDs for the SenML
PATCH and FETCH media types in the "CoAP Content-Formats" sub-
registry, within the "CoRE Parameters" registry [RFC7252]. All IDs
are assigned from the "Expert Review" (0-255) range. The assigned
IDs are show in Table 1.
+-----------------------------+-----+
| Media type | ID |
+-----------------------------+-----+
| application/senml-etch+json | TBD |
| | |
| application/senml-etch+cbor | TBD |
+-----------------------------+-----+
Table 1: CoAP Content-Format IDs
5.2. senml-etch+json Media Type
Type name: application
Subtype name: senml-etch+json
Required parameters: none
Optional parameters: none
Encoding considerations: Must be encoded as using a subset of the
encoding allowed in [RFC8259]. See RFC-AAAA for details. This
simplifies implementation of very simple system and does not impose
any significant limitations as all this data is meant for machine to
machine communications and is not meant to be human readable.
Security considerations: See Section 4 of RFC-AAAA.
Interoperability considerations: Applications MUST ignore any key
value pairs that they do not understand unless the key ends with the
'_' character in which case an error MUST be generated. This allows
backwards compatible extensions to this specification.
Published specification: RFC-AAAA
Applications that use this media type: Applications that use the
SenML media type for resource representation.
Fragment identifier considerations: N/A
Additional information:
Magic number(s): none
File extension(s): senml-etchj
Windows Clipboard Name: "SenML FETCH/PATCH format"
Macintosh file type code(s): none
Macintosh Universal Type Identifier code: org.ietf.senml-etch-json
conforms to public.text
Person & email address to contact for further information: Ari
Keranen ari.keranen@ericsson.com
Intended usage: COMMON
Restrictions on usage: None
Author: Ari Keranen ari.keranen@ericsson.com
Change controller: IESG
5.3. senml-etch+cbor Media Type
Type name: application
Subtype name: senml-etch+cbor
Required parameters: none
Optional parameters: none
Encoding considerations: Must be encoded as using [RFC7049]. See
RFC-AAAA for details.
Security considerations: See Section 4 of RFC-AAAA.
Interoperability considerations: Applications MUST ignore any key
value pairs that they do not understand unless the key ends with the
'_' character in which case an error MUST be generated. This allows
backwards compatible extensions to this specification.
Published specification: RFC-AAAA
Applications that use this media type: Applications that use the
SenML media type for resource representation.
Fragment identifier considerations: N/A
Additional information:
Magic number(s): none
File extension(s): senml-etchc
Macintosh file type code(s): none
Macintosh Universal Type Identifier code: org.ietf.senml-etch-cbor
conforms to public.data
Person & email address to contact for further information: Ari
Keranen ari.keranen@ericsson.com
Intended usage: COMMON
Restrictions on usage: None
Author: Ari Keranen ari.keranen@ericsson.com
Change controller: IESG
6. Acknowledgements
The use of FETCH and iPATCH methods with SenML was first introduced The use of FETCH and iPATCH methods with SenML was first introduced
by the OMA SpecWorks LwM2M v1.1 specification. This document by the OMA SpecWorks LwM2M v1.1 specification. This document
generalizes the use to any SenML representation. The authors would generalizes the use to any SenML representation. The authors would
like to thank Carsten Bormann, Christian Amsuess, Jaime Jimenez, like to thank Carsten Bormann, Christian Amsuess, Jaime Jimenez,
Klaus Hartke, and also everyone in the IETF CoRE and OMA SpecWorks Klaus Hartke, and also everyone in the IETF CoRE and OMA SpecWorks
DMSE working groups for their contributions and reviews. DMSE working groups for their contributions and reviews.
6. References 7. References
6.1. Normative References 7.1. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>. <https://www.rfc-editor.org/info/rfc2119>.
[RFC7049] Bormann, C. and P. Hoffman, "Concise Binary Object
Representation (CBOR)", RFC 7049, DOI 10.17487/RFC7049,
October 2013, <https://www.rfc-editor.org/info/rfc7049>.
[RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained [RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained
Application Protocol (CoAP)", RFC 7252, Application Protocol (CoAP)", RFC 7252,
DOI 10.17487/RFC7252, June 2014, DOI 10.17487/RFC7252, June 2014,
<https://www.rfc-editor.org/info/rfc7252>. <https://www.rfc-editor.org/info/rfc7252>.
[RFC8132] van der Stok, P., Bormann, C., and A. Sehgal, "PATCH and [RFC8132] van der Stok, P., Bormann, C., and A. Sehgal, "PATCH and
FETCH Methods for the Constrained Application Protocol FETCH Methods for the Constrained Application Protocol
(CoAP)", RFC 8132, DOI 10.17487/RFC8132, April 2017, (CoAP)", RFC 8132, DOI 10.17487/RFC8132, April 2017,
<https://www.rfc-editor.org/info/rfc8132>. <https://www.rfc-editor.org/info/rfc8132>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>. May 2017, <https://www.rfc-editor.org/info/rfc8174>.
[RFC8259] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data
Interchange Format", STD 90, RFC 8259,
DOI 10.17487/RFC8259, December 2017,
<https://www.rfc-editor.org/info/rfc8259>.
[RFC8428] Jennings, C., Shelby, Z., Arkko, J., Keranen, A., and C. [RFC8428] Jennings, C., Shelby, Z., Arkko, J., Keranen, A., and C.
Bormann, "Sensor Measurement Lists (SenML)", RFC 8428, Bormann, "Sensor Measurement Lists (SenML)", RFC 8428,
DOI 10.17487/RFC8428, August 2018, DOI 10.17487/RFC8428, August 2018,
<https://www.rfc-editor.org/info/rfc8428>. <https://www.rfc-editor.org/info/rfc8428>.
6.2. Informative References 7.2. Informative References
[IPSO] IPSO, "IP for Smart Objects - IPSO Objects", 2018, [IPSO] IPSO, "IPSO Smart Object Guidelines", 2018,
<https://github.com/IPSO-Alliance/pub>. <https://www.omaspecworks.org/develop-with-oma-specworks/
ipso-smart-objects/guidelines/>.
Authors' Addresses Authors' Addresses
Ari Keranen Ari Keranen
Ericsson Ericsson
Email: ari.keranen@ericsson.com Email: ari.keranen@ericsson.com
Mojan Mohajer Mojan Mohajer
u-blox UK u-blox UK
 End of changes. 16 change blocks. 
30 lines changed or deleted 173 lines changed or added

This html diff was produced by rfcdiff 1.47. The latest version is available from http://tools.ietf.org/tools/rfcdiff/