Media Types for Hypertext Sensor MarkupSmartThings1281 Lawrence Station RoadSunnyvale94089USA+1-707-502-5136michael.koster@smartthings.com
Internet
Thing-to-Thing Research GroupIoT, T2TRG, Web of Things, Hypermedia, Semantic Interoperability, HATEOAS, Web Linking, CoRE, Constrained Resources, REST, HyperlinksThe scale and scope of the worldwide web has been in part driven by the availability of HTML as a common serialization, data model, and interaction model for structured resources on the web. By contrast, the general use of appropriate hypermedia techniques for machine interfaces has been limited by the lack of a common markup format for serialization and exchange of structured machine resources and sensor/actuator data which includes or embeds standardized hypermedia controls. The IRTF Thing to Thing Research Group has a charter to investigate the use of REST design style for machine interactions. The W3C Web of Things Interest Group are investigating abstract hypermedia controls and interaction models for machines. Machine optimized content formats exist for web links and for data items .Structured data which contains both links and items is known as the collection pattern. This draft describes media types for representation of machine resources structured as collections. A simple, reusable data model is described with a representation format, using a well known set of keywords to expose hypermedia controls, which inform clients how to perform state transfer operations on resources. The underlying assumptions regarding transfer layer processing are specified in this document. The HSML media type described in this document is compatible with SenML and CoRE Link-format by reusing the keyword identifiers and element structures from these content formats. Representations of HSML document content may be obtained in CoRE Link-Format and SenML content formats.This is a broadly scoped document which specifies representation formats, data models, interaction models, transfer mapping, URI processing, and design pattern extensions including actions and monitors.The features listed above and new features may be specified and extended as needed in other documents which refer to this document.Use case requirements include the following.A standardized way to expose self-describing resource representations using embedded hyperlinks and link annotations.A standardized way of organizing and interacting with resource instances using hypermedia controls such as links and forms.A standardized encapsulation of resources for modeling things, capabilities, groups, indices, and other common structures.The HSML data model consists of collections containing links which point to items. An instance of a collection is a resource and is identified by a URI.Links are standard web links as in or . Items are identified by links in collections.Links in a collection may point to items within the context of the collection or they may point to items external to the collection, on the same server or on other servers.Items are data elements, either within the context the collection, or outide the context of the collection. An instance of an item is a resource and is identified by a URI.An Item may only be in the context of one collection, but may be identified by any number of links in any number of collections.Items in the collection that use an HSML compatible data model, for example SenML, see , may be embedded in the collection and transferred either along with the links or separately from links.JSON formatted examples are used in this document to illustrate normative and informative concepts. Representations in other formats may be derived from the JSON representations. For example, compact binary mappings may be defined using available models.Links follow the specifications in and with extensions to implement actions and monitors as described in this document and any referencing extension documents.HSML Links may be stored in Resource Directories for discovery using CoRE Resource Directory .Collections contain one or more links and extended links, and may contain data items referred to by the links. A representation of a collection may contain both links and data items, plus any extended links such as action forms.Link embedding enables the transfer of one or more items in a collection using a single transfer operation. This document describes two types of link embedding for items in the collection. Batch link embedding allows one or more resource instances (item) to each contribute part of an aggregate (collection) representation. Group link embedding allows a particular operation to be repeated for each member (item) of a group (collection).A collection of items enables operations on more than one item at a time by exposing a structured a representation of multiple resources in the collection.Applications may select resources by using URI parameters, and transfer representations of multiple named resources using the HSML or SenML multi-item formats.Resource links in the collection may specify group transfer semantics, where transfer operations are routed to each resource in the collection specified by a group link. Group responses are aggregated using a multi-item format which identifies each item by URI.The HSML media type assumes a transfer model capable of interacting with representations using a simple CRUD model, allowing for basic life cycle operations on resources and collections.
Create an instance of a resource as specified using the payload as a constructor. Optionally return a reference to the created resource. Typically uses POST in CoAP or HTTP, may use PUBLISH in pubsub protocols.
Obtain a representation of the selected resource. Typically uses GET in CoAP or HTTP, could use SUBSCRIBE with message retention in pubsub.
Replace or partially replace the representation of the selected resource. Typically uses PUT or PATCH in CoAP and HTTP, could use PUBLISH in pubsub in the frequent case that CREATE and UPDATE are not needed on the same resource.
Remove the representation of the selected resource. Typically uses DELETE in CoAP or HTTP. There is no natural mapping to pubsub if a remove operation is not provided.
Obtain a sequence of representations of the selected resource, indicating state updates which occur on the resource. Typically uses CoAP Observe, HTTP EventSource, MQTT SUBSCRIBE. OBSERVE is the transfer equivalent of performing a RETRIEVE on the resource immediately following each state change of the resource.Collection representations in HSML include Base Elements, Link Elements, and Item Elements.A base elements describes the context under which to interpret values embedded in subsequent items within the representation of a collection.The base identifier element (bi) may contain an absolute URI or an absolute path reference from which to base relative references found in the links. It functions as a base URI embedded in content as per Section 5.1.1URI reference follows the definition in Section 5.The format of base elements are specified in . is an example of a base element.Other base items from SenML are permissible, including base time (bt) and base value(bv). If additional senml base values are present, the client MUST interpret the items in the collection in the context of the applicable base elements. For example, if there is a “bv” or base value elment, all of the returned values from items in the collection MUST be added to the base value as per .A link element is a hyperlink based on the structure and syntax of and . An example link element is shown in .An item element in a collection is a data element that is referenced by a link in the collection.Items in the collection are indicated by hyperlink references (“href”) that serve as selection variables for matching to URI parameters and resource names (“n”)in multi-resource representataions. Reference resolution should use the rules defined in .Items may be embedded in the collection, they may be subresources of the collection, or they may be items in other collections referenced by links in the collection. An example item element is shown in Items may be stored as simple sets of key-value pairs in the context of the collection. Items stored in this way may only offer item representations. Links about these items may be obtained from the collection that contains them.Alternatively, items themselves may be stored as single-item collections, pointed to by links in another collection. Items stored as collections may contain an item with a zero length name, and a self link for the item as shown in the collection representation of the item in . Items stored in this way may be augmented by adding additional resources and link content to the collection. Items stored as collections may offer link format and collection format representations.Items embedded in collections, and items linked and stored as separate collections, will all be returned using the item representation format as shown in . A client interacting with the items representation of the example collection at /sensors/ would not need to understand the difference between embedded items and linked items that exposed similar content.The HSML media type includes multiple content types and interface types to enable the client to select representations that optimize communication for the workflow. Representation formats include links and items together (collection formats), links alone (link formats), or items alone (item formats).Link formats are useful for discovery workflow, item formats are useful for interaction with resource state machines, and link+item formats are useful for constructing and modifying resource instances.In addition to HSML native formats, standard CoRE Link-Format and SenML formats may be exposed. shows an example document in hsml+json format. This example contains a base element, three link elements, and two item elements.The HSML media type defines content formats and corresponding CoRE Interface Types that may select partial representations of the resource for interaction.Collection formats as shown in expose all of the elements of a resource, including items, links, and link extensions.Link content formats, when used in an “accept” option or “content-type” option in a transfer header, or when selected by the “if=hsml.link” URI parameter, will select the link elements in the collection for interaction as in .CoRE link-format content formats, for example application/link-format+json, select RFC6690 compliant links, and may not include representations of extended links (rel=action, rel=monitor).Item content formats, when used in an “accept” option or “content-type” option in a transfer header, or when selected by the “if=hsml.item” URI parameter, will select the item elements in the collection for interaction as in .URI Parameters for matching link attributes and relations may be used to select items when item representations are being specified using either content-format (accept) or interface parameters (if=). For example:SenML content formats select data records and return SenML compliant resource names. “bn” may optionally be returned when compliant resource names “n” may be resolved through simple string concatenation as per .The HSML media type defines URI reference processing and URI Query processing but does not in general define fragment (#) references in URIs.If fragment references are provided in a particular transfer implementation, they should be used to select single items in collections in accordance with current practice.The path part of the URI reference used to indicate HSML resources may be used as a reference to a collection or to an item in a collection. Collection references should contain the trailing slash character “/” in accordance with . Server implementations should return links to collections with the trailing “/”, and should attempt to accept references to collections without the trailing “/” if such references can be used to construct unambiguous references.References to items in a collection should not contain the trailing “/” character. Servers should return items in response to references that do not contain the trailing “/” character, and should attempt to accept references to items in collections with the trailing “/” if such references can be used to construct unambiguous references.URI references may be routed to collections in the order in which path segments appear in the reference, from left to right reading the path string, separated by “/” characters.URI references may alternatively be routed as opaque strings to resources. In this case, the resolution of relative references to items in a collection should be possible by concatenating the relative reference to the context URI of the collection. Note that this may enforce certain naming conventions such as the trailing slash in practice.URI Parameters, typically mapped as query parameters in HTTP and CoAP, are used for selecting resources, selecting partial representations, and otherwise modifying aspects of the expected or included representation. In this way, they may be considered part of the URI, since they help identify a unique representation to be transferred.URI Parameters may be used to select resources in a collection for transfer. This is done using the common parameter matching rules specified in .Resource selection is performed based on matching URI Parameters with Link Parameters of all links in the collection which are exposed by the indicated media type and interface type. URI Parameters listed in are excluded from the matching process.The target resource selection depends on the content-format specified in the request or the interface type specified in the URI parameters.The collection content-formats or interface types select all links and items in the collection, including link extensions. URI parameters included in the request should be matched against link parameters for selecting links and associated items.The link content formats or interface types select all links in the collection. URI parameters included in the request should be matched against link parameters for link selection.The item content formats or interface types select all items in the collection. URI parameters included in the request should be matched against link parameters associated with items in the collection for item selection as shown in .When the reference of a request targets a collection resource, using a collection format, the representation may contain both links and items. It is implied that operations using this format will interact with both links and items. The collection format is indicated by using a collection content type in the accept or content-type header, or by specifying a collection interface type e.g. if=hsml.collection.Retrieve returns a representation of selected elements, consisting of a list of elements in the collection, including base element, links, and optionally representations of items, as shown in . Elements may include link extenstions, for example action links and monitor links.Update replaces all selected elements in the collection with elements included in the payload. Update operations may include replace (PUT) and partial update (PATCH) oprations where supported in the transfer protocol. The server response should indicate that the resource was Changed.Create adds elements to a collection, including links and items, where the elements are specified by representations included in the payload. Hints and directives about the created resource may be included in the payload as link parameters, for example a value for href, specifying the location of the created resource. The server is expected to return the location of created resource instances to the client in a header or other response parameter. For example, the “Location” option in CoAP or “Location” header in HTTP should be used to identify the created resource. The server response should indicate that a resource was Created.Delete removes selected elements from the collection. If no elements are selected, delete removes the entire collection. The server response should indicate that the resource was Deleted.When a collection is referenced and the link format is indicated, using a link content format in the header or specifying a link interface type, e.g. if=hsml.link, it is expected that the request will interact with the links in the collection.Retrieve returns a list containing selected links, as shown in .Update modifies selected links, replacing link elements with elements included in the payload. Update operations may include replace (PUT) and partial update (PATCH) oprations where supported in the transfer protocol. The server response should indicate that the resource was Changed.Create adds links to the collection, where the links are included in the payload. The server response should indicate that the resource was Changed.Delete removes selected links from the collection. The server response should indicate that the resource was Changed. If links point to items in the context of the collection, either remove the items as well as the links, or leave the collection as is and return a method error (Method Not Allowed).Whan a collection is referenced and the item format is indicated, either by including an item content type in the request header or using an item interface type, e.g. if=hsml.item, it is expected that the request will interact with the items in a collection.Specifying item interaction with a collection invokes the link embedding operations.Collective operations on items in collections are invoked by using the URI of the collections, along with URI parameters, to select one or more items in the collection.Items which are compatible with the HSML item format may be returned with multiple items embedded in a single representation.Retrieve returns a list containing a base element and a composite representation of the selected items as shown in .Update modifies selected items, replacing items in the collection with items included in the payload which match by name “n” value. Update operations may include replace (PUT) and partial update (PATCH) oprations where supported in the transfer protocol. The server response should indicate that the resource was Changed.Create adds new items to the collection along with system-constructed links. Link content is determined by the resource type or traits defined by application semantics. Server is expected to return the location of created resource instances to the client in a header or other response parameter. For example, the “Location” option in CoAP or “Location” header in HTTP should be used to identify the created resource. THe server response should indicate that a resource was Created.Delete removes selected items and corresponding links from the collection. The server response should indicate that the resource was Deleted. If no items are selected, return a not found error.When the URI of a reference points to an item in a collection, it is expected that the request will interact with a single item.Retrieve returns a representation of the item in the content type according to the accept option of the RETRIEVE request, or using a system defined content-format if there is no accept option provided.Update replaces the resource state with the state defined in the supplied representation according to the content-type or ct option. Update operations may include replace (PUT) and partial update (PATCH) oprations where supported in the transfer protocol. The server response should indicate that the resource was Changed.Not Defined, application dependent.Delete removes any links to the item from the collection, and removes the item. If the item is stored as a collection, delete removes the collection. The server response should indicate that the resource was Deleted.Group transfer operations are provided by collections that contain links with the “grp” relation value.Transfer operations which specify the collection URI as target and use the item content format are routed to the resolved URI of each link in the collection that contains the “grp” relation.URI Parameters used for resource selection and matching are sent to the target URIs of all links that contain the “grp” relation.Responses from the selected group resources are aggregated and by default returned as a single response. The group response SHOULD be returned as an outer array where such representation is available, for example a JSON array which contains elements consisting of SenML responses.Optionally, a chunked response may be specified, if provided by the transfer implementation, in which the response from each group member is returned individually within a sequence of responses.The return code should be based on successful responses from link targets. An implementation of a group collection may choose to allow some rejected responses from link targets, depending on the composition of the link targets. A group may not be required to be composed of link targets that always accept all requests; this is at the discretion of the resource designer.No mechanism is provided in this document to enable a client to inspect the separate return codes from each group link target resource. Multiple transfer headers may be supplied in some representations, or mapped to metadata in others.The following examples assume the prior example from indexed by a group collection as in .Retrieve requests are routed to each link in the collection that contains the “grp” relation. The response from each link target is returned as an element in an array representation.Update requests are routed to each link in the collection that contains the “grp” relation. The target resource of each group link processes the request, including URI parameters and content format. The result code returned should indicate that the resource is Changed if any resource state may have been updated.Create requests are routed to each link in the collection that contains the “grp” relation. In the example shown in , an additional named resource is being created within each (collection type) item to hold a location value for that item. The result code should indicate that a resource was Created if any resource was created as a result of the create operation.Delete requests are routed to each link in the collection that contains the “grp” relation. In the example shown in , the URI parameter ?href=location selects the resource at the relative URI reference “location” at each group link target for delete. The result code should indicate that a resource was Deleted if any resource was deleted as a result of the delete operation.Actions are hypermedia controls, indicated by a rel=action value in a link, used to construct transfer operations that change the state of resources. The use roughly follows the use of forms in HTML , with semantics more consistent with links. See for more information.An example Action element is shown in .This Action element informs the client that to perform a type “st.on” action on the context resource, perform a CREATE method on the “commands” URI relative to the context URI, using the application/json content type, with a payload as defined by the “Schema” parameter.Monitors are hypermedia controls, indicated by a rel=monitor value in a link, used to construct transfer operations that expose state changes of resources. A monitor invokes an outbound transfer operation on a target resource. Monitors use the IANA registered link relation “monitor”, defined in .Monitors have a set of accept parameters that indicate how the context resource is being observed, a set of filter parameters that indicate the conditions for generating a state change in the monitor, and a set of target parameters that indicate how state changes are to be applied to the monitor resource. See for more information.An example Monitor element is shown in .This Monitor element defines a monitor resource at the “tank-level-events” URI relative to the context URI, which OBSERVEs the context URI, and updates the “tank-level-events” resource using the CREATE method to add JSON items to the collection, according to the given conditional parameters no more frequently than once every 600 seconds, at least once every 3600 seconds, when the reading is in the notification band, which has a lower limit of 80 and wraps around zero to an upper limit of 20. This has the effect of defining a low level alert notification and high level alert notification.This section defines the common reserved identifiers that are expected to be processed by implementations of HSML clients and servers. There are many more relation types and link parameters defined and registered with IANA. Implementations should not restrict processing to the keywords identified in this document; they should accept all IANA registered keywords as valid identifiers.Many of the keywords listed are defined in other RFCs and IETF documents. This document does not redefine any existing keywords. Where a definition exists, the existing definition will be used. Where multiple conflicting definitions exist, this document will indicate the required definition.New definitions are summarized in .Identifiers in representations using the HSML media types are assumed to use the default CURIE “hsml”. An identifier that is not matched to an existing namespace is assumed to carry the prefix “hsml”.For example, if the identifier “method” is encountered and it doesn’t resolve to an IANA registered parameter (reg-parameter in ) resolution should be attempted using “hsml:method”.The default CURIE “hsml” identifies a namespace defined by the identifiers in of this document.The following URI Parameters are used to filter representations according to specific processing rules and should not be used to attempt to match link parameters.
Interface type, used to select a partial representation of a collection
Indicates the number of items to be returned from the collection
Indicates the array index of the item in the collection to select as the first item to be returned
Page number, in units of countThe following keywords are reserved for use in an HSML serialization to indicate elements of a web link
Overrides the default resource context of the link
Link relation type as defined in and
Target of a link reference. This may be a relative path reference in the collection, e.g. “currentValue” or an absolute path reference on the server, “/sensors/temp/currentValue”, or an absulute URI, for example “https://example.com/sensors/temp/currentValue”The following keywords are reserved for use in a HSML serialization to indicate types of link relations, and are used for values of “rel”.
Refers to the collection that contains the link
The link points to an item in the collection
The item the link points to is available for collective interaction through the collection URI according to group semantics described in .The following keywords are reserved for use in a HSML serialization to indicate types of link attributes
The resource type(s) of the item
Units of measure
The CoAP content-format number(s) associated with the item
The media type string(s) associated with the item
Presence of this attribute indicates that the associated resource is observableThe following keywords are reserved for use in a HSML serialization to indicate elements within the serialization. Some of these are defined in .
The base URI of the collection, relative to the service location e.g. “/sensors/temp/” Thi sis a new definition for HSML
The base time that corresponds to the encapsulated state of the collection
The time stamp that corresponds to the encapsulated state of the item in the collection, relative to the base time “bt”
The name or URI of the resource, relative to the base name or base URI
Units of measure
Number value
Boolean value
String value
May override the default context of an action
Indicates that this control is an action when rel contains the value “action”
URI for mapping or invoking the action specified in the action control.
Additional indicator of the action being exposed, can be used with “rel”
Transfer method to use on a particular action
The Content-Types or CoAP content-formats that are accepted on create and update methods
The media type string(s) that are exposed by retrieve and observe methods
The CoAP content-format number(s) exposed
Indicates the schema to use for constructing or interpreting transfer payloads, may be a literal value or a URI pointing to an instance of a schema
May override the context URI of a monitor with any observable resource
Indicates that this control is a monitor when rel contains the value “monitor”
The URI of the resource used to monitor context URI, where transfer operations will be sent.
The media type string or CoAP content-format to request from the observed resource
The media type string to use in the transfer operation
the CoAP content-format number to use in the transfer operation
Transfer method to use in request from the observed resource, default is OBSERVE
Transfer method to use for notifications, default is UPDATE
Schema to use in interpreting the observed resource payload, required if target-schema is used.
Schema to use in constructing the notification transfer payload, default is to transfer the accepted payload unmodified to the target resource.
Minimum time between notifications from a monitor
Maximum time between notifications from a monitor
Value to match or exceed to determine notification condition
Value to match or be less than to determine notification condition
Value change +/- from last report to determine notification condition
Value to match, or change from, to determine notification condition
Defines a lower limit, at or above which notification is enabled
Defines an upper limit, at or below which notification is enabled
Starts the notification state machine with an initial valueThe following keywords are reserved for use in a HSML serialization to indicate values of link attributes
Transfer layer CREATE operation, value of “method” or “target-method”
Transfer layer RETRIEVE operation, value of “method” or “accept-method”
Transfer layer UPDATE operation, value of “method” or “target-method”
Transfer layer DELETE operation, value of “method” or “target-method”
Transfer layer OBSERVE operation, value of “method” or “accept-method”TypeapplicationSubtypeshsmlhsml.collectionhsml.linkhsml.itemMedia type stringsapplication/hsmlapplication/hsml.collectionapplication/hsml.linkapplication/hsml.itemapplication/hsml+jsonapplication/hsml.collection+jsonapplication/hsml.link+jsonapplication/hsml.item+json(subject to Structured Syntax encoding rules TBD)22000 - application/hsml+json22001 - application/hsml.link+json22002 - application/hsml.item+jsonmethodschemacontent-typectaccept-methodtarget-methodaccept-schematarget-schemaThe following should be registered in the CoRE dynamic linking draft .pminpmaxnbllnbulinitltgtsteqgrphsml.collectionhsml.itemhsml.linkThese definitions may use the default CURIE and do not need to be registered with IANAhsml:createhsml:retrievehsml:updatehsml:deletehsml:observeCollection representations are resource state encapsulations and may be transmitted and stored as signed objects in order to protect the integrity of data and metadata, including time and embedded access control information.The collection may include time stamps (bt and t) that are signed with the object data and metadata.The collection representation may include embedded access control information, also signed with the metadata, that can instruct the server to enforce a particular access policy for transfer requests.Representations submitted to a server to update the state of a resource (UPDATE, CREATE, DELETE) may also contain embedded signed assertions which may be used by the server to decide whether to apply or reject the update.Object signing and encryption SHOULD use the mechanisms specified in IETF documents for secure JSON Objects and CBOR Objects .
Having a client role in a REST operation, transmitting a request and receiving one or more responses.
Having a server role in a REST operation, the origin of data items or proxy for the origin. A server is also an authority for a URI namespace .
Server endpoint for a REST operation, identified by a URI
An encoded form of the state of a resource. The encoding rules may be specified in a media type or content type. Clients and servers exchange representations of resources in order to effect application state changes .
Uniform Resource Identifier, used to identify a resource in a link or as a reference
An identifier used to select or identify a particular resource. References are constructed by clients to identify resources when interacting with servers. Servers match references in client requests against URIs of hosted resources.
A set of rules for encoding, transfer, and prosessing resource representations
Design style which uses metadata in the form of hyperlinks to structure resources in relation to each other
A composite resource that contains links and optionally data items
A metadata element as described in and that contains a pointer to and description of some data element.
A data item pointed to by one or more links in one or more collections.
The context of a link is the subject of the link or the enclosing scope. In this document the collection is the default context for links in the collection.
The target of a link is the resource being pointed to or described. Links in a collection point to and describe items as link targets.
A set of predefined message types used to implement state transfer semantics, for example REST.
A message sent from a client to a server identifying the resource, representation, and method to use for the interaction with the server.
A message sent from a server to a client in response to a request, which communicates the state of the identified resource.
The state transition type requested by the client for the server to perform on the identified resource. Indicated by the transfer layer method, for example, RETRIEVE, UPDATE, CREATE, DELETE.
A transfer layer semantic interface based on the publish-subscribe paradigm, allowing for asynchronous messages to be routed on demand.Constrained RESTful Environments (CoRE) Link FormatThis specification defines Web Linking using a link format for use by constrained web servers to describe hosted resources, their attributes, and other relationships between links. Based on the HTTP Link Header field defined in RFC 5988, the Constrained RESTful Environments (CoRE) Link Format is carried as a payload and is assigned an Internet media type. "RESTful" refers to the Representational State Transfer (REST) architecture. A well-known URI is defined as a default entry point for requesting the links hosted by a server. [STANDARDS-TRACK]Representing CoRE Formats in JSON and CBORJavaScript Object Notation, JSON (RFC7159) is a text-based data format which is popular for Web based data exchange. Concise Binary Object Representation, CBOR (RFC7049) is a binary data format which has been optimized for data exchange for the Internet of Things (IoT). For many IoT scenarios, CBOR formats will be preferred since it can help decrease transmission payload sizes as well as implementation code sizes compared to other data formats. Web Linking (RFC5988) provides a way to represent links between Web resources as well as the relations expressed by them and attributes of such a link. In constrained networks, a collection of Web links can be exchanged in the CoRE link format (RFC6690). Outside of constrained environments, it may be useful to represent these collections of Web links in JSON, and similarly, inside constrained environments, in CBOR. This specification defines a common format for this.Uniform Resource Identifier (URI): Generic SyntaxA Uniform Resource Identifier (URI) is a compact sequence of characters that identifies an abstract or physical resource. This specification defines the generic URI syntax and a process for resolving URI references that might be in relative form, along with guidelines and security considerations for the use of URIs on the Internet. The URI syntax defines a grammar that is a superset of all valid URIs, allowing an implementation to parse the common components of a URI reference without knowing the scheme-specific requirements of every possible identifier. This specification does not define a generative grammar for URIs; that task is performed by the individual specifications of each URI scheme. [STANDARDS-TRACK]Web LinkingThis document specifies relation types for Web links, and defines a registry for them. It also defines the use of such links in HTTP headers with the Link header field. [STANDARDS-TRACK]A SIP Event Package for Subscribing to Changes to an HTTP ResourceThe Session Initiation Protocol (SIP) is increasingly being used in systems that are tightly coupled with Hypertext Transport Protocol (HTTP) servers for a variety of reasons. In many of these cases, applications can benefit from being able to discover, in near real- time, when a specific HTTP resource is created, changed, or deleted. This document proposes a mechanism, based on the SIP Event Framework, for doing so. [STANDARDS-TRACK]The Constrained Application Protocol (CoAP)The Constrained Application Protocol (CoAP) is a specialized web transfer protocol for use with constrained nodes and constrained (e.g., low-power, lossy) networks. The nodes often have 8-bit microcontrollers with small amounts of ROM and RAM, while constrained networks such as IPv6 over Low-Power Wireless Personal Area Networks (6LoWPANs) often have high packet error rates and a typical throughput of 10s of kbit/s. The protocol is designed for machine- to-machine (M2M) applications such as smart energy and building automation.CoAP provides a request/response interaction model between application endpoints, supports built-in discovery of services and resources, and includes key concepts of the Web such as URIs and Internet media types. CoAP is designed to easily interface with HTTP for integration with the Web while meeting specialized requirements such as multicast support, very low overhead, and simplicity for constrained environments.JSON Web Encryption (JWE)JSON Web Encryption (JWE) represents encrypted content using JSON-based data structures. Cryptographic algorithms and identifiers for use with this specification are described in the separate JSON Web Algorithms (JWA) specification and IANA registries defined by that specification. Related digital signature and Message Authentication Code (MAC) capabilities are described in the separate JSON Web Signature (JWS) specification.Hypertext Markup Language - 2.0This document defines a HTML 2.0 (to distinguish it from the previous informal specifications). [STANDARDS-TRACK]Reusable Interface Definitions for Constrained RESTful EnvironmentsThis document defines a set of reusable REST resource design patterns suitable for use in constrained environments, based on IETF CoRE standards for information representation and information exchange. Interface types for Sensors, Actuators, Parameters, and resource Collections are defined using the "if" link attribute defined by CoRE Link Format [RFC6690]. Clients may use the "if" attribute to determine how to consume resources. Editor's note: This version removes the observe notify functionality. Further work is needed on this draft toCoRE Resource DirectoryIn many M2M applications, direct discovery of resources is not practical due to sleeping nodes, disperse networks, or networks where multicast traffic is inefficient. These problems can be solved by employing an entity called a Resource Directory (RD), which hosts descriptions of resources held on other servers, allowing lookups to be performed for those resources. This document specifies the web interfaces that a Resource Directory supports in order for web servers to discover the RD and to register, maintain, lookup and remove resources descriptions. Furthermore, new link attributes useful in conjunction with an RD are defined.Media Types for Sensor Markup Language (SenML)This specification defines media types for representing simple sensor measurements and device parameters in the Sensor Markup Language (SenML). Representations are defined in JavaScript Object Notation (JSON), Concise Binary Object Representation (CBOR), eXtensible Markup Language (XML), and Efficient XML Interchange (EXI), which share the common SenML data model. A simple sensor, such as a temperature sensor, could use this media type in protocols such as HTTP or CoAP to transport the measurements of the sensor or to be configured.CBOR Object Signing and Encryption (COSE)Concise Binary Object Representation (CBOR) is data format designed for small code size and small message size. There is a need for the ability to have the basic security services defined for this data format. This document defines the CBOR Object Signing and Encryption (COSE) specification. This specification describes how to create and process signature, message authentication codes and encryption using CBOR for serialization. This specification additionally specifies how to represent cryptographic keys using CBOR.Dynamic Resource Linking for Constrained RESTful EnvironmentsFor CoAP [RFC7252] Dynamic linking of state updates between resources, either on an endpoint or between endpoints, is defined with the concept of Link Bindings. This document defines conditional observation attributes that work with Link Bindings or with simple CoAP Observe [RFC7641].Object Security of CoAP (OSCOAP)This memo defines Object Security of CoAP (OSCOAP), a method for application layer protection of message exchanges with the Constrained Application Protocol (CoAP), using the CBOR Object Signing and Encryption (COSE) format. OSCOAP provides end-to-end encryption, integrity and replay protection to CoAP payload, options, and header fields, as well as a secure binding between CoAP request and response messages. The use of OSCOAP is signaled with the CoAP option Object-Security, also defined in this memo.Architectural Styles and the Design of Network-based Software ArchitecturesUniversity of California, IrvineW3C Web of Things Interest GroupIRTF Thing to Thing Research Group