draft-ietf-core-interfaces-00.txt   draft-ietf-core-interfaces-01.txt 
CoRE Z. Shelby CoRE Z. Shelby
Internet-Draft Sensinode Internet-Draft ARM
Intended status: Informational M.V. Vial Intended status: Informational M. Vial
Expires: December 05, 2013 Schneider-Electric Expires: June 14, 2014 Schneider-Electric
June 03, 2013 December 11, 2013
CoRE Interfaces CoRE Interfaces
draft-ietf-core-interfaces-00 draft-ietf-core-interfaces-01
Abstract Abstract
This document defines well-known REST interface descriptions for This document defines well-known REST interface descriptions for
Batch, Sensor, Parameter and Actuator types for use in contrained web Batch, Sensor, Parameter and Actuator types for use in contrained web
servers using the CoRE Link Format. A short reference is provided servers using the CoRE Link Format. A short reference is provided
for each type that can be efficiently included in the interface for each type that can be efficiently included in the interface
description attribute of the CoRE Link Format. These descriptions description attribute of the CoRE Link Format. These descriptions
are intended to be for general use in resource designs or for are intended to be for general use in resource designs or for
inclusion in more specific interface profiles. In addition, this inclusion in more specific interface profiles. In addition, this
document defines the concepts of Function Set and Binding. The document defines the concepts of Function Set and Binding. The
former is the basis element to create RESTful profiles and the latter former is the basis element to create RESTful profiles and the latter
helps the configuration of links between resources located on one or helps the configuration of links between resources located on one or
more endpoints. more endpoints.
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 http://datatracker.ietf.org/drafts/current/. Drafts is at http://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 December 05, 2013. This Internet-Draft will expire on June 14, 2014.
Copyright Notice Copyright Notice
Copyright (c) 2013 IETF Trust and the persons identified as the Copyright (c) 2013 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
(http://trustee.ietf.org/license-info) in effect on the date of (http://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 . . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3
3. Function Set . . . . . . . . . . . . . . . . . . . . . . . . 4 3. Function Set . . . . . . . . . . . . . . . . . . . . . . . . . 4
3.1. Defining a Function Set . . . . . . . . . . . . . . . . . 4 3.1. Defining a Function Set . . . . . . . . . . . . . . . . . 4
3.1.1. Path template . . . . . . . . . . . . . . . . . . . . 4 3.1.1. Path template . . . . . . . . . . . . . . . . . . . . 5
3.1.2. Resource Type . . . . . . . . . . . . . . . . . . . . 5 3.1.2. Resource Type . . . . . . . . . . . . . . . . . . . . 5
3.1.3. Interface Description . . . . . . . . . . . . . . . . 5 3.1.3. Interface Description . . . . . . . . . . . . . . . . 5
3.1.4. Data type . . . . . . . . . . . . . . . . . . . . . . 5 3.1.4. Data type . . . . . . . . . . . . . . . . . . . . . . 6
3.2. Discovery . . . . . . . . . . . . . . . . . . . . . . . . 6 3.2. Discovery . . . . . . . . . . . . . . . . . . . . . . . . 6
3.3. Versioning . . . . . . . . . . . . . . . . . . . . . . . 6 3.3. Versioning . . . . . . . . . . . . . . . . . . . . . . . . 6
4. Bindings . . . . . . . . . . . . . . . . . . . . . . . . . . 6 4. Bindings . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
4.1. Format . . . . . . . . . . . . . . . . . . . . . . . . . 7 4.1. Format . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4.2. Binding methods . . . . . . . . . . . . . . . . . . . . . 8 4.2. Binding methods . . . . . . . . . . . . . . . . . . . . . 8
4.3. Binding table . . . . . . . . . . . . . . . . . . . . . . 9 4.3. Binding table . . . . . . . . . . . . . . . . . . . . . . 9
5. Interface Descriptions . . . . . . . . . . . . . . . . . . . 9 5. Interface Descriptions . . . . . . . . . . . . . . . . . . . . 10
5.1. Link List . . . . . . . . . . . . . . . . . . . . . . . . 10 5.1. Link List . . . . . . . . . . . . . . . . . . . . . . . . 11
5.2. Batch . . . . . . . . . . . . . . . . . . . . . . . . . . 11 5.2. Batch . . . . . . . . . . . . . . . . . . . . . . . . . . 11
5.3. Linked Batch . . . . . . . . . . . . . . . . . . . . . . 11 5.3. Linked Batch . . . . . . . . . . . . . . . . . . . . . . . 12
5.4. Sensor . . . . . . . . . . . . . . . . . . . . . . . . . 13 5.4. Sensor . . . . . . . . . . . . . . . . . . . . . . . . . . 13
5.5. Parameter . . . . . . . . . . . . . . . . . . . . . . . . 13 5.5. Parameter . . . . . . . . . . . . . . . . . . . . . . . . 14
5.6. Read-only Parameter . . . . . . . . . . . . . . . . . . . 14 5.6. Read-only Parameter . . . . . . . . . . . . . . . . . . . 14
5.7. Actuator . . . . . . . . . . . . . . . . . . . . . . . . 14 5.7. Actuator . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.8. Binding . . . . . . . . . . . . . . . . . . . . . . . . . 15 5.8. Binding . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.9. Resource Observation Attributes . . . . . . . . . . . . . 15 5.9. Resource Observation Attributes . . . . . . . . . . . . . 16
5.10. Future Interfaces . . . . . . . . . . . . . . . . . . . . 18 5.10. Future Interfaces . . . . . . . . . . . . . . . . . . . . 18
5.11. WADL Description . . . . . . . . . . . . . . . . . . . . 18 5.11. WADL Description . . . . . . . . . . . . . . . . . . . . . 18
6. Security Considerations . . . . . . . . . . . . . . . . . . . 22 6. Security Considerations . . . . . . . . . . . . . . . . . . . 22
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 22 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 22
8. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 22 8. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 22
9. Changelog . . . . . . . . . . . . . . . . . . . . . . . . . . 22 9. Changelog . . . . . . . . . . . . . . . . . . . . . . . . . . 22
10. References . . . . . . . . . . . . . . . . . . . . . . . . . 23 10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 23
10.1. Normative References . . . . . . . . . . . . . . . . . . 23 10.1. Normative References . . . . . . . . . . . . . . . . . . . 23
10.2. Informative References . . . . . . . . . . . . . . . . . 23 10.2. Informative References . . . . . . . . . . . . . . . . . . 23
Appendix A. Profile example . . . . . . . . . . . . . . . . . . 23 Appendix A. Profile example . . . . . . . . . . . . . . . . . . . 24
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 25 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 25
1. Introduction 1. Introduction
The Constrained RESTful Environments (CoRE) working group aims at The Constrained RESTful Environments (CoRE) working group aims at
realizing the REST architecture in a suitable form for the most realizing the REST architecture in a suitable form for the most
constrained nodes (e.g. 8-bit microcontrollers with limited RAM and constrained nodes (e.g. 8-bit microcontrollers with limited RAM and
ROM) and networks (e.g. 6LoWPAN). CoRE is aimed at machine-to- ROM) and networks (e.g. 6LoWPAN). CoRE is aimed at machine-to-
machine (M2M) applications such as smart energy and building machine (M2M) applications such as smart energy and building
automation. automation.
The discovery of resources offered by a constrained server is very The discovery of resources offered by a constrained server is very
important in machine-to-machine applications where there are no important in machine-to-machine applications where there are no
humans in the loop and static interfaces result in fragility. The humans in the loop and static interfaces result in fragility. The
discovery of resources provided by an HTTP Web Server is typically discovery of resources provided by an HTTP Web Server is typically
called Web Linking [RFC5988]. The use of Web Linking for the called Web Linking [RFC5988]. The use of Web Linking for the
description and discovery of resources hosted by constrained web description and discovery of resources hosted by constrained web
servers is specified by the CoRE Link Format servers is specified by the CoRE Link Format
skipping to change at page 4, line 23 skipping to change at page 4, line 29
resources being hosted on a web server. resources being hosted on a web server.
Gradual Reveal: A REST design where resources are discovered Gradual Reveal: A REST design where resources are discovered
progressively using Web Linking. progressively using Web Linking.
Binding: A unidirectional logical link between a source resource and Binding: A unidirectional logical link between a source resource and
a destination resource. a destination resource.
3. Function Set 3. Function Set
This section defines how a specification can organize REST resources This section defines how a set of REST resources can be created
to create a new profile. A profile is structured into groups of called a function set. A Function Set is similar to a function block
resource types called Function Sets. A Function Set is similar to a in the sense that it consists of input, output and parameter
function block in the sense that it consists of input, output and resources and contains internal logic. A Function Set can have a
parameter resources and contains internal logic. A Function Set MAY subset of mandatory inputs, outputs and parameters to provide minimum
have a subset of mandatory inputs, outputs and parameters to provide interoperability. It can also be extended with manufacturer/
minimum interoperability. It MAY also be extended with manufacturer/ user-specific resources. A device is composed of one or more
user-specific resources. Other specifications defines the list of Function Set instances.
function sets available within a given profile. A device is composed
of one or more Function Set instances. A profile specification MAY An example of function sets can be found from the CoRE Resource
specify device profiles with mandatory function sets. Directory specification that defines REST interfaces for
registration, group and lookup [I-D.ietf-core-resource-directory].
The OMA Lightweight M2M standard [REF] also defines a function set
structure called an Objects that use integer path, instance and
resource URI segments. OMA Objects can be defined and then
registered with an OMA maintained registry [REF]. This section is
simply meant as a guideline for the definition of other such REST
interfaces, either custom or part of other specifications.
3.1. Defining a Function Set 3.1. Defining a Function Set
In a Function Set, types of resources are defined. Each type In a Function Set, types of resources are defined. Each type
includes a human readable name, a path template, a Resource Type for includes a human readable name, a path template, a Resource Type for
discovery, the Interface Definition and the data type and allowed discovery, the Interface Definition and the data type and allowed
values. A Function Set definition may also include a field values. A Function Set definition may also include a field
indicating if a sub-resource is mandatory or optional. indicating if a sub-resource is mandatory or optional.
3.1.1. Path template 3.1.1. Path template
A Function Set is a container resource under which its sub-resources A Function Set is a container resource under which its sub-resources
are organized. The profile defines the path to each resource of a are organized. The profile defines the path to each resource of a
Function Set in a path template. The template can contain either Function Set in a path template. The template can contain either
relative paths or absolute paths depending on the profile needs. An relative paths or absolute paths depending on the profile needs. An
absolute Function Set SHOULD be located at its recommended root path absolute Function Set should be located at its recommended root path
on a web server, however it MAY be located under an alternative path on a web server, however it can be located under an alternative path
if necessary (for example multi-purpose devices, gateways etc.). A if necessary (for example multi-purpose devices, gateways etc.). A
relative Function Set can be instantiated as many times as needed on relative Function Set can be instantiated as many times as needed on
a web server with an arbitrary root path. However some Function Sets a web server with an arbitrary root path. However some Function Sets
(e.g. device description) only make sense as singletons. (e.g. device description) only make sense as singletons.
The path template includes a possible index {#} parameter, and The path template includes a possible index {#} parameter, and
possible fixed path segments. The index {#} allows for multiple possible fixed path segments. The index {#} allows for multiple
instances of this type of resource, and can be any string. The root instances of this type of resource, and can be any string. The root
path and the indexes are the only variable elements in a path path and the indexes are the only variable elements in a path
template. All other path segments MUST be fixed. template. All other path segments should be fixed.
3.1.2. Resource Type 3.1.2. Resource Type
Each root resource of a Function Set is assigned a Resource Type Each root resource of a Function Set is assigned a Resource Type
parameter, therefore making it possible to discover it. Each sub- parameter, therefore making it possible to discover it. Each sub-
resource of a Function Set is also assigned a Resource Type resource of a Function Set is also assigned a Resource Type
parameter. This Resource Type is used for resource discovery and is parameter. This Resource Type is used for resource discovery and is
usually necessary to discover optional resources supported on a usually necessary to discover optional resources supported on a
specific device. The Resource Type of a Function Set may also be specific device. The Resource Type of a Function Set may also be
used for service discovery and MAY be exported to DNS-SD used for service discovery and can be exported to DNS-SD
[I-D.cheshire-dnsext-dns-sd] for example. [I-D.cheshire-dnsext-dns-sd] for example.
The Resource Type parameter defines the value that MUST be included The Resource Type parameter defines the value that should be included
in the rt= field of the CoRE Link Format when describing a link to in the rt= field of the CoRE Link Format when describing a link to
this resource. The value SHOULD be in the form "namespace.type" for this resource. The value SHOULD be in the form "namespace.type" for
root resources and "namespace.type.subtype" for sub-resources. This root resources and "namespace.type.subtype" for sub-resources. This
naming convention facilitates resource type filtering with the / naming convention facilitates resource type filtering with the
.well-known/core resource. However a profile MAY allow mixing in /.well-known/core resource. However a profile could allow mixing in
foreign namespace references within a Function Set to import external foreign namespace references within a Function Set to import external
references from other object models (e.g. SenML and UCUM). references from other object models (e.g. SenML and UCUM).
3.1.3. Interface Description 3.1.3. Interface Description
The Interface Description parameter defines the REST interface for The Interface Description parameter defines the REST interface for
that type of resource. Several base interfaces are defined in that type of resource. Several base interfaces are defined in
Section 5 of this document. For a given profile, the Interface Section 5 of this document. For a given profile, the Interface
Description may be inferred from the Resource Type. In that case the Description may be inferred from the Resource Type. In that case the
Interface Description MAY be elided from link descriptions of Interface Description MAY be elided from link descriptions of
resource types defined in the profile, but SHOULD be included for resource types defined in the profile, but should be included for
custom extensions to the profile. custom extensions to the profile.
The root resource of a Function Set should provide a list of links to The root resource of a Function Set should provide a list of links to
its sub-resources in order to offer gradual reveal of resources. The its sub-resources in order to offer gradual reveal of resources. The
CoRE Link List interface defined in Section 5.1 offers this CoRE Link List interface defined in Section 5.1 offers this
functionality so a root resource SHOULD support this interface or a functionality so a root resource should support this interface or a
derived interface like CoRE Batch (See Section 5.2). derived interface like CoRE Batch (See Section 5.2).
3.1.4. Data type 3.1.4. Data type
The Data Type field defines the type of value (and possible range) The Data Type field defines the type of value (and possible range)
that is returned in response to a GET for that resource or accepted that is returned in response to a GET for that resource or accepted
with a PUT. The interfaces defined in Section 5 make use of plain with a PUT. The interfaces defined in Section 5 make use of plain
text and SenML Media types for the actual format of this data. A text and SenML Media types for the actual format of this data. A
profile may restrict the list of supported content types for the CoRE profile may restrict the list of supported content types for the CoRE
interfaces or define new interfaces with new content types. interfaces or define new interfaces with new content types.
3.2. Discovery 3.2. Discovery
A device conforming to a profile SHOULD make its resources A device conforming to a profile SHOULD make its resources
skipping to change at page 6, line 17 skipping to change at page 6, line 30
text and SenML Media types for the actual format of this data. A text and SenML Media types for the actual format of this data. A
profile may restrict the list of supported content types for the CoRE profile may restrict the list of supported content types for the CoRE
interfaces or define new interfaces with new content types. interfaces or define new interfaces with new content types.
3.2. Discovery 3.2. Discovery
A device conforming to a profile SHOULD make its resources A device conforming to a profile SHOULD make its resources
discoverable by providing links to the resources on the path /.well- discoverable by providing links to the resources on the path /.well-
known/core as defined in [I-D.ietf-core-link-format]. All resources known/core as defined in [I-D.ietf-core-link-format]. All resources
hosted on a device SHOULD be discoverable either with a direct link hosted on a device SHOULD be discoverable either with a direct link
in /.well-known/core or by following successive links starting from / in /.well-known/core or by following successive links starting from
.well-known/core. /.well-known/core.
The root path of a Function Set instance SHOULD be directly The root path of a Function Set instance SHOULD be directly
referenced in /.well-known/core in order to offer discovery at the referenced in /.well-known/core in order to offer discovery at the
first discovery stage. A device with more than 10 individual first discovery stage. A device with more than 10 individual
resources SHOULD only expose Function Set instances in /.well-known/ resources SHOULD only expose Function Set instances in /.well-known/
core to limit the size of this resource. core to limit the size of this resource.
In addition, a device MAY register its resources to a Resource In addition, a device MAY register its resources to a Resource
Directory using the registration interface defined in Directory using the registration interface defined in
[I-D.shelby-core-resource-directory] if such a directory is [I-D.ietf-core-resource-directory] if such a directory is available.
available.
3.3. Versioning 3.3. Versioning
A profile should track Function Set changes to avoid incompatibility A profile should track Function Set changes to avoid incompatibility
issues. Evolutions in a Function Set SHOULD be backward compatible. issues. Evolutions in a Function Set SHOULD be backward compatible.
4. Bindings 4. Bindings
In a M2M RESTful environment, endpoints exchange the content of their In a M2M RESTful environment, endpoints exchange the content of their
resources to operate the distributed system. Beforehand, a resources to operate the distributed system. Beforehand, a
skipping to change at page 10, line 5 skipping to change at page 10, line 28
link, the resource MUST support the corresponding REST interface link, the resource MUST support the corresponding REST interface
described in this section. The resource MAY support additional described in this section. The resource MAY support additional
functionality, which is out of scope for this specification. functionality, which is out of scope for this specification.
Although these interface descriptions are intended to be used with Although these interface descriptions are intended to be used with
the CoRE Link Format, they are applicable for use in any REST the CoRE Link Format, they are applicable for use in any REST
interface definition. interface definition.
The Methods column defines the methods supported by that interface, The Methods column defines the methods supported by that interface,
which are described in more detail below. which are described in more detail below.
+-------------------+---------------+-------------------------------+ +-------------------+----------+------------------------------------+
| Interface | if= | Methods | | Interface | if= | Methods |
+-------------------+---------------+-------------------------------+ +-------------------+----------+------------------------------------+
| Link List | core.ll | GET | | Link List | core.ll | GET |
| Batch | core.b | GET, PUT, POST (where | | Batch | core.b | GET, PUT, POST (where applicable) |
| | | applicable) | | Linked Batch | core.lb | GET, PUT, POST, DELETE (where |
| Linked Batch | core.lb | GET, PUT, POST, DELETE (where | | | | applicable) |
| | | applicable) | | Sensor | core.s | GET |
| Sensor | core.s | GET | | Parameter | core.p | GET, PUT |
| Parameter | core.p | GET, PUT | | Read-only | core.rp | GET |
| Read-only | core.rp | GET | | Parameter | | |
| Parameter | | | | Actuator | core.a | GET, PUT, POST |
| Actuator | core.a | GET, PUT, POST | | Binding | core.bnd | GET, POST, DELETE |
| Binding | core.bnd | GET, POST, DELETE | +-------------------+----------+------------------------------------+
+-------------------+---------------+-------------------------------+
The following is an example of links in the CoRE Link Format using The following is an example of links in the CoRE Link Format using
these interface descriptions. The resource hierarchy is based on a these interface descriptions. The resource hierarchy is based on a
simple profile defined in Appendix A. These links are used in the simple profile defined in Appendix A. These links are used in the
subsequent examples below. subsequent examples below.
Req: GET /.well-known/core Req: GET /.well-known/core
Res: 2.05 Content (application/link-format) Res: 2.05 Content (application/link-format)
</s>;rt="simple.sen";if="core.b", </s>;rt="simple.sen";if="core.b",
</s/lt>;rt="simple.sen.lt";if="core.s", </s/lt>;rt="simple.sen.lt";if="core.s",
skipping to change at page 12, line 4 skipping to change at page 12, line 24
Req: GET /s Req: GET /s
Res: 2.05 Content (application/senml+json) Res: 2.05 Content (application/senml+json)
{"e":[ {"e":[
{ "n": "light", "v": 123, "u": "lx" }, { "n": "light", "v": 123, "u": "lx" },
{ "n": "temp", "v": 27.2, "u": "degC" }, { "n": "temp", "v": 27.2, "u": "degC" },
{ "n": "humidity", "v": 80, "u": "%RH" }], { "n": "humidity", "v": 80, "u": "%RH" }],
} }
5.3. Linked Batch 5.3. Linked Batch
The Linked Batch interface is an extension of the Batch interface. The Linked Batch interface is an extension of the Batch interface.
Contrary to the basic Batch which is a collection statically defined Contrary to the basic Batch which is a collection statically defined
by the web server, a Linked Batch is dynamically controlled by a web by the web server, a Linked Batch is dynamically controlled by a web
client. A Linked Batch resource has no sub-resources. Instead the client. A Linked Batch resource has no sub-resources. Instead the
resources forming the batch are referenced using Web Linking resources forming the batch are referenced using Web Linking
[RFC5988] and the CoRE Link Format [I-D.ietf-core-link-format]. A [RFC5988] and the CoRE Link Format [I-D.ietf-core-link-format]. A
request with a POST method and a content type of application/link- request with a POST method and a content type of application/
format simply appends new resources to the collection. The links in link-format simply appends new resources to the collection. The
the payload MUST reference a resource on the web server with an links in the payload MUST reference a resource on the web server with
absolute path. A DELETE request empties the current collection of an absolute path. A DELETE request empties the current collection of
links. All other requests available for a basic Batch are still links. All other requests available for a basic Batch are still
valid for a Linked Batch. valid for a Linked Batch.
The following example interacts with a Linked Batch /l and creates a The following example interacts with a Linked Batch /l and creates a
collection containing /s/light, /s/temp and /s/humidity in 2 steps. collection containing /s/light, /s/temp and /s/humidity in 2 steps.
Req: POST /l (Content-type: application/link-format) Req: POST /l (Content-type: application/link-format)
</s/light>,</s/temp> </s/light>,</s/temp>
Res: 2.04 Changed Res: 2.04 Changed
skipping to change at page 15, line 23 skipping to change at page 15, line 40
Req: POST /a/1/led (text/plain) Req: POST /a/1/led (text/plain)
Res: 2.04 Changed Res: 2.04 Changed
Req: GET /a/1/led Req: GET /a/1/led
Res: 2.05 Content (text/plain) Res: 2.05 Content (text/plain)
0 0
5.8. Binding 5.8. Binding
The Binding interface is used to manipulate a binding table. A The Binding interface is used to manipulate a binding table. A
request with a POST method and a content type of application/link- request with a POST method and a content type of application/
format simply appends new bindings to the table. All links in the link-format simply appends new bindings to the table. All links in
payload MUST have a relation type "boundTo". A GET request simply the payload MUST have a relation type "boundTo". A GET request
returns the current state of a binding table whereas a DELETE request simply returns the current state of a binding table whereas a DELETE
empties the table. request empties the table.
The following example shows requests for adding, retrieving and The following example shows requests for adding, retrieving and
deleting bindings in a binding table. deleting bindings in a binding table.
Req: POST /bnd (Content-type: application/link-format) Req: POST /bnd (Content-type: application/link-format)
<coap://sensor.example.com/s/light>; <coap://sensor.example.com/s/light>;
rel="boundto";anchor="/a/light";bind="obs";pmin="10";pmax="60" rel="boundto";anchor="/a/light";bind="obs";pmin="10";pmax="60"
Res: 2.04 Changed Res: 2.04 Changed
Req: GET /bnd Req: GET /bnd
skipping to change at page 22, line 34 skipping to change at page 22, line 38
Acknowledgement is given to colleagues from the SENSEI project who Acknowledgement is given to colleagues from the SENSEI project who
were critical in the initial development of the well-known REST were critical in the initial development of the well-known REST
interface concept, to members of the IPSO Alliance where further interface concept, to members of the IPSO Alliance where further
requirements for interface types have been discussed, and to Szymon requirements for interface types have been discussed, and to Szymon
Sasin, Cedric Chauvenet, Daniel Gavelle and Carsten Bormann who have Sasin, Cedric Chauvenet, Daniel Gavelle and Carsten Bormann who have
provided useful discussion and input to the concepts in this provided useful discussion and input to the concepts in this
document. document.
9. Changelog 9. Changelog
Changes from -00 to WG Document -01
o Improvements to the Function Set section.
Changes from -05 to WG Document -00 Changes from -05 to WG Document -00
o Updated the date and version. o Updated the date and version.
Changes from -04 to -05 Changes from -04 to -05
o Made the Observation control parameters to be treated as resources o Made the Observation control parameters to be treated as resources
rather than Observe query parameters. Added Less Than and Greater rather than Observe query parameters. Added Less Than and Greater
Than parameters. Than parameters.
Changes from -03 to -04 Changes from -03 to -04
o Draft refresh o Draft refresh
Changes from -02 to -03 Changes from -02 to -03
skipping to change at page 23, line 21 skipping to change at page 23, line 35
o Improved the WADL interface definition. o Improved the WADL interface definition.
o Added a simple profile example. o Added a simple profile example.
10. References 10. References
10.1. Normative References 10.1. Normative References
[I-D.ietf-core-link-format] [I-D.ietf-core-link-format]
Shelby, Z., "CoRE Link Format", draft-ietf-core-link- Shelby, Z., "CoRE Link Format",
format-14 (work in progress), June 2012. draft-ietf-core-link-format-14 (work in progress),
June 2012.
[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, March 1997. Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC5988] Nottingham, M., "Web Linking", RFC 5988, October 2010. [RFC5988] Nottingham, M., "Web Linking", RFC 5988, October 2010.
10.2. Informative References 10.2. Informative References
[I-D.cheshire-dnsext-dns-sd] [I-D.cheshire-dnsext-dns-sd]
Cheshire, S. and M. Krochmal, "DNS-Based Service Cheshire, S. and M. Krochmal, "DNS-Based Service
Discovery", draft-cheshire-dnsext-dns-sd-11 (work in Discovery", draft-cheshire-dnsext-dns-sd-11 (work in
progress), December 2011. progress), December 2011.
[I-D.ietf-core-coap] [I-D.ietf-core-coap]
Shelby, Z., Hartke, K., and C. Bormann, "Constrained Shelby, Z., Hartke, K., and C. Bormann, "Constrained
Application Protocol (CoAP)", draft-ietf-core-coap-14 Application Protocol (CoAP)", draft-ietf-core-coap-18
(work in progress), March 2013. (work in progress), June 2013.
[I-D.ietf-core-observe] [I-D.ietf-core-observe]
Hartke, K., "Observing Resources in CoAP", draft-ietf- Hartke, K., "Observing Resources in CoAP",
core-observe-08 (work in progress), February 2013. draft-ietf-core-observe-11 (work in progress),
October 2013.
[I-D.shelby-core-resource-directory] [I-D.ietf-core-resource-directory]
Shelby, Z., Krco, S., and C. Bormann, "CoRE Resource Shelby, Z., Krco, S., and C. Bormann, "CoRE Resource
Directory", draft-shelby-core-resource-directory-05 (work Directory", draft-ietf-core-resource-directory-00 (work in
in progress), February 2013. progress), June 2013.
Appendix A. Profile example Appendix A. Profile example
The following is a short definition of simple profile. This The following is a short definition of simple profile. This
simplistic profile is for use in the examples of this document. simplistic profile is for use in the examples of this document.
+--------------------+-----------+------------+---------+ +--------------------+-----------+------------+---------+
| Function Set | Root Path | RT | IF | | Function Set | Root Path | RT | IF |
+--------------------+-----------+------------+---------+ +--------------------+-----------+------------+---------+
| Device Description | /d | simple.dev | core.ll | | Device Description | /d | simple.dev | core.ll |
| Sensors | /s | simple.sen | core.b | | Sensors | /s | simple.sen | core.b |
| Actuators | /a | simple.act | core.b | | Actuators | /a | simple.act | core.b |
+--------------------+-----------+------------+---------+ +--------------------+-----------+------------+---------+
skipping to change at page 25, line 8 skipping to change at page 25, line 21
| Type | Path | RT | IF | Data Type | | Type | Path | RT | IF | Data Type |
+------+------------+----------------+--------+-------------+ +------+------------+----------------+--------+-------------+
| LED | /a/{#}/led | simple.act.led | core.a | xsd:boolean | | LED | /a/{#}/led | simple.act.led | core.a | xsd:boolean |
+------+------------+----------------+--------+-------------+ +------+------------+----------------+--------+-------------+
Actuators Function Set Actuators Function Set
Authors' Addresses Authors' Addresses
Zach Shelby Zach Shelby
Sensinode ARM
Kidekuja 2 150 Rose Orchard
Vuokatti 88600 San Jose 95134
FINLAND FINLAND
Phone: +358407796297 Phone: +1-408-203-9434
Email: zach@sensinode.com Email: zach.shelby@arm.com
Matthieu Vial Matthieu Vial
Schneider-Electric Schneider-Electric
Grenoble Grenoble,
FRANCE FRANCE
Phone: +33 (0)47657 6522 Phone: +33 (0)47657 6522
Email: matthieu.vial@schneider-electric.com Email: matthieu.vial@schneider-electric.com
 End of changes. 34 change blocks. 
109 lines changed or deleted 123 lines changed or added

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