Movatterモバイル変換


[0]ホーム

URL:


W3C

Web of Things (WoT) Thing Description

W3C Recommendation (Link errors corrected 23 June 2020)

This version:
https://www.w3.org/TR/2020/REC-wot-thing-description-20200409/
Latest published version:
https://www.w3.org/TR/wot-thing-description/
Latest editor's draft:
https://w3c.github.io/wot-thing-description/
Implementation report:
https://w3c.github.io/wot-thing-description/testing/report.html
Previous version:
https://www.w3.org/TR/2020/PR-wot-thing-description-20200130/
Editors:
Sebastian Kaebisch (Siemens AG)
Takuki Kamiya (Fujitsu Laboratories of America)
Michael McCool (Intel)
Victor Charpenay (Siemens AG)
Matthias Kovatsch (Huawei)
Participate:
GitHub w3c/wot-thing-description
File a bug
Commit history
Pull requests
Contributors:
In the GitHub repository
Repository:
We are on GitHub
File a bug

Please check theerrata for any errors or issues reported since publication.

See alsotranslations.

Copyright © 2017-2020W3C® (MIT,ERCIM,Keio,Beihang). W3C liability, trademark and permissive document license rules apply.


Abstract

This document describes a formal model and a common representation for a Web of Things (WoT) Thing Description. A Thing Description describes the metadata and interfaces ofThings, where aThing is an abstraction of a physical or virtual entity that provides interactions to and participates in the Web of Things. Thing Descriptions provide a set of interactions based on a small vocabulary that makes it possible both to integrate diverse devices and to allow diverse applications to interoperate. Thing Descriptions, by default, are encoded in a JSON format that also allows JSON-LD processing. The latter provides a powerful foundation to represent knowledge aboutThings in a machine-understandable way. A Thing Description instance can be hosted by theThing itself or hosted externally when aThing has resource restrictions (e.g., limited memory space) or when a Web of Things-compatible legacy device is retrofitted with a Thing Description.

Status of This Document

This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of currentW3C publications and the latest revision of this technical report can be found in theW3C technical reports index at https://www.w3.org/TR/.

Status Update (June 2020): The link to the commit history was fixed in-place on June 23 2020 after the renaming of a branch.

This document was published by theWeb of Things Working Group as a Recommendation.

GitHub Issues are preferred for discussion of this specification. Alternatively, you can send comments to our mailing list. Please send them topublic-wot-wg@w3.org (archives).

Please see the Working Group's implementation report.

This document has been reviewed byW3C Members, by software developers, and by otherW3C groups and interested parties, and is endorsed by the Director as aW3C Recommendation. It is a stable document and may be used as reference material or cited from another document.W3C's role in making the Recommendation is to draw attention to the specification and to promote its widespread deployment. This enhances the functionality and interoperability of the Web.

This document was produced by a group operating under theW3C Patent Policy.W3C maintains apublic list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes containsEssential Claim(s) must disclose the information in accordance withsection 6 of theW3C Patent Policy.

This document is governed by the1 March 2019W3C Process Document.

1. Introduction

This section is non-normative.

The WoT Thing Description (TD) is a central building block in theW3C Web of Things (WoT) and can be considered as the entry point of aThing (much like theindex.html of a Web site). A TD instance has four main components: textual metadata about theThing itself, a set ofInteraction Affordances that indicate how theThing can be used,schemas for the data exchanged with theThing for machine-understandability, and, finally,Web links to express any formal or informal relation to otherThings or documents on the Web.

TheInteraction Model ofW3C WoT defines three types ofInteraction Affordances: Properties (PropertyAffordance class) can be used for sensing and controlling parameters, such as getting the current value or setting an operation state. Actions (ActionAffordance class) model invocation of physical (and hence time-consuming) processes, but can also be used to abstract RPC-like calls of existing platforms. Events (EventAffordance class) are used for the push model of communication where notifications, discrete events, or streams of values are sent asynchronously to the receiver. See [WOT-ARCHITECTURE] for details.

In general, the TD provides metadata for differentProtocol Bindings identified by URI schemes [RFC3986] (e.g.,http,coap, etc. [IANA-URI-SCHEMES]), content types based on media types [RFC2046] (e.g.,application/json,application/xml,application/cbor,application/exi, etc. [IANA-MEDIA-TYPES]), and security mechanisms (for authentication, authorization, confidentiality, etc.). Serialization of TD instances is based on JSON [RFC8259], where JSON names refer to terms of the TD vocabulary, as defined in this specification document. In addition the JSON serialization of TDs follows the syntax of JSON-LD 1.1 [JSON-LD11] to enable extensions and rich semantic processing.

Example 1 shows a TD instance and illustrates theInteraction Model with Properties, Actions, and Events by describing a lampThing with the titleMyLampThing.

Example1: Thing Description Sample
{"@context":"https://www.w3.org/2019/wot/td/v1","id":"urn:dev:ops:32473-WoTLamp-1234","title":"MyLampThing","securityDefinitions": {"basic_sc": {"scheme":"basic","in":"header"}    },"security": ["basic_sc"],"properties": {"status" : {"type":"string","forms": [{"href":"https://mylamp.example.com/status"}]        }    },"actions": {"toggle" : {"forms": [{"href":"https://mylamp.example.com/toggle"}]        }    },"events":{"overheating":{"data": {"type":"string"},"forms": [{"href":"https://mylamp.example.com/oh","subprotocol":"longpoll"            }]        }    }}

From this TD example, we know there exists oneProperty affordance with the titlestatus. In addition, information is provided to indicate that this Property is accessible via (the secure form of) the HTTP protocol with a GET method at the URIhttps://mylamp.example.com/status (announced within theforms structure by thehref member), and will return a string-based status value. The use of the GET method is not stated explicitly, but is one of the default assumptions defined by this document.

In a similar manner, anAction affordance is specified to toggle the switch status using the POST method on thehttps://mylamp.example.com/toggle resource, where POST is again a default assumption for invoking Actions.

TheEvent affordance enables a mechanism for asynchronous messages to be sent by aThing. Here, a subscription to be notified upon a possible overheating event of the lamp can be obtained by using HTTP with its long polling subprotocol onhttps://mylamp.example.com/oh.

This example also specifies thebasic security scheme, requiring a username and password for access. Note that a security scheme is first given a name insecurityDefinitions and then activated by specifying that name in asecurity section. In combination with the use of the HTTP protocol this example demonstrates the use of HTTP Basic Authentication. Specification of at least one security scheme at the top level is mandatory, and gives the default access requirements for every resource. However, security schemes can also be specified per-form, with configurations given at the form level overriding configurations given at theThing level, allowing for the specification of fine-grained access control. It is also possible to use a specialnosec security scheme to indicate that no access control mechanisms are used. Additional examples will be provided later.

The Thing Description offers the possibility to add contextual definitions in some namespace. This mechanism can be used to integrate additional semantics to the content of the Thing Description instance, provided that formal knowledge, e.g., logic rules for a specific domain of application, can be found under the given namespace. Contextual information can also help specify some configurations and behavior of the underlying communication protocols declared in theforms field.Example 2 extends the TD sample from Example 1 by introducing a second defintion in the@context to declare the prefixsaref as referring toSAREF, the Smart Appliance Reference Ontology [SMARTM2M]. This IoT ontology includes terms interpreted as semantic labels that can be set as values of the@type field, giving the semantics ofThings and theirInteraction Affordances. In the example below, theThing is labelled withsaref:LightSwitch, thestatusProperty is labelled withsaref:OnOffState and thetoggleAction withsaref:ToggleCommand.

Example2: Thing Description with TD Context Extension for semantic annotations
{"@context": ["https://www.w3.org/2019/wot/td/v1",        {"saref":"https://w3id.org/saref#" }    ],"id":"urn:dev:ops:32473-WoTLamp-1234","title":"MyLampThing","@type":"saref:LightSwitch","securityDefinitions": {"basic_sc": {"scheme":"basic","in":"header"    }},"security": ["basic_sc"],"properties": {"status": {"@type":"saref:OnOffState","type":"string","forms": [{"href":"https://mylamp.example.com/status"            }]        }    },"actions": {"toggle": {"@type":"saref:ToggleCommand","forms": [{"href":"https://mylamp.example.com/toggle"            }]        }    },"events": {"overheating": {"data": {"type":"string"},"forms": [{"href":"https://mylamp.example.com/oh"            }]        }    }}

The declaration mechanism inside some@context is specified by JSON-LD. A TD instance complies to version 1.1 of that specification [json-ld11]. Hence, a TD instance can be also processed as an RDF document (for details about semantic processing, please refer to Appendix§ D. JSON-LD Context Usage and the documentation under the namespace IRIs, e.g.,https://www.w3.org/2019/wot/td).

2. Conformance

As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.

The key wordsMAY,MUST,MUST NOT,RECOMMENDED,SHOULD, andSHOULD NOT in this document are to be interpreted as described inBCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

A Thing Description instance complies with this specification if it follows the normative statements in§ 5. TD Information Model and§ 6. TD Representation Format regarding Thing Description serialization.

A JSON Schema [JSON-SCHEMA] to validate Thing Description instances is provided in Appendix§ B. JSON Schema for TD Instance Validation.

3. Terminology

This section is non-normative.

The fundamental WoT terminology such asThing,Consumer,Thing Description (TD),Interaction Model,Interaction Affordance,Property,Action,Event,Protocol Binding,Servient,WoT Interface,WoT Runtime, etc. is defined inSection 3 of the WoT Architecture specification [WOT-ARCHITECTURE].

In addition, this specification introduces the following definitions:

TD Context Extension
A mechanism to extendThing Descriptions with additionalVocabulary Terms. It is the basis for semantic annotations and extensions to core mechanisms such as Protocol Bindings, Security Schemes, and Data Schemas.
TD Information Model
Set ofClass definitions constructed from pre-definedVocabularies on which constraints apply, thus defining the semantics of theseVocabularies. Class definitions are typically expressed in terms of aSignature (a set ofVocabulary Terms) and functions over thatSignature. TheTD Information Model also includesDefault Values, defined as a global function overClasses.
TD Processor
A system that can serialize some internal representation of aThing Description in a given format and/or deserialize it from that format. ATD Processor must detect semantically inconsistentThing Descriptions, that is,Thing Descriptions that cannot satisfy constraints on theInstance Relation of theThing class. For that purpose, aTD Processor may compute canonical forms ofThing Descriptions in which all possibleDefault Values are assigned. ATD Processor is typically a sub-system of aWoT Runtime. Implementations of a TD Processor may be a TD producer only (able to serialize to TD Documents) or a TD consumer only (able to deserialize from TD Documents).
TD Serialization orTD Document
Textual or binary representation ofThing Descriptions that can be stored and exchanged betweenServients. ATD Serialization follows a given representation format, identified by a media type when exchanged over the network. The default representation format forThing Descriptions is JSON-based as defined by this specification.
Vocabulary
A collection ofVocabulary Terms, identified by a namespace IRI.
Term andVocabulary Term
A character string. When aTerm is part of aVocabulary, i.e., prefixed by a namespace IRI, it is called aVocabulary Term. For the sake of readability,Vocabulary Terms present in this document are always written in a compact form and not as full IRIs.

These definitions are further developed in§ 5.2 Preliminaries.

4. Namespaces

The version of theTD Information Model defined in§ 5. TD Information Model of this specification is identified by the following IRI:

https://www.w3.org/2019/wot/td/v1

This IRI [RFC3987], which is also a URI [RFC3986], can be dereferenced to obtain aJSON-LD context file [json-ld11], allowing the compact strings inTD Documents to be expanded to full IRI-basedVocabulary Terms. However, this processing is only required when transforming JSON-basedTD Documents to RDF, an optional feature ofTD Processor implementations.

In the present specification,Vocabulary Terms are always presented in their compact form. Their expanded form can be accessed under the namespace IRI of theVocabulary they belong to. These namespaces follow the structure of§ 5.3 Class Definitions. EachVocabulary used in theTD Information Model has its own namespace IRI, as follows:

VocabularyNamespace IRI
Corehttps://www.w3.org/2019/wot/td#
Data Schemahttps://www.w3.org/2019/wot/json-schema#
Securityhttps://www.w3.org/2019/wot/security#
Hypermedia Controlshttps://www.w3.org/2019/wot/hypermedia#

TheVocabularies are independent from each other. They may be reused and extended in otherW3C specifications. Every breaking change in the design of aVocabulary will require the assignment of a new year-based namespace URI. Note that to maintain the general coherence of theTD Information Model, the associated JSON-LD context file is versioned such that every version has its own URI (v1,v1.1,v2, ...) to also identify non-breaking changes, in particular the addition of newTerms.

Because aVocabulary under some namespace IRI can only undergo non-breaking changes, its content can be safely cached or embedded in applications. One advantage of exposing relatively static content under a namespace IRI is to optimize payload sizes of messages exchanged between constrained devices. It also avoids any privacy leakage resulting from devices accessing publicly available vocabularies from private networks (see also§ 9.1 Context Fetching Privacy Risk).

5. TD Information Model

This section introduces theTD Information Model. TheTD Information Model serves as the conceptual basis for the processing of Thing Descriptions and their serialization, which is described separately in§ 6. TD Representation Format.

5.1 Overview

TheTD Information Model is built upon the following, independentVocabularies:

Each of theseVocabularies is essentially a set ofTerms that can be used to build data structures, interpreted as objects in the traditional object-oriented sense. Objects are instances of classes and have properties. In the context ofW3C WoT, they denoteThings and theirInteraction Affordances. A formal definition of objects is given in§ 5.2 Preliminaries. The main elements of theTD Information Model are then presented in§ 5.3 Class Definitions. Certain object properties may be omitted in a TD whenDefault Values exist. A list of defaults is given in§ 5.4 Default Value Definitions.

The UML diagram shown next gives an overview of theTD Information Model. It represents all classes as tables and the associations that exist between classes, starting from the classThing, as directed arrows. For the sake of readability, the diagram was split in four parts, one for each of the four baseVocabularies.

UML diagram of the TD information model for the TD core vocabulary
Figure1TD core vocabulary

UML diagram of the TD information model for the Data schema vocabulary
Figure2Data schema vocabulary

UML diagram of the TD information model for the WoT security vocabulary
Figure3WoT security vocabulary

UML diagram of the TD information model for the hypermedia controls vocabulary
Figure4Hypermedia controls vocabulary

5.2 Preliminaries

To provide a model that can be easily processed by both, simple rules on a tree-based document (i.e., raw JSON processing) and rich Semantic Web tooling (i.e., JSON-LD processing), this document defines the following formal preliminaries to construct theTD Information Model accordingly.

All definitions in this section refer tosets, which intuitively are collections of elements that can themselves be sets. All arbitrarily complex data structures can be defined in terms of sets. In particular, anObject is a data structure recursively defined as follows:

Though this definition does not preventObjects to include multiple name-value pairs with the same name, they are generally not considered in this specification. AnObject whose elements only have numbers as names is called anArray. Similarly, anObject whose elements only haveTerms (that do not belong to anyVocabulary) as names is called aMap. All names appearing in some name-value pair in aMap are assumed to beunique within the scope of theMap.

Moreover,Objects can be instances of someClass. AClass, which is denoted by aVocabulary Term, is first defined by a set ofVocabulary Terms called aSignature. AClass whoseSignature is empty is called aSimple Type.

TheSignature of aClass allows to construct two functions that further defineClasses: anAssignment Function and aType Function. TheAssignment Function of aClass takes aVocabulary Term of theClass'sSignature as input and returns eithertrue orfalse as output. Intuitively, theAssignment Function indicates whether an element of theSignature is mandatory or optional when instantiating theClass. TheType Function of aClass also takes aVocabulary Term of theClass'sSignature as input and returns anotherClass as output. These functions arepartial: their domain is limited to theSignature of theClass being defined.

On the basis of these two functions, anInstance Relation can be defined for a pair composed of anObject and aClass. This relation is defined as constraints to be satisfied. That is, anObject is an instance of aClass if the two following constraints areboth satisfied:

According to the definition above, anObject would be an instance of everySimple Type, regardless of its structure. Instead, another definition for theInstance Relation is introduced forSimple Types: anObject is an instance of aSimple Type if it is aTerm with a given lexical form (e.g.,true,false for theboolean type,1,2,3, ... for theunsignedInt type, etc.).

Moreover, additionalClasses, calledParameterized Classes, can be derived from the genericMap andArray structures. AnObject is aMap of someClass, that is, an instance of theMap typeparameterized with someClass, if it is aMap such that the value in all the name-value pairs it contains is an instance of thisClass. The same applies toArrays.

Finally, aClass is aSubclass of some otherClass if every instance of the former is also an instance of the latter.

Given all definitions above, theTD Information Model is to be understood as a set ofClass definitions, which include aClass name (aVocabulary Term), aSignature (a set ofVocabulary Terms), anAssignment Function, and aType Function. TheseClass definitions are provided as tables in§ 5.3 Class Definitions. For each table, the values "mandatory" (respectively, "optional") in the assignment column indicates that theAssignment Function returnstrue (respectively,false) for the correspondingVocabulary Term.

By convention,Simple Types are denoted by names starting with lowercase. TheTD Information Model references the followingSimple Types defined in XML Schema [XMLSCHEMA11-2-20120405]:string,anyURI,dateTime,integer,unsignedInt,double, andboolean. Their definition (i.e., the specification of their lexical form) is outside of the scope of theTD Information Model.

In addition, theTD Information Model defines a global function on pairs ofVocabulary Terms. The function takes aClass name and anotherVocabulary Term as input and returns anObject. If the returnedObject is different fromnull, it represents theDefault Value for some assignment on the inputVocabulary Term in an instance of the inputClass. This function allows to relax the constraint defined above on theAssignment Function: anObject is an instance of aClass if it includes all mandatory assignmentsor ifDefault Value exist for the missing assignments. AllDefault Values are given in the table of§ 5.4 Default Value Definitions. In each table of§ 5.3 Class Definitions, the assignment column contains the value "with default" if aDefault Value is available for the corresponding combination ofClass andVocabulary Term in theTD Information Model.

The formalization introduced here does not consider the possible relation betweenObjects as abstract data structures and physical world objects such asThings. However, care was given to the possibility of re-interpreting allVocabulary Terms involved in theTD Information Model as RDF resources, so as to integrate them in a larger model of the physical world (an ontology). For details about semantic processing, please refer to§ D. JSON-LD Context Usage and the documentation under the namespace IRIs, e.g.,https://www.w3.org/2019/wot/td.

5.3 Class Definitions

ATD ProcessorMUST satisfy theClass instantiation constraints on allClasses defined in§ 5.3.1 Core Vocabulary Definitions,§ 5.3.2 Data Schema Vocabulary Definitions,§ 5.3.3 Security Vocabulary Definitions, and§ 5.3.4 Hypermedia Controls Vocabulary Definitions.

5.3.1 Core Vocabulary Definitions

5.3.1.1Thing

An abstraction of a physical or a virtual entity whose metadata and interfaces are described by a WoT Thing Description, whereas a virtual entity is the composition of one or more Things.

Vocabulary termDescriptionAssignmentType
@contextJSON-LD keyword to define short-hand names called terms that are used throughout a TD document.mandatoryanyURI orArray
@typeJSON-LD keyword to label the object with semantic tags (or types).optionalstring orArray ofstring
idIdentifier of the Thing in form of a URI [RFC3986] (e.g., stable URI, temporary and mutable URI, URI with local IP address, URN, etc.).optionalanyURI
titleProvides a human-readable title (e.g., display a text for UI representation) based on a default language.mandatorystring
titlesProvides multi-language human-readable titles (e.g., display a text for UI representation in different languages).optionalMultiLanguage
descriptionProvides additional (human-readable) information based on a default language.optionalstring
descriptionsCan be used to support (human-readable) information in different languages.optionalMultiLanguage
versionProvides version information.optionalVersionInfo
createdProvides information when the TD instance was created.optionaldateTime
modifiedProvides information when the TD instance was last modified.optionaldateTime
supportProvides information about the TD maintainer as URI scheme (e.g.,mailto [RFC6068],tel [RFC3966],https).optionalanyURI
baseDefine the base URI that is used for all relative URI references throughout a TD document. In TD instances, all relative URIs are resolved relative to the base URI using the algorithm defined in [RFC3986].

base does not affect the URIs used in@context and the IRIs used within Linked Data [LINKED-DATA] graphs that are relevant when semantic processing is applied to TD instances.
optionalanyURI
properties All Property-basedInteraction Affordances of the Thing.optionalMap ofPropertyAffordance
actions All Action-basedInteraction Affordances of the Thing.optionalMap ofActionAffordance
events All Event-basedInteraction Affordances of the Thing.optionalMap ofEventAffordance
forms Set of form hypermedia controls that describe how an operation can be performed. Forms are serializations of Protocol Bindings. In this version of TD, all operations that can be described at the Thing level are concerning how to interact with the Thing'sProperties collectively at once.optionalArray ofForm
securitySet of security definition names, chosen from those defined insecurityDefinitions. These must all be satisfied for access to resources.mandatorystring orArray ofstring
securityDefinitionsSet of named security configurations (definitions only). Not actually applied unless names are used in asecurity name-value pair.mandatoryMap ofSecurityScheme

The@context name-value pairMUST contain the anyURIhttps://www.w3.org/2019/wot/td/v1 either directly when of typeanyURI or as first element when of typeArray.When@context is anArray, the anyURIhttps://www.w3.org/2019/wot/td/v1MAY be followed by elements of typeanyURI or typeMap in any order, while it isRECOMMENDED to include only oneMap with all the name-value pairs in the@contextArray.Maps contained in an@contextArrayMAY contain name-value pairs, where the value is a namespace identifier of typeanyURI and the name aTerm or prefix denoting that namespace.OneMap contained in an@contextArraySHOULD contain a name-value pair that defines the default language for the Thing Description, where the name is theTerm@language and the value is a well-formed language tag as defined by [BCP47] (e.g.,en,de-AT,gsw-CH,zh-Hans,zh-Hant-HK,sl-nedis).

The computation of the base direction of all human-readable text strings is defined by the following set of rules:

  • If no language tag is given, the base directionSHOULD be inferred through first-strong heuristics or detection algorithms such as the CLDR Likely Subtags [LDML].
  • Outside ofMultiLanguageMaps, the base directionMAY be inferred from the language tag of the default language.
  • Inside ofMultiLanguageMaps, the base direction of each value of the name-value pairsMAY be inferred from the language tag given in the corresponding name.
  • In cases where a language can be written in more than one script with different base directions, the corresponding language tag given in@language orMultiLanguageMapsMUST include a script subtag, so that an appropriate base direction can be inferred. An example is Azeri, which is written LTR when Latin script is used (specified usingaz-Latn) and RTL when Arabic script is used (specified usingaz-Arab).

TD Processors should be aware of certain special cases when processing bidirectional text. They should take care to use bidi isolation when presenting strings to users, particularly when embedding in surrounding text (e.g., for Web user interface). Mixed direction text can occur in any language, even when the language is properly identified.

TD producers should attempt to provide mixed direction strings in a way that can be displayed successfully by a naive user agent. For example, if an RTL string begins with an LTR run (such as a number or a brand or trade name in Latin script), including an RLM character at the start of the string or wrapping opposite direction runs in bidi controls can assist in proper display.

Strings on the Web: Language and Direction Metadata [string-meta] provides some guidance and illustrates a number of pitfalls when using bidirectional text.

In addition to the explicitly providedInteraction Affordances in theproperties,actions, andeventsArrays, aThing can also provide meta-interactions, which are indicated byForm instances in its optionalformsArray.When theformsArray of aThing instance containsForm instances, the string values assigned to the nameop, either directly or within anArray,MUST be one of the followingoperation types:readallproperties,writeallproperties,readmultipleproperties, orwritemultipleproperties. (Seean example for an usage ofform in a Thing instance.)

The data schema for each of these meta-interactions is constructed by combining the data schemas of eachPropertyAffordance instance in a singleObjectSchema instance, where thepropertiesMap of theObjectSchema instance contains each data schema of thePropertyAffordances identified by the name of the correspondingPropertyAffordances instance.

If not specified otherwise (e.g., through aTD Context Extension), the request data of thereadmultipleproperties operation is anArray that contains the intendedPropertyAffordances instance names, which is serialized to the content type specified by theForm instance.

5.3.1.2InteractionAffordance

Metadata of a Thing that shows the possible choices toConsumers, thereby suggesting howConsumers may interact with the Thing. There are many types of potential affordances, butW3C WoT defines three types of Interaction Affordances: Properties, Actions, and Events.

Vocabulary termDescriptionAssignmentType
@typeJSON-LD keyword to label the object with semantic tags (or types).optionalstring orArray ofstring
titleProvides a human-readable title (e.g., display a text for UI representation) based on a default language.optionalstring
titlesProvides multi-language human-readable titles (e.g., display a text for UI representation in different languages).optionalMultiLanguage
descriptionProvides additional (human-readable) information based on a default language.optionalstring
descriptionsCan be used to support (human-readable) information in different languages.optionalMultiLanguage
formsSet of form hypermedia controls that describe how an operation can be performed. Forms are serializations of Protocol Bindings.mandatoryArray ofForm
uriVariablesDefine URI template variables as collection based on DataSchema declarations.optionalMap ofDataSchema

The classInteractionAffordance has the following subclasses:

5.3.1.3PropertyAffordance

An Interaction Affordance that exposes state of the Thing. This state can then be retrieved (read) and optionally updated (write). Things can also choose to make Properties observable by pushing the new state after a change.

Vocabulary termDescriptionAssignmentType
observableA hint that indicates whether Servients hosting the Thing and Intermediaries should provide a Protocol Binding that supports theobserveproperty operation for this Property.optionalboolean
Note

Property instances are also instances of the classDataSchema. Therefore, it can contain thetype,unit,readOnly andwriteOnly members, among others.

PropertyAffordance is aSubclass of theInteractionAffordanceClass and theDataSchemaClass.When a Form instance is within aPropertyAffordance instance, the value assigned toopMUST be one ofreadproperty,writeproperty,observeproperty,unobserveproperty or anArray containing a combination of these terms.

5.3.1.4ActionAffordance

An Interaction Affordance that allows to invoke a function of the Thing, which manipulates state (e.g., toggling a lamp on or off) or triggers a process on the Thing (e.g., dim a lamp over time).

Vocabulary termDescriptionAssignmentType
inputUsed to define the input data schema of the Action.optionalDataSchema
outputUsed to define the output data schema of the Action.optionalDataSchema
safeSignals if the Action is safe (=true) or not. Used to signal if there is no internal state (cf. resource state) is changed when invoking an Action. In that case responses can be cached as example.with defaultboolean
idempotentIndicates whether the Action is idempotent (=true) or not. Informs whether the Action can be called repeatedly with the same result, if present, based on the same input.with defaultboolean

ActionAffordance is aSubclass of theInteractionAffordanceClass.When a Form instance is within anActionAffordance instance, the value assigned to opMUST beinvokeaction.

5.3.1.5EventAffordance

An Interaction Affordance that describes an event source, which asynchronously pushes event data toConsumers (e.g., overheating alerts).

Vocabulary termDescriptionAssignmentType
subscriptionDefines data that needs to be passed upon subscription, e.g., filters or message format for setting up Webhooks.optionalDataSchema
dataDefines the data schema of the Event instance messages pushed by the Thing.optionalDataSchema
cancellationDefines any data that needs to be passed to cancel a subscription, e.g., a specific message to remove a Webhook.optionalDataSchema

EventAffordance is aSubclass of theInteractionAffordanceClass.When a Form instance is within anEventAffordance instance, the value assigned toopMUST be eithersubscribeevent,unsubscribeevent, or both terms within anArray.

5.3.1.6VersionInfo

Metadata of a Thing that provides version information about the TD document. If required, additional version information such as firmware and hardware version (term definitions outside of the TD namespace) can be extended via theTD Context Extension mechanism.

Vocabulary termDescriptionAssignmentType
instanceProvides a version indicator of this TD instance.mandatorystring

It is recommended that the values within instances of theVersionInfoClass follow the semantic versioning pattern, where a sequence of three numbers separated by a dot indicates the major version, minor version, and patch version, respectively. See [SEMVER] for details.

5.3.1.7MultiLanguage

AMap providing a set of human-readable texts in different languages identified by language tags described in [BCP47]. See§ 6.3.2 Human-Readable Metadata for example usages of this container in a Thing Description instance.

Each name of theMultiLanguageMapMUST be a language tag as defined in [BCP47].Each value of theMultiLanguageMapMUST be of typestring.

5.3.2 Data Schema Vocabulary Definitions

The data schema vocabulary definition is reflecting a very common subset of the terms defined by JSON Schema [JSON-SCHEMA]. It is noted that data schema definitions within Thing Description instances are not limited to this defined subset and may use additional terms found in JSON Schema using aTD Context Extension for the additional terms as described in§ 7. TD Context Extensions, otherwise these terms are semantically ignored byTD Processors (for details about semantic processing, please refer to§ D. JSON-LD Context Usage and the documentation under the namespace IRIs, e.g.,https://www.w3.org/2019/wot/td).

A data schema is an abstract notation for data contained in data formats. In a TD, concrete data formats are specified in Forms (see§ 5.3.4.2Form) using content types. When the value of a content type in an instance of the Form isapplication/json, the data schema can be processed directly by JSON Schema processors. Otherwise, Web of Things (WoT) Binding Templates [WOT-BINDING-TEMPLATES] defines data schema's available mappings to other content types such as XML [xml]. If the content type in an instance of the Form is notapplication/json and if no mapping is defined for the content type, specifying a data schema does not make sense for the content type.

5.3.2.1DataSchema

Metadata that describes the data format used. It can be used for validation.

Vocabulary termDescriptionAssignmentType
@typeJSON-LD keyword to label the object with semantic tags (or types)optionalstring orArray ofstring
titleProvides a human-readable title (e.g., display a text for UI representation) based on a default language.optionalstring
titlesProvides multi-language human-readable titles (e.g., display a text for UI representation in different languages).optionalMultiLanguage
descriptionProvides additional (human-readable) information based on a default language.optionalstring
descriptionsCan be used to support (human-readable) information in different languages.optionalMultiLanguage
typeAssignment of JSON-based data types compatible with JSON Schema (one of boolean, integer, number, string, object, array, or null).optionalstring (one ofobject,array,string,number,integer,boolean, ornull)
constProvides a constant value.optionalany type
unitProvides unit information that is used, e.g., in international science, engineering, and business.optionalstring
oneOfUsed to ensure that the data is valid against one of the specified schemas in the array.optionalArray ofDataSchema
enumRestricted set of values provided as an array.optionalArray of any type
readOnlyBoolean value that is a hint to indicate whether a property interaction / value is read only (=true) or not (=false).with defaultboolean
writeOnlyBoolean value that is a hint to indicate whether a property interaction / value is write only (=true) or not (=false).with defaultboolean
formatAllows validation based on a format pattern such as "date-time", "email", "uri", etc. (Also see below.)optionalstring

The classDataSchema has the following subclasses:

Theformat string values are known from a fixed set of values and their corresponding format rules defined in [JSON-SCHEMA] (Section 7.3 Defined Formats in particular).ServientsMAY use theformat value to perform additional validation accordingly.When a value that is not found in the known set of values is assigned toformat, such a validationSHOULD succeed.

5.3.2.2ArraySchema

Metadata describing data of typeArray. ThisSubclass is indicated by the valuearray assigned totype inDataSchema instances.

Vocabulary termDescriptionAssignmentType
itemsUsed to define the characteristics of an array.optionalDataSchema orArray ofDataSchema
minItemsDefines the minimum number of items that have to be in the array.optionalunsignedInt
maxItemsDefines the maximum number of items that have to be in the array.optionalunsignedInt
5.3.2.3BooleanSchema

Metadata describing data of typeboolean. ThisSubclass is indicated by the valueboolean assigned totype inDataSchema instances.

5.3.2.4NumberSchema

Metadata describing data of typenumber. ThisSubclass is indicated by the valuenumber assigned totype inDataSchema instances.

Vocabulary termDescriptionAssignmentType
minimumSpecifies a minimum numeric value. Only applicable for associated number or integer types.optionaldouble
maximumSpecifies a maximum numeric value. Only applicable for associated number or integer types.optionaldouble
5.3.2.5IntegerSchema

Metadata describing data of typeinteger. ThisSubclass is indicated by the valueinteger assigned totype inDataSchema instances.

Vocabulary termDescriptionAssignmentType
minimumSpecifies a minimum numeric value. Only applicable for associated number or integer types.optionalinteger
maximumSpecifies a maximum numeric value. Only applicable for associated number or integer types.optionalinteger
5.3.2.6ObjectSchema

Metadata describing data of typeobject. ThisSubclass is indicated by the valueobject assigned totype inDataSchema instances.

Vocabulary termDescriptionAssignmentType
propertiesData schema nested definitions.optionalMap ofDataSchema
requiredDefines which members of the object type are mandatory.optionalArray ofstring
5.3.2.7StringSchema

Metadata describing data of typestring. ThisSubclass is indicated by the valuestring assigned totype inDataSchema instances.

5.3.2.8NullSchema

Metadata describing data of typenull. ThisSubclass is indicated by the valuenull assigned totype inDataSchema instances. This Subclass describes only one acceptable value, namelynull. It can be used as part of aoneOf declaration, where it is used to indicate, that the data can also benull.

5.3.3 Security Vocabulary Definitions

This specification provides a selection of well-established security mechanisms that are directly built into protocols eligible asProtocol Bindings forW3C WoT or are widely in use with those protocols. The current set of HTTP security schemes is partly based on OpenAPI 3.0.1 (see also [OPENAPI]). However while the HTTP security schemes,Vocabulary, and syntax given in this specification share many similarities with OpenAPI, they are not compatible.

5.3.3.1SecurityScheme

Metadata describing the configuration of a security mechanism.The value assigned to the nameschemeMUST be defined within aVocabulary included in theThing Description, either in the standardVocabulary defined in§ 5. TD Information Model or in aTD Context Extension.

Vocabulary termDescriptionAssignmentType
@typeJSON-LD keyword to label the object with semantic tags (or types).optionalstring orArray ofstring
schemeIdentification of the security mechanism being configured.mandatorystring (e.g.,nosec,basic,digest,bearer,psk,oauth2, orapikey)
descriptionProvides additional (human-readable) information based on a default language.optionalstring
descriptionsCan be used to support (human-readable) information in different languages.optionalMultiLanguage
proxyURI of the proxy server this security configuration provides access to. If not given, the corresponding security configuration is for the endpoint.optionalanyURI

The classSecurityScheme has the following subclasses:

5.3.3.2NoSecurityScheme

A security configuration corresponding to identified by theVocabulary Termnosec (i.e.,"scheme": "nosec"), indicating there is no authentication or other mechanism required to access the resource.

5.3.3.3BasicSecurityScheme

Basic Authentication [RFC7617] security configuration identified by theVocabulary Termbasic (i.e.,"scheme": "basic"), using an unencrypted username and password. This scheme should be used with some other security mechanism providing confidentiality, for example, TLS.

Vocabulary termDescriptionAssignmentType
inSpecifies the location of security authentication information.with defaultstring (one ofheader,query,body, orcookie)
nameName for query, header, or cookie parameters.optionalstring
5.3.3.4DigestSecurityScheme

Digest Access Authentication [RFC7616] security configuration identified by theVocabulary Termdigest (i.e.,"scheme": "digest"). This scheme is similar to basic authentication but with added features to avoid man-in-the-middle attacks.

Vocabulary termDescriptionAssignmentType
qopQuality of protection.with defaultstring (one ofauth, orauth-int)
inSpecifies the location of security authentication information.with defaultstring (one ofheader,query,body, orcookie)
nameName for query, header, or cookie parameters.optionalstring
5.3.3.5APIKeySecurityScheme

API key authentication security configuration identified by theVocabulary Termapikey (i.e.,"scheme": "apikey"). This is for the case where the access token is opaque and is not using a standard token format.

Vocabulary termDescriptionAssignmentType
inSpecifies the location of security authentication information.with defaultstring (one ofheader,query,body, orcookie)
nameName for query, header, or cookie parameters.optionalstring
5.3.3.6BearerSecurityScheme

Bearer Token [RFC6750] security configuration identified by theVocabulary Termbearer (i.e.,"scheme": "bearer") for situations where bearer tokens are used independently of OAuth2. If theoauth2 scheme is specified it is not generally necessary to specify this scheme as well as it is implied. Forformat, the valuejwt indicates conformance with [RFC7519],jws indicates conformance with [RFC7797],cwt indicates conformance with [RFC8392], andjwe indicates conformance with [RFC7516], with values foralg interpreted consistently with those standards.Other formats and algorithms for bearer tokensMAY be specified in vocabulary extensions.

Vocabulary termDescriptionAssignmentType
authorizationURI of the authorization server.optionalanyURI
algEncoding, encryption, or digest algorithm.with defaultstring (e.g.,MD5,ES256, orES512-256)
formatSpecifies format of security authentication information.with defaultstring (e.g.,jwt,cwt,jwe, orjws)
inSpecifies the location of security authentication information.with defaultstring (one ofheader,query,body, orcookie)
nameName for query, header, or cookie parameters.optionalstring
5.3.3.7PSKSecurityScheme

Pre-shared key authentication security configuration identified by theVocabulary Termpsk (i.e.,"scheme": "psk").

Vocabulary termDescriptionAssignmentType
identityIdentifier providing information which can be used for selection or confirmation.optionalstring
5.3.3.8OAuth2SecurityScheme

OAuth2 authentication security configuration for systems conformant with [RFC6749] and [RFC8252], identified by theVocabulary Termoauth2 (i.e.,"scheme": "oauth2").For thecode flow bothauthorization andtokenMUST be included. If noscopes are defined in theSecurityScheme then they are considered to be empty.

Vocabulary termDescriptionAssignmentType
authorizationURI of the authorization server.optionalanyURI
tokenURI of the token server.optionalanyURI
refreshURI of the refresh server.optionalanyURI
scopesSet of authorization scope identifiers provided as an array. These are provided in tokens returned by an authorization server and associated with forms in order to identify what resources a client may access and how. The values associated with a form should be chosen from those defined in anOAuth2SecurityScheme active on that form.optionalstring orArray ofstring
flowAuthorization flow.mandatorystring (e.g.,code)

5.3.4 Hypermedia Controls Vocabulary Definitions

The present model provides a representation for (typed) Web links and Web forms exposed by aThing. TheLink class definition is reflecting a very common subset of the terms defined in Web Linking [RFC8288]. The defined terms can be used, e.g., to describe the relation to anotherThing such as aLamp Thing is controlled by aSwitch Thing. TheForm class corresponds to a newly introduced form of hypermedia control to manipulate the state ofThings (and other Web resources).

5.3.4.1Link

A link can be viewed as a statement of the form "link context has arelation type resource atlink target", where the optionaltarget attributes may further describe the resource.

Vocabulary termDescriptionAssignmentType
5.3.4.2Form

A form can be viewed as a statement of "To perform anoperation type operation onform context, make arequest method request tosubmission target" where the optionalform fields may further describe the required request. In Thing Descriptions, theform context is the surrounding Object, such as Properties, Actions, and Events or the Thing itself for meta-interactions.

Vocabulary termDescriptionAssignmentType
opIndicates the semantic intention of performing the operation(s) described by the form. For example, the Property interaction allows get and set operations. The protocol binding may contain a form for the get operation and a different form for the set operation. The op attribute indicates which form is for which and allows the client to select the correct form for the operation required. op can be assigned one or more interaction verb(s) each representing a semantic intention of an operation.with defaultstring orArray ofstring (one ofreadproperty,writeproperty,observeproperty,unobserveproperty,invokeaction,subscribeevent,unsubscribeevent,readallproperties,writeallproperties,readmultipleproperties, orwritemultipleproperties)
hrefTarget IRI of a link or submission target of a form.mandatoryanyURI
contentTypeAssign a content type based on a media type (e.g.,text/plain) and potential parameters (e.g.,charset=utf-8) for the media type [RFC2046].with defaultstring
contentCodingContent coding values indicate an encoding transformation that has been or can be applied to a representation. Content codings are primarily used to allow a representation to be compressed or otherwise usefully transformed without losing the identity of its underlying media type and without loss of information. Examples of content coding include "gzip", "deflate", etc. .optionalstring
subprotocolIndicates the exact mechanism by which an interaction will be accomplished for a given protocol when there are multiple options. For example, for HTTP and Events, it indicates which of several available mechanisms should be used for asynchronous notifications such as long polling (longpoll), WebSub [websub] (websub), Server-Sent Events (sse) [html] (also known as EventSource). Please note that there is no restriction on the subprotocol selection and other mechanisms can also be announced by this subprotocol term.optionalstring (e.g.,longpoll,websub, orsse)
securitySet of security definition names, chosen from those defined insecurityDefinitions. These must all be satisfied for access to resources.optionalstring orArray ofstring
scopesSet of authorization scope identifiers provided as an array. These are provided in tokens returned by an authorization server and associated with forms in order to identify what resources a client may access and how. The values associated with a form should be chosen from those defined in anOAuth2SecurityScheme active on that form.optionalstring orArray ofstring
responseThis optional term can be used if, e.g., the output communication metadata differ from input metadata (e.g., output contentType differ from the input contentType). The response name contains metadata that is only valid for the response messages.optionalExpectedResponse

Possible values for thecontentCoding property can be found, e.g., in the IANA HTTP content coding registry.

The list of possible operation types of a form is fixed. As of this version of the specification, it only includes the well-known types necessary to implement the WoT interaction model described in [WOT-ARCHITECTURE]. Future versions of the standard may extend this list butoperations typesSHOULD NOT be arbitrarily set by servients.

The optionalresponse name-value pair can be used to provide metadata for the expected response message. With the core vocabulary, it only includes content type information, but TD Context Extensions could be applied.If noresponse name-value pair is provided, itMUST be assumed that the content type of the response is equal to the content type assigned to the Form instance. Note thatcontentType within anExpectedResponseClass does not have aDefault Value. For instance, if the value of the content type of the form isapplication/xml the assumed value of the content type of the response will be alsoapplication/xml.

In some use cases, input and output data might be represented in a different form, for instance an Action that accepts JSON, but returns an image. In such a case, the optionalresponse name-value pair can describe the content type of the expected response.If the content type of the expected response differs from the content type of the form, theForm instanceMUST include a name-value pair with the nameresponse. For instance, anActionAffordance could only acceptapplication/json for its input data, while it will respond with animage/jpeg content type for its output data. In that case the content types differ and theresponse name-value pair has to be used to provide response content type (image/jpeg) information to theConsumer.

5.3.4.3ExpectedResponse

Communication metadata describing the expected response message.

Vocabulary termDescriptionAssignmentType
contentTypeAssign a content type based on a media type (e.g.,text/plain) and potential parameters (e.g.,charset=utf-8) for the media type [RFC2046].mandatorystring

5.4 Default Value Definitions

When assignments in a TD are missing, aTD ProcessorMUST follow theDefault Value assignments expressed in the table of§ 5.4 Default Value Definitions.

The following table gives allDefault Values defined in theTD Information Model.

ClassVocabulary TermDefault ValueComment
FormcontentTypeapplication/json
DataSchemareadOnlyfalse
DataSchemawriteOnlyfalse
ActionAffordancesafefalse
ActionAffordanceidempotentfalse
FormopArray ofstring with the elementsreadproperty andwriteproperty
If defined within an instance ofPropertyAffordance
FormopinvokeactionIf defined within an instance ofActionAffordance
FormopsubscribeeventIf defined within an instance ofEventAffordance
BasicSecuritySchemeinheader
DigestSecuritySchemeinheader
BearerSecuritySchemeinheader
APIKeySecuritySchemeinquery
DigestSecuritySchemeqopauth
BearerSecuritySchemealgES256
BearerSecuritySchemeformatjwt

6. TD Representation Format

WoT Thing Descriptions represent Things and are modeled and structured based on§ 5. TD Information Model. This section defines a JSON-based representation format forThings, a serialization of instances of theClassThing defined by theTD Information Model.

ATD ProcessorMUST be able to serializeThing Descriptions into the JSON format [RFC8259] and/or deserializeThing Descriptions from that format, according to the rules noted in§ 6.1 Mapping to JSON Types and§ 6.3 Information Model Serialization.

The JSON serialization of theTD Information Model is aligned with the syntax of JSON-LD 1.1 [json-ld11] in order to streamline semantic evaluation. Hence, the TD representation format can be processed either as raw JSON or with a JSON-LD 1.1 processor (for details about semantic processing, please refer to§ D. JSON-LD Context Usage and the documentation under the namespace IRIs, e.g.,https://www.w3.org/2019/wot/td).

In order to support interoperable internationalization,TDsMUST be serialized according to the requirements defined in Section 8.1 of RFC8259 [RFC8259] for open ecosystems. In summary, this requires the following:

6.1 Mapping to JSON Types

TheTD Information Model is constructed, so that there is an easy mapping between modelObjects and JSON types. EveryClass instances maps to a JSON object, where each name-value pair of theClass instance is a member of the JSON object.

EverySimple Type mentioned in§ 5.3 Class Definitions (i.e.,string,anyURI,dateTime,integer,unsignedInt,double, andboolean) maps to a primitive JSON type (string, number, boolean), as per the rules listed below. These rules apply to values in name-value pairs:

Every complex type of theTD Information Model (i.e.,Arrays,Maps, andClass instances) maps to a structured JSON type (array and object), as per the rules listed below:

6.2 Omitting Default Values

A Thing Description serialization may omitVocabulary Term for whichDefault Values are defined, as listed in the table given in§ 5.4 Default Value Definitions.

The following example shows the TD instance fromExample 1 with a checkbox to also include the members withDefault Values (=checkbox checked). These members can be omitted (=checkbox unchecked) to simplify the TD serialization. Note that aTD Processor interprets these omitted members identically as if they were explicitly present with a givenDefault Value.

Example3
with Default Values
{"@context":"https://www.w3.org/2019/wot/td/v1","id":"urn:dev:ops:32473-WoTLamp-1234","title":"MyLampThing","securityDefinitions": {"basic_sc": {"scheme":"basic"        }    },"security": ["basic_sc"    ],"properties": {"status": {"type":"string","forms": [{"href":"https://mylamp.example.com/status"            }]        }    },"actions": {"toggle": {"forms": [{"href":"https://mylamp.example.com/toggle"            }]        }    },"events": {"overheating": {"data": {"type":"string"            },"forms": [{"href":"https://mylamp.example.com/oh","subprotocol":"longpoll"            }]        }    }}
{"@context":"https://www.w3.org/2019/wot/td/v1","id":"urn:dev:ops:32473-WoTLamp-1234","title":"MyLampThing","securityDefinitions": {"basic_sc": {"scheme":"basic","in":"header"        }    },"security": ["basic_sc"    ],"properties": {"status": {"type":"string","readOnly" :false,"writeOnly" :false,"forms": [{"op": ["readproperty","writeproperty"                ],"href":"https://mylamp.example.com/status","contentType":"application/json"            }]        }    },"actions": {"toggle": {"safe":false,"idempotent":false,"forms": [{"op":"invokeaction","href":"https://mylamp.example.com/toggle","contentType":"application/json"            }]        }    },"events": {"overheating": {"data": {"type":"string","readOnly" :false,"writeOnly" :false            },"forms": [{"op":"subscribeevent","href":"https://mylamp.example.com/oh","contentType":"application/json","subprotocol":"longpoll"            }]        }    }}

Please note that, depending on theProtocol Binding used, additional protocol-specificVocabulary Terms may apply. They may also have associatedDefault Values, and hence can also be omitted as explained in this subsection. Further information can be found in§ 8.3 Protocol Bindings.

6.3 Information Model Serialization

6.3.1 Thing Root Object

A Thing Description is a data structure rooted at anObject of typeThing. In turn, a JSON serialization of the Thing Description is a JSON object, which is the root of a syntax tree constructed from theTD Information Model.

The root element of aTD SerializationMUST be a JSON object that includes a member with the name@context and a value of type string or array that equals or respectively containshttps://www.w3.org/2019/wot/td/v1.

In general, this URI is used to identify the TD representation format version defined by this specification. For JSON-LD processing [json-ld11], this URI specifies the Thing Description context file. An@context of type array indicatesTD Context Extensions (see§ 7. TD Context Extensions for details).

Example4
{"@context":"https://www.w3.org/2019/wot/td/v1",    ...}

All name-value pairs of an instance ofThing, where the name is aVocabulary Term in theSignature ofThing,MUST be serialized as JSON members of the root object.

A TD snippet for a serialized root object including all mandatory and optional members is given below:

Example5: Sample of Thing serializations
{"@context":"https://www.w3.org/2019/wot/td/v1","@type":"Thing","id":"urn:dev:ops:32473-Thing-1234","title":"MyThing","titles": {...},"description":"Human readable information.","descriptions": {...},"support":"mailto:support@example.com","version" : {...},"created" :"2018-11-14T19:10:23.824Z","modified" :"2019-06-01T09:12:43.124Z","securityDefinitions": {...},"security": ...,"base":"https://servient.example.com/","properties": {...},"actions": {...},"events": {...},"links": [...],"forms": [...]}

All values assigned toversion,securityDefinitions,properties,actions, andevents in an instance of theClassThingMUST be serialized as JSON objects.

All values assigned tolinks, andforms in an instance of theClassThingMUST be serialized as JSON arrays containing JSON objects as defined in§ 6.3.8links and§ 6.3.9forms, respectively.

The value assigned tosecurity in an instance ofClassThingMUST be serialized as JSON string or as JSON array whose elements are JSON strings.

6.3.2 Human-Readable Metadata

JSON members namedtitle anddescription are used within a TD document to provide human-readable metadata. They can be used as comments for developers inspecting a TD document or as display texts for user interface.

As defined in§ 5.3.1.1Thing, the base text direction used to display human-readable metadata can either be estimated using heuristics such as the first-strong rule or inferred from language information. In TD documents the default language is defined by a value assigned to@language in the@context, and this, along with a script subtag if necessary, can be used to determine a base text direction.However, when interpreting human-readable text, each human-readable string valueMUST be processed independently. In other words, aTD Processor cannot carry forward changes in direction from one string to another, or infer direction for one string from another one elsewhere in the TD.

Note

Strings on the Web [STRING-META] suggests both strong-first and language-based inferencing as means to determine the base text direction. Given that the Thing Description format is based on JSON-LD 1.1 [json-ld11], which currently lacks explicit direction metadata, these approaches are currently considered appropriate at the time of this publication. However, if JSON-LD 1.1 adopts support for explicit base direction metadata as recommended by [STRING-META], the Thing Description format should be updated to take advantage of that feature.

A TD snippet usingtitle anddescription is shown below. The default language is set toen through the definition of the@language member within a JSON object in the@context array.

Example6
{"@context": ["https://www.w3.org/2019/wot/td/v1",        {"@language" :"en" }    ],"title":"MyThing","description":"Human readable information.",    ..."properties": {"on": {"title" :"On/Off","type":"boolean","forms": [...]        },"status": {"title" :"Status","type":"object",            ..."forms": [...]        }    },    ...}

The JSON members namedtitles anddescriptions are used within the TD document to provide human-readable metadata in multiple languages within a single TD document.All name-value pairs of aMultiLanguageMapMUST be serialized as members of a JSON object, where the name is a well-formed language tag as defined by [BCP47] and the value is a human-readable string in the language indicated by the tag. See§ 5.3.1.7MultiLanguage for details.AllMultiLanguage object within a TD documentSHOULD contain the same set of language members.

A TD snippet usingtitles anddescriptions at different levels is given below:

Example7
{"@context":"https://www.w3.org/2019/wot/td/v1","title":"MyThing","titles": {"en":"MyThing","de":"MeinDing","ja" :"私の物","zh-Hans" :"我的东西","zh-Hant" :"我的東西"    },"descriptions": {"en":"Human readable information.","de":"Menschenlesbare Informationen.","ja" :"人間が読むことができる情報","zh-Hans" :"人们可阅读的信息","zh-Hant" :"人們可閱讀的資訊"    },    ..."properties": {"on": {"titles": {"en":"On/Off","de":"An/Aus","ja":"オンオフ","zh-Hans":"开关","zh-Hant":"開關" },"type":"boolean","forms": [...]        },"status": {"titles": {"en":"Status","de":"Zustand","ja":"状態","zh-Hans":"状态","zh-Hant":"狀態" },"type":"object",            ..."forms": [...]        }    },    ...}

TD instances may also combine the use oftitle anddescription withtitles anddescriptions.Whentitle andtitles ordescription anddescriptions are present within the same JSON object, the values oftitle anddescriptionMAY be seen as the default text.Whentitle andtitles ordescription anddescriptions are present in a TD document, eachtitle anddescription memberSHOULD have a correspondingtitles anddescriptions member, respectively. The language of the default text is indicated by the default language, which is usually set by the creator of the Thing Description instance.

Example8
{"@context": ["https://www.w3.org/2019/wot/td/v1",        {"@language" :"de" }    ],"title":"MyThing","titles": {"en":"MyThing","de":"MeinDing","ja" :"私の物","zh-Hans" :"我的东西","zh-Hant" :"我的東西"    },"description":"Menschenlesbare Informationen.","descriptions": {"en":"Human readable information.","de":"Menschenlesbare Informationen.","ja" :"人間が読むことができる情報","zh-Hans" :"人们可阅读的信息","zh-Hant" :"人們可閱讀的資訊"    },    ..."properties": {"on": {"title" :"An/Aus","titles": {"en":"On/Off","de":"An/Aus","ja":"オンオフ","zh-Hans":"开关","zh-Hant":"開關" },"type":"boolean","forms": [...]        },"status": {"title" :"Zustand","titles": {"en":"Status","de":"Zustand","ja":"状態","zh-Hans":"状态","zh-Hant":"狀態" },"type":"object",            ..."forms": [...]        }    },    ...}

Another possibility to set the default language is through a language negotiation mechanism, such as theAccept-Language header field of HTTP.In cases where the default language has been negotiated, an@language memberMUST be present to indicate the result of the negotiation and the corresponding default language of the returned content.When the default language has been negotiated successfully, TD documentsSHOULD include the appropriate matching values for the memberstitle anddescription in preference toMultiLanguage objects intitles anddescriptions members.Note however that ThingsMAY choose to not support such dynamically-generated TDs nor to support language negotiation (e.g., because of resource constraints).

6.3.3version

All name-value pairs of an instance ofVersionInfo, where the name is aVocabulary Term included in theSignature ofVersionInfo,MUST be serialized as JSON members with theVocabulary Term as name.

A TD snippet of a version information object is given below:

Example9
{    ..."version": {"instance":"1.2.1" },    ...}

Theversion member is intended as container for additional application- and/or device-specific version information based onTD Context Extensions. See§ 7.1 Semantic Annotations for details.

6.3.4securityDefinitions andsecurity

In aThing instance, the value assigned tosecurityDefinitions is aMap of instances ofSecurityScheme.All name-value pairs of aMap ofSecurityScheme instancesMUST be serialized as members of the JSON object that results from serializing theMap; the name of a pairMUST be serialized as a JSON string and the value of the pair, an instance ofSecurityScheme,MUST be serialized as a JSON object.

All name-value pairs of an instance of one of theSubclasses ofSecurityScheme, where the name is aVocabulary Term included in theSignature of thatSubclass or in theSignature ofSecurityScheme,MUST be serialized as members of the JSON object that results from serializing theSecuritySchemeSubclass's instance, with theVocabulary Term as name.

The following TD snippet shows a simple security configuration specifying basic username/password authentication in the header. The value given forin is actually theDefault Value (header) and could be omitted. A named security configuration must be given in thesecurityDefinitions map. That definition must be activated by including its JSON name in thesecurity member, which can be of type string when only one definition is activated.

Example10
..."securityDefinitions": {"basic_sc": {"scheme":"basic","in":"header"    }},"security":"basic_sc",...

Here is a more complex example: a TD snippet showing digest authentication on a proxy combined with bearer token authentication on theThing. In thedigest scheme, theDefault Value ofin (i.e.,header) is omitted, but still applies. Note that the corresponding private security configuration such as username/password and tokens must be configured in theConsumer to interact successfully. When activating multiple security definitions, thesecurity member becomes an array.

Example11
..."securityDefinitions": {"proxy_sc": {"scheme":"digest","proxy":"https://portal.example.com/"    },"bearer_sc": {"in":"header","scheme":"bearer","format":"jwt","alg":"ES256","authorization":"https://servient.example.com:8443/"    }},"security": ["proxy_sc","bearer_sc"],...

Security configuration in the TD is mandatory.At least one security definitionMUST be activated through thesecurity array at the Thing level (i.e., in the TD root object). This configuration can be seen as the default security mechanism required to interact with theThing.Security definitionsMAY also be activated at the form level by including asecurity member in form objects, which overrides (i.e., completely replace) all definitions activated at the Thing level.

Thenosec security scheme is provided for the case that no security is needed. The minimal security configuration for aThing is activation of thenosec security scheme at the Thing level, as shown in the following example:

Example12
{"@context":"https://www.w3.org/2019/wot/td/v1","id":"urn:dev:ops:32473-Thing-1234","title":"MyThing","description":"Human readable information.","support":"https://servient.example.com/contact","securityDefinitions": {"nosec_sc": {"scheme":"nosec" }},"security":"nosec_sc","properties": {...},"actions": {...},"events": {...},"links": [...]}

To give a more complex example, suppose we have aThing where allInteraction Affordances require basic authentication except for one, for which no authentication is required. For thestatus Property and thetoggle Action,basic authentication is required and defined at the Thing level. For theoverheating Event, however, no authentication is required, and hence the security configuration is overridden at the form level.

Example13
{    ..."securityDefinitions": {"basic_sc": {"scheme":"basic"},"nosec_sc": {"scheme":"nosec"}    },"security": ["basic_sc"],    ..."properties": {"status": {            ..."forms": [{"href":"https://mylamp.example.com/status"            }]        }    },"actions": {"toggle": {            ..."forms": [{"href":"https://mylamp.example.com/toggle"            }]        }    },"events": {"overheating": {            ..."forms": [{"href":"https://mylamp.example.com/oh","security": ["nosec_sc"]            }]        }    }}

Security configurations can also can be specified for different forms within the sameInteraction Affordance. This may be required for devices that support multiple protocols, for example HTTP and CoAP [RFC7252], which support different security mechanisms. This is also useful when alternative authentication mechanisms are allowed. Here is a TD snippet demonstrating three possible ways to activate a Property affordance: via HTTPS with basic authentication, with digest authentication, with bearer token authentication. In other words, the use of different security configurations within multiple forms provides a way to combine security mechanisms in an "OR" fashion. In contrast, putting multiple security configurations in the samesecurity member combines them in an "AND" fashion, since in that case they would all need to be satisfied to allow activation of theInteraction Affordance. Note that activating one (default) configuration at the Thing level is still mandatory.

Example14
{    ..."securityDefinitions": {"basic_sc": {"scheme":"basic" },"digest_sc": {"scheme":"digest" },"bearer_sc": {"scheme":"bearer" }    },"security": ["basic_sc"],    ..."properties": {"status": {            ..."forms": [{"href":"https://mylamp.example.com/status"            }, {"href":"https://mylamp.example.com/status","security": ["digest_sc"]            }, {"href":"https://mylamp.example.com/status","security": ["bearer_sc"]            }]        }    },    ...}

As another more complex example, OAuth2 makes use of scopes. These are identifiers that may appear in tokens and must match with corresponding identifiers in a resource to allow access to that resource (orInteraction Affordance in the case ofW3C WoT). For example, in the following, thestatus Property can be read byConsumers using bearer tokens containing the scopelimited, but theconfigure Action can only be invoked with a token containing thespecial scope. Scopes are not identical to roles, but are often associated with them; for example, perhaps only those in an administrative role are authorized to perform "special" interactions. Tokens can have more than one scope. In this example, an administrator would probably be issued tokens with both thelimited andspecial scopes, while ordinary users would only be issued tokens with thelimited scope.

Example15
{    ..."securityDefinitions": {"oauth2_sc": {"scheme":"oauth2",            ..."flow":"code","authorization":"https://example.com/authorization","token":"https://example.com/token","scopes": ["limited","special"]        }    },"security": ["oauth2_sc"],    ..."properties": {"status": {            ..."forms": [{"href":"https://scopes.example.com/status","scopes": ["limited"]            }]        }    },"actions": {"configure": {            ..."forms": [{"href":"https://scopes.example.com/configure","scopes": ["special"]            }]        }    },    ...}

6.3.5properties

The value assigned toproperties in aThing instance is aMap of instances ofPropertyAffordance.All name-value pairs of aMap ofPropertyAffordance instancesMUST be serialized as members of the JSON object that results from serializing theMap; the name of a pairMUST be serialized as a JSON string and the value of the pair, an instance ofPropertyAffordance,MUST be serialized as a JSON object.

All name-value pairs of an instance ofPropertyAffordance, where the name is aVocabulary Term included in (one of) theSignatures ofPropertyAffordance,InteractionAffordance, orDataSchema,MUST be serialized as members of the JSON object that results from serializing thePropertyAffordance instance, with theVocabulary Term as name. See§ 6.3.10 Data Schemas for details on serializingDataSchema instances.

The value assigned toforms in an instance ofPropertyAffordanceMUST be serialized as a JSON array containing one or more JSON object serializations as defined in§ 6.3.9forms.

A snippet for twoProperty affordances is given below:

Example16: Sample of Property serializations
..."properties": {"on": {"type":"boolean","forms": [...]    },"status": {"type":"object","properties": {"brightness": {"type":"number","minimum":0.0,"maximum":100.0            },"rgb": {"type":"array","items" : {"type" :"number","minimum":0,"maximum":255                },"minItems":3,"maxItems":3            }        },"required": ["brightness","rgb"],"forms": [...]    }},...

6.3.6actions

In aThing instance, the value assigned toactions is aMap of instances ofActionAffordance.All name-value pairs of aMap ofActionAffordance instancesMUST be serialized as members of the JSON object that results from serializing theMap; the name of a pairMUST be serialized as a JSON string and the value of the pair, an instance ofActionAffordance,MUST be serialized as a JSON object.

All name-value pairs of an instance ofActionAffordance, where the name is aVocabulary Term included in (one of) theSignatures ofActionAffordance orInteractionAffordance,MUST be serialized as members of the JSON object that results from serializing theActionAffordance instance, with theVocabulary Term as name.

The values assigned toinput andoutput in an instance ofActionAffordanceMUST be serialized as JSON objects. They rely on theClassDataSchema, whose serialization is defined in§ 6.3.10 Data Schemas.

The value assigned toforms in an instance ofActionAffordanceMUST be serialized as a JSON array containing one or more JSON object serializations as defined in§ 6.3.9forms.

A TD snippet of an Action affordance is given below:

Example17: Sample of an Action serialization
..."actions": {"fade" : {"title":"Fade in/out","description":"Smooth fade in and out animation.","input": {"type":"object","properties": {"from": {"type":"integer","minimum":0,"maximum":100                },"to": {"type":"integer","minimum":0,"maximum":100                },"duration": {"type":"number"}            },"required": ["to","duration"],        },"output": {"type":"string"},"forms": [...]    }},...

6.3.7events

In aThing instance, the value assigned toevents is a map of instances ofEventAffordance.All name-value pairs of aMap ofEventAffordance instancesMUST be serialized as members of the JSON object that results from serializing theMap; the name of a pairMUST be serialized as a JSON string and the value of the pair, an instance ofEventAffordance,MUST be serialized as a JSON object.

All name-value pairs of an instance ofEventAffordance, where the name is aVocabulary Term included in (one of) theSignatures ofEventAffordance orInteractionAffordance,MUST be serialized as members of the JSON object that results from serializing theEventAffordance instance, with theVocabulary Term as name.

The values assigned tosubscription,data, andcancellation in an instance ofEventAffordanceMUST be serialized as JSON objects. They rely on theClassDataSchema, whose serialization is defined in§ 6.3.10 Data Schemas.

The value assigned toforms in an instance ofEventAffordanceMUST be serialized as a JSON array containing one or more JSON object serializations as defined in§ 6.3.9forms.

A TD snippet of an Event object is given below:

Example18: Sample of an Event serialization
..."events": {"overheated": {"data" : {"type":"string"        },"forms": [...]    }},...

Event affordances have been defined in a flexible manner, in order to adopt existing (e.g., WebSub [websub]) or customer-oriented event mechanisms (e.g., Webhooks). For this reason,subscription andcancellation can be defined according to the desired mechanism. Please find further details in [WOT-BINDING-TEMPLATES]. Example§ A.3 Webhook Event Example illustrates how Events can usesubscription andcancellation to describe Webhooks.

6.3.8links

All name-value pairs of an instance ofLink, where the name is aVocabulary Term included in theSignature ofLink,MUST be serialized as members of the JSON object that results from serializing theLink instance, with theVocabulary Term as name.

A TD snippet of a link object in thelinks array is given below:

Example19: Sample of a Link serialization
..."links": [{"rel":"controlledBy","href":"https://servient.example.com/things/lampController","type":"application/td+json"}]...

6.3.9forms

All name-value pairs of an instance ofForm, where the name is aVocabulary Term included in theSignature ofForm,MUST be serialized as members of the JSON object that results from serializing theForm instance, with theVocabulary Term as name.

If required, form objectsMAY be supplemented with protocol-specificVocabulary Terms identified with a prefix. See also§ 8.3 Protocol Bindings.

A TD snippet of a form object in theforms array is given below:

Example20: Sample of a Form serialization
..."forms": [{"op":"writeproperty","href" :"http://mytemp.example.com:5683/temp","contentType":"application/json","htv:methodName":"POST"}]...

href may also carry a URI that contains dynamic variables such as p and d in http://192.168.1.25/left?p=2&d=1. In that case the URI can be defined as template as defined in [RFC6570]:http://192.168.1.25/left{?p,d}.

In such a case, the URI Template variablesMUST be collected in the JSON-object baseduriVariables member with the associated (unique) variable names as JSON names.

The serialization of each value in the map assigned touriVariables in an instance ofFormMUST rely on theClassDataSchema, whose serialization is defined in§ 6.3.10 Data Schemas.

A TD snippet using a URI Template anduriVariables is given below:

Example21
{"@context": ["https://www.w3.org/2019/wot/td/v1",        {"eg":"http://www.example.org/iot#" }    ],    ..."actions": {"LeftDown": {            ..."uriVariables": {"p" : {"type":"integer","minimum":0,"maximum":16,"@type":"eg:SomeKindOfAngle" },"d" : {"type":"integer","minimum":0,"maximum":1,"@type":"eg:Direction" }            },"forms": [{"href" :"http://192.168.1.25/left{?p,d}","htv:methodName":"GET"            }]        },        ...    },    ...}

ThecontentType member is used to assign a media type [RFC2046] including media type parameters as attribute-value pairs separated by a; character. Example:

Example22
..."contentType" :"text/plain; charset=utf-8",...

In some use cases, the form metadata of theInteraction Affordance not only describes the request, but also provides metadata for the expected response. For instance, an ActiontakePhoto defines aninput schema to submit parameter settings of a camera (aperture priority, timer, etc.) using JSON for the request payload (i.e.,"contentType": "application/json"). The output of this action is the photo taken, which is available in JPEG format, for example. In such cases, theresponse member is used to indicate the representation format of the response payload (e.g.,"contentType": "image/jpeg"). Here nooutput schema is required, as the content type fully specifies the representation format.

If present, the value assigned toresponse in an instance ofFormMUST be a JSON object.If present, the response objectMUST contain acontentType member as defined in theClass definition ofExpectedResponse.

Aform snippet with theresponse member is shown below based on thetakePhoto Action described above:

Example23
{    ..."actions": {"takePhoto": {            ..."forms": [{"op":"invokeaction","href":"http://camera.example.com/api/snapshot","contentType":"application/json","response": {"contentType":"image/jpeg"                }            }]        }    },    ...}

Whenforms is present at the top level, it can be used to describe meta interactions offered by aThing. For example, the operation types "readallproperties" and "writeallproperties" are for meta interactions with aThing by whichConsumers can read and write all properties at once. In the example below, aforms member is included in the TD root object and theConsumer can use the submission targethttps://mylamp.example.com/allproperties both to read or write all Properties (i.e.,on,brightness, andtimer) of theThing in a single protocol transaction.

Example24
{    ..."properties": {"on": {"type":"boolean","forms": [...]        },"brightness": {"type":"number","forms": [...]        },"timer": {"type":"integer","forms": [...]        }    },    ..."forms": [{"op":"readallproperties","href":"https://mylamp.example.com/allproperties","contentType":"application/json","htv:methodName":"GET"    }, {"op":"writeallproperties","href":"https://mylamp.example.com/allproperties","contentType":"application/json","htv:methodName":"PUT"    }]}
In the case of operation typewriteallproperties, it is expected that theConsumer provides all writable (nonreadOnly) properties and the (new) assigned values (e.g., within payload). Similarly, for thewritemultipleproperties operation type, it is expected that theConsumer provides writable (nonreadOnly) properties. On theThing side,Thing is expected to return readable (nonwriteOnly) properties in the case ofreadmultipleproperties andreadallproperties operation types.

6.3.10 Data Schemas

The data schemas of the WoT Thing Description defined through theDataSchemaClass are based on a subset of the JSON Schema terms [JSON-SCHEMA]. Thus, serializations of the TD data schemas can be fed directly into JSON Schema validator implementations to validate the data exchanged withThings.

Data schema serialization applies toPropertyAffordance instances, the values assigned toinput andoutput inActionAffordance instances, the values assigned tosubscription,data, andcancellation inEventAffordance instances, and the value assigned touriVariables in instances ofSubclasses ofInteractionAffordance (when aform object uses a URI Template).

All name-value pairs of an instance of one of theSubclasses ofDataSchema, where the name is aVocabulary Term included in theSignature of thatSubclass or in theSignature ofDataSchema,MUST be serialized as members of the JSON object that results from serializing theDataSchemaSubclass's instance, with theVocabulary Term as name.

The value assigned toproperties in an instance ofObjectSchemaMUST be serialized as a JSON object.

The values assigned toenum,required, andoneOf in an instance ofDataSchemaMUST be serialized as a JSON array.

The value assigned toitems in an instance ofArraySchemaMUST be serialized as a JSON object or a JSON array containing JSON objects.

A TD snippet data schema members is given below. Note that the surrounding object may be a data schema object (e.g., forinput andoutput) or a Property object, which would contain additional members.

Example25: Sample of a DataSchema serialization
..."type":"object","properties": {"status": {"title":"Status","type":"string","enum": ["On","Off","Error"]    },"brightness": {"title":"Brightness value","type":"number","minimum":0.0,"maximum":100.0    },"rgb": {"title":"RGB color value","type":"array","items" : {"type" :"number","minimum":0,"maximum":255        },"minItems":3,"maxItems":3    }},...

The termsreadOnly andwriteOnly can be used signal which data items are exchanged in read interactions (i.e., when reading a Property) and which in write interactions (i.e., when writing a Property). This can be used as workaround when Properties of an unconventionalThing exhibit different data for reading and writing, which can be the case when augmenting an existing device or service with a Thing Description.

A TD snippet with the usage ofreadOnly andwriteOnly is given below:

Example26
..."properties": {"status": {"description":"Read or write On/Off status.","type":"object","properties": {"latestStatus": {"type":"string","enum": ["On","Off"],"readOnly":true            },"newStatusValue": {"type":"string","enum": ["On","Off"],"writeOnly":true            }        },forms: [...]    }}...

When thestatus Property is read, the status data is returned using alatestStatus member in the payload. To update thestatus Property, the new value must be provided through anewStatusValue member in the payload.

As an additional feature, a Thing Description instance allows the usage of aunit member within data schemas. This can be used to associate a unit of measure to a data item. Its string value can be selected freely. However, it is recommended to select units defined in well-knownVocabularies. See§ 7. TD Context Extensions for an example.

6.4 Identification

The JSON-based serialization of Thing Descriptions is identified by the media typeapplication/td+json or the CoAP Content-Format ID432 (see§ 10. IANA Considerations).

7. TD Context Extensions

This section is non-normative.

In addition to the standardVocabulary definitions in§ 5. TD Information Model, the WoT Thing Description offers the possibility to add context knowledge from additional namespaces. This mechanism can be used to enrich the Thing Description instances with additional (e.g., domain-specific) semantics. It can also be used to import additionalProtocol Bindings or new security schemes in the future.

For suchTD Context Extensions, the Thing Descriptions use the@context mechanism known from JSON-LD [json-ld11]. When usingTD Context Extensions, the value of@context of theClassThing is an Array with additional elements of typeanyURI identifying JSON-LD context files orMap containing namespace IRIs as defined in§ 5.3.1.1Thing.

The serialization rules for complex types in§ 6.1 Mapping to JSON Types define the serialization of an extended@context name-value pair. A snippet withTD Context Extensions is given below:

Example27
{"@context": ["https://www.w3.org/2019/wot/td/v1",        {"eg":"http://example.org/iot#","cov":"http://www.example.org/coap-binding#"        },"https://schema.org/"    ],    ...}

7.1 Semantic Annotations

TD Context Extensions allow for additionalVocabulary Terms to a Thing Description instance. If the included namespaces are based onClass definitions such as those provided by the RDF Schema or OWL, they can be used to annotate anyClass instance of a Thing Description semantically by associating the instance to a such an externalClass definition. This is done by assigning aClass name to the@type name-value pair or includingClass name in itsArray value for multiple associations/annotations. Following the serialization rules in§ 6.1 Mapping to JSON Types,@type is either serialized as JSON string or as JSON array.@type is the JSON-LD keyword [json-ld11] used to set the type of a node.

TD Context Extensions also allow the inclusion of additional name-value pairs and well-defined values within anyClass instance of a Thing Description. These pairs and values are defined through the includedVocabulary Terms and are serialized as additional members in the corresponding JSON objects or values of existing members, respectively. Examples are additional version metadata for theThing or units of measure for data items.

As an example, the TD snippet given below extends the version information container by adding version numbers for the hardware and firmware of theThing, and uses values from externalVocabularies for theThing and for the data schema unit:SAREF, also used inExample2, andOM, the Ontology of Units of Measure [RIJGERSBERG]. TheseVocabularies are used as examples—others may exist, in particular in the home automation domain.

Example28
{"@context": ["https://www.w3.org/2019/wot/td/v1",        {"v":"http://www.example.org/versioningTerms#","saref":"https://w3id.org/saref#","om":"http://www.ontology-of-units-of-measure.org/resource/om-2/"        }    ],"version": {"instance":"1.2.1","v:firmware":"0.9.1","v:hardware":"1.0"    },    ..."@type":"saref:TemperatureSensor","properties": {"temperature": {"description":"Temperature value of the weather station","type":"number","minimum":-32.5,"maximum":55.2,"unit":"om:degree_Celsius","forms": [...]        },        ...    },    ...}

In many cases,TD Context Extensions may be used to annotate pieces of a data schema, to be able to semantically process the state information of the physical world object, which is represented by the data exchanged during an interaction (e.g., in the payload of a response). For example, a semantic description of this state information in RDF can be embedded in theTD Document and pieces of a data schema can be individually annotated as referring to specific parts of that RDF-modeled state of the physical world object.

The TD snippet below uses SAREF to describe the state of a lamp. The externalVocabulary Termssn:forProperty, taken fromSSN, the Semantic Sensor Network Ontology [VOCAB-SSN], is being used to link the data schema of thestatusProperty with the actual on/off state of the physical world object.

Example29
{"@context": ["https://www.w3.org/2019/wot/td/v1",        {"saref":"https://w3id.org/saref#","ssn":"http://www.w3.org/ns/ssn/"        }    ],"id":"urn:dev:ops:32473-WoTLamp-1234","@type":"saref:LightSwitch","saref:hasState": {"@id":"urn:dev:ops:32473-WoTLamp-1234/state","@type":"saref:OnOffState"    },    ..."properties": {"status": {"ssn:forProperty":"urn:dev:ops:32473-WoTLamp-1234/state","type":"string","forms": [{"href":"https://mylamp.example.com/status"}]        },"fullStatus": {"ssn:forProperty":"urn:dev:ops:32473-WoTLamp-1234/state","type":"object","properties": {"statusString": {"type":"string" },"statusCode": {"type":"number" },"statusDescription": {"type":"string" }            },"forms": [{"href":"https://mylamp.example.com/status?full=true"}]        },        ...    },    ...}

InExample2, the state of theThing is given by thestatus affordance itself and possible state changes are given by thetoggle affordance. In other words, the state of the physical world object directly provides theInteraction Affordances of theThing. This design is satisfactory for simple cases. In more elaborate cases, however, several affordances may be available for the same physical state. In the example above, thefullStatusProperty provides an alternative, more verbose representation for the state of the lamp.

7.2 Adding Protocol Bindings

With theTD Context Extensions in a Thing Description, the communication metadata can be supplemented or newProtocol Bindings added through additionalVocabulary Terms serialized into JSON objects representing aForm instance. (see also§ 8.3 Protocol Bindings).

The following TD example uses a fictional CoAPProtocol Binding, as no suchProtocol Binding is available at the time of writing this specification. ThisTD Context Extension assumes that there is aCoAP in RDF vocabulary similar toHTTP Vocabulary in RDF 1.0 [HTTP-in-RDF10] that is accessible via an example namespacehttp://www.example.org/coap-binding#. The supplementedcov:methodName member instructs theConsumer which CoAP method has to be applied (e.g.,GET for the CoAP Method Code 0.01,POST for the CoAP Method Code 0.02, oriPATCH for CoAP Method Code 0.07).

Example30: Specialization of forms through TD Context Extension
{"@context": ["https://www.w3.org/2019/wot/td/v1",        {"cov":"http://www.example.org/coap-binding#" }    ],    ..."properties": {"brightness": {"description":"The current brightness setting","type":"integer","minimum":-64,"maximum":64,"forms": [{"op":"readproperty","href":"coap://example.org:61616/api/brightness","cov:methodName":"GET"            }, {"op":"writeproperty","href":"coap://example.org:61616/api/brightness","cov:methodName":"POST"            }]        },        ...    },    ...}

7.3 Adding Security Schemes

Finally, new security schemes that are not included in§ 5.3.3 Security Vocabulary Definitions can be imported using theTD Context Extension mechanism. This example uses a fictional ACE security scheme based on [ACE] that is, for this example, defined by the namespace athttp://www.example.org/ace-security#. Note that such additional security schemes must beSubclasses of theClassSecurityScheme.

Example31
{    @context: ["https://www.w3.org/2019/wot/td/v1",        {"cov":"http://www.example.org/coap-binding#","ace":"http://www.example.org/ace-security#"        }    ],    ..."securityDefinitions": {"ace_sc": {"scheme":"ace:ACESecurityScheme",            ..."ace:as":"coaps://as.example.com/token","ace:audience":"coaps://rs.example.com","ace:scopes": ["limited","special"],"ace:cnonce":true        }    },"security": ["ace_sc"],"properties": {"status": {            ..."forms": [{"op":"readproperty","href":"coaps://rs.example.com/status","contentType":"application/cbor","cov:methodName":"GET","ace:scopes": ["limited"]            }]        }    },"actions": {"configure": {            ..."forms": [{"op":"invokeaction","href":"coaps://rs.example.com/configure","contentType":"application/cbor","cov:methodName":"POST","ace:scopes": ["special"]            }]        }    },    ...}

Note that all security schemes defined in§ 5.3.3 Security Vocabulary Definitions are already part of the TD context and need not to be included through aTD Context Extension.

8. Behavioral Assertions

The following assertions relate to the behavior of components of a WoT system, as opposed to the representation or information model of the TD. However, note that TDs are descriptive, and may in particular be used to describe pre-existing network interfaces. In these cases, assertions cannot be made that constrain the behavior of such pre-existing interfaces. Instead, the assertions must be interpreted as constraints on the TD to accurately represent such interfaces.

8.1 Security Configurations

To enable secure interoperation, security configurations must accurately reflect the requirements of theThing:

Some security protocols may ask for authentication information dynamically, including required encoding or encryption schemes. One consequence of the above is that if a protocol asks for a form of security credentials or an encoding or encryption scheme not declared in the Thing Description then the Thing Description is to be considered invalid.

8.2 Data Schemas

The data schemas provided in the TD should accurately represent the data payloads returned and accepted by the describedThing in the interactions specified in the TD. In general,Consumers should follow the data schemas strictly, not generating anything not given in the WoT Thing Description, but should accept additional data from theThing not given explicitly in the WoT Thing Description. In general,Things aredescribed by WoT Thing Descriptions, butConsumers areconstrained to follow WoT Thing Descriptions when interacting withThings.

8.3 Protocol Bindings

AProtocol Binding is the mapping from anInteraction Affordance to concrete messages of a specific protocol such as HTTP [RFC7231], CoAP [RFC7252], or MQTT [MQTT].Protocol Bindings ofInteraction Affordances are serialized asforms as defined in§ 6.3.9forms.

Every form in a WoT Thing Description must have a submission target, given by thehref member. The URI scheme of this submission target indicates whatProtocol Binding theThing implements [WOT-ARCHITECTURE]. For instance, if the target starts withhttp orhttps, aConsumer can then infer theThing implements theProtocol Binding based on HTTP and it should expect HTTP-specific terms in the form instance (see next section,§ 8.3.1 Protocol Binding based on HTTP).

8.3.1 Protocol Binding based on HTTP

Per default the Thing Description supports theProtocol Binding based on HTTP by including the HTTP RDF vocabulary definitions fromHTTP Vocabulary in RDF 1.0 [HTTP-in-RDF10]. This vocabulary can be directly used within TD instances by the usage of the prefixhtv, which points tohttp://www.w3.org/2011/http#. Further details ofProtocol Binding based on HTTP can be found in [WOT-BINDING-TEMPLATES].

To interact with aThing that implements theProtocol Binding based on HTTP, aConsumer needs to know what HTTP method to use when submitting a form. In the general case, a Thing Description can explicitly include a term indicating the method, i.e.,htv:methodName. For the sake of conciseness, theProtocol Binding based on HTTP definesDefault Values for the operation types listed below, which also aims at convergence of the methods expected byThings (e.g., GET to read, PUT to write).When no method is indicated in a form representing anProtocol Binding based on HTTP, aDefault ValueMUST be assumed as shown in the following table.

Vocabulary termDefault valueContext
htv:methodNameGETForm with operation typereadproperty,readallproperties,readmultipleproperties
htv:methodNamePUTForm with operation typewriteproperty,writeallproperties,writemultipleproperties
htv:methodNamePOSTForm with operation typeinvokeaction

For example, theExample 1 in§ 1. Introduction does not contain operation types and HTTP methods in the forms. The followingDefault Values should be assumed for the forms in theExample 1:

Example32
with default values for Protocol Binding based on HTTP
{"@context":"https://www.w3.org/2019/wot/td/v1","id":"urn:dev:ops:32473-WoTLamp-1234","title":"MyLampThing","securityDefinitions": {"basic_sc": {"scheme":"basic","in":"header"        }    },"security": ["basic_sc"    ],"properties": {"status": {"type":"string","forms": [                {"href":"https://mylamp.example.com/status"                }            ]        }    },"actions": {"toggle": {"forms": [                {"href":"https://mylamp.example.com/toggle"                }            ]        }    },"events": {"overheating": {"data": {"type":"string"            },"forms": [                {"href":"https://mylamp.example.com/oh","subprotocol":"longpoll"                }            ]        }    }}
{"@context":"https://www.w3.org/2019/wot/td/v1","id":"urn:dev:ops:32473-WoTLamp-1234","title":"MyLampThing","securityDefinitions": {"basic_sc": {"scheme":"basic","in":"header"        }    },"security": ["basic_sc"    ],"properties": {"status": {"type":"string","forms": [                {"op":"readproperty","href":"https://mylamp.example.com/status","htv:methodName":"GET"                },                {"op":"writeproperty","href":"https://mylamp.example.com/status","htv:methodName":"PUT"                }            ]        }    },"actions": {"toggle": {"forms": [                {"op":"invokeaction","href":"https://mylamp.example.com/toggle","htv:methodName":"POST"                }            ]        }    },"events": {"overheating": {"data": {"type":"string"            },"forms": [                {"op":"subscribeevent","href":"https://mylamp.example.com/oh","subprotocol":"longpoll"                }            ]        }    }}

8.3.2 Other Protocol Bindings

The number ofProtocol Bindings aThing can implement is not restricted. OtherProtocol Bindings (e.g., for CoAP, MQTT, or OPC UA) are intended to be standardized in separate documents such as a protocolVocabulary similar toHTTP Vocabulary in RDF 1.0 [HTTP-in-RDF10] or specifications includingDefault Value definitions. Such protocols can be simply integrated into the TD by the usage of theTD Context Extension mechanism (see§ 7. TD Context Extensions).

Please refer to [WOT-BINDING-TEMPLATES] for information on how to describe IoT platforms and ecosystems.

9. Security and Privacy Considerations

This section is non-normative.

In general the security measures taken to protect a WoT system will depend on the threats and attackers that system may face and the value of the assets needs to protect. In addition privacy risks will depend on the association of Things with identifiable people and both the direct information and the inferred information available from such an association. A detailed discussion of security and privacy considerations for the Web of Things, including a threat model that can be adapted to various circumstances, is presented in the informative document [WOT-SECURITY-GUIDELINES]. This section discusses only security and privacy risks and possible mitigations directly relevant to the WoT Thing Description.

A WoT Thing Description can describe both secure and insecure network interfaces. When a Thing Description is retro-fitted to an existing network interface, no change in the security status of the network interface is to be expected.

The use of a WoT Thing Description introduces the security and privacy risks given in the following sections. After each risk, we suggest some possible mitigations.

9.1 Context Fetching Privacy Risk

Fetching the vocabulary files given in the@context member of any JSON-LD [json-ld11] document can be a privacy risk. In the case of the WoT, an attacker can observe the network traffic produced by such fetches and can use the metadata of the fetch, such as the destination IP address, to infer information about the device especially if domain-specific vocabularies are used. This is a risk even if the connection is encrypted, and is related to DNS privacy leaks.

Mitigation:
Avoid actual fetching of vocabulary files. Vocabulary files should be cached whenever possible. Ideally they would be made immutable, built into the interpreting device, and not fetched at all, with the URI in the@context member serving only as an identifier of the (known) vocabulary. This requires the use of strict version control, as updates should use a new URI to ensure that existing URIs can refer to immutable data. Use well-known standard vocabulary files whenever possible to improve the chances that the context file will be available locally to systems interpreting the metadata in a Thing Description.

9.2 Immutable Identifiers Privacy Risk

A Thing Description containing an identifier (id) may describe a Thing that is associated with an identifiable person. Such identifiers pose various risks including tracking. However, if the identifier is also immutable, then the tracking risk is amplified, since a device may be sold or given to another person and the known ID used to track that person.

Mitigation:
All identifiers should be mutable, and there should be a mechanism to update theid of aThing. Specifically, theid of aThing should not be fixed in hardware. This does, however, conflict with the Linked Data ideal that identifiers are fixed URIs. In many circumstances it will be acceptable to only allow updates to identifiers if aThing is reinitialized. In this case as a software entity the oldThing ceases to exist and a newThing is created. This can be sufficient to break a tracking chain when, for example, a device is sold to a new owner. Alternatively, if more frequent changes are desired during the operational phase of a device, a mechanism can be put into place to notify only authorized users of the change in identifier when a change is made. Note however that some classes of devices, e.g., medical devices, may require immutable IDs by law in some jurisdictions. In this case extra attention should be paid to secure access to files, such as Thing Descriptions, containing such immutable identifiers. It may also be desirable to not share the "true" immutable identifier in such a case in the TD whenever possible.

9.3 Fingerprinting Privacy Risk

As noted above, theid member in a TD can pose a privacy risk. However, even if theid is updated as described to mitigate its tracking risk, it may still be possible to associate a TD with a particular physical device, and from there to an identifiable person, through fingerprinting.

Even if a specific device instance cannot be identified through fingerprinting, it may be possible to infer the type of a device from the information in the TD, such as the set of interactions, and use this type to infer private information about an identifiable person, such as a medical condition.

Mitigation:
Only authorized users should be provided access to the Thing Description for aThing, and only the amount of information needed for the level of authorization and the use case should be provided. If the TD is only distributed to authorized users through secure and confidential channels, for example through a directory service that requires authentication, then external unauthorized parties will not have access to the TD to fingerprint it. To further mitigate this risk, information not necessary for a particular use case of a TD should be omitted whenever possible. For example, for an ad-hoc connection to a device where the Consumer does not store state about the Thing, theid can be omitted. If the Consumer does not need certain interactions for its use case, they can be omitted. If the Consumer is not authorized to use certain interactions, they can likewise be omitted. If the Consumer does not have any capability to display human-readable information such as titles or descriptions, they can be omitted or replaced with zero-length strings.

9.4 Globally Unique Identifier Privacy Risk

Globally unique identifiers pose a privacy risk if a centralized authority is needed to create and distribute them, since then a third party has knowledge of the identifiers.

Mitigation:
Theid field in TDs are intentionally not required to be globally unique. There are several cryptographic mechanisms available to generate suitable IDs in a distributed fashion that do not require a central registry. These mechanisms typically have a very low probability of generating duplicate identifiers, and this needs to be taken into account in the system design; for example, by detecting duplicates and regenerating IDs when necessary. The scope of IDs also does not need to be global: it is acceptable to use identifiers that only distinguish Things in a certain context, such as within a home or factory.

9.5 TD Interception and Tampering Security Risk

Intercepting and tampering with TDs can be used to launch man-in-the-middle attacks, for example by rewriting URLs in TDs to redirect accesses to a malicious intermediary that can capture or manipulate data.

Mitigation:
Obtain Thing Descriptions only through mutually authenticated channels. This ensures that theConsumer and the server are both sure of the identity of the other party to the communication. This is also necessary in order to deliver TDs only to authorized users.

9.6 Context Interception and Tampering Security Risk

Intercepting and tampering with context files can be used to facilitate attacks by modifying the interpretation of vocabulary.

Mitigation:
Ideally context files would only be obtained through authenticated channels but it is notable (and unfortunate) that many contexts are indicated using HTTP URLs, which are vulnerable to interception and modification if dereferenced. However, if context files are immutable and cached, and dereferencing is avoided whenever possible, then this risk can be reduced.

9.7 Inferencing of Personally Identifiable Information Privacy Risk

In many locales, in order to protect the privacy of users, there are legal requirements for the handling of personally identifiable information, that is, information that can be associated with a particular person. Such information can of course be generated by IoT devices directly. However, the existence and metadata of IoT devices (the kind of data stored in a Thing Description) can also contain or be used to infer personally identifiable information. This information can be as simple as the fact that a certain person owns a certain type of device, which can lead to additional inferences about that person.

Mitigation:
Treat a Thing Description associated with a personal device as if it contained personally identifiable information. As an example application of this principle, consider how to obtain user consent. Consent for usage of personally identifiable data generated by aThing is often obtained when aThing is paired with system consuming the data, which is frequently also when the Thing Description is registered with a local directory or the system consuming the Thing Description in order to access the device. In this case, consent for using data from aThing can be combined with consent for accessing the Thing Description of theThing. As a second example, if we consider a TD to contain personally identifiable information, then it should not be retained indefinitely or used for purposes other than those for which consent was given.

10. IANA Considerations

10.1application/td+json Media Type Registration

Type name:
application
Subtype name:
td+json
Required parameters:
None
Optional parameters:
None
Encoding considerations:
SeeRFC 6839, section 3.1.
Security considerations:
SeeRFC 8259, section 12.

Since WoT Thing Description is intended to be a pure data exchange format forThing metadata, the serializationSHOULD NOT be passed through a code execution mechanism such as JavaScript'seval() function to be parsed. An (invalid) document may contain code that, when executed, could lead to unexpected side effects compromising the security of a system.

WoT Thing Descriptions can be evaluated with a JSON-LD 1.1 processor, which typically follows links to remote contexts (i.e., TD context extensions, seeW3C WoT Thing Description, section 7) automatically, resulting in the transfer of files without the explicit request of theConsumer for each one. If remote contexts are served by third parties, it may allow them to gather usage patterns or similar information leading to privacy concerns.While implementations on resource-constrained devices are expected to perform raw JSON processing (as opposed to JSON-LD processing), implementations in generalSHOULD statically cache vetted versions of their supported context extensions and not to follow links to remote contexts. Supported context extensions can be managed through a secure software update mechanism instead.

Context Extensions (seeW3C WoT Thing Description, section 7) that are loaded from the Web over non-secure connections, such as HTTP, run the risk of being altered by an attacker such that they may modify theTD Information Model in a way that could compromise security.For this reason,Consumer againSHOULD vet and cache remote contexts before allowing the system to use it.

Given that JSON-LD processing usually includes the substitution of long IRIs [RFC3987] with short terms, WoT Thing Descriptions may expand considerably when processed using a JSON-LD 1.1 processor and, in the worst case, the resulting data might consume all of the recipient's resources.ConsumersSHOULD treat any TD metadata with due skepticism.

Interoperability considerations:
SeeRFC 8259.

Rules for processing both conforming and non-conforming content are defined in this specification.

Published specification:
https://w3c.github.io/wot-thing-description
Applications that use this media type:
All participating entities in theW3C Web of Things, that is,Things,Consumers, and Intermediaries as defined in theWeb of Things (WoT) Architecture.
Fragment identifier considerations:
SeeRFC 6839, section 3.1.
Additional information:
Magic number(s):
Not Applicable
File extension(s):
.jsontd
Macintosh file type code(s):
TEXT
Person & email address to contact for further information:
Matthias Kovatsch <w3c@kovatsch.net>
Intended usage:
COMMON
Restrictions on usage:
None
Author(s):
The WoT Thing Description specification is a product of the Web of Things Working Group.
Change controller:
W3C

10.2 CoAP Content-Format Registration

IANA assigns compact CoAP Content-Format IDs for media types in the CoAP Content-Formats subregistry within the Constrained RESTful Environments (CoRE) Parameters registry [RFC7252]. The Content-Format ID for WoT Thing Description is 432.

Media Type:
application/td+json
Encoding:
-
ID:
432
Reference:
["Web of Things (WoT) Thing Description", May 2019]

A. Example Thing Description Instances

This section is non-normative.

A.1 MyLampThing Example with CoAP Protocol Binding

Feature list of theThing:

Example33: MyLampThing with CoAP Protocol Binding
{"@context": ["https://www.w3.org/2019/wot/td/v1",      {"cov":"http://www.example.org/coap-binding#"      }    ],"id":"urn:dev:ops:32473-WoTLamp-1234","title":"MyLampThing","description" :"MyLampThing uses JSON serialization","securityDefinitions": {"psk_sc":{"scheme":"psk"}},"security": ["psk_sc"],"properties": {"status": {"description" :"Shows the current status of the lamp","type":"string","forms": [{"op":"readproperty","href":"coaps://mylamp.example.com/status","cov:methodName" :"GET"             }]        }    },"actions": {"toggle": {"description" :"Turn on or off the lamp","forms": [{"href":"coaps://mylamp.example.com/toggle","cov:methodName" :"POST"             }]        }    },"events": {"overheating": {"description" :"Lamp reaches a critical temperature (overheating)","data": {"type":"string"},"forms": [{"href":"coaps://mylamp.example.com/oh","cov:methodName" :"GET","subprotocol" :"cov:observe"             }]        }    }}

A.2 MyIlluminanceSensor Example with MQTT Protocol Binding

Feature list of theThing:

Example34: MyIlluminanceSensor with MQTT Protocol Binding
{"@context":"https://www.w3.org/2019/wot/td/v1","title":"MyIlluminanceSensor","id":"urn:dev:ops:32473-WoTIlluminanceSensor-1234","securityDefinitions": {"nosec_sc": {"scheme":"nosec"}},"security": ["nosec_sc"],"events": {"illuminance": {"data":{"type":"integer"},"forms": [                {"href":"mqtt://192.168.1.187:1883/illuminance","contentType" :"text/plain","op" :"subscribeevent"                }            ]        }    } }

A.3 Webhook Event Example

Feature list of theThing:

Example35: Temperature Event with subscription and cancellation
{"@context":"https://www.w3.org/2019/wot/td/v1","id":"urn:dev:ops:32473-Thing-1234","title":"WebhookThing","description":"Webhook-based Event with subscription and unsubscribe form.","securityDefinitions": {"nosec_sc": {"scheme":"nosec"}},"security": ["nosec_sc"],"events": {"temperature": {"description":"Provides periodic temperature value updates.","subscription": {"type":"object","properties": {"callbackURL": {"type":"string","format":"uri","description":"Callback URL provided by subscriber for Webhook notifications.","writeOnly":true                    },"subscriptionID": {"type":"string","description":"Unique subscription ID for cancellation provided by WebhookThing.","readOnly":true                    }                }            },"data": {"type":"number","description":"Latest temperature value that is sent to the callback URL."            },"cancellation": {"type":"object","properties": {"subscriptionID": {"type":"integer","description":"Required subscription ID to cancel subscription.","writeOnly":true                    }                }            },"uriVariables": {"subscriptionID": {"type":"string" }            },"forms": [                {"op":"subscribeevent","href":"http://192.168.0.124:8080/events/temp/subscribe","contentType":"application/json","htv:methodName":"POST"                },                {"op":"unsubscribeevent","href":"http://192.168.0.124:8080/events/temp/{subscriptionID}","htv:methodName":"DELETE"                }            ]        }    }}

B. JSON Schema for TD Instance Validation

This section is non-normative.

Below is a JSON Schema [JSON-SCHEMA] document for syntactically validating Thing Description instances serialized in JSON based format.

Note

The Thing Description defined by this document allows for adding external vocabularies by using@context mechanism known from JSON-LD [json-ld11], and the terms in those external vocabularies can be used in addition to the terms defined in§ 5. TD Information Model. For this reason, the below JSON schema is intentionally non-strict in that regard. You can replace the value ofadditionalProperties schema propertytrue withfalse in different scopes/levels in order to perform a stricter validation in case no external vocabularies are used.

Note

Please note that some JSON Schema validation tools do not support theiri string format.

The following JSON Schema for validating TD instances does not require the terms withDefault Values to be present. Thus the terms withDefault Values are optional. (see also§ 5.4 Default Value Definitions)

    {    "title": "WoT TD Schema - 16 October 2019",    "description": "JSON Schema for validating TD instances against the TD model. TD instances can be with or without terms that have default values",    "$schema ": "http://json-schema.org/draft-07/schema#",    "definitions": {        "anyUri": {            "type": "string",            "format": "iri-reference"        },        "description": {            "type": "string"        },        "descriptions": {            "type": "object",            "additionalProperties": {                "type": "string"            }        },        "title": {            "type": "string"        },        "titles": {            "type": "object",            "additionalProperties": {                "type": "string"            }        },        "security": {            "oneOf": [{                    "type": "array",                    "items": {                        "type": "string"                    }                },                {                    "type": "string"                }            ]        },        "scopes": {            "oneOf": [{                    "type": "array",                    "items": {                        "type": "string"                    }                },                {                    "type": "string"                }            ]        },        "subprotocol": {            "type": "string",            "enum": [                "longpoll",                "websub",                "sse"            ]        },        "thing-context-w3c-uri": {            "type": "string",            "enum": [                "https://www.w3.org/2019/wot/td/v1"            ]        },        "thing-context": {            "oneOf": [{                    "type": "array",                    "items": [{                        "$ref": "#/definitions/thing-context-w3c-uri"                    }],                    "additionalItems": {                        "anyOf": [{                                "$ref": "#/definitions/anyUri"                            },                            {                                "type": "object"                            }                        ]                    }                },                {                    "$ref": "#/definitions/thing-context-w3c-uri"                }            ]        },        "type_declaration": {            "oneOf": [{                    "type": "string"                },                {                    "type": "array",                    "items": {                        "type": "string"                    }                }            ]        },        "dataSchema": {            "type": "object",            "properties": {                "@type": {                    "$ref": "#/definitions/type_declaration"                },                "description": {                    "$ref": "#/definitions/description"                },                "title": {                    "$ref": "#/definitions/title"                },                "descriptions": {                    "$ref": "#/definitions/descriptions"                },                "titles": {                    "$ref": "#/definitions/titles"                },                "writeOnly": {                    "type": "boolean"                },                "readOnly": {                    "type": "boolean"                },                "oneOf": {                    "type": "array",                    "items": {                        "$ref": "#/definitions/dataSchema"                    }                },                "unit": {                    "type": "string"                },                "enum": {                    "type": "array",                    "minItems": 1,                    "uniqueItems": true                },                "format": {                    "type": "string"                },                "const": {},                "type": {                    "type": "string",                    "enum": [                        "boolean",                        "integer",                        "number",                        "string",                        "object",                        "array",                        "null"                    ]                },                "items": {                    "oneOf": [{                            "$ref": "#/definitions/dataSchema"                        },                        {                            "type": "array",                            "items": {                                "$ref": "#/definitions/dataSchema"                            }                        }                    ]                },                "maxItems": {                    "type": "integer",                    "minimum": 0                },                "minItems": {                    "type": "integer",                    "minimum": 0                },                "minimum": {                    "type": "number"                },                "maximum": {                    "type": "number"                },                "properties": {                    "additionalProperties": {                        "$ref": "#/definitions/dataSchema"                    }                },                "required": {                    "type": "array",                    "items": {                        "type": "string"                    }                }            }        },        "form_element_property": {            "type": "object",            "properties": {                "op": {                    "oneOf": [{                            "type": "string",                            "enum": [                                "readproperty",                                "writeproperty",                                "observeproperty",                                "unobserveproperty"                            ]                        },                        {                            "type": "array",                            "items": {                                "type": "string",                                "enum": [                                    "readproperty",                                    "writeproperty",                                    "observeproperty",                                    "unobserveproperty"                                ]                            }                        }                    ]                },                "href": {                    "$ref": "#/definitions/anyUri"                },                "contentType": {                    "type": "string"                },                "contentCoding": {                    "type": "string"                },                "subprotocol": {                    "$ref": "#/definitions/subprotocol"                },                "security": {                    "$ref": "#/definitions/security"                },                "scopes": {                    "$ref": "#/definitions/scopes"                },                "response": {                    "type": "object",                    "properties": {                        "contentType": {                            "type": "string"                        }                    }                }            },            "required": [                "href"            ],            "additionalProperties": true        },        "form_element_action": {            "type": "object",            "properties": {                "op": {                    "oneOf": [{                            "type": "string",                            "enum": [                                "invokeaction"                            ]                        },                        {                            "type": "array",                            "items": {                                "type": "string",                                "enum": [                                    "invokeaction"                                ]                            }                        }                    ]                },                "href": {                    "$ref": "#/definitions/anyUri"                },                "contentType": {                    "type": "string"                },                "contentCoding": {                    "type": "string"                },                "subprotocol": {                    "$ref": "#/definitions/subprotocol"                },                "security": {                    "$ref": "#/definitions/security"                },                "scopes": {                    "$ref": "#/definitions/scopes"                },                "response": {                    "type": "object",                    "properties": {                        "contentType": {                            "type": "string"                        }                    }                }            },            "required": [                "href"            ],            "additionalProperties": true        },        "form_element_event": {            "type": "object",            "properties": {                "op": {                    "oneOf": [{                            "type": "string",                            "enum": [                                "subscribeevent",                                "unsubscribeevent"                            ]                        },                        {                            "type": "array",                            "items": {                                "type": "string",                                "enum": [                                    "subscribeevent",                                    "unsubscribeevent"                                ]                            }                        }                    ]                },                "href": {                    "$ref": "#/definitions/anyUri"                },                "contentType": {                    "type": "string"                },                "contentCoding": {                    "type": "string"                },                "subprotocol": {                    "$ref": "#/definitions/subprotocol"                },                "security": {                    "$ref": "#/definitions/security"                },                "scopes": {                    "$ref": "#/definitions/scopes"                },                "response": {                    "type": "object",                    "properties": {                        "contentType": {                            "type": "string"                        }                    }                }            },            "required": [                "href"            ],            "additionalProperties": true        },        "form_element_root": {            "type": "object",            "properties": {                "op": {                    "oneOf": [{                            "type": "string",                            "enum": [                                "readallproperties",                                "writeallproperties",                                "readmultipleproperties",                                "writemultipleproperties"                            ]                        },                        {                            "type": "array",                            "items": {                                "type": "string",                                "enum": [                                    "readallproperties",                                    "writeallproperties",                                    "readmultipleproperties",                                    "writemultipleproperties"                                ]                            }                        }                    ]                },                "href": {                    "$ref": "#/definitions/anyUri"                },                "contentType": {                    "type": "string"                },                "contentCoding": {                    "type": "string"                },                "subprotocol": {                    "$ref": "#/definitions/subprotocol"                },                "security": {                    "$ref": "#/definitions/security"                },                "scopes": {                    "$ref": "#/definitions/scopes"                },                "response": {                    "type": "object",                    "properties": {                        "contentType": {                            "type": "string"                        }                    }                }            },            "required": [                "href"            ],            "additionalProperties": true        },        "property_element": {            "type": "object",            "properties": {                "@type": {                    "$ref": "#/definitions/type_declaration"                },                "description": {                    "$ref": "#/definitions/description"                },                "descriptions": {                    "$ref": "#/definitions/descriptions"                },                "title": {                    "$ref": "#/definitions/title"                },                "titles": {                    "$ref": "#/definitions/titles"                },                "forms": {                    "type": "array",                    "minItems": 1,                    "items": {                        "$ref": "#/definitions/form_element_property"                    }                },                "uriVariables": {                    "type": "object",                    "additionalProperties": {                        "$ref": "#/definitions/dataSchema"                    }                },                "observable": {                    "type": "boolean"                },                "writeOnly": {                    "type": "boolean"                },                "readOnly": {                    "type": "boolean"                },                "oneOf": {                    "type": "array",                    "items": {                        "$ref": "#/definitions/dataSchema"                    }                },                "unit": {                    "type": "string"                },                "enum": {                    "type": "array",                    "minItems": 1,                    "uniqueItems": true                },                "format": {                    "type": "string"                },                "const": {},                "type": {                    "type": "string",                    "enum": [                        "boolean",                        "integer",                        "number",                        "string",                        "object",                        "array",                        "null"                    ]                },                "items": {                    "oneOf": [{                            "$ref": "#/definitions/dataSchema"                        },                        {                            "type": "array",                            "items": {                                "$ref": "#/definitions/dataSchema"                            }                        }                    ]                },                "maxItems": {                    "type": "integer",                    "minimum": 0                },                "minItems": {                    "type": "integer",                    "minimum": 0                },                "minimum": {                    "type": "number"                },                "maximum": {                    "type": "number"                },                "properties": {                    "additionalProperties": {                        "$ref": "#/definitions/dataSchema"                    }                },                "required": {                    "type": "array",                    "items": {                        "type": "string"                    }                }            },            "required": [                "forms"            ],            "additionalProperties": true        },        "action_element": {            "type": "object",            "properties": {                "@type": {                    "$ref": "#/definitions/type_declaration"                },                "description": {                    "$ref": "#/definitions/description"                },                "descriptions": {                    "$ref": "#/definitions/descriptions"                },                "title": {                    "$ref": "#/definitions/title"                },                "titles": {                    "$ref": "#/definitions/titles"                },                "forms": {                    "type": "array",                    "minItems": 1,                    "items": {                        "$ref": "#/definitions/form_element_action"                    }                },                "uriVariables": {                    "type": "object",                    "additionalProperties": {                        "$ref": "#/definitions/dataSchema"                    }                },                "input": {                    "$ref": "#/definitions/dataSchema"                },                "output": {                    "$ref": "#/definitions/dataSchema"                },                "safe": {                    "type": "boolean"                },                "idempotent": {                    "type": "boolean"                }            },            "required": [                "forms"            ],            "additionalProperties": true        },        "event_element": {            "type": "object",            "properties": {                "@type": {                    "$ref": "#/definitions/type_declaration"                },                "description": {                    "$ref": "#/definitions/description"                },                "descriptions": {                    "$ref": "#/definitions/descriptions"                },                "title": {                    "$ref": "#/definitions/title"                },                "titles": {                    "$ref": "#/definitions/titles"                },                "forms": {                    "type": "array",                    "minItems": 1,                    "items": {                        "$ref": "#/definitions/form_element_event"                    }                },                "uriVariables": {                    "type": "object",                    "additionalProperties": {                        "$ref": "#/definitions/dataSchema"                    }                },                "subscription": {                    "$ref": "#/definitions/dataSchema"                },                "data": {                    "$ref": "#/definitions/dataSchema"                },                "cancellation": {                    "$ref": "#/definitions/dataSchema"                }            },            "required": [                "forms"            ],            "additionalProperties": true        },        "link_element": {            "type": "object",            "properties": {                "href": {                    "$ref": "#/definitions/anyUri"                },                "type": {                    "type": "string"                },                "rel": {                    "type": "string"                },                "anchor": {                    "$ref": "#/definitions/anyUri"                }            },            "required": [                "href"            ],            "additionalProperties": true        },        "securityScheme": {            "oneOf": [{                    "type": "object",                    "properties": {                        "@type": {                            "$ref": "#/definitions/type_declaration"                        },                        "description": {                            "$ref": "#/definitions/description"                        },                        "descriptions": {                            "$ref": "#/definitions/descriptions"                        },                        "proxy": {                            "$ref": "#/definitions/anyUri"                        },                        "scheme": {                            "type": "string",                            "enum": [                                "nosec"                            ]                        }                    },                    "required": [                        "scheme"                    ]                },                {                    "type": "object",                    "properties": {                        "@type": {                            "$ref": "#/definitions/type_declaration"                        },                        "description": {                            "$ref": "#/definitions/description"                        },                        "descriptions": {                            "$ref": "#/definitions/descriptions"                        },                        "proxy": {                            "$ref": "#/definitions/anyUri"                        },                        "scheme": {                            "type": "string",                            "enum": [                                "basic"                            ]                        },                        "in": {                            "type": "string",                            "enum": [                                "header",                                "query",                                "body",                                "cookie"                            ]                        },                        "name": {                            "type": "string"                        }                    },                    "required": [                        "scheme"                    ]                },                {                    "type": "object",                    "properties": {                        "@type": {                            "$ref": "#/definitions/type_declaration"                        },                        "description": {                            "$ref": "#/definitions/description"                        },                        "descriptions": {                            "$ref": "#/definitions/descriptions"                        },                        "proxy": {                            "$ref": "#/definitions/anyUri"                        },                        "scheme": {                            "type": "string",                            "enum": [                                "digest"                            ]                        },                        "qop": {                            "type": "string",                            "enum": [                                "auth",                                "auth-int"                            ]                        },                        "in": {                            "type": "string",                            "enum": [                                "header",                                "query",                                "body",                                "cookie"                            ]                        },                        "name": {                            "type": "string"                        }                    },                    "required": [                        "scheme"                    ]                },                {                    "type": "object",                    "properties": {                        "@type": {                            "$ref": "#/definitions/type_declaration"                        },                        "description": {                            "$ref": "#/definitions/description"                        },                        "descriptions": {                            "$ref": "#/definitions/descriptions"                        },                        "proxy": {                            "$ref": "#/definitions/anyUri"                        },                        "scheme": {                            "type": "string",                            "enum": [                                "apikey"                            ]                        },                        "in": {                            "type": "string",                            "enum": [                                "header",                                "query",                                "body",                                "cookie"                            ]                        },                        "name": {                            "type": "string"                        }                    },                    "required": [                        "scheme"                    ]                },                {                    "type": "object",                    "properties": {                        "@type": {                            "$ref": "#/definitions/type_declaration"                        },                        "description": {                            "$ref": "#/definitions/description"                        },                        "descriptions": {                            "$ref": "#/definitions/descriptions"                        },                        "proxy": {                            "$ref": "#/definitions/anyUri"                        },                        "scheme": {                            "type": "string",                            "enum": [                                "bearer"                            ]                        },                        "authorization": {                            "$ref": "#/definitions/anyUri"                        },                        "alg": {                            "type": "string"                        },                        "format": {                            "type": "string"                        },                        "in": {                            "type": "string",                            "enum": [                                "header",                                "query",                                "body",                                "cookie"                            ]                        },                        "name": {                            "type": "string"                        }                    },                    "required": [                        "scheme"                    ]                },                {                    "type": "object",                    "properties": {                        "@type": {                            "$ref": "#/definitions/type_declaration"                        },                        "description": {                            "$ref": "#/definitions/description"                        },                        "descriptions": {                            "$ref": "#/definitions/descriptions"                        },                        "proxy": {                            "$ref": "#/definitions/anyUri"                        },                        "scheme": {                            "type": "string",                            "enum": [                                "psk"                            ]                        },                        "identity": {                            "type": "string"                        }                    },                    "required": [                        "scheme"                    ]                },                {                    "type": "object",                    "properties": {                        "@type": {                            "$ref": "#/definitions/type_declaration"                        },                        "description": {                            "$ref": "#/definitions/description"                        },                        "descriptions": {                            "$ref": "#/definitions/descriptions"                        },                        "proxy": {                            "$ref": "#/definitions/anyUri"                        },                        "scheme": {                            "type": "string",                            "enum": [                                "oauth2"                            ]                        },                        "authorization": {                            "$ref": "#/definitions/anyUri"                        },                        "token": {                            "$ref": "#/definitions/anyUri"                        },                        "refresh": {                            "$ref": "#/definitions/anyUri"                        },                        "scopes": {                            "oneOf": [{                                    "type": "array",                                    "items": {                                        "type": "string"                                    }                                },                                {                                    "type": "string"                                }                            ]                        },                        "flow": {                            "type": "string",                            "enum": [                                "code"                            ]                        }                    },                    "required": [                        "scheme"                    ]                }            ]        }    },    "type": "object",    "properties": {        "id": {            "type": "string",            "format": "uri"        },        "title": {            "$ref": "#/definitions/title"        },        "titles": {            "$ref": "#/definitions/titles"        },        "properties": {            "type": "object",            "additionalProperties": {                "$ref": "#/definitions/property_element"            }        },        "actions": {            "type": "object",            "additionalProperties": {                "$ref": "#/definitions/action_element"            }        },        "events": {            "type": "object",            "additionalProperties": {                "$ref": "#/definitions/event_element"            }        },        "description": {            "$ref": "#/definitions/description"        },        "descriptions": {            "$ref": "#/definitions/descriptions"        },        "version": {            "type": "object",            "properties": {                "instance": {                    "type": "string"                }            },            "required": [                "instance"            ]        },        "links": {            "type": "array",            "items": {                "$ref": "#/definitions/link_element"            }        },        "forms": {            "type": "array",            "minItems": 1,            "items": {                "$ref": "#/definitions/form_element_root"            }        },        "base": {            "$ref": "#/definitions/anyUri"        },        "securityDefinitions": {            "type": "object",            "minProperties": 1,            "additionalProperties": {                "$ref": "#/definitions/securityScheme"            }        },        "support": {            "$ref": "#/definitions/anyUri"        },        "created": {            "type": "string",            "format": "date-time"        },        "modified": {            "type": "string",            "format": "date-time"        },        "security": {            "oneOf": [{                    "type": "string"                },                {                    "type": "array",                    "minItems": 1,                    "items": {                        "type": "string"                    }                }            ]        },        "@type": {            "$ref": "#/definitions/type_declaration"        },        "@context": {            "$ref": "#/definitions/thing-context"        }    },    "required": [        "title",        "security",        "securityDefinitions",        "@context"    ],    "additionalProperties": true}

C. Thing Description Templates

This section is non-normative.

AThing Description Template is a description for aclass ofThings. It describes the properties, actions, events and common metadata that are shared for an entire group ofThings, to enable the common handling of thousands of devices by a cloud server, which is not practical on a per-Thing basis. The Thing Description Template uses the same core vocabulary and information model from§ 5. TD Information Model.

The Thing Description Template enables:

The Thing Description Template is a logical description of the interface and possible interaction with devices (properties, actions and events), however it does not contain device-specific information, such as a serial number, GPS location, security information or concrete protocol endpoints.

Since a Thing Description Template does not contain aProtocol Binding to specific endpoints and does not define a specific security mechanism, theforms andsecurityDefinitions andsecurity keys must not be present.

The same Thing Description Template can be implemented byThings from multiple vendors, aThing can implement multiple Thing Description Templates, define additional metadata (vendor, location, security) and define bindings to concrete protocols. To avoid conflicts between properties, actions and events from different Thing Description Templates that are combined into a commonThing, all these identifiers must be unique within aThing.

A common Thing Description Template for a class of devices enables writing applications across vendors and creates a more attractive market for application developers. A concrete Thing Description can implement multiple Thing Description Templates and thus can aggregate function blocks into a combined device.

The business models of cloud vendors are typically built on managing thousands of identical devices. All devices with the same Thing Description Template can be managed in the same way by cloud applications. It is easy to create multiple simulated devices, if the interface and the instance are treated separately.

Since a Thing Description Template is a subset of the Thing Description in which some optional and mandatoryVocabulary Terms do not exist, however, it can be serialized in the same way and in the same formats as a Thing Description. Note that Thing Template instances cannot be validated in the same way as Thing Description instances due to some missing mandatory terms.

C.1 Thing Description Template Examples

This section shows a Thing Description Template for a lamp and a Thing Description Template for a buzzer.

C.1.1 Thing Description Template: Lamp

Example36: MyLampThingTemplate serialized in JSON
{"@context": ["https://www.w3.org/2019/wot/td/v1"],"@type" :"ThingTemplate","title":"Lamp Thing Description Template","description" :"Lamp Thing Description Template","properties": {"status": {"description" :"current status of the lamp (on|off)","type":"string","readOnly":true        }    },"actions": {"toggle": {"description" :"Turn the lamp on or off"        }    },"events": {"overheating": {"description" :"Lamp reaches a critical temperature (overheating)","data": {"type":"string"}        }    }}

C.1.2 Thing Description Template: Buzzer

Example37: MyBuzzerThingTemplate serialized in JSON
{"@context": ["https://www.w3.org/2019/wot/td/v1"],"@type" :"ThingTemplate","title":"Buzzer Thing Description Template","description" :"Thing Description Template of a buzzer that makes noise for 10 seconds","actions": {"buzz": {"description" :"buzz for 10 seconds"        }     }}

D. JSON-LD Context Usage

This section is non-normative.

The present specification introduces theTD Information Model as a set of constraints over differentVocabularies, i.e. sets ofVocabulary Terms. This section briefly explains how a machine-readable definition of these constraints can be integrated into client applications, by making use of the mandatory@context of a TD document.

Accessing theTD Information Model from a TD document is done in two steps. First, clients must retrieve a mapping from JSON strings to IRIs. This mapping is defined as a JSON-LD context, as explained later. Second, clients can access the constraints defined on these IRIs by dereferencing them. Constraints are defined as logical axioms in the RDF format, readily interpretable by client programs.

AllVocabulary Terms referenced in§ 5. TD Information Model are serialized as (compact) JSON strings in a TD document. However, each of these terms is unambiguously identified by a full IRI, as per the first Linked Data principle [LINKED-DATA]. The mappings from JSON keys to IRIs is what the@context value of a TD points to. For instance, the file at

https://www.w3.org/2019/wot/td/v1

includes the following mappings (among others):

propertieshttps://www.w3.org/2019/wot/td#hasPropertyAffordance
objecthttps://www.w3.org/2019/wot/json-schema#ObjectSchema
basichttps://www.w3.org/2019/wot/security#BasicSecurityScheme
hrefhttps://www.w3.org/2019/wot/hypermedia#hasTarget
...

This JSON file follows the JSON-LD 1.1 syntax [JSON-LD11]. Numerous JSON-LD libraries can automatically process the@context of a TD and expand all the JSON strings it includes.

Once everyVocabulary Term of a TD is expanded to a IRI, the second step consists in dereferencing this IRI to get fragments of theTD Information Model that refer to thatVocabulary Term. For instance, dereferencing the IRI

https://www.w3.org/2019/wot/json-schema#ObjectSchema

results in an RDF document stating that the termObjectSchema is aClass and more precisely, a sub-class ofDataSchema. Such logical axioms are represented in RDF using formalisms of various complexity: here, sub-class relations are expressed as RDF Schema axioms [RDF-SCHEMA]. Moreover, these axioms may be serialized in various formats. Here, they are serialized in the Turtle format [TURTLE]:

<https://www.w3.org/2019/wot/json-schema#ObjectSchema>    a rdfs:Class .<https://www.w3.org/2019/wot/json-schema#ObjectSchema>    rdfs:subClassOf <https://www.w3.org/2019/wot/json-schema#DataSchema> .

By default, if a user agent does not perform any content negotiation, a human-readable HTML documentation is returned instead of the RDF document. To negotiate content, clients must include the HTTP headerAccept: text/turtle in their request.

E. Recent Specification Changes

E.1 Changes from Proposed Recommendation

E.2 Changes from Second Candidate Recommendation

E.3 Changes from First Candidate Recommendation

Changes from First Candidate Recommendation are described in the second Candidate Recommendation

F. Acknowledgements

The editors would like to thank Michael Koster, Michael Lagally, Kazuyuki Ashimura, Ege Korkan, Daniel Peintner, Toru Kawaguchi, María Poveda, Dave Raggett, Kunihiko Toumura, Takeshi Yamada, Ben Francis, Manu Sporny, Klaus Hartke, Addison Phillips, Jose M. Cantera, Tomoaki Mizushima, Soumya Kanti Datta and Benjamin Klotz for providing contributions, guidance and expertise.

Also, many thanks to theW3C staff and all other current and former active Participants of theW3C Web of Things Interest Group (WoT IG) and Working Group (WoT WG) for their support, technical input and suggestions that led to improvements to this document.

Finally, special thanks to Joerg Heuer for leading the WoT IG for 2 years from its inception and guiding the group to come up with the concept of WoT building blocks including the Thing Description.

G. References

G.1 Normative references

[BCP47]
Tags for Identifying Languages. A. Phillips; M. Davis. IETF. September 2009. IETF Best Current Practice. URL:https://tools.ietf.org/html/bcp47
[html]
HTML Standard. Anne van Kesteren; Domenic Denicola; Ian Hickson; Philip Jägenstedt; Simon Pieters. WHATWG. Living Standard. URL:https://html.spec.whatwg.org/multipage/
[RFC2046]
Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types. N. Freed; N. Borenstein. IETF. November 1996. Draft Standard. URL:https://tools.ietf.org/html/rfc2046
[RFC2119]
Key words for use in RFCs to Indicate Requirement Levels. S. Bradner. IETF. March 1997. Best Current Practice. URL:https://tools.ietf.org/html/rfc2119
[RFC3339]
Date and Time on the Internet: Timestamps. G. Klyne; C. Newman. IETF. July 2002. Proposed Standard. URL:https://tools.ietf.org/html/rfc3339
[RFC3629]
UTF-8, a transformation format of ISO 10646. F. Yergeau. IETF. November 2003. Internet Standard. URL:https://tools.ietf.org/html/rfc3629
[RFC3986]
Uniform Resource Identifier (URI): Generic Syntax. T. Berners-Lee; R. Fielding; L. Masinter. IETF. January 2005. Internet Standard. URL:https://tools.ietf.org/html/rfc3986
[RFC3987]
Internationalized Resource Identifiers (IRIs). M. Duerst; M. Suignard. IETF. January 2005. Proposed Standard. URL:https://tools.ietf.org/html/rfc3987
[RFC6570]
URI Template. J. Gregorio; R. Fielding; M. Hadley; M. Nottingham; D. Orchard. IETF. March 2012. Proposed Standard. URL:https://tools.ietf.org/html/rfc6570
[RFC6749]
The OAuth 2.0 Authorization Framework. D. Hardt, Ed.. IETF. October 2012. Proposed Standard. URL:https://tools.ietf.org/html/rfc6749
[RFC6750]
The OAuth 2.0 Authorization Framework: Bearer Token Usage. M. Jones; D. Hardt. IETF. October 2012. Proposed Standard. URL:https://tools.ietf.org/html/rfc6750
[RFC7252]
The Constrained Application Protocol (CoAP). Z. Shelby; K. Hartke; C. Bormann. IETF. June 2014. Proposed Standard. URL:https://tools.ietf.org/html/rfc7252
[RFC7516]
JSON Web Encryption (JWE). M. Jones; J. Hildebrand. IETF. May 2015. Proposed Standard. URL:https://tools.ietf.org/html/rfc7516
[RFC7519]
JSON Web Token (JWT). M. Jones; J. Bradley; N. Sakimura. IETF. May 2015. Proposed Standard. URL:https://tools.ietf.org/html/rfc7519
[RFC7616]
HTTP Digest Access Authentication. R. Shekh-Yusef, Ed.; D. Ahrens; S. Bremer. IETF. September 2015. Proposed Standard. URL:https://httpwg.org/specs/rfc7616.html
[RFC7617]
The 'Basic' HTTP Authentication Scheme. J. Reschke. IETF. September 2015. Proposed Standard. URL:https://httpwg.org/specs/rfc7617.html
[RFC7797]
JSON Web Signature (JWS) Unencoded Payload Option. M. Jones. IETF. February 2016. Proposed Standard. URL:https://tools.ietf.org/html/rfc7797
[RFC8174]
Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words. B. Leiba. IETF. May 2017. Best Current Practice. URL:https://tools.ietf.org/html/rfc8174
[RFC8252]
OAuth 2.0 for Native Apps. W. Denniss; J. Bradley. IETF. October 2017. Best Current Practice. URL:https://tools.ietf.org/html/rfc8252
[RFC8259]
The JavaScript Object Notation (JSON) Data Interchange Format. T. Bray, Ed.. IETF. December 2017. Internet Standard. URL:https://tools.ietf.org/html/rfc8259
[RFC8288]
Web Linking. M. Nottingham. IETF. October 2017. Proposed Standard. URL:https://httpwg.org/specs/rfc8288.html
[RFC8392]
CBOR Web Token (CWT). M. Jones; E. Wahlstroem; S. Erdtman; H. Tschofenig. IETF. May 2018. Proposed Standard. URL:https://tools.ietf.org/html/rfc8392
[websub]
WebSub. Julien Genestoux; Aaron Parecki. W3C. 23 January 2018. W3C Recommendation. URL:https://www.w3.org/TR/2018/REC-websub-20180123/
[XMLSCHEMA11-2-20120405]
W3C XML Schema Definition Language (XSD) 1.1 Part 2: Datatypes. David Peterson; Sandy Gao; Ashok Malhotra; Michael Sperberg-McQueen; Henry Thompson; Paul V. Biron et al. W3C. 5 April 2012. W3C Recommendation. URL:https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/

G.2 Informative references

[ACE]
Authentication and Authorization for Constrained Environments (ACE) using the OAuth 2.0 Framework (ACE-OAuth). L. Seitz; G. Selander; E. Wahlstroem; S. Erdtman; H. Tschofenig. IETF. 27 March 2019. Internet-Draft. URL: https://tools.ietf.org/html/draft-ietf-ace-oauth-authz-24
[HTTP-in-RDF10]
HTTP Vocabulary in RDF 1.0. Johannes Koch; Carlos A. Velasco; Philip Ackermann. W3C. 2 February 2017. W3C Note. URL:https://www.w3.org/TR/2017/NOTE-HTTP-in-RDF10-20170202/
[IANA-MEDIA-TYPES]
Media Types. IANA. URL:https://www.iana.org/assignments/media-types/
[IANA-URI-SCHEMES]
Uniform Resource Identifier (URI) Schemes. IANA. URL: https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml
[JSON-LD11]
JSON-LD 1.1. Gregg Kellogg; Pierre-Antoine Champin; Dave Longley. W3C. 16 March 2020. W3C Candidate Recommendation. URL:https://www.w3.org/TR/2020/CR-json-ld11-20200316/
[JSON-SCHEMA]
JSON Schema Validation: A Vocabulary for Structural Validation of JSON. Austin Wright; Henry Andrews; Geraint Luff. IETF. 19 March 2018. Internet-Draft. URL: https://tools.ietf.org/html/draft-handrews-json-schema-validation-01
[LDML]
Unicode Technical Standard #35: Unicode Locale Data Markup Language (LDML). Mark Davis; CLDR Contributors. URL:https://unicode.org/reports/tr35/
[LINKED-DATA]
Linked Data Design Issues. Tim Berners-Lee. W3C. 27 July 2006. W3C-Internal Document. URL:https://www.w3.org/DesignIssues/LinkedData.html
[MQTT]
MQTT Version 3.1.1. Andrew Banks; Rahul Gupta. OASIS. 10 December 2015. OASIS Standard Incorporating Approved Errata 01. URL: http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/mqtt-v3.1.1.html
[OPENAPI]
OpenAPI Specification: Version 3.0.1. Darrel Miller; Jason Harmon; Jeremy Whitlock; Kris Hahn; Marsh Gardiner; Mike Ralphson; Rob Dolin; Ron Ratovsky; Tony Tam. OpenAPI Initiative, Linux Foundation. 7 December 2017. URL:https://swagger.io/specification/
[RDF-SCHEMA]
RDF Schema 1.1. Dan Brickley; Ramanathan Guha. W3C. 25 February 2014. W3C Recommendation. URL:https://www.w3.org/TR/rdf-schema/
[RFC3966]
The tel URI for Telephone Numbers. H. Schulzrinne. IETF. December 2004. Proposed Standard. URL:https://tools.ietf.org/html/rfc3966
[RFC6068]
The 'mailto' URI Scheme. M. Duerst; L. Masinter; J. Zawinski. IETF. October 2010. Proposed Standard. URL:https://tools.ietf.org/html/rfc6068
[RFC7231]
Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content. R. Fielding, Ed.; J. Reschke, Ed.. IETF. June 2014. Proposed Standard. URL:https://httpwg.org/specs/rfc7231.html
[RIJGERSBERG]
Ontology of Units of Measure and Related Concepts. Hajo Rijgersberg; Mark van Assem; Jan Top. Semantic Web journal, IOS Press. 2013. URL: http://www.semantic-web-journal.net/content/ontology-units-measure-and-related-concepts
[SEMVER]
Semantic Versioning 2.0.0. Tom Preston-Werner. 26 December 2017. URL:https://semver.org/
[SMARTM2M]
ETSI TS 103 264 V2.1.1 (2017-03): SmartM2M; Smart Appliances; Reference Ontology and oneM2M Mapping. ETSI. March 2017. Published. URL: http://www.etsi.org/deliver/etsi_ts/103200_103299/103264/02.01.01_60/ts_103264v020101p.pdf
[string-meta]
Strings on the Web: Language and Direction Metadata. Addison Phillips; Richard Ishida. W3C. 11 June 2019. W3C Working Draft. URL:https://www.w3.org/TR/2019/WD-string-meta-20190611/
[TURTLE]
RDF 1.1 Turtle. Eric Prud'hommeaux; Gavin Carothers. W3C. 25 February 2014. W3C Recommendation. URL:http://www.w3.org/TR/2014/REC-turtle-20140225/
[VOCAB-SSN]
Semantic Sensor Network Ontology. Armin Haller; Krzysztof Janowicz; Simon Cox; Danh Le Phuoc; Kerry Taylor; Maxime Lefrançois. W3C. 19 October 2017. W3C Recommendation. URL:https://www.w3.org/TR/2017/REC-vocab-ssn-20171019/
[WOT-ARCHITECTURE]
Web of Things (WoT) Architecture. Matthias Kovatsch; Ryuichi Matsukura; Michael Lagally; Toru Kawaguchi; Kunihiko Toumura; Kazuo Kajimoto. W3C. 9 April 2020. URL:https://www.w3.org/TR/2020/REC-wot-architecture-20200409/
[WOT-BINDING-TEMPLATES]
Web of Things (WoT) Binding Templates. Michael Koster; Ege Korkan. W3C. 30 January 2020. W3C Note. URL:https://www.w3.org/TR/2020/NOTE-wot-binding-templates-20200130/
[WOT-SECURITY-GUIDELINES]
Web of Things (WoT) Security and Privacy Guidelines. Elena Reshetova; Michael McCool. W3C. 6 November 2019. URL:https://www.w3.org/TR/2019/NOTE-wot-security-20191106/
[xml]
Extensible Markup Language (XML) 1.0 (Fifth Edition). Tim Bray; Jean Paoli; Michael Sperberg-McQueen; Eve Maler; François Yergeau et al. W3C. 26 November 2008. W3C Recommendation. URL:http://www.w3.org/TR/2008/REC-xml-20081126/


[8]ページ先頭

©2009-2025 Movatter.jp