diff --git a/publication/3-wd/diff.html b/publication/3-wd/diff.html new file mode 100644 index 00000000..dda0b86e --- /dev/null +++ b/publication/3-wd/diff.html @@ -0,0 +1,60912 @@ + + + + + + + + + + + + +Web of Things (WoT) Discovery + + + + + + + + + + + + + + + + +
+

+ +

+

+Web +of +Things +(WoT) +Thing +Description +1.1 + +Discovery + +

+

+ +W3C +Working +Draft + +11 +March + + +

+
+ +More +details +about +this +document + +
+
+This +version: +
+
+https://www.w3.org/TR/2022/WD-wot-thing-description11-20220311/ + + +https://www.w3.org/TR/2022/WD-wot-discovery-20220718/ + + +
+
+Latest +published +version: +
+
+https://www.w3.org/TR/wot-thing-description11/ + + +https://www.w3.org/TR/wot-discovery/ + + +
+
+Latest +editor's +draft: +
+
+https://w3c.github.io/wot-thing-description/ + + +https://w3c.github.io/wot-discovery/ + + +
+
+History: +
+
+https://www.w3.org/standards/history/wot-thing-description11 + + +https://www.w3.org/standards/history/wot-discovery + + +
+
+ +Commit +history + +
+
+Implementation +report: +
+
+https://w3c.github.io/wot-thing-description/testing/report11.html + + +https://w3c.github.io/wot-discovery/testing/report.html + + +
+
+Editors: +
+
+ +Sebastian +Kaebisch + +Andrea +Cimmino + + +( +Siemens +AG + + +Universidad +Politécnica +de +Madrid + + +) +
+
+ +Takuki +Kamiya + +Michael +McCool + + +( +Fujitsu +Research +of +America + + +Intel +Corp. + + +) +
+
+ +Michael +McCool + +Farshid +Tavakolizadeh + + +( +Intel + + +Invited +Expert + +) +
+Kunihiko +Toumura + +( + +Hitachi, +Ltd. + + +) +
+
+Former +editor: +
+ +Victor +Charpenay + +Farshid +Tavakolizadeh + + +( +Siemens +AG + + +Fraunhofer-Gesellschaft + + +) +- +Until + +
+
+Feedback: +
+
+ +GitHub +w3c/wot-thing-description + +w3c/wot-discovery + + +( + +pull +requests +, + +new +issue +, + +open +issues + +) +
+
+ +public-wot-wg@w3.org + +with +subject +line + +[wot-thing-description11] + +[wot-discovery] + + +… +message +topic +… + + +( + +archives + +) +
+
+Contributors +
+
+ +In +the +GitHub +repository + +
+Repository +We +are +on +GitHub +File +a +bug + +
+
+ +
+
+
+

+Abstract +

+

+This +document +describes +a +formal +information +model +and +a +common +representation +for +a + +The + +W3C + +Web +of +Things +(WoT) +Thing +Description +1.1. +A +Thing +Description +describes + +is +intended +to +enable +interoperability +across +IoT +platforms +and +application +domains. +One +key +mechanism +for +accomplishing +this +goal +is + +the +metadata + +definition + +and +interfaces + +use + +of +Things +, +where +a +Thing +is + +metadata +describing +the +interactions + +an +abstraction + +IoT +device +or +service +makes +available +over +the +network +at +a +suitable +level + +of +abstraction. +The +WoT +Thing +Description +specification +satisfies +this +objective. +

+However, +in +order +to +use + +a +physical +or +virtual +entity +that +provides +interactions + +Thing +its +Thing +Description +first +has + +to +and +participates + +be +obtained. +The + +WoT +Discovery + +process +described + +in +this +document +addresses +this +problem. +WoT +Discovery +needs +to +support + +the +Web + +distribution + +of +Things. + +WoT + +Thing +Descriptions +provide + +in + +a +set + +variety + +of +interactions +based + +use +cases. +This +includes +ad-hoc +and +engineered +systems; +during +development +and +at +runtime; +and + +on +a +small +vocabulary +that +makes +it +possible + +both +to +integrate +diverse +devices + +local + +and +global +networks. +The +process +also +needs + +to +allow +diverse +applications + +work +with +existing +discovery +mechanisms, +be +secure, +protect +private +information, +and +be +able + +to +interoperate. +Thing +Descriptions, +by +default, +are +encoded +in +a +JSON +format +that +also +allows +JSON-LD +processing. +The +latter +provides +a +powerful +foundation + +efficiently +handle +updates + +to +represent +knowledge +about +Things +in +a +machine-understandable +way. +A + +WoT + +Thing +Description +instance +can +be +hosted +by + +Descriptions +and + +the +Thing +itself +or +hosted +externally +when +a +Thing +has +resource +restrictions +(e.g., +limited +memory +space) +or +when +a +Web + +dynamic +and +diverse +nature + +of +Things-compatible +legacy +device +is +retrofitted +with +a +Thing +Description. +Furthermore, +this +document +introduces + +the +Thing +Model, +which +allows +authors + +IoT +ecosystem. +

+The +WoT +Discovery +process +is +divided +into +two +phases, +Introduction, +and +Exploration. +The +Introduction +phase +leverages +existing +discovery +mechanisms +but +does +not +directly +expose +metadata; +they +are +simply +used + +to +describe + +discover +Exploration +services, +which +provide +metadata +but + +only +the +model +or +class +of +an +Internet +of +Thing +(IoT) +entity. +Thing +Models +can +be +seen +as +a +template + +after +secure +authentication +and +authorization. +This +document +normatively +defines +two +Exploration +services: + +for +distributing +a +single +WoT + +Thing +Description +instances, +but +with +reduced +constraints +such + +from +a +regular +web +service, +including + +as +no +or +few +requirements +for +specific +communication +metadata. +This +specification +describes + +a +superset +of +the +features +defined +in + +special +case +self-description; +and +a +searchable +WoT + +Thing +Description +1.0 +[ +WOT-THING-DESCRIPTION +]. +Unless +otherwise +specified, +documents +created +with +version +1.0 + +Directory +service +for +collections + +of +this +specification +remain +compatible +with + +Thing +Description +1.1. + +Descriptions. +A +variety +of +Introduction +services +are +also +described +and +where +necessary +normative +definitions +are +given +to +support +them. + +

+
+
+

+Status +of +This +Document +

+

+ +This +section +describes +the +status +of +this +document +at +the +time +of +its +publication. +A +list +of +current + +W3C + +publications +and +the +latest +revision +of +this +technical +report +can +be +found +in +the + + +W3C + +technical +reports +index + +at +https://www.w3.org/TR/. + +

+

+This +is +the +second +Working +Draft +published +for +this +document, +and +is +expected +to +be +the +final +draft +before +CR +transition. +

+This + +document +was +published +by +the + +Web +of +Things +Working +Group + +as +a +Working +Draft +using +the + +Recommendation +track +. +

+

+Publication +as +a +Working +Draft +does +not +imply +endorsement +by + +W3C + +and +its +Members. +

+

+This +is +a +draft +document +and +may +be +updated, +replaced +or +obsoleted +by +other +documents +at +any +time. +It +is +inappropriate +to +cite +this +document +as +other +than +work +in +progress. +

+

+This +document +was +produced +by +a +group +operating +under +the + +1 +August +2017 + +W3C + +Patent +Policy +. + +W3C + +maintains +a + +public +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 +contains + +Essential +Claim(s) + +must +disclose +the +information +in +accordance +with + +section +6 +of +the + +W3C + +Patent +Policy +. +

+

+This +document +is +governed +by +the + +2 +November +2021 + +W3C + +Process +Document +. +

+
+ +
+
+

+ +1. + +Introduction +

+ + +
+

+This +section +is +non-normative. +1.1 +Thing +Description + +The +WoT +Thing +Description +(TD) +is +a +central +building +block +in +the +W3C + +Web +of +Things +(WoT) +and +can +be +considered +as +the +entry +point +of +a +Thing +(much +like +the +index.html +of +a +Web +site). +A +TD +instance +has +five +main +components: +textual +metadata +about +the +Thing +itself, +a +set +of +Interaction +Affordances + +defines +an +architecture + +that +indicate +how +the +Thing +can +be +used, +schemas +for + +supports + +the +data +exchanged + +integration +and +use +of +web +technologies + +with +the +Thing +for +machine-understandability, +Security +Definitions +to +provide +metadata +about +the +security +mechanisms +that +must +be +used +for +interactions, +and, +finally, +Web +links +to +express +any +formal +or +informal +relation +to +other +Things +or +documents +on +the +Web. + +IoT +devices. + +The +Interaction +Model +of +W3C + +WoT +defines +three +types +of +Interaction +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 + +Architecture + +[ + +WOT-ARCHITECTURE + + +wot-architecture11 + + + +] +for +details. +In +general, + +document +defines + +the +TD +provides +metadata +for +different +Protocol +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 +]), + +basic +concepts + +and +security +mechanisms +(for +authentication, +authorization, +confidentiality, +etc.). +Serialization + +patterns + +of +TD +instances +is +based +on +JSON + +usage +supported. +However, +the +WoT +Thing +Description + +[ + +RFC8259 + + +wot-thing-description11 + + + +], +where +JSON +names +refer +to +terms +of +the +TD +vocabulary, +as +defined +in +this + +] +is +a +key + +specification +document. +In +addition +the +JSON +serialization +of +TDs +follows + +for +WoT +Discovery +since +it +is + +the +syntax + +purpose + +of +JSON-LD +1.1 +[ +JSON-LD11 +] + +WoT +Discovery + +to +enable +extensions + +make +WoT +Thing +Descriptions +available. +Specifically, +WoT +Discovery +has +to +allow +authenticated + +and +rich +semantic +processing. +Example +1 +shows + +authorized +entities +(and +only +those +entities) +to +find +WoT +Thing +Descriptions +satisfying + +a +TD +instance +and +illustrates +the +Interaction +Model +with +Properties, +Actions, +and +Events +by +describing + +set +of +criteria, +such +as +being +near + +a +lamp +Thing +with +the +title +MyLampThing +. +Example +1 +: +Thing +Description +sample +{ + : <span class= +"hljs-string">"https://www.w3.org/2022/wot/td/v1.1", + : <span class= +"hljs-string">"urn:dev:ops:32473-WoTLamp-1234", + : <span class= +"hljs-string">"MyLampThing", + : { + : {<span class= +"hljs-attr">"scheme": <span class= +"hljs-string">"basic", <span class= +"hljs-attr">"in"} + }, + : <span class= +"hljs-string">"basic_sc", + : { + : { + : <span class= +"hljs-string">"string", + : [{<span class= +"hljs-attr">"href": <span class= +"hljs-string">"https://mylamp.example.com/status"}] + } + }, + : { + : { + : [{<span class= +"hljs-attr">"href": <span class= +"hljs-string">"https://mylamp.example.com/toggle"}] + } + }, + :{ + :{ + : {<span class= +"hljs-attr">"type": <span class= +"hljs-string">"string"}, + : [{ + : <span class= +"hljs-string">"https://mylamp.example.com/oh", + <span class= +"hljs-attr">"subprotocol": <span class= +"hljs-string">"longpoll" + }] + } + } +} +From +this +TD +example, +we +know +there +exists +one +Property +affordance +with + +certain +location, +or +having +certain +semantics, +or +containing +certain +interactions. +Conversely, +in +order +to +support +security +and +privacy +objectives, + +the +title +status +. +In +addition, + +WoT +Discovery +process +must +not +leak + +information +is +provided + +to +indicate + +unauthorized +entities. +This +includes +leaking +information + +that +this +Property +is +accessible +via +(the +secure +form +of) +the +HTTP +protocol +with +a +GET +method +at +the +URI +https://mylamp.example.com/status +(announced +within +the +forms +structure +by +the +href +member), +and +will +return + +a +string-based +status +value. +The +use +of +the +GET +method + +given +entity + +is +requesting +certain +information, + +not +stated +explicitly, +but +is +one +of +the +default +assumptions +defined +by +this +document. +In +a +similar +manner, +an +Action +affordance +is +specified +to +toggle +the +switch +status +using + +just + +the +POST +method +on + +information +distributed +in + +the +https://mylamp.example.com/toggle +resource, +where +POST +is +again +a +default +assumption +for +invoking +Actions. + +Thing +Descriptions +themselves. + +

+

+The +Event +affordance +enables + +There +are +already + +a +mechanism +for +asynchronous +messages + +number +of +discovery +mechanisms +defined, +so +we +have + +to +be +sent +by +a +Thing +. +Here, + +establish +why +we +are +proposing + +a +subscription + +new +one. +First, +many +existing +discovery +mechanisms +have +relatively +weak +security +and +privacy +protections. +One +of +our +objectives +is + +to +be +notified +upon + +establish + +a +possible +overheating +event +of +the +lamp + +mechanism +that +not +only +uses +best +practices +to +protect +metadata, +but +that + +can +be +obtained +by + +upgraded +to +support +future +best +practices +as +needed. +Second, +we +are + +using +HTTP +with +its +long +polling +subprotocol +on +https://mylamp.example.com/oh +. +This +example +also +specifies +the +basic +security +scheme, +requiring +a +username +and +password +for +access. +Note +that +a +security +scheme +is +first +given +a +name + +discovery + +in +securityDefinitions + +a +broad +sense +to +include +both +local + +and +then +activated +by +specifying +that +name +in + +non-local +mechanisms. +While + +a +security +section. +In +combination +with +the +use +of +the +HTTP +protocol +this +example +demonstrates +the + +local +mechanism +might + +use +of +HTTP +Basic +Authentication. +Specification +of +at +least +one +security +scheme +at + +a +broadcast +protocol, +non-local +mechanisms +might +go +beyond + +the +top +level + +current +network +segment +where +broadcast + +is +mandatory, + +not +scalable, + +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 +the +Thing +level, +allowing +for +the +specification +of +fine-grained +access +control. +It + +so +a +different +approach, +such +as +a +search +service, +is +needed. +Our +approach + +is +also +possible + +to +use +a +special +nosec +security +scheme +to +indicate +that +no +access +control + +existing + +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 + +as +needed + +to +bootstrap +into +a +more +general +and +secure +metadata +distribution +system. +Third, + +the +content +of + +metadata +we +are +distributing, + +the +WoT + +Thing +Description +instance, +provided +that +formal +knowledge, +e.g., +logic +rules +for + +Description, +is +highly +structured +and +includes +rich +data +such +as +data +schemas +and +semantic +annotations. +Existing +discovery +mechanisms +based +on + +a +specific +domain + +list + +of +application, +can +be +found +under + +simple +key-value +pairs +are +not +appropriate. +At + +the +given +namespace. +Contextual +information +can +also +help +specify +some +configurations +and +behavior + +same +time, +use + +of +the +underlying +communication +protocols +declared +in +the +forms +field. +Example +2 +extends +the +TD +sample +from +Example +1 +by +introducing +a +second +definition +in +the +@context +to +declare +the +prefix +saref + +existing +standards +for +semantic +data +query, +such + +as +referring +to +SAREF +, +the +Smart Appliance +Reference +Ontology + +SPARQL + +[ + +SMARTM2M + + +SPARQL11-OVERVIEW + + + +]. +This + +], +while +potentially +suitable +for +some +advanced +use +cases, +might +require +too +much +effort +for +many +anticipated + +IoT +ontology +includes +terms +interpreted +as +semantic +labels +that +can +be +set +as +values +of +the +@type +field, +giving + +applications. +Therefore +in +order +to +address +more +basic +applications, +we +also +define +some +simpler +query +mechanisms. +

+After +defining +some +basic +terminology, +we +will +summarize + +the +semantics +of +Things + +basic +use +cases + +and +their +Interaction +Affordances +. +In +the +example +below, +the +Thing +is +labelled +with +saref:LightSwitch +, + +requirements +for +WoT +Discovery. +These +are +a +subset +of + +the +status +Property +is +labelled +with +saref:OnOffState + +more +detailed +and +exhaustive +use +cases + +and +requirements +presented +in + +the +toggle +Action +with +saref:ToggleCommand +. +Example +2 +: +Thing +Description +with +TD +Context +Extension +for +semantic +annotations +{ + : [ + <span class= +"hljs-string">"https://www.w3.org/2022/wot/td/v1.1", + { : <span class= +"hljs-string">"https://w3id.org/saref#" } + ], + : <span class= +"hljs-string">"urn:dev:ops:32473-WoTLamp-1234", + : <span class= +"hljs-string">"MyLampThing", + : <span class= +"hljs-string">"saref:LightSwitch", + : { + : {<span class= +"hljs-attr">"scheme": <span class= +"hljs-string">"basic", <span class= +"hljs-attr">"in"} + }, + : <span class= +"hljs-string">"basic_sc", + : { + : { + : <span class= +"hljs-string">"saref:OnOffState", + : <span class= +"hljs-string">"string", + : [{ + : <span class= +"hljs-string">"https://mylamp.example.com/status" + }] + } + }, + : { + : { + : <span class= +"hljs-string">"saref:ToggleCommand", + : [{ + : <span class= +"hljs-string">"https://mylamp.example.com/toggle" + }] + } + }, + : { + : { + : {<span class= +"hljs-attr">"type": <span class= +"hljs-string">"string"}, + : [{ + : <span class= +"hljs-string">"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 + +WoT +Use +Cases + +[ + +json-ld11 + + +wot-usecases + + + +]. +Hence, +a +TD +instance +can +be +also +processed +as +an +RDF +document +(for +details +about +semantic +processing, +please +refer +to +Appendix +C. +JSON-LD +Context +Usage + +] + +and +the +documentation +under +the +namespace +IRIs, +e.g., +https://www.w3.org/2019/wot/td +). +1.2 +Thing +Model + +WoT +Architecture +[ + + +wot-architecture11 + + +One +of + + +] +documents. +Then +we +will +describe + +the +main +intentions + +basic +architecture + +of +the +WoT +Discovery +process, +which +uses + +a +Thing +Description + +two-phase +Introduction/Exploration +approach. +The +basic +goal +of +this +architecture + +is +to +provide +a +Consumer +with +all +the +details +necessary + +be +able + +to +successfully +interact +with +a +Thing +. +In +some +IoT +application +scenarios, +a +fully + +use +existing +discovery +standards +to +bootstrap +access +to +protected +discovery +services, +but +to +distribute + +detailed +Thing +Description +, +e.g., +with +communication + +metadata +is +not +necessary +(e.g., +IoT +ecosystems +may +implicitly +handle +communication +separately), +or +may +not +be +available +because +a +new +entity +has +not +yet +been +deployed +(e.g., +IP +address +is +not +yet +known). +Sometimes, +also +a +kind +of +class +definition +is +required +that +forces +capability +definitions +that +should +be +available +for +all +created +instances +(e.g., +large-scale +production +of +new +devices). +In +order + +only + +to +address +the +above-mentioned +scenarios +or +others, +the +Thing +Model +can +be +used +that +mainly +provides +the +data +model +definitions +within +Things +' +Properties +, +Actions +, +and/or +Events + +authorized +users, + +and +can +be +potentially +used + +to +also +protect +those +making +queries +from +eavesdroppers + +as +template + +much +as +possible. +We +then +describe +details +of +specific +Introduction +and +Exploration +mechanisms. +In +particular, +we +define +in +detail +a +normative +API + +for +creating + +a +WoT + +Thing +Description +instances. +In +the +following + +Directory +(WoT +TDD) +service +that +provides + +a +sample + +search +mechanism +for +collections +of +WoT + +Thing +Model +is +presented + +Descriptions + +that +can +be +seen +as +a +model +for +the +Thing +Description +instance +in +Example +1 +. +Example +3 +: +Thing +Model +sample +{ + : [<span class= +"hljs-string">"https://www.w3.org/2022/wot/td/v1.1"], + : <span class= +"hljs-string">"tm:ThingModel", + : <span class= +"hljs-string">"Lamp Thing Model", + : { + : { + <span class= +"hljs-attr">"description": <span class= +"hljs-string">"current status of the lamp (on|off)", + : <span class= +"hljs-string">"string", + : <span class= +"hljs-literal">true + } + }, + : { + : { + <span class= +"hljs-attr">"description": <span class= +"hljs-string">"Turn the lamp on or off" + } + }, + : { + : { + <span class= +"hljs-attr">"description": <span class= +"hljs-string">"Lamp reaches a critical temperature (overheating)", + : {<span class= +"hljs-attr">"type": <span class= +"hljs-string">"string"} + } + } +} +Thing +Model +definitions +are +identified + +dynamically +registered + +by +the +"@type": +"tm:ThingModel" +. +As +the +example +shows, +it +does +not +provide +details +about +a + +Things +or +entities +acting +on +their +behalf. +The +WoT +Discovery +mechanism +however +also +supports +distribution +of + +single +Thing +instance +due +to +the +lack + +TDs +from +regular +web +services, +with +a +special +case + +of +communication +and + +this +being +self-description. +Finally, +we +discuss +some + +security +metadata. +This +specification +presents +a +mechanism +for +deriving +valid +Thing +Description +instances +from +such +Thing +Model +definitions. +In +addition, +other +design +concepts +are +specified, + +and +privacy +considerations, + +including +how +to +override, +extend, + +a +set +of +potential +risks + +and +reuse +existing +Thing +Model +definitions. + +mitigations. + +

+
+
+
+

+ +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 +words + +MAY +, + +MUST +, + +MUST +NOT + +OPTIONAL + +, + +RECOMMENDED +, + +SHOULD +, +and + +SHOULD +NOT + +in +this +document +are +to +be +interpreted +as +described +in + +BCP +14 + +[ + + +RFC2119 + + +] +[ + + +RFC8174 + + +] +when, +and +only +when, +they +appear +in +all +capitals, +as +shown +here. +

+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 +as + +Thing +, +Consumer +, + + +Thing +Description + +( + +TD + +), +Partial +TD +, + + +Thing +Model + +( + +TM + +), +Interaction +Model +, +Interaction +Affordance +, + + +Property +, + +Action +, + +Event +, +Protocol +Binding + + +Anonymous +TD + +, +Servient + + +Discoverer + +, +Vocabulary + + +Discovery + +, +Term + + +Exploration + +, +Vocabulary +Term + + +Introduction + +, +WoT +Interface + + +Thing +Description +Server + +( + +TD +Server + +), + +Thing +Description +Directory + +( + +TDD + +), + +Partial +TD + +, +and +WoT +Runtime + + +Enriched +TD + + +are +defined +in + +Section +3 + +of +the +WoT +Architecture +1.1 + +specification +[ + +WOT-ARCHITECTURE + + +wot-architecture11 + + + +]. +

+In +addition, +this +specification +introduces +the +following +definitions: +TD +Context +Extension +A +mechanism +to +extend +Thing +Descriptions +with +additional +Vocabulary +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 +of +Class +definitions +constructed +from +pre-defined +Vocabularies +on +which +constraints +apply, +thus +defining +the +semantics +of +these +Vocabularies +. +Class +definitions +are +typically +expressed +in +terms +of +a +Signature +(a +set +of +Vocabulary +Terms +) +and +functions +over +that +Signature +. The +TD +Information +Model +also +includes +Default +Values +, +defined +as +a +global +function +over +Classes +. +TD +Processor +A +system +that +can +serialize +some +internal +representation +of +a +Thing Description +in +a +given +format +and/or +deserialize +it +from +that +format. +A +TD +Processor +must +detect +semantically +inconsistent +Thing +Descriptions +, +that +is, +Thing +Descriptions +that +cannot +satisfy +constraints +on +the +Instance +Relation +of +the +Thing +class. +For +that +purpose, +a +TD Processor +may +compute +forms +of +Thing +Descriptions +in +which +all +possible +Default +Values +are +assigned. +A +TD +Processor +is +typically +a +sub-system +of +a +WoT +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 +or +TD Document +Textual +or +binary +representation +of +Thing +Descriptions +that +can +be +stored +and +exchanged +between +Servients +. +A +TD +Serialization +follows +a +given +representation +format, +identified +by +a +media +type +when +exchanged +over +the +network. +The +default +representation +format +for +Thing +Descriptions +is +JSON-based +as +defined +by +this +specification. +These +definitions +are +further +developed +in +5.2 +Preliminaries +. + +
+
+
+

+ +4. + +Namespaces + +Architecture + +

+ + +
+

+The +version +of +the +TD +Information +Model +defined +in + +5. +TD +Information +Model +of +this +specification + + +This +section + +is +identified +by +the +following +IRI: +https://www.w3.org/2022/wot/td/v1.1 + +non-normative. + +

+

+This +IRI +[ + +RFC3987 +], +which +is +also +a +URI +[ + + +Figure + +1 + +RFC3986 + + +], +can +be +dereferenced +to +obtain + +shows +an +overview +of +the +WoT +Discovery +process. +Discovery +uses + +a +JSON-LD +context +file +[ +json-ld11 +], +allowing + +two-phase +architecture +to +resolve + +the +compact +strings +in +TD +Documents + +competing +requirements + +to +be +expanded + +both +open +and + +to +full +IRI-based +Vocabulary +Terms +. +However, +this +processing +is +only +required +when +transforming +JSON-based +TD +Documents + +restrict +access + +to +RDF, +an +optional +feature +of +TD Processor +implementations. + +metadata +to +authorized +entities. + +In +the +present +specification, +Vocabulary +Terms +are +always +presented +in +their +compact +form. +Their +expanded +form +can + +first +phase, +one +or +more +of +a +set +of +relatively +open +"Introduction" +mechanisms +may + +be +accessed +under +the +namespace +IRI + +used +to +generate +a +set + +of +the +Vocabulary +they +belong +to. + +candidate +URLs. + +These +namespaces +follow +the +structure +of +5.3 +Class +Definitions +. +Each +Vocabulary + +URLs +do +not +themselves +contain +metadata, +but +are + +used +in +the +TD Information +Model +has +its +own +namespace +IRI, +as +follows: +Vocabulary +Namespace +IRI +Core +https://www.w3.org/2019/wot/td# +Data +Schema +https://www.w3.org/2019/wot/json-schema# +Security +https://www.w3.org/2019/wot/security# +Hypermedia +Controls +https://www.w3.org/2019/wot/hypermedia# +All +vocabularies + +second +stage +to +reference +"Exploration" +services + +that +are +additionally +used +for +Thing +Model +definitions +have + +can +actually +provide +metadata, +after +authentication, +in + +the +following +namespace +IRI: +Vocabulary +Namespace +IRI + +form +of + +Thing +Model +https://www.w3.org/2022/wot/tm# + +Descriptions +.

+The +Vocabularies +are +independent +from +each +other. +They +may +be +reused +and +extended +in +other +W3C +specifications. +Every +breaking +change +in +the +design + +Discovery process overview +
+Figure + +1 + +Discovery +architecture +overview. +A +set + +of +open +Introduction +mechanisms +provides + +a +Vocabulary +will +require +the +assignment + +set + +of +a +new +year-based +namespace +URI. +Note + +URLs, +which +point +at +Exploration +services + +that +to +maintain + +only +provide +metadata +(TDs) +after +suitable +authentication. +Thing +Links +and +Thing +Description +Directories +provide +additional +flexibility +but +retrieving +further +results +from +these +is +at + +the +general +coherence + +discretion + +of +the +TD +Information +Model +, +the +associated +JSON-LD +context +file + +application. +

+The +intention + +is +versioned +such + +that +every +version +has +its +own +URI +( +v1 +, +v1.1 +, +v2 +, +...) + +Introduction +mechanisms +are +relatively +open +"first +contact" +mechanisms + +to +also +identify +non-breaking +changes, +in +particular + +provide +a +starting +point +for + +the +addition + +rest + +of +new +Terms +. + +the +Discovery +process. +In +this +document +we +specify +details +on +several +Introduction +mechanisms, +suitable +for +different +use +cases, +including +both +local +and +non-local +scenarios, +but +Introductions +can +in +fact +be +provided +by +any +mechanism +that +can +return +a +URL. +Introductions, +however, +do +not +include +any +security +or +privacy +controls +and +so +should +not +provide +metadata +directly. +Instead, +the +URLs +provided +by +Introduction +mechanisms +reference +"Exploration" +services. +Exploration +services +actually +do +provide +metadata, +but +only +after +suitable +authentication +and +access +controls +have +been +applied. + +

+

+Because +a +Vocabulary +under +some +namespace +IRI + +The +Discovery +process + +can +only +undergo +non-breaking +changes, + +produce +a + +set + +of +URLs +as +output +from + +its +content + +Introduction +phase, +even +if +only +one +Introduction +mechanism +is +used +(some +Introduction +mechanisms +can +themselves +return +multiple +URLs). +The +final +output +after +the +Exploration +phase + +can +also + +be +safely +cached +or +embedded +in +applications. +One +advantage +of +exposing +relatively +static +content +under + +a +namespace +IRI +is +to +optimize +payload +sizes + + +set + +of +messages +exchanged +between +constrained +devices. +It +also +avoids +any +privacy +leakage +resulting +from +devices +accessing +publicly +available +vocabularies +from +private +networks +(see +also +10. +Privacy +Considerations +). + +Thing +Descriptions. + +

+5. +TD +Information +Model + +

+This +section +introduces + +Each +URL +provided +by + +the +TD +Information +Model +. +The +TD +Information +Model +serves +as + +Introduction +phase +always +points +at +an +Exploration +service +endpoint +that +will +return +a +single +Thing +Description. +In + +the +conceptual +basis +for + +simplest +case +this +URL +references +an +ordinary +resource +provided +by +a +web +server +which +provides + +the +processing + +Thing +Description + +of +a +Thing +describing +an +IoT +endpoint +device. +As +a +special +case +of +this, +for +self-describing +Things +an +Introduction +URL +might +point +directly +at +an +endpoint +provided +by +a +Thing +serving +its +own +Thing +Description. +

+In +general + +Thing +Descriptions +might +be +provided +in +various +ways + +and +their +serialization, +which +is +described +separately + +in +6. +TD +Representation +Format +. +5.1 +Overview +The +TD +Information +Model +is +built +upon +the +following, +independent +Vocabularies +: + +particular +may +not +be +self-describing. +For +example, + +

+ +

+Each +of +these +Vocabularies + +The +Thing +Description +for +such +Things +should +be +provided +by +separate +services. +

+This +document +specifies +two +special +cases +that +allow +for +more +flexibility: +

+

+The +UML +diagram +shown +next +gives +an +overview +of +the +TD +Information +Model +. + +It +represents +all +classes +as +tables +and + +is + +not + +mandatory +for + +the +associations +that +exist +between +classes, +starting +from + +Discovery +process +to +retrieve + +the +class + +contents +of + +Thing +, + +Description +Directories +and +return +them + +as +directed +arrows. +For +the +sake + +part + +of +readability, + +the +diagram +was +split + +results, +because + +in +four +parts, +one +for +each + +general +this +might +result +in +a +huge +set + +of +results. +Instead + +the +four +base +Vocabularies +. +Note +The +following +figures +are +automatically +generated +based +on + +application +should +scan + +the +underlying +ontology +definitions. + +results +for +Thing +Description +Directory +TDs +and +decide +whether +to +retrieve +TDs +from +them, +possibly +selectively. +Likewise, +it +is +not +required +to +follow +Thing +Links +automatically; +instead +the +application +may +choose +to +follow +them +selectively. + +

+Figure +1 +TD +core +vocabulary +( +SVG +file +) +Figure +2 +Data +schema +vocabulary +( +SVG +file +) +Figure +3 +WoT +security +vocabulary +( +SVG +file +) +Figure +4 +Hypermedia +controls +vocabulary +( +SVG +file +) + +
+
+
+

+ +5.2 + +5. + + +Preliminaries + +Discoverer +Process +

+ +
+

+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), + +In + +this +document +defines + +section +we +will +describe + +the +following +formal +preliminaries +to +construct + +WoT +Discovery +process +from + +the +TD +Information +Model +accordingly. +All +definitions +in +this +section +refer +to +sets +, +which +intuitively +are +collections + +point + +of +elements +that +can +themselves +be +sets. +All +arbitrarily +complex +data +structures +can +be +defined +in +terms + +view + +of +sets. +In +particular, +an +Object +is + +a +data +structure +recursively +defined +as +follows: +a +Term +, +which +may +or +may +not +belong + +client, +and +what +it +means + +to +say +that + +a +Vocabulary +, +is + +client +supports +WoT +Discovery. +We +will +use +the +term + +Discoverer + +for + +an +Object +. + +entity +that +is + +a +set + +client + +of +name-value +pairs +where + +the +name +is + +WoT +Discovery +process. +A +Discoverer +may +or +may +not +be + +a +Term +and +the +value +is +another +Object +, +is +also +an +Object +. +Though +this +definition + +full +Consumer. +A +Discoverer + +does +not +prevent +Objects + +however +need + +to +include +multiple +name-value +pairs +with +the +same +name, +they +are +generally +not +considered + +read +and +extract +information +from +special +TDs +for +Directories +and +Thing +Links +and +use +specific +affordances +and +links +provided + +in +this +specification. +An +Object +whose +elements +only +have +numbers +as +names +is +called +an +Array +. +Similarly, +an +Object +whose +elements +only +have +Term +s +(that +do + +them. +Conversely, +a +Consumer +may + +not +belong +to +any +Vocabulary + +support +Discovery, +although +it +is +recommended +[ + +wot-architecture11 + + +) +as +names + + +]. +

+The +WoT +Discovery +process + +is +called + +designed +so +that +nearly +any +client +that +can +fetch + +a +Map +. +All +names +appearing +in +some +name-value +pair +in + +single +TD +given + +a +Map +are +assumed +to + +single +URI +can + +be +unique +within +the +scope + +said +to +support +WoT +Discovery. +Of +course, +Discoverers +may +support +more +powerful +Discovery +mechanisms, +but +some + +of +the +Map +. +Moreover, +Object +s + +these +have +additional +requirements. +Some +Introduction +mechanisms + +can +be +instances + +return +multiple +URLs, +each + +of +some +Class +. +A +Class +, + +which +is +denoted +by +a +Vocabulary +Term +, +is +first +defined +by +a +set +of +Vocabulary +Terms +called + +can +in +turn +be +used +to +fetch +at +least +one +TD. +So +even +without + +a +Signature +. +A +Class +whose +Signature +is +empty + +TDD, +it + +is +called +a +Simple +Type +. + +possible +to +discover +multiple +TDs. + +

+

+The +Signature + +following +assertions +describe +the +specific +responsibilities + +of +a +Class +allows +to +construct +two +functions +that +further +define +Classes +: +an +Assignment +Function +and +a +Type +Function +. + +Discoverer: +

+

+Strings +on +the +Web: +Language +and +Direction +Metadata +[ +string-meta +] +provides +some +guidance +and +illustrates + +The +above +process +supports + +a +number +of +pitfalls +when +using +bidirectional +text. +In +addition + +way + +to +the +explicitly +provided +Interaction +Affordances +in +the +properties +, +actions +, +and +events +Maps +, + +let +Directories +reference +other +Directories +without +duplicating +their +TDs: + +a +Thing +can +also +provide +meta-interactions, +which +are +indicated +by +Form +instances +in +its +optional +forms +Array +. +When +the +forms +Array +of + +Directory +wanting +to +reference +other +Directories +should +include + +a + +Thing +Link + + +instance +contains +Form +instances, +the +string +values +assigned + +with +a +"describedby" +relation + +to +the +name +op +, +either +directly +or +within +an +Array +, +MUST +be +one + +TD + +of +the +following +operation +types +: +readallproperties +, +writeallproperties +, +readmultipleproperties +, +writemultipleproperties +, +observeallproperties +, +unobserveallproperties +, +queryallactions +, +subscribeallevents +, +or +unsubscribeallevents +. +(See +an +example +for +an +usage +of +form +in +a +Thing +instance.) +The +data +schema +for +each +of + +other +Directory +service. +Then + +the +property +meta-interactions +is +constructed +by +combining + +above +process +would +expand + +the +data +schemas +of +each +PropertyAffordance +instance +in +a +single +ObjectSchema +instance, +where + +Thing +Link +to +obtain + +the +properties +Map + +actual +TD + +of +the +ObjectSchema +instance +contains +each +data +schema +of + +Directory, +and +then +(optionally) +use + +the +PropertyAffordances +identified +by + +appropriate +Directory +affordance +to +access + +the +name + +contents + +of +the +corresponding +PropertyAffordances +instance. +If +not +specified +otherwise +(e.g., +through + +linked +Directory. +Note +that +such + +a +TD +Context +Extension +), + +Thing +Link +points +at + +the +request +data + +TD + +of +the +readmultipleproperties +operation +is +an +Array +that +contains +the +intended +PropertyAffordances +instance +names, +which +is +serialized +to + +Directory, +not +at + +the +content +type +specified +by + +Directory +itself. +These +may +or +may +not +be +hosted +in + +the +Form +instance. + +same +location. + +

+5.3.1.2 +InteractionAffordance + +

+Metadata +of +a +Thing +that +shows +the +possible +choices +to +Consumers +, +thereby +suggesting +how +Consumers +may +interact +with + +Recursively +fetching + +the +Thing. +There +are +many +types + +contents + +of +potential +affordances, +but +W3C +WoT +defines +three +types + +such +linked +directories, +especially +without +a +specific +query +or +filter, +could +easily +result +in +downloading +a +large +amount + +of +Interaction +Affordances: +Properties, +Actions, +and +Events. +Vocabulary +term +Description +Assignment +Type +@type +JSON-LD +keyword + +data. +Such +recursive +expansion +should +be +limited + +to +label +the +object +with +semantic +tags +(or +types). +optional +string + +use +cases +that +require +it, +such +as +inventory, +auditing, + +or +Array +of +string +title +Provides +a +human-readable +title +(e.g., +display +a +text +for +UI +representation) +based +on +a +default +language. +optional +string +titles +Provides +multi-language +human-readable +titles +(e.g., +display +a +text + +indexing. +

+URLs + +for +UI +representation +in +different +languages). +Also +see +MultiLanguage +. +optional +Map +of +MultiLanguage +description +Provides +additional +(human-readable) +information +based +on +a +default +language. +optional +string +descriptions +Can + +Directory +services +can +also + +be +used +with +the +federation +capabilities +of +SPARQL +queries, +noted +below, +which +in +most +cases +will +be +a +more +efficient +way + +to +support +(human-readable) + +collect +specific + +information +in +different +languages. +Also +see +MultiLanguage +. +optional +Map + +from +a +set + +of +MultiLanguage +forms +Set + +distributed +directory +services. +However, +SPARQL +requires +the +URL + +of +form +hypermedia +controls +that +describe +how +an +operation + +a +SPARQL +endpoint +for +such +federation, +which + +can +be +performed. +Forms +are +serializations +of +Protocol +Bindings. +mandatory +Array + +found +in +the +TDs + +of +Form +uriVariables +Define +URI +template +variables +according +to +[ +RFC6570 +] +as +collection +based +on +DataSchema +declarations. +The +individual +variables +DataSchema +cannot +be +an +ObjectSchema +or +an +ArraySchema. +If + +Directories +supporting +SPARQL +queries. +This +is +not + +the +same +variable +is +both +declared +in +Thing-level +uriVariables +and +in +Interaction +Affordance +level, + +as + +the +Interaction +Affordance +level +variable +takes +precedence. +optional +Map +of +DataSchema +The +class +InteractionAffordance +has + +URL +pointing +at + +the +following +subclasses: + +TD +of +a +Directory. + +

+PropertyAffordance +ActionAffordance +EventAffordance + +
+
+
+

+5.3.1.3 + + +6. + + +PropertyAffordance + +Introduction +Mechanisms +

+ +
+

+An +Interaction +Affordance +that +exposes +state +of +the +Thing. + +This +state +can +then +be +retrieved +(read) +and/or +updated +(write). +Things +can +also +choose +to +make +Properties +observable +by +pushing +the +new +state +after +a +change. +Vocabulary +term +Description +Assignment +Type +observable +A +hint +that +indicates +whether +Servients +hosting +the +Thing +and +Intermediaries +should +provide +a +Protocol +Binding +that +supports +the +observeproperty +and +unobserveproperty +operations + +chapter +describes +mechanisms + +for +this +Property. + +initial +contact + +with +default +boolean +Note +Property +instances +are +also +instances +of +the +class +DataSchema + +Things +or + +Thing +Description +Directories + +. +Therefore, +it +can +contain +the +type +, +unit +, +readOnly +and +writeOnly +members, +among +others. +PropertyAffordance +is +a +Subclass + +Any + +of +the +InteractionAffordance +Class +and + +following +mechanisms +may +be +provided +by + +the +DataSchema +Class +. +When +a +Form +instance +is +within +a +PropertyAffordance +instance, + +Thing +or + +the +value +assigned + + +Thing +Description +Directory + +to +op +MUST +be +one + +Consumers. +The +result + +of +readproperty +, +writeproperty +, +observeproperty +, +unobserveproperty +or + +an +Array +containing + +introduction +mechanism +is +always + +a +combination + +URL +(address) + +of +these +terms. +Note + +an +exploration +service +which +can +be +used +to +obtain +detailed +metadata +(TDs) +after +suitable +authentication. + +It +is +considered + +also +possible +for +multiple +introduction +mechanisms + +to +be +good +practice +that +each +observeproperty +has +a +corresponding +unobserveproperty +unless + +used +and + +the +protocol +supports +implicit +unsubscription +mechanisms +(e.g., +heartbeat +to +detect +connection +loss). +Note +The +observation + +results +merged. +No +particular +introduction + +mechanism +depends +on +the +underlying +protocol +or +sub-protocol. +Having +said +that, +it + +is +not +guaranteed +that +the +current +Property +value +will +be +provided +once + +mandatory, +as +long +as + +the +subscription + +URL +of +at +least +one +exploration +service + +is +initiated. +Hence, +it +may +be +necessary +to +read +the +current +Property +value +before/after +the +subscription +to +get +a +first +value. + +somehow +obtained. + +

+
+
+

+ +5.3.1.4 + +6.1 + + +ActionAffordance + +Direct +

+ +
+

+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 +term +Description +Assignment +Type + +input +Used +to +define +the +input +data +schema +of +the +Action. +optional +DataSchema +output +Used +to +define +the +output +data +schema + + +To +obtain +an +URL + +of +the +Action. +optional +DataSchema +safe +Signals +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 + +exploration +service, +any +mechanism + +that +case +responses +can + +results +in +a +single +URL + +MAY + +be +cached + +used. + +This +includes +Bluetooth +beacons, +QR +codes, +and +written +URLs +to +be +typed +by +a +user. + +A +request +on +all +such +URLs + +MUST + +result +in +a +TD + +as +example. +with +default +boolean +idempotent + +prescribed +in + +Indicates +whether +the +Action +is +idempotent +(=true) +or +not. +Informs +whether +the +Action + + +7. + +Exploration +Mechanisms +. +For +self-describing +Things, +this + +can +be +called +repeatedly +with +the +same +result, +if +present, +based +on + +the +same +input. +with +default +boolean +ActionAffordance +is +a +Subclass + +TD + +of +the +InteractionAffordance +Class +. +When +a +Form +instance +is +within +an +ActionAffordance +instance, + +Thing +itself. + +If + +the +value +assigned +to +op + +URL +references +a + +Thing +Description +Directory +, +this + + +MUST + +either + +be +invokeaction +, +queryaction +, +cancelaction +or +an +Array +containing +a +combination + +the +Directory +Description + +of +these +terms. + +the + +Thing +Description +Directory +. + +

+
+
+
+

+ +5.3.1.5 + +6.2 + + +EventAffordance + +Well-Known +URIs +

+ +
+

+An +Interaction +Affordance +that +describes +an +event +source, +which +asynchronously +pushes +event +data +to +Consumers +(e.g., +overheating +alerts). +Vocabulary +term +Description +Assignment +Type +subscription + +Defines +data +that +needs +to +be +passed +upon +subscription, +e.g., +filters + + +A +Thing + +or +message +format +for +setting +up +Webhooks. +optional +DataSchema + + +Thing +Description +Directory + + +data +Defines +the +data +schema +of +the +Event +instance +messages +pushed +by + + +MAY + +use + +the +Thing. +optional +DataSchema + +Well-Known +Uniform +Resource +Identifier +[ + + +RFC8615 + + +dataResponse +Defines +the +data +schema +of +the +Event +response +messages +sent +be +the +consumer +in +a +response + + +] + +to +advertise +its +presence. + +If + +a +data +message. +optional +DataSchema + +Thing +or + +Thing +Description +Directory + + +use +the +Well-Known +Uniform +Resource +Identifier +[ + +cancellation + + +RFC8615 + +Defines +any +data +that +needs +to +be +passed +to +cancel +a +subscription, +e.g., +a +specific +message + + +] + +to +remove +a +Webhook. +optional + +advertise +its +presence, +it + +MUST + +register +its +own +Thing +Description +into +the +following +path: + + +DataSchema + +/.well-known/wot +. +

+

+EventAffordance +is +a +Subclass +of +the +InteractionAffordance +Class +. + + +When +a +Form +instance + +request + +is +within +an +EventAffordance +instance, + +made +at + +the +value +assigned +to +op + +above +Well-Known +URI, +the +server + + +MUST + +return +a +Thing +Description +as +prescribed +in + +be +either +subscribeevent +, +unsubscribeevent +, +or +both +terms +within +an +Array + + +7. + +Exploration +Mechanisms + +. + +

+
+
+ +Note + +Editor's +note + + +It +is +considered +to +be +good +practice +that +each +subscribeevent +has +a +corresponding +unsubscribeevent +unless +the +protocol +supports +implicit +unsubscription +mechanisms +(e.g., +heartbeat +to +detect +connection +loss). +5.3.1.6 +VersionInfo +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 +the +TD +Context +Extension +mechanism. +Vocabulary +term +Description +Assignment +Type +instance +Provides +a +version +indicator +of +this +TD. +instance. +mandatory +string +model +Provides +a +version +indicator + +: +Registration + +of +the +underlying +TM. +instance. +optional + +Well-known +URI + +
+

+The +service +name +in +Well-Known +URI +( + + +string + +wot + + +It + +) + +is +recommended +that +the +values +within +instances + +tentative. +"Well-Known +URIs" +registry + +and +model + +contents + +of +the +VersionInfo +Class +follow +the +semantic +versioning +pattern, +where +a +sequence + +registration +request +is +described +in +Section +3.1 + +of +three +numbers +separated +by +a +dot +indicates +the +major +version, +minor +version, +and +patch +version, +respectively. +See + +[ + +SEMVER + + +RFC8615 + + + +] +for +details. + +]. + +

+
+
+
+
+

+5.3.1.7 + + +6.3 + + +MultiLanguage + +DNS-Based +Service +Discovery +

+ +
+

+A +Map +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 + + +A +Thing +or + +Thing +Description +instance. +Each +name +of +the +MultiLanguage +Map + +Directory + + +MUST + + +MAY + + +be +a +language +tag +as +defined +in +[ + +use +DNS-Based +Service +Discovery +(DNS-SD)[ + + +BCP47 + + +RFC6763 + + + +]. + +Each +value +of +the +MultiLanguage +Map +MUST + +This +can + +be +of +type +string +. +5.3.2 +Data +Schema +Vocabulary +Definitions +A +data +schema +is +an +abstract +notation +for +data +contained +in +data +formats. +The +data +schema +vocabulary +definition +reflects +a +very +common +subset +of + +also +be +used +on + +the +terms +defined +by +JSON +Schema +[ + +same +local +network +in +combination +with +Multicast +DNS +(mDNS)[ + + +JSON-SCHEMA + + +RFC6762 + + + +]. +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 +a +TD +Context +Extension +for +the +additional +terms +as +described +in +7. +TD +Context +Extensions +, +otherwise +these +terms +are +semantically +ignored +by +TD +Processors +(for +details +about +semantic +processing, +please +refer +to +C. +JSON-LD +Context +Usage +and +the +documentation +under +the +namespace +IRIs, +e.g., +https://www.w3.org/2019/wot/td +). + +

+

+In +a +TD, +concrete +data +formats +are +specified +in +Forms +(see +5.3.4.2 +Form +) +using +content +types. +When + +DNS-SD, + +the +value +of +a +content +type +in +an +instance + +format + +of +the +Form + +Service +Instance +Name + +is + +application/json +, + +Instance.Service.Domain +. +The +Service +part +is +a +pair +of +labels +following + +the +data +schema +can +be +processed +directly +by +JSON +Schema +processors. +Otherwise, +Web + +conventions + +of +Things +(WoT) +Binding +Templates + +[ + +WOT-BINDING-TEMPLATES +] +defines +data +schema's +available +mappings +to +other +content +types +such +as +XML +[ +xml + + +RFC2782 + + + +]. +If +the +content +type +in + +The +first +label +has + +an +instance +of + +underscore +followed +by + +the +Form +is +not +application/json + +Service +Name, + +and +if +no +mapping +is +defined +for + +the +content +type, +specifying +a +data +schema +does +not +make +sense +for + +second +label +describes + +the +content +type. + +protocol. + +

+

+ +The +following +table +is +at +risk +but +contains +content +types +which + +Service +Name +to +indicate +the +Thing +or + +Thing +Description +Directory + + +MAY + +MUST + + +use +data +schema. + +be + +_wot +. +The +Service +Name +to +indicate +the + +Thing +Description +Directory + +MUST + +be + +_directory._sub._wot +. + +

+Format +Content +Type +JSON + +
+
+application/json + + +Editor's +note + +application/ld+json + +: +Service +Names +in +existing +implementations + +
+

+The +Service +Names + + +application/senml+json + +_wot + + +and + + +application/cbor + +_directory._sub._wot + + +are +tentative. +The +following +Service +Names +are +used +in +the +existing +implementations: + + +application/senml+cbor +XML + +_wot +, + +application/xml + +_device._sub._wot +, + +application/senml+xml + +_directory._sub._wot +, + +application/exi +5.3.2.1 + +_webthing +, + +DataSchema + +_wot-servient +. +To +use +a +Service +Name, +registration +to +"Underscored +and +Globally +Scoped +DNS +Node +Names" +Registry +[ + + +RFC8552 + + + +] +is +required. +

+
+
+

+Metadata +that +describes + +In +addition, + +the +data +format +used. +It +can + +following +information + +MUST + +be +used +for +validation. +Vocabulary +term +Description +Assignment +Type + +included +in +the + + +@type + +TXT + + +JSON-LD +keyword + +record +that +is +pointed + +to +label + +by + +the +object +with +semantic +tags +(or +types) +optional + +Service +Instance +Name: +

+ +string + +td + + +
+
+Absolute +pathname +of +the +Thing +Description +of +the +Thing + +or +Array + +Directory +Description + +of +string +title +Provides +a +human-readable +title +(e.g., +display +a +text +for +UI +representation) +based +on +a +default +language. +optional +string + +the + +Thing +Description +Directory +.
+ +titles + +type + + +Provides +multi-language +human-readable +titles +(e.g., +display +a +text +for +UI +representation +in +different +languages). +Also +see +MultiLanguage +. +optional +Map + +
+
+Type + +of +MultiLanguage +description +Provides +additional +(human-readable) +information +based +on +a +default +language. +optional + +the +Thing +Description, +i.e. + + +string + +Thing + + +or + + +descriptions +Can +be +used + +Directory +. +If +omitted, +the +type +is +assumed + +to +support +(human-readable) +information +in +different +languages. +Also +see +MultiLanguage +. +optional +Map +of +MultiLanguage + +be + + +const +Provides +a +constant +value. +optional +any +type + +Thing +.
+default + + +Editor's +note + +Supply + +: +Usage +of + +a +default +value. +The +value +should +validate +against +the +data +schema + +TXT +record + +in +which +it +resides. +optional +any +type +unit + +existing +implementations + +Provides +unit +information +that +is +used, +e.g., + +
+

+The +following +key/value +pairs +are +used + +in +international +science, +engineering, +and +business. +To +preserve +uniqueness, +it +is +recommended +that + +the +value + +existing +implementations: +
+retrieve +: +Absolute +path +name + +of +the +unit +points +to +a +semantic +definition +(also +see +Section +Semantic +Annotations +). +optional +string +oneOf +Used + +API + +to +ensure +that +the +data +is +valid +against +one + +get +an +array + +of +Thing +Description +IDs +from + +the +specified +schemas +in +the +array. +optional +Array +of +DataSchema + +directory +service. +
+ +enum +Restricted +set +of +values +provided +as +an +array. +optional +Array + +register +: +Absolute +path +name + +of +any +type +readOnly +Boolean +value +that +is +a +hint +to +indicate +whether +a +property +interaction +/ +value +is +read +only +(=true) +or +not +(=false). +with +default +boolean +writeOnly +Boolean +value +that +is +a +hint + +the +API + +to +indicate +whether + +register + +a +property +interaction +/ +value +is +write +only +(=true) +or +not +(=false). + +Directory +Description + +with +default +boolean + +the + +Thing +Description +Directory +.
+ +format +Allows +validation +based + +path +: +The +URI +of +the +thing +description + +on +a +format +pattern +such +as +"date-time", +"email", +"uri", +etc. +(Also +see +below.) +optional +string + +the +Web +Thing's +web +server +
+ +type +Assignment +of +JSON-based +data +types +compatible +with +JSON +Schema +(one +of +boolean, +integer, +number, +string, +object, +array, +or +null). +optional +any +type +(one + +td +: +Prefix + +of +directory +service +API +
+ +object +, +array +, +string +, +number +, +integer +, +boolean +, +or +null +) +The +class +DataSchema +has + +tls +: +Value +of +1 +if + +the +following +subclasses: + +Web +Thing +supports +connections +via +HTTPS. +
+

+
+

+ArraySchema + + +Figure + +2 + + +BooleanSchema + +and + +Figure + +3 + + +NumberSchema + +shows +example +sequences +of +discovery +of +Thing +and + +Thing +Description +Directory + + +using +DNS-SD +and +mDNS. +

+An example sequence of discovery of Thing using DNS-SD and mDNS +
+Figure + +2 + +An +example +sequence +of +discovery +of +Thing +using +DNS-SD +and +mDNS + +IntegerSchema + +
+
+
+An example sequence of discovery of directory service using DNS-SD and mDNS +
+Figure + +3 + +An +example +sequence +of +discovery +of + +Thing +Description +Directory + + +using +DNS-SD +and +mDNS + +ObjectSchema + +
+
+
+
+
+ + +StringSchema + +
+

+ +A +Thing +or + +Thing +Description +Directory + + + +MAY + +advertise +its +presence +using +the +Constrained +RESTful +Environment +(CoRE) +Link +Format +[ + +NullSchema + + +RFC6690 + + +The +format +string +values +are +known +from +a +fixed +set +of +values +and +their +corresponding +format +rules +defined +in + + +]. + +A +Thing +or + +Thing +Description +Directory + +MAY + +use +the +CoRE +Resource +Directory + +[ + +JSON-SCHEMA + + +CoRE-RD + + + +] +(Section +7.3 +Defined +Formats +in +particular). +Servients + +to +register +a +link +to +the +Thing +or +Directory +Description. + +MAY + +

+

+use +the + + +The +resource +type +( + + +format + +rt + + +value +to +perform +additional +validation +accordingly. +When +a +value + +) +of +the +Link + +that +is +not +found +in + +targets + +the +known +set + +Thing +Description + +of +values +is +assigned +to +format +, +such +a +validation +SHOULD + +the +Thing + +MUST + + +be + +wot.thing +. +The +resource +type +of +the +Link +that +targets +the +Directory +Description +of +the + +Thing +Description +Directory + +MUST + + +succeed. + +be + +wot.directory +. + +

+
+
+ +Note + +Editor's +note + + +
+

+The +resource +types + + +format + +wot.thing + + +term +is +not +widely +implemented +by +JSON +Schema +tools. +In +addition, +the +term + +and + + +format + +wot.directory + + +is +being +discussed +by +the +JSON +Schema +standardisation +community +and +may +be +replaced +by +another +mechanism +or +removed +in +a +future +JSON +Schema +version. + +are +tentative. +See +also + +11. + +IANA +Considerations +. +

+
+
+
+
+

+ +5.3.2.2 + +6.5 + + +ArraySchema + +DID +Documents +

+ +
+

+Metadata +describing +data +of +type +Array +. +This +Subclass + + +A +Thing +or + +Thing +Description +Directory + + +is +indicated +by + + +MAY + +advertise +its +presence +using + +the +value +array +assigned +to +type +in +DataSchema +instances. + +Decentralized +Identifier +(DID) +[ + +Vocabulary +term + + +DID-CORE + + +Description +Assignment +Type + + +]. + +items + +

+

+Used +to +define + + +The +DID +Document +obtained +by +resolving + +the +characteristics + +DID + +of +an +array. +optional +DataSchema + +a +Thing + +or +Array + + +Thing +Description +Directory + + +of + + +MUST + +contain +a +Service +Endpoint +which +points +to +a +Thing +Description +describing +that +Thing +or + +Thing +Description +Directory +. +DataSchema + +

+ +
+
+ + +Issue +65 + + +: +Create +typed +links +in +DID +Documents +for +WoT +Directories + +DID + +maxItems + + +Defines +the +maximum +number +of +items + +
+

+These +should +be +consistent +with +a +general +model + +that +have + +we +should +also +use +for +similar +things, +i.e. +CoRE-RD +and +DNS-SD. +We +should +discuss +with +DID +the +process +for +how + +to +be + +document +a +link +type +for +use + +in +the +array. +optional +unsignedInt + +DID +Documents. +

+
+
+
+
+

+ +5.3.2.3 + +7. + + +BooleanSchema + +Exploration +Mechanisms +

+ +
+Metadata +describing +data +of +type +boolean +. + +This +Subclass +is +indicated +by + +section +defines + +the +value +boolean +assigned +to +type +in +DataSchema +instances. + +supported +exploration +mechanisms +after +providing +some +common +background +material. +
+
+

+ +5.3.2.4 + +7.1 + + +NumberSchema + +Overview +

+ +
+Metadata +describing +data + +
+Exploration mechanisms high-level class diagram +
+Figure + +4 + +The +high-level +class +diagram + +of +type +number +. +This +Subclass +is +indicated +by + +the +value +number +assigned +to +type +in +DataSchema +instances. +Vocabulary +term + +exploration +mechanisms, +depicting +how +Thing + +Description +Assignment +Type +minimum +Specifies + +Servers +and +Thing +Description +Directories +provide + +TDs +. +A +Self-describing +Thing +is + +a +minimum +numeric +value, +representing +an +inclusive +lower +limit. +Only +applicable +for +associated +number +or +integer +types. +optional +double +exclusiveMinimum +Specifies + +special +case +of + +a +minimum +numeric +value, +representing +an +exclusive +lower +limit. +Only +applicable + +Thing +Description +Server +that +is +also +a +Thing. +A +Thing +Description +Directory +acts +as +a +Thing +Description +Server + +for +associated +number +or +integer +types. +optional + +each +Thing +Description +it +contains. + +
+
+

+double + + +Figure + +4 + + +maximum +Specifies +a +maximum +numeric +value, +representing +an +inclusive +upper +limit. +Only +applicable + +depicts +the +high-level +information +model + +for +associated +number +or +integer +types. +optional +double + + +TD +Servers + + +exclusiveMaximum +Specifies +a +maximum +numeric +value, +representing +an +exclusive +upper +limit. +Only +applicable + +(serving +single +TDs, +including +those + +for +associated +number +or +integer +types. +optional +double + +self-description) +and + +Thing +Description +Directory + + +multipleOf +Specifies + +services. +A + +Thing +Description +Directory + +may +contain + +TDs + +and +at + +the +multipleOf +value +number. +The +value +must +strictly +greater +than +0. +Only +applicable + +same +time +is +also +a +Thing, +which +means +it +has +its +own +TD. +A +directory +also +hosts +web +service +endpoints + +for +associated +number +or +integer +types. +optional +double + +retrieving +individual +TDs +for +other +Things +and +each +of +these +can +be +used +as +a +TD +Server. +A +Thing +may +in +general +host +its +own +TD +in +which +case +it +is +a +Self-Describing +Thing. +Self-description +is +not +mandatory +for +directories, +but +Self-Describing +Thing +Description +Directories +are +possible +that +are +both +Thing +Description +Directories +and +Self-Describing +Things. +

+The +two +basic +exploration +mechanisms +are +described +in + + +7.2 + +Thing +Description +Server + + +and + + +7.3 + +Thing +Description +Directory +.

+
+

+ +5.3.2.5 + +7.1.1 + + +IntegerSchema + +Ontology +

+ +
+Metadata +describing +data + +
+Ontology of TD in discovery context +
+Figure + +5 + +The +ontology + +of +type +integer +. +This +Subclass +is +indicated +by +the +value +integer +assigned +to +type + +Thing +Descriptions + +in +DataSchema +instances. +Vocabulary +term +Description +Assignment +Type +minimum +Specifies +a +minimum +numeric +value, +representing +an +inclusive +lower +limit. +Only +applicable +for +associated +number +or +integer +types. +optional + +the +Discovery +context. + +
+
+

+integer + + +Figure + +5 + + +exclusiveMinimum +Specifies +a +minimum +numeric +value, +representing + +illustrates +the +Discovery +ontology +as + +an +exclusive +lower +limit. +Only +applicable + +extension +of +the +Thing +ontology. +

+The +ontology +includes +a +class + +for +metadata +that +are + +associated +number +or +integer +types. +optional + +with +TDs +stored +in +a +directory. +This +class +is +called + + +integer + +RegistrationInformation + + +and +described +as +part +of +the +directory +specification +in + + +7.3.1.1 + +Registration +Information +.

+The +Discovery +ontology +also +defines +two +new +Thing +Description +classes, +described +in +the +following +sections, +that +may +be +used +to +model +special +exploratory +metadata: + +ThingDirectory + + +and + +ThingLink +.

+ +7.1.1.1 + + +maximum + +ThingDirectory + + +Specifies +a +maximum +numeric +value, +representing +an +inclusive +upper +limit. +Only +applicable +for +associated +number +or +integer +types. +optional +integer + +
+ + +exclusiveMaximum +Specifies +a +maximum +numeric +value, +representing +an +exclusive +upper +limit. +Only +applicable +for +associated +number +or +integer +types. +optional + +
+
+
+ +integer + + +Issue +148 + + +: +Discovery +context +and +namespace +under +w3.org/ns + +
+
+The +type +URIs +used +below +are +tentative +and +subject +to +change. +
+A +TD +which +describes +a +Thing +Description +Directory +instance + +MUST + +use +type + + +multipleOf + +ThingDirectory + + +Specifies + +from + +the +multipleOf +value +number. +The +value +must +strictly +greater +than +0. +Only +applicable +for +associated +number + +discovery +context + +or +integer +types. +optional + +URI + + +integer + +https://www.w3.org/2021/wot/discovery#ThingDirectory +.

+A +TD +of +this +class +can +be +derived +from +Directory's +Thing +Model; +see + + +7.3.2.4 + +API +Specification +(Thing +Model) +.

+
+ +
+
+
+

+ +5.3.3 + +7.1.2 + + +Security +Vocabulary +Definitions + +Bootstrapping + +

+ + +
+

+This +specification +provides +a +selection + +The +purpose + +of +well-established + +an +exploration +service +is +to +serve +TDs, +but +only +after +suitable +authentication, +and +only +to +authorized +parties. +However, +in +some +cases +a +Discoverer +may +not +know +what + +security +mechanisms +that + +credentials + +are +directly +built +into +protocols +eligible +as +Protocol +Bindings +for +W3C +WoT +or + +needed +to +access +a +TD +via +an +exploration +service, +particularly +in +ad-hoc +scenarios. +Since +upon +first +access +to +an +exploration +service +a +Discoverer +will +not +yet +have +access +to +the +TD +if +suitable +authentication +credentials + +are +widely + +not +provided, +the +Discoverer +can't +depend +on +the +security +metadata +held + +in +use +with +those +protocols. +The +current +set + +TDs +to +know +what +kind + +of +HTTP +security +schemes + +authentication +and +authorization +information + +is +partly +based +on +OpenAPI +3.0.1 +(see +also +[ +OPENAPI +]). +However +while + +needed. +If + +the +HTTP + +Discoverer +has +no +prior +knowledge, +it +will +have +to +depend +on +existing + +security +schemes, +Vocabulary +, +and +syntax +given +in +this +specification +share +many +similarities +with +OpenAPI, +they +are +not +compatible. + +negotation +support +to +bootstrap +access, +at +least +to +the +TD +itself. + +

+5.3.3.1 +SecurityScheme + +

+Metadata +describing + +We +define + +the +configuration +of +a + +following +for +the +HTTP +protocol, +for +which + +security +mechanism. +The +value +assigned +to + +negotiation +processes +already +exist. +However, +most +of + +the +name +scheme +MUST +be +defined +within + +HTTP +negotiation +processes +assume +there +is + +a +Vocabulary +included +in +the +Thing +Description +, +either + +human +user + +in +the +standard +Vocabulary +defined +in +§  +5. +TD +Information +Model +or +in + +loop, +but +this +is +also +appropriate +for +WoT +Discovery, +since +this +problem +will +typically +occur +when + +a +TD +Context +Extension +. +For +all +security +schemes, +any +private +keys, +passwords, +or +other +sensitive +information +directly +providing + +user +is +trying +to + +access +should +be +shared +and +stored +out-of-band +and +MUST +NOT +be +stored +in + +a +public +WoT +service +or +perform +integration +of +a +new +device. +In +this +case + +the +TD. +The + +purpose +of +a +TD + +negotiation + +is +to +describe +how + +provide +guidance +on +what +credentials +are +needed + +to +access +a +Thing +if +and +only +if +a +Consumer +already +has +authorization, + +the +system. +

+In +cases +when +exploration +services +are +being +used +to +automate +system +management +it +would +be +best +to +pre-establish +what +credentials +(and +authentication +mechanisms) +are +needed +to +access +the +relevant +exploration +services + +and +security +bootstrapping +would +not +be +required. +For +this +reason +security +bootstrapping + +is +not +meant + +a +mandatory +feature, +and +can + +be +used +to +grant + +omitted +or +disabled +on +devices + +that +authorization. + +are +to +be +used +with +pre-established +security +mechanisms. + +

+

+Security +schemes +generally + +bootstrapping + +may +require +additional + +also +only +be +necessary +on +the + +first + +access +to +a +TD. +Once +a +Discoverer +has +determined +what +credentials +and + +authentication +parameters, +such +as + +mechanism +are +required +to +access + +a +password +or +key. +The +location +of + +particular +exploration +service, +they +can +retain + +this +information +is +indicated +by +the +value +associated +with +the +name +in +, +often +in +combination +with +the +value +associated +with +name +. +The +value +associated +with +in +can +take +one +of + +and +attempt +to +use +them +for +future +accesses. +Note +however +that +depending +on + +the +following +values: + +security +scheme +used, +credentials +themselves +may +expire +and +may +need +to +be +re-established +periodically. + +

+

+header +: +The +parameter +will + + +Security +bootstrapping + +MAY + +be +given +in +a +header + +provided +by +the +protocol, +with +the +name +of +the +header +provided +by +the +value +of +name +. +query +: +The +parameter +will +be +appended + +on +any +HTTP +endpoint +that +serves +a +TD. + +As +mentioned +above, +disabling +or +omitting +security +bootstrapping +is +permissible +if +security +mechanisms +have +been +previously +established. +For +example, +if +an +installation +wants + +to +use + +the +URI +as +a +query +parameter, + +OAuth2 + +client + +flow +and +provide +potential +clients + +with +the +name + +an +address + +of +the +query +parameter +provided +by +name +. +body +: +The +parameter +will +be +provided + +an +authentication +server +to +use + +in +advance, +then +security +bootstrapping +can +be +disabled, +since + +the +body + +alternative +would +be +to +include +other +(and +potentially +weaker) +forms + +of +authentication. +

+In + +the +request +payload, +with + +HTTP +protocol, + +the +data +schema +element + +authentication +and +authorization +mechanisms +to +be + +used +provided + +can +generally +be +negotiated + +by +name +. +When +used +in + +the +context +of + +HTTP +server +returning +a +"401 +(Unauthorized)" +response +code +in +conjunction +with + +a + +body + +WWW-Authenticate + + +security +information +location, + +header +that +specifies + +the +value +of +name +MUST +be +in + +information +required. +To +gain +access, + +the +form +of +a +JSON +pointer +[ +RFC6901 +] +relative + +client +then +needs + +to +make +another +request +with + +the +root +of +the +input +DataSchema +for +each +interaction +it +is +used +with. +Since +this +value +is + +necessary +information. + +There +are +several +authentication +schemes +registered +with +IANA. + +However, + +not +a +fragment +identifier, + +all +of +these +are +in +wide +use, +some +are +experimental, + +and +there + +is +not +relative +to +the +root +of + +only +partial +overlap +with + +the +TD +but +to +whichever +data +schemas + +schemes +supported +by +TDs. +Also, +note +that + +the +security +scheme +is +bound +to, +this +value +should +not +start +with + + +# + +oauth + + +; +it +is +a +"pure" +JSON +pointer. +Since +this +value +is +not +a +fragment +identifier, +it +also +does +not +need +to +URL-encode +special +characters. +The +targeted +element +may +or +may +not +already +exist +at +the +specified +location + +scheme + +in +the +referenced +data +schema. +If +it +does +not, + +IANA +registration +refers +to +OAuth1, +which +is +deprecated, +so + +it +will + +should +not + +be +inserted. +This +avoids +having +to +duplicate +definitions +in + +used. +The +relevant +OAuth2 +flow, + +the +data +schemas +of +every +interaction. +When +an +element + + +code + +flow, +instead + +of +a +data +schema +indicated +by + +401 +response +begins +with + +a +JSON +pointer +indicated + +redirection +to +an +authentication +server, +eventually +resulting + +in +a +body +locator +does +not +already +exist + +credentials +(bearer +tokens + +in +the +indicated +schema, +it +MUST + +case +of +WoT) +that +can + +be +possible + +used +for +access. +

+Given +these +considerations, + +to +insert + +enable +security +bootstrapping +on +a +wide +variety +of +devices +as +well +as +on +browsers, + +the +indicated +element +at + +following +constraints +should +be +observed: +

  • +If +security +bootstrapping +is +enabled +on +an +exploration +service, +after +initial +contact +using + +the +location +indicated + +URL +provided + +by +an +introduction +mechanism, + +the +pointer. +The +JSON +pointer +used +in +the +body +locator + +exploration +service + + +MAY + +MUST + + +use +the +" +- +" +character +to +indicate +a +non-existent +array +element +when +it +is +necessary +to +insert + +reply +with +either + +an +element +after + +HTTP +"401 +(Unauthorized)" +response +code +or +(in + +the +last +element + +case + +of +an +existing +array. +The +element +referenced +(or +created) +by + +OAuth2) +with +either + +a +body +security + +HTTP +"302 +(Found)" +or +"303 +(See +Other)" +response +code +if +appropriate +authentication + +information +location +MUST + +has +not +been +provided +but +access +can + +be +required +and +of +type +" +string +". + +granted +when +it +is. + + +If +name +is + +Note +that +if +the +exploration +service +does + +not +given, + +want +to +provide +access +for +some +reason, +or +if +security +bootstrapping +is +disabled, + +it +can +ignore +the +request +or +reply +with +another +code +such +as +404 +or +403. +Also, +if +no +authentication + +is +assumed + +required, +then + +the +entire +body + +system +can +reply +immediately +with +the +requested +TD +as +if +authentication +information +were +provided. +Bypassing +authentication +however + +is +to + +only +appropriate +if +the +TD +served +as +a +response +does +not +contain +and +cannot + +be +used +as +the +security +parameter. + +to +infer +Personally +Identifiable +Information; +see + +cookie +: +The +parameter +is +stored +in +a +cookie +identified +by +the +value +of +name +. + + +9. + +Privacy +Considerations +.
  • +uri +: +The +parameter +is +embedded +in +the +URI +itself, +which + + +If +security +bootstrapping + +is +encoded +in +the +relevant +interaction + +enabled +on +an +exploration +service + +using +a +URI +template +variable +defined +by +the +value + +one + +of +name +. +This +is +more +general +than + +the +query +mechanism +but +more +complex. +The +value +uri + +following +IANA-registered +HTTP +Authentication +Schemes: +Basic, +Bearer, +or +Digest, +then +a +401 +HTTP +response +at +an +API +endpoint +intended +to +serve +a +TD + + +SHOULD + +MUST + + +be +specified +for +the +name +in +in + +include + +a +security +scheme +only +if + + +query + +WWW-Authenticate + + +is +not +applicable. + +header +and +any +other +headers +describing +the +required +authorizations. + + +The +URIs +provided +in +interactions +where +a +security +scheme +using +uri +as + +For +details +of + +the +value + +requirements, +the +IANA +registry +should +be +consulted + +for +each +of +the +above +authentication +schemes. + +If +the +OAuth2 + + +in + +code + + +flow +is +used +during +security +bootstrapping, +the +"302 +(Found)" +or +"303 +(See +Other)" +response +code + +MUST + +be +a +URI +template +including + +used +for +redirection +to + +the +defined +variable. + +authentication +server, +with +access +credentials +eventually +being +represented +with +bearer +tokens. + + +If +multiple +parameters +are +needed +for +a +security +scheme, +repeat + +Note +that + +the +security +scheme +definition +for +each +parameter +and +combine +them +using +a + +other +OAuth2 +flows +supported +in +WoT +Thing +Description +1.1, + + +combo + +client + + +security +scheme + +and + +allOf +. +In +some +cases +parameters +may +not +actually + +device +, +both +expect +the +initial +access +to + +be +secret +but +a +user +may +wish + +to +leave +them +out +of + +the +TD + +authentication +server, +not +the +final +endpoint, +and +so +cannot +be +used +via +security +bootstrapping. +These +requirements +also +apply +only + +to +help +protect +privacy. +As +an +example + +endpoints + +of +this, +some + +exploration +services +that +might +need +to +support + +security +mechanisms +require +both +a +client +identifier +and +a +secret +key. +In +theory, +the +client +identifier + +bootstrapping, +that + +is +public +however +it +may +be +hard + +those +that +serve +TDs, +not + +to +update +and +pose +a +tracking +risk. +In +such +a +case +it +can + +other +endpoints +that +might + +be +provided +as +an +additional +security +parameter +so +it +does +not +appear +in +the +TD. +The +names +of +URI +variables +declared +in +a +SecurityScheme +MUST +be +distinct +from +all +other +URI +variables +declared +in + +by + +the +TD. +Vocabulary +term +Description +Assignment +Type +@type +JSON-LD +keyword + +same +exploration +service. +In +particular, +these +requirements +apply +only + +to +label +the +object +with +semantic +tags +(or +types). +optional +string +or +Array +of +string +description +Provides +additional +(human-readable) +information +based +on +a +default +language. +optional +string +descriptions +Can + +URLs +that +can + +be +used + +referenced +by +introduction +mechanisms, +not + +to +support +(human-readable) +information + +(for +example) +event +subscription +endpoints. +

+There +are +relevant +Security +and +Privacy +Considerations + +in +different +languages. +Also +see + +[ + + +MultiLanguage +. +optional +Map + + +wot-architecture11 + + +of + +MultiLanguage + + +] +and +[ + + +wot-thing-description11 + + +proxy +URI +of +the +proxy +server +this +security +configuration +provides +access +to. +If +not +given, +the +corresponding +security +configuration + + +] +regarding +when +authentication + +is +required + +for +access +to +TDs +and + +the +endpoint. +optional +anyURI +scheme +Identification +of +the +security +mechanism +being +configured. +optional +any +type +(one + +use + +of +nosec +, +combo +, +basic +, +digest +, +bearer +, +psk +, +oauth2 +, +or +apikey +) +The +class +SecurityScheme +has +the +following +subclasses: +NoSecurityScheme +ComboSecurityScheme +BasicSecurityScheme +DigestSecurityScheme +APIKeySecurityScheme +BearerSecurityScheme +PSKSecurityScheme +OAuth2SecurityScheme + +secure +transport. +See +also + + +5.3.3.2 + +9. + + +NoSecurityScheme +A +security +configuration +corresponding +to +identified +by +the +Vocabulary +Term +nosec +(i.e., +"scheme": +"nosec" +), +indicating + +Privacy +Considerations +. +In +summary, +secure +transport +(e.g. +TLS) +is +required +for +public +services +and +strongly +recommended +even +on +private +networks +(even +if + +there +is +no +authentication +or +other +mechanism +required + +requirement, + +to +access + +protect + +the +resource. + +confidentiality +of +queries), +and +serving +requests +without +authentication +and +authorization +should +only +be +considered +in +limited +circumstances +when +no +Personally +Identifiable +Information +is +present +or +can +be +inferred. + +

+
+
+
+
+

+5.3.3.3 + + +7.2 + + +ComboSecurityScheme + +Thing +Description +Server +

+ +
+

+This +section +is +at +risk. +A +combination +of +other +security +schemes +identified + +Any +web +service +that +can +be +referenced + +by +the +Vocabulary +Term +combo +(i.e., +"scheme": +"combo" +). +Elements +of +this +scheme +define +various +ways +in +which +other +named +schemes +defined +in +securityDefinitions +, +including +other +ComboSecurityScheme +definitions, +are +to + +a +URL +and +return +a +TD +with +appropriate +authentication +and +access +controls +can + +be +combined + +used +as +an +exploration +mechanism. +We +will +refer + +to +create + +this +as + +a +new +scheme +definition. +Exactly +one +of +either +oneOf + +Thing +Description +Server + +or +allOf +MUST + +TD +Server. +A +TD +Server +does +not +need +to + +be +included. +Only +security +scheme +definitions +which + +a +Thing. +In +particular, +a +TD + +can +be +used +together + +hosted +on +an +ordinary +web +server +and +referenced +by +its +URL. +

+A +TD +Server + +can +be +combined +with +allOf +. +For +example, +it +is +not +possible +in +general +to +combine +different +OAuth +2.0 +flows +together +using +allOf +unless +one +applies + +used + +to +support +self-description. +For +self-description, + +a +proxy + + +Thing + +hosts +its +own + +TD + +and +one +to +the +endpoint. +Note +that +when +multiple +named +security +scheme +definitions +are +listed +in + +makes +it +available +via + +a +security +field +the +same +semantics +apply +as +in +an +allOf +combination +(and +the +same +limitations +on +allowable +combinations). +The +oneOf +combination +is +equivalent +to +using +different +security +schemes +on +forms +that +are +otherwise +identical. +In +this +sense + +web +resource +identified +with + +a +oneOf +scheme + +URL. +Such +a +web +resource +however + +is +not +included +as + +an +essential +feature +but +it +does +avoid +redundancy + +affordance + +in +such +cases. +Vocabulary +term +Description +Assignment +Type +oneOf +Array +of +two + +the +TD +itself. +This +web +resource +may + +or +more +strings +identifying +other +named +security +scheme +definitions, +any +one +of +which, +when +satisfied, +will +allow +access. +Only +one + +may +not + +be +chosen +for +use. +mandatory +string +or +Array +of +string +allOf + +the +same +as +the +well-known +URL +used +as +an +Introduction +mechanism +defined +in + +Array +of +two +or +more +strings +identifying +other +named +security +scheme +definitions, +all + + +6.2 + +Well-Known +URIs +.

+Use + +of +which +must +be +satisfied +for +access. +mandatory +string +or +Array + +secure +transport +is +subject +to +assertions +given +in +the +Security +Considerations +and +Privacy +Considerations +sections + +of +string +5.3.3.4 +BasicSecurityScheme + +the +[ + + +wot-architecture11 + + +Basic +Authentication + + +] +and + +[ + +RFC7617 + + +wot-thing-description11 + + + +] +security +configuration +identified +by + +specifications, +which +define +scenarios +where +secure +transport +is +recommended +or +mandatory +and +mutual +authentication +is +recommended. +

+A +TD +Server +distributing +a +TD +using + +the +Vocabulary +Term + +following +protocols +is +subject +to +the +following +constraints: +

+HTTP +

+An +HTTP-based +TD +Server +providing +a + +TD + + + +MUST + +serve +that +resource +with +a + + +basic +(i.e., +"scheme": +"basic" + +GET + + +), +using + +method. + +A +successful +response +from + +an +unencrypted +username +and +password. +This +scheme +should +be +used +with +some +other +security +mechanism + +HTTP-based +TD +Server + +providing +confidentiality, +for +example, +TLS. +Vocabulary +term + +a + +TD + + +Description +Assignment +Type +name +Name +for +query, +header, +cookie, +or +uri +parameters. +optional +string + + +MUST + +have +200 +(OK) +status +and +the + +TD + + +in +Specifies + +the +location +of +security +authentication +information. + +body. + +A +successful +response + +with +default + +JSON +serialization + +MUST + +contain + + +string + +application/json + + +(one +of +header +, +query +, +body +, +cookie +, + +or +more +specifically, + + +uri +) +5.3.3.5 +DigestSecurityScheme + +application/td+json + + +Digest +Access +Authentication + +in +the +Content-Type +header. + +The +default +serialization +format +for +successful +response +bodies + +MUST + +be +JSON, +with +JSON-LD +1.1 + +[ + +RFC7616 + + +JSON-LD11 + + + +] +security +configuration +identified +by +the +Vocabulary +Term + +syntax. + +The +JSON-LD +syntax +allows +semantic +extensions +and +processing. + +An +HTTP-based +TD +Server +providing +a + +TD + + +digest +(i.e., +"scheme": +"digest" +). +This +scheme + + +MAY + +provide +alternative +representations +through +server-driven +content +negotiation, +that + +is +similar +to +basic +authentication +but +with +added +features +to +avoid +man-in-the-middle +attacks. +Vocabulary +term +Description +Assignment +Type +name +Name +for +query, +header, +cookie, +or +uri +parameters. +optional +string +in +Specifies + +by +honoring + +the +location +of +security +authentication +information. + +request's +Accept +and +Accept-Encoding +headers +and +responding + +with +default +string + +the +supported +TD +serialization +and +equivalent +Content-Type +and +Content-Encoding +headers. + +An +HTTP-based +TD +Server +providing +a + +TD + + +(one +of +header +, +query +, +body +, +cookie +, + + +MAY + +provide +modified +TDs + +or +uri +) +qop +Quality +of +protection. +with + +error +responses +using +a +different + +default +language +after +server-driven +content +negotiation, +that +is +by +honouring +the +request's +Accept-Language +header. + +string + +

+

+ +An +HTTP-based +TD +Server +providing +a + +TD + + +(one +of +auth +, +or +auth-int +) +5.3.3.6 + + +MUST + +respond +to + + +APIKeySecurityScheme + +HEAD + + +API +key +authentication +security +configuration +identified + +requests + +by +returning +only + +the +Vocabulary +Term +apikey +(i.e., +"scheme": +"apikey" +). +This +scheme +is + +headers +equivalent + +to +be +used +when +the +access +token +is +opaque, +for +example +when +a +key +in +an +unknown +or +proprietary +format +is +provided + +those +returned + +by +a +cloud +service +provider. +In +this +case + + +GET + +request +to + +the +key +may +not +be +using +a +standard +token +format. + +same +endpoint. + +This +scheme +indicates +that +the +key +provided +by +the +service +provider +needs + +enables +clients + +to +be +supplied + +retrieve +HTTP +headers +such + +as +part +of +service +requests +using +the +mechanism +indicated +by + +the +"in" +field. +Vocabulary +term +Description +Assignment +Type +name +Name +for +query, +header, +cookie, +or +uri +parameters. +optional +string + +Content-Length + +in +Specifies + +advance +to +know + +the +location + +size + +of +security +authentication +information. +with +default +string + +the + +TD + + +(one +of +header +, + +(in +bytes) +and +decide +on +an +efficient + +query +, +body +, +cookie +, + +strategy. +

+In +constrained +environments, +a +single + +TD + +may +be +too +large +to +process +for +the +server + +or +uri +) + +clients. +See + + +5.3.3.7 + +10.1 + + +BearerSecurityScheme +Bearer +Token +[ +RFC6750 +] +security +configuration +identified +by +the +Vocabulary +Term + +Incremental +Transfer + + +bearer +(i.e., +"scheme": +"bearer" +) + +for +situations +where +bearer +tokens +are +used +independently + +protocol-specific +recommendations +on +incremental +transfer + +of +OAuth2. +If + +the +oauth2 +scheme +is +specified +it +is +not +generally +necessary + +requested +payload. +

+Error +responses: +

  • +401 +(Unauthorized): +No +authentication. +
  • +403 +(Forbidden): +Insufficient +rights + +to +specify +this +scheme +as +well +as +it +is +implied. +For +format +, + +the +value +jwt +indicates +conformance +with +[ + +resource. +
+CoAP +

+RFC7519 + + +A +CoAP-based +TD +Server +providing +a + +TD + + +], + + +MUST + +serve +that +resource +with +a + + +jws + +GET + + +indicates +conformance +with +[ +RFC7797 + +method. + +A +successful +response +from +a +CoAP-based +TD +Server +providing +a + +TD + + +], + + +MUST + +have +a +2.05 +(Content) +status, +contain +a +Content-Format +option +with +value +50 +( + + +cwt + +application/json + + +indicates +conformance +with +[ +RFC8392 +], +and + +) +or +432 +( + + +jwe + +application/td+json + + +indicates +conformance +with + +), +and +the + +TD + +in +the +payload. + +Note +that +the +payload +might +be +split +over +multiple +message +exchanges +using +block-wise +transfer + +[ + +RFC7516 + + +RFC7959 + + + +], +with +values +for +alg +interpreted +consistently +with +those +standards. +Other +formats +and +algorithms +for +bearer +tokens + +]. + +A +CoAP-based +TD +Server +providing +a + +TD + +MAY + +be +specified +in +vocabulary +extensions +. +Vocabulary +term +Description +Assignment +Type +authorization +URI +of + +provide +alternative +representations +through +server-driven +content +negotiation, +that +is +by +honouring + +the +authorization +server. +optional +anyURI +name +Name +for +query, +header, +cookie, +or +uri +parameters. +optional +string +alg +Encoding, +encryption, +or +digest +algorithm. +with +default +string +(e.g., +ES256 +, +or +ES512-256 +) +format +Specifies +format +of +security +authentication +information. + +request's +Accept +option +and +responding + +with +default +string +(e.g., +jwt +, +cwt +, +jwe +, +or +jws +) +in +Specifies + +the +location +of +security +authentication +information. +with +default + +supported + +TD + + +serialization +and +equivalent +Content-Format +option. + +string + +

+

+ +A +CoAP-based + +TD + + +(one +of +header +, +query +, +body +, +cookie +, +or +uri +) +5.3.3.8 +PSKSecurityScheme + +Server +providing +a + +TD + + +Pre-shared +key +authentication +security +configuration +identified + + +SHOULD + +respond +to +requests +containing +a +Size2 +option + +by +including + +the +Vocabulary +Term + +size +estimate +of +the + +TD + + +psk +(i.e., +"scheme": +"psk" +). + +in +its +next +response. + +This +is +meant +to +identify +that + +relevant +when +obtaining + +a +standard +is +used +for +pre-shared +keys +such +as +TLS-PSK +[ +RFC4279 + + +TD + + +], + +using +block-wise +transfer + +and +that + +enables +clients +to +abort + +the +ciphersuite +used +for +keys +will + +retrieval +if +the +total +payload +size +should + +be +established +during +protocol +negotiation. + +too +large +for +them +to +process. + +

+Vocabulary +term + +

+In +constrained +environments, +a +single + +TD + + +Description +Assignment +Type +identity +Identifier +providing +information +which +can + +may + +be +used + +too +large +to +process + +for +selection + +the +server + +or +confirmation. +optional +string + +clients. +See + + +10.1 + +Incremental +Transfer + + +for +protocol-specific +recommendations +on +incremental +transfer +of +the +requested +payload. +

+Error +responses: +

  • +4.01 +(Unauthorized): +No +authentication. +
  • +4.03 +(Forbidden): +Insufficient +rights +to +the +resource. +
+
+
+
+

+ +5.3.3.9 + +7.3 + + +OAuth2SecurityScheme + +Thing +Description +Directory +

+ +
+

+OAuth +2.0 +authentication +security +configuration + +A + +Thing +Description +Directory + +(TDD +or +Directory + +for +systems +conformant +with +[ +RFC6749 + +short) +is +a + +Thing + + +that +provides +a +service +to +manage +a +set +of +TDs +describing +other +Things. +

+], +[ + + +7.3.1 + +Information +Model +

+RFC8252 + + +] +and +(for +the +device +flow) +[ +RFC8628 + +
+As +shown +in + +Figure + +4 + +], +identified +by + +, +the +Vocabulary +Term +oauth2 +(i.e., +"scheme": +"oauth2" +). +Vocabulary +term + + +Thing + +Description +Assignment +Type +authorization +URI +of +the +authorization +server. +In +the +case +of +the +device +flow, + +Directory + +can +contain +zero +or +more + +TDs +. +For +every +TD, + +the +URI +provided + +directory +maintains +additional +metadata + +for +the +authorization +value +refers +to +the +device +authorization +endpoint +[ + +bookkeeping +and +search +purposes. +These +are +described +in + +RFC8628 + + +7.3.1.1 + +Registration +Information + + +and + +]. +optional +anyURI + + +7.3.1.3 + +Anonymous +TD +Identifiers +. +A + +TD + + +token +URI + +that +embeds +such +additional +metadata +as +part + +of +the +token +server. +optional + +interaction +with +the +directory +is +called +an + +Enriched +TD +.
+anyURI + + +7.3.1.1 + +Registration +Information +
+ +refresh +URI + +
+The +ontology + +of +the +refresh +server. +optional +anyURI + +a + +TD + + +in +the +Discovery +context +was +introduced +in + +Figure + +5 + +. +The + + +scopes + +RegistrationInformation + + +Set +of +authorization +scope +identifiers +provided +as +an +array. +These +are +provided +in +tokens +returned +by +an +authorization +server +and + +class +is + +associated +with +forms + + +TDs + +that +are +stored + +in +order +to +identify +what +resources + +a +client +may +access +and +how. + +directory. + +The +values +associated +with +a +form +should +be +chosen +from +those +defined +in +an +OAuth2SecurityScheme +active +on +that +form. +optional +string +or +Array +of +string +flow +Authorization +flow. +mandatory +string + +following +table +lists +the +registration +information +attributes +for +use +within + +TDs + + +(e.g., +code +, +client +, + +that +embed + +or +device +) +For +the +code +flow +both +authorization +and +token +MUST +be +included. +For +the +client +flow +token +MUST +be +included. +For + +reference + +the +client +flow +authorization +MUST +NOT +be +included. +For + +Discovery +context. +Note +that +only +an + +Enriched +TD + +embeds + +the +device +flow +both +authorization +and +token + +registration +information. + +An + +Enriched +TD + + +MUST + +be +included. +In +the +case +of +the +device +flow +the +value +provided +for +authorization +refers +to +the +device +authorization +endpoint +defined +in +[ +RFC8628 +]. +The +mandatory +elements +for +each +flow +are +summarized + +contain + +in +its +@context + +the +following +table: +Element +code + +URI + + +https://w3c.github.io/wot-discovery/context/discovery-context.jsonld +. +In +this +table, + +client +device +authorization +mandatory +omit +mandatory; + +refers +to +device +authorization +endpoint +token +mandatory +mandatory +mandatory +refresh +optional +optional +optional +5.3.4 +Hypermedia +Controls +Vocabulary +Definitions +The +present +model +provides +a +representation +for +(typed) +Web +links +and +Web +forms +exposed +by +a +Thing +. +The +Link +class +definition +reflects +a +very +common +subset +of + +the +terms +defined +in +Web +Linking +[ +RFC8288 + +producer +or +consumer +of +a + +TD + + +]. +The +defined +terms +can +be +used, +e.g., + +and +server +refers + +to +describe + +the +relation +to +another +Thing +such +as +a +Lamp +Thing +is +controlled +by +a +Switch + + +Thing +. +The +Form +class +corresponds +to +a +newly +introduced +form +of +hypermedia +control +to +manipulate +the +state +of +Things +(and +other +Web +resources). +5.3.4.1 +Link +A +link +can +be +viewed +as +a +statement +of +the +form +" +link +context +has +a +relation +type +resource +at +link +target +", +where +the +optional +target +attributes +may +further +describe +the +resource. + +Description +Directory +. + + + + + + + + + + +href +Target +IRI +of +a +link +or +submission +target +of +a +form. +mandatory +anyURI + + + + + + + + + + + + + + + + + + + + + + + + + + + +0..1 +Points +to +a +collections +of +Things +. +IANA +Link +Relation + + + + + + + + + + +
+Vocabulary +term + +Description + +Client +Assignment + +Server + +Assignment + +Type +
+ +type + +created + + + +Target +attribute +providing +a +hint +indicating +what + +Provides +information +when + +the +media +type +[ +RFC2046 +] +of + +TD +instance +was +created +inside + +the +result +of +dereferencing + +directory. +

+This + +MAY + +be +set +by + +the +link +should +be. +optional +string +rel + +directory +and +returned +to +consumers. +

+
+A +link +relation +type +identifies +the +semantics +of +a +link. + +read-only + + +optional + + + +string + +dateTime + + + +
+ +anchor + +modified + + + +Overrides + +Provides +information +when + +the +link +context +(by +default + +TD +instance +was +last +modified +inside + +the +Thing +itself +identified + +directory. +

+This + +MAY + +be +set + +by +its +id +) +with + +the +given +URI +or +IRI. + +directory +and +returned +to +consumers. +

+read-only + + +optional + + + +anyURI + +dateTime + + + +
+ +sizes + +expires + + + +Target +attribute +that +specifies +one +or +more +sizes +for + +Provides + +the +referenced +icon. +Only +applicable + +absolute +time + +for +relation +type +"icon". +The +value +pattern +follows +{Height}x{Width} +(e.g., +"16x16", +"16x16 +32x32"). +optional +string +Link +relations +can +be +used +to +describe +relations +such +as +to +other +Things +(e.g., +a +Switch +Thing +controls +a +Lamp +Thing), +to +a +specific +kind +of +Thing +Models +(e.g., +a +Thing +Description +is +an + +when +the +TD + +instance +of +a +specific +Thing +Model), +or +to +further +documentations +information +(e.g., +device +manual +of +a +Thing). +It +is +recommended + +registration +expires. +

+The +producer + +MAY + +set +this + +to +reuse +existing +and +established +Link +Relation +definitions +from +IANA. + +indicate +the +absolute +expiry +time +during +the +registration. + +

+

+In +the +following +a +best +practice +relation +type +table +is +introduced + +For +servers + +that +support +expirable +TDs: +If + +ttl + +(relative +expiry) + +is +recommended + +present, +the +server + +MUST + +ignore +client +assignments + +to +use +within +WoT +Thing +Description +or +Thing +Model +instances. +Value +Occurrence +Explanation +Source +of +value +origin + + +icon + +expires + + +and +instead +compute +and +set +it +internally. +

+
+0..* + +optional + + +Imports +an +icon +associated +to +the +Thing +(e.g., +for +UI +purposes). + +optional + + +IANA +Link +Relation + + + +service-doc + +dateTime + + +0..* +Relation +to +a +resource +that +provide +(human-readable) +documentation +or +descriptions. +IANA +Link +Relation + + +
+ +alternate + +ttl + + + +0..* +Point +to +alternative +representation + +Time-to-live: +relative +amount + +of +time +in +seconds +from + +the +Thing +(i.e. +RDF-Turtle, +human-readable +HTML +document, +...). +IANA +Link +Relation +type +0..1 +Indicate +that + +registration +time +until +when + +the +Thing +is +an + +TD + +instance +of +the +target +resource +such +as + +registration +expires. +

+The +producer + +MAY + +set +this + +to +a +Thing +Model +. +IANA +Link +Relation +tm:extends +0..1 +Extends +an +existing +definition +of + +indicate + +the +target +resource +such +as +a +Thing +Model +. +Only +applicable +for +Thing +Model +definitions. +W3C +WoT +Thing +Model +tm:submodel +0..* +Used +to +compose +one +or +multiple +Thing +Models +. +Only +applicable +for +Thing +Model +definitions. +W3C +WoT +Thing +Model + +relative +expiry +time +during +the +registration. +

+For +servers +that +support +expirable +TDs: +The +server + +MUST + +use + + +manifest + +ttl + + +0..* +Point + +to +calculate + +the +web +app +manifest +of +a +web +application +which +provides, +e.g., +a +user +interface +with +which +a +user +can +interact +with +the +Thing +(also +see +[ +APPMANIFEST +]). +IANA +Link +Relation + + +proxy-to + +expires + + +0..* + +(absolute +expiry) +value. +

+
+Target +resource +provide +the +address +of +a +proxy. + +optional + + +W3C +WoT +Security +and +WoT +Binding +Template + +read-only + + + +collection + +number + + +
+ +item + +retrieved + + + +0..* +Points +to +a +Thing +that + +The +time +at +which +the +TD +was +retrieved +from +the +server. +

+This + +is +member + +useful +for +clients +that +intend +to +process +other +absolute +timestamps +but +do +not +have +an +internal +clock +or +other +means + +of +acquiring + +the +current +Thing +collections. +IANA +Link +Relation +predecessor-version + +time. +

+
+0..1 + +read-only + + +Points +to +a +previous +Thing +Description +or +Thing +Model +version. + +optional + + +IANA +Link +Relation + + + +controlledBy + +dateTime + + +0..* +Refers +to +a +Thing + + +that +controls +the +context +Thing +. + +W3C +Thing +Description + +
+
+
+
+
+5.3.4.2 + + +7.3.1.2 + + +Form + +Registration +Expiry + +
+ + +
+Section + +7.3.1.1 + +Registration +Information + +introduces +some +attributes +to +specify +and +discover +the +expiry +time +of +registered + +TDs +. +

+A +form + +Producers + +can +be +viewed +as +a +statement +of +"To +perform +an +operation +type +operation +on +form +context +, +make +a +request +method +request + +set +the +expiry +time + +to +submission +target +" +where + +inform + +the +optional +form +fields +may +further +describe + +directory +and +other +consumers +about + +the +required +request. +In +Thing +Descriptions, + +validity +of + +the +form +context + +TD +registrations. +The +expiry + +is +also +a +useful +indicator +to +inform + +the +surrounding +Object, + +consumers +about +expiry +of +dynamic + +TDs +, +e.g. +when +changes +to +metadata + +such +as +Properties, +Actions, +and +Events + +geolocation + +or +the +Thing +itself + +properties +are +expected +to +be +valid + +for +meta-interactions. +Vocabulary +term +Description +Assignment +Type +href +Target +IRI +of +a +link +or +submission +target +of +a +form. +mandatory +anyURI +contentType +Assign + +a +content +type +based + +limited +period. +Consumers +may +rely + +on +a +media +type +(e.g., +text/plain +) +and +potential +parameters +(e.g., +charset=utf-8 +) +for + +the +media +type +[ +RFC2046 +]. +with +default +string + +expiry +time +to +know +how +long +a +retrieved + +TD + + +contentCoding +Content +coding +values +indicate +an +encoding +transformation +that +has +been +or +can + +will + +be +applied + +valid +and +when +they +need + +to +request + +a +representation. +Content +codings + +more +recent +one. +Consumers +who +retrieve +an +expired +TD +may +consider +it +as +metadata +of +an +inactive +client. +

+For +the +servers, +the +expiry +time +is +useful +for +implementing +automatic +removal +of +obsolete +or +accidental +registrations. + +Servers + +SHOULD + +periodically +purge +TDs +that + +are +primarily +used +to +allow + +past +their +expiry +times. + +Prescribing + +a +representation +to +be +compressed + +global +mandate + +or +otherwise +usefully +transformed +without +losing + +upper +limit +for + +the +identity +of +its +underlying +media +type + +expiry +time +is +application-specific + +and +without +loss +of +information. +Examples +of +content +coding +include +"gzip", +"deflate", +etc. +. +optional +string +security +Set + +beyond +the +scope + +of +security +definition +names, +chosen +from +those +defined +in +securityDefinitions +. +These +must +all +be +satisfied +for +access +to +resources. +optional +string + +this +specification. + +The +servers + +MAY + +mandate + +or +Array +of +string +scopes +Set +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 + +set + +a +client +may +access + +configurable +upper +limit +to +expiry +times + +and +how. + +refuse +incompliant +requests. + +The +values +associated + +purging +by +servers +is +particularly +beneficial +when +interacting + +with +a +form +should +be +chosen +from +those +defined +in +an +OAuth2SecurityScheme +active +on + +clients +(e.g. +IoT +devices) + +that +form. +optional +string +or +Array +of +string +response + +are +unable +to +explicitly +deregister +their + +TDs +. +This +optional +term +can + +could + +be +used +if, +e.g., +the +output +communication +metadata +differ +from +input +metadata +(e.g., +output +contentType +differ +from + +due +to +protocol-specific +limitations, +failure, +destruction, +or +ungraceful +decommissioning. +Such +clients +should +set +a +reasonably +short +expiry +time +and +periodically +extend +it +during + +the +input +contentType). + +normal +operation. + +The +response +name +contains +metadata + +expiry +can +be +extended +by +updating +the +registration +either +fully +or +partially, +including +an +update + +that +is +only +valid +for + +makes +no +changes +to + +the +primary +response +messages. +optional +ExpectedResponse +additionalResponses + +TD; +see + +This +optional +term +can +be +used +if +additional +expected +responses +are +possible, +e.g. +for +error +reporting. +Each +additional +response +needs + + +7.3.2.1.3 + +Update +. +If +a +client +ceases + +to +be +distinguished +from +others +in +some +way +(for +example, +by +specifying + +operate, + +a +protocol-specific +error +code), +and +may +also +have + +directory +with +purging +capability +will +automatically +remove + +its +own +data +schema. +optional + +registration. +

+AdditionalExpectedResponse + + +7.3.1.3 + +Anonymous +TD +Identifiers +
+ +or +Array +of +AdditionalExpectedResponse + +
+The +directory +assigns +local +identifiers +to + +Anonymous +TDs + + +subprotocol +Indicates + +to +enable +management +and +retrieval +of +such +TDs +from + +the +exact +mechanism +by +which + +directory. + +In +situations +where +the +server +exposes + +an +interaction +will +be +accomplished +for +a +given +protocol +when +there +are +multiple +options. +For +example, +for +HTTP +and +Events, + +Anonymous +TD +(e.g. +retrieval, +listing, +search), + +it +indicates +which +of +several +available +mechanisms +should + + +MUST + +add +the +local +identifier +to +the +TD +to +allow +local +referencing. + +The +local +identifier + +SHOULD + +be +used +for +asynchronous +notifications +such + +a +UUID +Version +4, +presented + +as +long +polling +( +longpoll +), +WebSub +[ +websub +] +( +websub +), +Server-Sent +Events +( +sse +) + +a +URN + +[ + +html + + +RFC4122 + + + +] +(also +known +as +EventSource). +Please +note +that +there + +]. + +UUID +Version +4 + +is +no +restriction +on +the +subprotocol +selection +and +other +mechanisms +can +also +be +announced +by +this +subprotocol +term. +optional +string +(e.g., +longpoll +, +websub +, +or +sse +) +op +Indicates +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 + +random +or +pseudo-random +number + +which +and +allows +the +client +to +select +the +correct +form +for + +does +not +carry +unintended +information +about + +the +operation +required. +op +can +be +assigned +one + +host + +or +more +interaction +verb(s) +each +representing +a +semantic +intention +of +an +operation. +with +default + +the +resource. +

+string + + +7.3.2 + +Directory +Service +API +

+ +or +Array +of +string + +
+

+Directory +services +provide +access +to + +System +User +Data + + +(one + +and +need +to +provide +appropriate +security +and +privacy +protections. +The +use + +of +readproperty +, +writeproperty +, +observeproperty +, +unobserveproperty +, +invokeaction +, +queryaction +, +cancelaction +, +subscribeevent +, +unsubscribeevent +, +readallproperties +, +writeallproperties +, +readmultipleproperties +, +writemultipleproperties +, +observeallproperties +, +unobserveallproperties +, +subscribeallevents +, +unsubscribeallevents +, +or +queryallactions +) +Possible +values + +secure +transport +protocols +and +access +controls + +for +the +contentCoding +property +can +be +found, +e.g., + +authenticity +and +confidentiality + +in +the +IANA +HTTP +content +coding +registry +. +The +list +of +possible +operation +types +of +a +form +is +fixed. +As +of +this +version + +implementations + +of +the +specification, +it +only +includes +the +well-known +types +necessary +to +implement +the + +WoT +interaction +model +described + +Directory +Service +API +are +governed +by +the +Security +Consideration +and +Privacy +Consierations +given + +in +[ + +WOT-ARCHITECTURE + + +wot-architecture11 + + + +]. +Future +versions +of +the +standard +may +extend + +

+

+The +HTTP +API +responses +must +use +appropriate +status +codes +described +in + +this +list +but +operations +types + +section +for +success +and +error +responses. + +The +HTTP +API + + +SHOULD +NOT + +MUST + + +use +the +Problem +Details +[ + +be +arbitrarily +set +by +servients +and +be +restricted + + +RFC7807 + +] +format + +to +the +values + +carry +error +details + +in +the +table +below. + +HTTP +client +error +(4xx) +and +server +error +(5xx) +responses. + + +Operation +Type +Description +readproperty +Identifies +the +read +operation +on +Property +Affordances +to +retrieve +the +corresponding +data. +writeproperty +Identifies +the +write +operation +on +Property +Affordances + +This +enables +both +machines +and +humans + +to +update +the +corresponding +data. +observeproperty +Identifies + +know + +the +observe +operation +on +Property +Affordances +to + +high-level +error +class +and +fine-grained +details. + +All +HTTP +API +error +responses +described +using +Problem +Details + +MUST + +be +notified +with +the +new +data +when +the +Property +is +updated. +unobserveproperty +Identifies +the +unobserve +operation +on +Property +Affordances +to +stop +the +corresponding +notifications. +invokeaction +Identifies +the +invoke +operation +on +Action +Affordances +to +perform + +encoded +using +UTF-8. + +HTTP +API +error +responses + +MAY + +report +details +in +different +languages +using +proactive +negotiation, +if + +the +corresponding +action. +queryaction +Identifies + + +Accept-Language + +header +field +has +been +set +in + +the +querying +operation +on +Action +Affordances +to +get + +HTTP +request +[ + +RFC7231 + +]. +

+The +APIs +set + +the +HTTP + +status +of +the +corresponding +action. +cancelaction +Identifies +the +cancel +operation +on +Action +Affordances +to +cancel +the +ongoing +corresponding +action. +subscribeevent +Identifies +the +subscribe +operation +on +Event +Affordances +to +be +notified +by +the +Thing +when +the +event +occurs. +unsubscribeevent +Identifies +the +unsubscribe +operation +on +Event +Affordances +to +stop +the +corresponding +notifications. +readallproperties +Identifies +the +readallproperties +operation +on +a +Thing +to +retrieve +the +data +of +all +Properties + +codes +as +defined + +in +a +single +interaction. +writeallproperties +Identifies +the +writeallproperties +operation +on +a +Thing +to +update +the +data + + +Section +6 + +of +all +writable +Properties +in +a +single +interaction. +readmultipleproperties +Identifies +the +readmultipleproperties +operation +on +a +Thing +to +retrieve +the +data + +[ + +RFC7231 + +]. +The +list + +of +selected +Properties +in +a +single +interaction. +writemultipleproperties +Identifies +the +writemultipleproperties +operation +on +a +Thing +to +update + +used +error +codes +include +(but +are +not +limited +to) + +the +data +of +selected +writable +Properties + +following: +

  • +400 +(Bad +Request): +Invalid +client +input + +in +a +single +interaction. +observeallproperties +Identifies +the +observeallproperties +operation +on +Properties +to +be +notified +with +new +data +when +any +Property + +body, +query, +or +headers. +This + +is +updated. +unobserveallproperties +Identifies +the +unobserveallproperties +operation +on +Properties +to +stop +notifications +from +all +Properties + +accompanied +by +an +appropriate +response +message. +
  • +401 +(Unauthorized): +The +request +lacks +valid +authentication +credentials. +As +noted + +in +a +single +interaction. +queryallactions +Identifies +the +queryallactions +operation +on +a +Thing +to +get + + + +7.1.2 + +Security +Bootstrapping +, +this +is + +the +status +of +all +Actions + +first +step + +in +a +single +interaction. +subscribeallevents +Identifies +the +subscribeallevents +operation +on +Events + +authentication +negotiation, +needed + +to +subscribe + +bootstrap +secure +access + +to +notifications +from +all +Events +in +a +single +interaction. +unsubscribeallevents +Identifies +the +unsubscribeallevents +operation + +TDs. +Information + +on +Events +to +unsubscribe +from +notifications +from +all +Events + +what +credentials +are +required +will +be +included + +in +a +single +interaction. +The +optional + + +response + +WWW-Authenticate + + +name-value +pair +can +be +used + +header. +
  • +403 +(Forbidden): +Insufficient +rights + +to +provide +metadata +for +the +expected +response +message. +With + +access + +the +core +vocabulary, +it +only +includes +content +type +information, +but + +resource. +
  • +404 +(Not +Found): + +TD +Context +Extensions +could +be +applied. +If +no +response +name-value +pair + +or +endpoint +does +not +exist. +This + +is +provided, +it +MUST + +accompanied +by +an +appropriate +response +message. +

+be +assumed + + +For +each +HTTP +endpoint + +that +the +content +type +of +the +response +is +equal +to +the +content +type +assigned + +responds + +to +the +Form +instance. +Note +that + + +contentType + +GET + + +within +an + +method, +the +server + +MUST + +accept + + +ExpectedResponse + +HEAD + + +Class +does +not +have +a +Default +Value +. +For +instance, +if + +requests +and +return +only + +the +value +of + +headers. + +This +allows +clients +to +retrieve +headers +such +as + +the +content +type +of + +Content-Length +without +receiving + +the +form +is +application/xml + +body +and +decide +on +a +suitable +strategy +to +query + +the +assumed +value +of + +information. +For +example, +a +constrained +client +can +request +only + +the +content +type + +necessary +parts + +of +the +response +will +be +also +application/xml +. +In +some +cases +additional +responses +might +be +possible. +One +example + +an +object +(using +an +appropriate +search +query) +or +retrieve +a +list + +of +this +is +error +responses +but + +items + +in +some +cases +there +might +also +be +additional +successful +responses. + +small +subsets. +

+In +this +case +the +response +name-value +pair +is +still +used +for +the +primary +response +but +additionalResponses + +constrained +environments, +a +single +TD + +may +also +be +provided, +whose +value +is +an +array +of +AdditionalExpectedResponse +objects. +Each +additional +response +must + +be +distinguished +in +some +way +from + +too +large +to +process +for + +the +primary +response, +either +by +contentType + +server + +or +by +protocol-specific +settings +such +as +error +code +header +values. +Each +additional +response +may +also +have + +clients. +This +affects +both +read +(i.e. +retrieving +one +or +more +TDs +or +TD +fragments) +and +write +(i.e. +submitting + +a +data +schema +which +can +differ +from +the +normal +output +data +schema + +TD +or +Partial +TD) +operations. +See + +10.1 + +Incremental +Transfer + +for +protocol-specific +recommendations +on +incremental +transfer +of + +the +interaction. + +payloads. + +

+

+In +some +use +cases, +input + +The +directory +APIs +include +mandatory, +recommended, + +and +output +data +might +be +represented +in +a +different +form, +for +instance +an +Action + +optional +features. +Directories + +that +accepts +JSON, +but +returns +an +image. +In +such +a +case, +the + +don't +offer +recommended +or + +optional +response +name-value +pair +can +describe + +features +inform + +the +content +type + +clients +about +the +absence + +of +those +features +according +to + +the +expected +response. + +following +rules: +

  • +If +the +content +type + +missing +feature +is +to +customize +existing +functionality + +of +an +API, + +the +expected +response +differs +from +the +content +type + +server +will +respond +with +501 +(Not +Implemented) +HTTP +status. +For +example, +if +a +client +requests +a +list + +of +items +with +a +particular +sorting +order, + +the +form, + +server +either +respects +that +request +and +returns + +the +Form +instance +MUST +include +a +name-value +pair + +list + +with +the +name +response +. +For +instance, +an +ActionAffordance +could +only +accept +application/json +for +its +input +data, +while +it +will +respond +with +an +image/jpeg +content +type +for +its +output +data. +In +that +case + +requested +order, +or +rejects + +the +content +types +differ + +request + +and +does +not +return + +the +response +name-value +pair +has +to +be +used +to +provide +response +content +type +( +image/jpeg +) +information +to + +list. +The +server +will +return + +the +Consumer +. +Similar +considerations +apply +to +additional +responses, +although +in +this +case + +list +with + +the +contentType +is +optional + +default +order + +if +it + +and +only +if +custom +sorting + +is +the +same +as +the +input +content +Type +(e.g. +JSON). +If +the +content +type +of +an +additional +expected +response +differs +from +the +content +type +of +the +form, +the +Form +instance +MUST +include +an +entry + +not +requested. +The +normative +behavior +is +prescribed + +in +the +array +associated +with +the +name +additionalResponses +that +includes +a +value +for +the +name +contentType +. + +respective +sections. +
  • +If +the +data +schema +of + +an +additional +expected +response +differs +from +the +output +data +schema +of +the +interaction, + +API +endpoint +is +not +provided, + +the +Form +instance + +server + + +MUST + +SHOULD + + +include +an +entry +in +the +array +associated + +respond + +with +the +name +additionalResponses +that +includes +a +value +for +the +name +schema +. + +404 +(Not +Found). + + +
  • +
+

+ +A +Thing +Description +of + +Directory +server + +MAY + +provide +modified +TDs +or +error +responses +using + +a +WoT +producer +may +have +multiple +forms +entries +with, +e.g., + +different +protocol +and/or + +default +language +after +server-driven + +content +types +declarations +that +a +Consumer +could +possibly +support. +In +that +case +the +Consumer +may +choose +any +form +entry + +negotiation, + +that +works +(e.g., +the +protocol +and +content +type + +is +supported) +for +them. +When +one +form +is +chosen, +it +is +expected +that +the +Consumer +will +continue +to +use +it +as +long +as +possible +for +every +new +interaction +with +the +WoT +producer. +5.3.4.3 +ExpectedResponse +Communication +metadata +describing + +by +honouring + +the +expected +response +message +for + +request's +Accept-Language +header. + +The +process +of +modifying + +the +primary +response. +Vocabulary +term +Description +Assignment +Type +contentType +Assign + +default +language +of + +a +content +type +based +on + +TD +using +translations +already +provided +in + +a +media +type +(e.g., +text/plain +) +and +potential +parameters +(e.g., +charset=utf-8 +) +for + +TD +is +described +in + +the +media +type + +WoT +Thing +Description +1.1 +specification + +[ + +RFC2046 + + +wot-thing-description11 + + + +]. +mandatory +string + +

+
+
+
+5.3.4.4 + + +7.3.2.1 + + +AdditionalExpectedResponse + +Things +API + +
+ + +
+

+Communication +metadata +describing + +The +Things +API +is +a +RESTful +HTTP +API +served +at + +the +expected +response +message +for +additional +responses. +Vocabulary +term +Description +Assignment +Type + + +success + +/things + + +Signals +if +an +additional +response +should +not +be +considered +an +error. + +endpoint +providing +interfaces +to +create, +retrieve, +update, +delete, +and +list +(CRUDL) + +TDs +. +The +design +of +this +API +is +in +accordance + +with +default +boolean + +[ + + +RFC7231 + + +contentType +Assign +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 + + +REST-IOT + + + +]. +with +default +string +schema +Used +to +define +the +output +data +schema +for +an +additional +response +if +it +differs +from +the +default +output +data +schema. +Rather +than +a +DataSchema +object, +the +name +of +a +previous +definition +given +in +a +schemaDefinitions +map +must +be +used. +optional +string +5.4 +Default +Value +Definitions + +

+

+The +HTTP +API +follows +these +general +rules: +

  • +When +assignments +in +a +TD +are +missing, +a +TD +Processor + + +The +API + + +MUST + +follow +the +Default +Value +assignments +expressed +in + +provide + +the +table +of +Default +Value +Definitions +. + +interface +to +list +TDs. + + +The +following +table +gives +all +Default +Values +defined +in +the +TD +Information +Model +. +Class +Vocabulary +Term +Default +Value +Comment +DataSchema +readOnly +false +DataSchema +writeOnly +false +PropertyAffordance +observable +false +ActionAffordance +safe +false +ActionAffordance +idempotent +false +AdditionalExpectedResponse +success +false +AdditionalExpectedResponse +contentType +value +of +the +contentType +of +the +Form +element +it +belongs +to. +Form +contentType +application/json +Form +op + +Search +API +allows +filtering +and +selection +from +this +list; +see + + +7.3.2.3 + +Search +API +.
  • +Array +of +string +with + + +The +API + +MAY + +provide + +the +elements +readproperty + +interfaces +to +create, +read, +update, + +and +writeproperty +when +readOnly + +delete +(CRUD) +individual +TDs. +
  • +A +directory +that +provides +both +read + +and +writeOnly +are +set +to +false +or +Array +of +string +with +the +element +readproperty +when +readOnly + +write +over +HTTP + +is +set +to +true +or +Array + +considered +a +full +HTTP +directory. + +Full +HTTP +directories + +SHOULD + +implement +all + +of +string +with +the +element +writeproperty +when +writeOnly + +CRUDL +(create, +read, +update, +delete, +and +list) +interfaces. + +It + +is +set + +practical + +to +true +. +If +defined +within +an +instance +of +PropertyAffordance +Form +op +invokeaction +If +defined +within +an +instance +of +ActionAffordance +Form +op +Array +of +string +with + +implement +only + +the +elements +subscribeevent + +interfaces +to +read + +and +unsubscribeevent +If +defined +within +an +instance + +list +if +the +directory +serves +a +static +collection + +of +EventAffordance +BasicSecurityScheme +in +header +DigestSecurityScheme +in +header +DigestSecurityScheme +qop +auth +APIKeySecurityScheme +in +query +BearerSecurityScheme +in +header +BearerSecurityScheme +alg +ES256 +BearerSecurityScheme +format +jwt +6. +TD +Representation +Format +WoT +Thing +Descriptions +represent +Things +and +are +modeled +and +structured +based +on +5. +TD +Information +Model + + +TDs + +. +This +section +defines +a +JSON-based +representation +format + +is +also +useful + +for +Things +, +a +serialization +of +instances +of +the +Class +Thing +defined +by +the +TD +Information +Model +. +A +TD +Processor +MUST +be +able +to +serialize +Thing +Descriptions +into +the +JSON +format +[ +RFC8259 +] +and/or +deserialize +Thing +Descriptions +from + +directories + +that +format, +according + +intend + +to +expose +only +retrieval +operations +over +HTTP, +and +perform +other +operations +via +out-of-band +mechanisms. + +To +expose +read-only +access, + +the +rules +noted +in +6.1 +Mapping +to +JSON +Types + +directory + +MUST + +enforce +access +control +on +create, +update, + +and +6.3 +Information +Model +Serialization +. + +delete +interfaces. + + +
  • +
  • + +The +JSON + +default + +serialization +of +the +TD +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 +C. +JSON-LD +Context +Usage + +for +all +request + +and +the +documentation +under +the +namespace +IRIs, +e.g., +https://www.w3.org/2019/wot/td +). +In +order +to +support +interoperable +internationalization, +TDs + +success +response +bodies + + +MUST + +be +serialized +according +to +the +requirements +defined +in +Section +8.1 +of +RFC8259 + +JSON, +with +JSON-LD +1.1 + +[ + +RFC8259 + + +JSON-LD11 + + + +] +for +open +ecosystems. +In +summary, +this +requires +the +following: +TDs +MUST +be +encoded +using +UTF-8 +[ +RFC3629 +]. + +syntax +to +support +extensions +and +semantic +processing. + + +
  • +
  • +Implementations + + +Directories + + +MUST +NOT + +MAY + + +add +a +byte +order +mark +(U+FEFF) + +accept +alternative +representations +based +on +request's +indicated +Content-Type +or +Content-Encoding +headers. + +This +is +useful +for +applications +that +need +to +provide +representations +other +than +raw +JSON +as +input + +to +the +beginning +of + +a +TD +document. + +directory. + +
  • +
  • +TD +Processors + + +Directories + + +MAY + +ignore + +provide +alternative +representations +through +server-driven +content +negotiation, +that +is +by +honouring + +the +presence +of +a +byte +order +mark +rather + +request's +Accept +and +Accept-Encoding +headers +and +responding +with +the +supported +TD +representation +and +equivalent +Content-Type +and +Content-Encoding +headers. + +This +is +useful +for +applications +that +need +to +retrieve +representations +other + +than +treating +it + +raw +JSON +from +a +directory, +such + +as +an +error. + +Gzip-compressed +JSON. + +
  • +
+

+The +CRUDL +operations +are +described +in +the +following +sections: +

+
+
+ +6.1 + +7.3.2.1.1 + + +Mapping +to +JSON +Types + +Creation +
+ +
+

+The +TD +Information +Model +is +constructed, +so +that +there +is +an +easy +mapping +between +model +Objects +and +JSON +types. +Every +Class +instances +maps + +Creation +refers + +to +a +JSON +object, +where +each +name-value +pair +of + +the +Class +instance +is +a +member + +registration + +of +a +new + +TD + +inside + +the +JSON +object. + +directory. + +

+

+Every +Simple +Type +mentioned + +The +TD +object +is +validated + +in +accordance +with + + +5.3 + +7.3.2.1.6 + + +Class +Definitions +(i.e., +string +, +anyURI +, +dateTime +, +integer +, +unsignedInt +, +double +, +and +boolean +) +maps +to +a +primitive +JSON +type +(string, +number, +boolean), +as +per +the +rules +listed +below. +These +rules +apply +to +values +in +name-value +pairs: +Values + +Validation +. +Note + +that +are +of +type +string + +a +TD +may + +or +anyURI +MUST +be +serialized +as +JSON +strings. +Values +that +are +of +type +dateTime +MUST + +may +not + +be +serialized +as +JSON +strings +following +the +"date-time" +format +specified + +generated + +by +[ +RFC3339 +]. +Examples +would +include +2019-05-24T13:12:45Z +and +2015-07-11T09:32:26+08:00 +. +Values +that +are +of +type +dateTime +SHOULD +use +the +literal +Z +representing + +the +UTC +time +zone +instead +of +an +offset. +Values +that +are +of +type +integer + + +Thing + +it +describes. +For +brownfield +devices +in +particular +a +separate + +Discoverer + +process + +or +unsignedInt +MUST + +service +may + +be +serialized +as +JSON +numbers +without + +required +that +generates +and +registers + +a +fraction +or +exponent +part. + +TD +for +a + +Thing + +on +its +behalf. +

+Values +that +are +of +type + + +A +TD +which +is +identified +with +an + + +double + +id + + +attribute + + +MUST + +be +serialized +as +JSON +number. +Values + +handled +differently +with +one + +that +are +of +type +boolean +MUST +be +serialized +as +JSON +boolean. +Every +complex +type +of +the + +has +no +identifier +( + +Anonymous + +TD +Information +Model +(i.e., +Arrays +, +Maps +, +and +Class + + +instances) +maps +to +a +structured +JSON +type +(array +and +object), +as +per +the +rules +listed + +). + +The +create +operations +are +elaborated + +below: +

+
    +
  • + +A +value +of +type +Array + +TD +that +has +an + +id + + +MUST + +be +serialized +as +JSON +array, +with +each +value +of +the +name-value +pairs +as +element +of + +submitted +to + +the +JSON +array +ordered +by + +directory +in + +the +numeric +name + +body + +of +an +HTTP + +PUT + +request +at + +/things/{id} + +endpoint, +where + +id + +is + +the +pair. +A +value +of +type +Map +MUST +be +serialized +as +JSON +object, +with +each +name-value +pair +as +member +of + +unique +TD +identifier, +present +inside + +the +JSON + +TD + +object. + +A +Class + +An + +Anonymous +TD + + +instance + +is +handled +differently; +see +below. + +The +request + + +MUST + +SHOULD + + +be +serialized +as + +contain + +application/td+json + +Content-Type +header +for + +JSON +object, +following +the +detailed +rules +given +individually +in +6.3 +Information +Model +Serialization +. +6.2 +Omitting +Default +Values +A +Thing +Description + +serialization +may +omit +Vocabulary +Term +for +which +Default +Values +are +defined, +as +listed +in +the +table +given + +of +TD. + +The +TD +object +is +validated + +in +accordance +with + + +5.4 + +7.3.2.1.6 + + +Default +Value +Definitions + +Validation + +. +The +following +example +shows + + +Upon +successful +processing, + +the +TD +instance +from +Example +1 + +server + +MUST + +respond + +with +a +checkbox +to +also +include + +201 +(Created) +status. +

    +Note: +If + +the +members +with +Default +Values +(=checkbox +checked). +These +members +can +be +omitted +(=checkbox +unchecked) + +target +location +corresponds + +to +simplify + +an +existing +TD, + +the +TD +serialization. +Note +that +a +TD +Processor +interprets +these +omitted +members +identically + +request +shall +instead +proceed + +as +if +they +were +explicitly +present +with +a +given +Default +Value +. + +an +Update +operation +and +respond +the +appropriate +status +code +(see +Update +section). + +

    +Example +4 +with +Default +Values +{ + : <span class= +"hljs-string">"https://www.w3.org/2022/wot/td/v1.1", + : <span class= +"hljs-string">"urn:dev:ops:32473-WoTLamp-1234", + : <span class= +"hljs-string">"MyLampThing", + : { + : { + : <span class= +"hljs-string">"basic" + } + }, + : <span class= +"hljs-string">"basic_sc", + : { + : { + : <span class= +"hljs-string">"string", + : [{ + : <span class= +"hljs-string">"https://mylamp.example.com/status" + }] + } + }, + : { + : { + : [{ + : <span class= +"hljs-string">"https://mylamp.example.com/toggle" + }] + } + }, + : { + : { + : { + : <span class= +"hljs-string">"string" + }, + : [{ + : <span class= +"hljs-string">"https://mylamp.example.com/oh", + <span class= +"hljs-attr">"subprotocol": <span class= +"hljs-string">"longpoll" + }] + } + } +} +{ + : <span class= +"hljs-string">"https://www.w3.org/2022/wot/td/v1.1", + : <span class= +"hljs-string">"urn:dev:ops:32473-WoTLamp-1234", + : <span class= +"hljs-string">"MyLampThing", + : { + : { + : <span class= +"hljs-string">"basic", + : <span class= +"hljs-string">"header" + } + }, + : <span class= +"hljs-string">"basic_sc", + : { + : { + : <span class= +"hljs-string">"string", + : <span class= +"hljs-literal">false, + <span class= +"hljs-attr">"writeOnly", + <span class= +"hljs-attr">"observable": <span class= +"hljs-literal">false, + : [{ + : [ + <span class= +"hljs-string">"readproperty", + <span class= +"hljs-string">"writeproperty" + ], + : <span class= +"hljs-string">"https://mylamp.example.com/status", + <span class= +"hljs-attr">"contentType": <span class= +"hljs-string">"application/json" + }] + } + }, + : { + : { + : <span class= +"hljs-literal">false, + <span class= +"hljs-attr">"idempotent": <span class= +"hljs-literal">false, + : [{ + : <span class= +"hljs-string">"invokeaction", + : <span class= +"hljs-string">"https://mylamp.example.com/toggle", + <span class= +"hljs-attr">"contentType": <span class= +"hljs-string">"application/json" + }] + } + }, + : { + : { + : { + : <span class= +"hljs-string">"string", + <span class= +"hljs-attr">"readOnly": <span class= +"hljs-literal">false, + <span class= +"hljs-attr">"writeOnly": <span class= +"hljs-literal">false + }, + : [{ + : <span class= +"hljs-string">"subscribeevent", + : <span class= +"hljs-string">"https://mylamp.example.com/oh", + <span class= +"hljs-attr">"contentType": <span class= +"hljs-string">"application/json", + <span class= +"hljs-attr">"subprotocol": <span class= +"hljs-string">"longpoll" + }] + } + } +} + +

    +Please +note +that, +depending +on +the +Protocol +Binding +used, +additional +protocol-specific +Vocabulary +Terms + +The +create +operation +for + +TDs + + +may +apply. +They +may +also + +that + +have +associated +Default +Values +, +and +hence +can +also +be +omitted + +identifiers +is +specified + +as +explained +in +this +subsection. +Further +information +can +be +found + + +createThing + +action + +in +8.3 +Protocol +Bindings +. + + + +6.3 +Information +Model +Serialization +6.3.1 + +7.3.2.4 + + +Thing +Root +Object +A +Thing +Description +is +a +data +structure +rooted +at +an +Object +of +type +Thing +. +In +turn, +a +JSON +serialization +of +the +Thing +Description +is +a +JSON +object, +which +is +the +root +of +a +syntax +tree +constructed +from +the +TD +Information +Model + +API +Specification +(Thing +Model) + +. +

    +
  • +
  • +The +root +element +of +a +TD Serialization + + +An + +Anonymous +TD + + + +MUST + + be +a +JSON +object +that +includes +a +member +with +the +name +@context +and +a +value +of +type +string +or +array +that +equals +or +respectively +contains +https://www.w3.org/2022/wot/td/v1.1 +. +In +general, +this +URI +is +used + +be +submitted + +to +identify + +the +TD +representation +format +version +defined +by +this +specification. +For +JSON-LD +processing +[ +json-ld11 +], +this +URI +specifies + +directory +in + +the +Thing +Description +context +file. +An +@context +of +type +array +indicates +TD +Context +Extensions +(see +7. +TD +Context +Extensions +for +details). +Example +5 +{ + : <span class= +"hljs-string">"https://www.w3.org/2022/wot/td/v1.1", + ... +} +All +name-value +pairs + +body + +of +an +instance +of + +HTTP + + +Thing +, +where +the +name +is +a +Vocabulary +Term +in +the +Signature +of + +POST + +request +at + + +Thing +, +MUST + +/things + +endpoint. + +The +request + +SHOULD + + +be +serialized +as + +contain + +application/td+json + +Content-Type +header +for + +JSON +members + +serialization + +of +the +root +object. + +TD. + + +A + +The + +TD +snippet +for +a +serialized +root + +object +including +all +mandatory +and +optional +members + +is +given +below: + +validated +in +accordance +with + +Example +6 + + +7.3.2.1.6 + + +: +Sample +of +Thing +serializations +{ + : <span class= +"hljs-string">"https://www.w3.org/2022/wot/td/v1.1", + : <span class= +"hljs-string">"Thing", + : <span class= +"hljs-string">"urn:dev:ops:32473-Thing-1234", + : <span class= +"hljs-string">"MyThing", + : {...}, + : <span class= +"hljs-string">"Human readable information.", + : {...}, + : <span class= +"hljs-string">"mailto:support@example.com", + : {...}, + : <span class= +"hljs-string">"2018-11-14T19:10:23.824Z", + : <span class= +"hljs-string">"2019-06-01T09:12:43.124Z", + : {...}, + : ..., + : <span class= +"hljs-string">"https://servient.example.com/", + : {...}, + : {...}, + : {...}, + : [...], + : [...] +} +All +values +assigned +to +version +, +securityDefinitions +, +properties +, +actions +, +and +events +in +an +instance +of + +Validation +. +Upon +successful +processing, + +the +Class +Thing + +server + +MUST + +be +serialized +as +JSON +objects. +All +values +assigned +to +links +, + +respond +with +201 +(Created) +status + +and +forms +in +an +instance + +a +Location +header +containing +a +system-generated +identifier +for +the +TD. + +The +scheme + +of +the +Class +Thing +MUST +be +serialized +as +JSON +arrays +containing +JSON +objects +as +defined + +system-generated +ID +is +described + +in + +6.3.8 + + +7.3.1.3 + + +Anonymous +TD +Identifiers +.

    +The +create +operation +for + +Anonymous +TDs + +is +specified +as + + +links + +createAnonymousThing + + +and + +action +in + + +6.3.9 + +7.3.2.4 + + +forms +, respectively. + +API +Specification +(Thing +Model) +. +

    +
  • +
+

+A +server +that +supports +expirable +TDs +will +realize +such +functionality +as +described +in + +The +value +assigned +to + + +7.3.1.2 + +Registration +Expiry +. +In +particular, +if + + +security + +ttl + + +in +an +instance +of +Class + +(relative +expiry) +is +given +during +the +creation, +such +servers +will +calculate +and +store +the + + +Thing + +expires + + +MUST + be +serialized +as +JSON string +or +as +JSON +array +whose +elements +are +JSON +strings. + +value. + +

+
+
+
+
+6.3.2 + + +7.3.2.1.2 + + +Human-Readable +Metadata + +Retrieval +
+ +
+

+JSON +members +named + + +The +retrieval +of +an +existing +TD + +MUST + +be +done +using +an +HTTP + + +title + +GET + + +and + +request +at + + +description + +/things/{id} + + +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.1 + +endpoint, +where + + +Thing + +id + + +, +the +base +text +direction +used +to +display +human-readable +metadata +can +either +be +estimated +using +heuristics +such +as + +is + +the +first-strong +rule +or +inferred +from +language +information. +In + +unique + +TD +documents + +identifier. + +A +successful +response + +MUST + +have +200 +(OK) +status +and + +the +default +language +is +defined +by +a +value +assigned +to +@language + +requested +TD + +in +the +@context +, +and +this, +along + +body. + +A +successful +response + +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 +value + +JSON +serialization + +MUST + +be +processed +independently. +In +other +words, +a +TD +Processor +cannot +carry +forward +changes +in +direction +from +one +string +to +another, + +contain + +application/json + +or +infer +direction +for +one +string +from +another +one +elsewhere + +more +specifically, + +application/td+json + +in +the +TD. +Note + +Content-Type +header. + + +Strings +on +the +Web +[ +STRING-META +] +suggests +both +strong-first +and +language-based +inferencing +as +means +to +determine +the +base +text +direction. +Given + +Note + +that +the +Thing +Description +format + +default +serialization + +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 +with + +JSON-LD +1.1 +adopts +support +for +explicit +base +direction +metadata +as +recommended +by +[ +STRING-META +], +the +Thing +Description +format +should + +syntax, +and +alternative +serializations +can + +be +updated +to +take +advantage +of +that +feature. + +negotiated; +see + +7.3.2.1 + +Things +API +. +

+

+A +TD +snippet +using +title +and +description +is +shown +below. + +The +default +language + +retrieve +operation + +is +set +to + +specified +as + + +en + +retrieveThing + + +through +the +definition + +action +in + +7.3.2.4 + +API +Specification +(Thing +Model) +.

+The +following +is +an +example + +of +the +@language +member +within + +a +JSON +object +in +the +@context +array. + +retrieved +TD: + +

+

+This +is +an + +Enriched + +TD +document. +All +name-value +pairs +of +a +MultiLanguage +Map + + +MUST + be +serialized +as +members +of +a +JSON +object, +where + +which +includes + +the +name +is +a +well-formed +language +tag + +registration +information +such + +as +defined +by +[ +BCP47 +] +and + +the +value +is +a +human-readable +string +in +the +language +indicated +by + +creation +and +modification +time +of + +the +tag. +See +5.3.1.7 +MultiLanguage +for +details. +All +MultiLanguage +object +within +a + +TD +document +SHOULD +contain + +within + +the +same +set +of +language +members. + +directory. + +

+

+A + +The +example +below +shows +a +retrieved + +Anonymous + +TD +snippet +using +titles + + +that +is +in + +Enriched +TD + +form + +and +has +local +identifier + + +descriptions +at +different +levels +is +given +below: + +urn:uuid:48951ff3-4019-4e67-b217-dbbf011873dc +. +

+

+The +following +is +an +example +of + +a +retrieved + +TD +document, +each +title +and +description +member +SHOULD +have + +that +was +registered +with + +a +corresponding +titles +and +descriptions +member, +respectively. +The +language + +relative +expiry +time + +of +3600 +seconds +(one +hour). +The +server +has +calculated + +the +default +text +is +indicated +by +the +default +language, +which +is +usually +set +by +the +creator +of + +absolute +expiry +time +as +one +hour +after + +the +Thing +Description +instance. + +modification +time. + +

+

+For + +the +corresponding +default +language + +sake + +of +readability, + +the +returned +content. +When +the +default +language +has +been +negotiated +successfully, +TD +documents +SHOULD +include +the +appropriate +matching + +time + +values +for +the +members +title +and +description +in +preference +to +MultiLanguage +objects + +in +titles +and +descriptions +members. +Note +however +that +Things +MAY +choose +to +not +support +such +dynamically-generated +TDs +nor + +this +example +are +set + +to +support +language +negotiation +(e.g., +because +of +resource +constraints). + +exact +numbers. +In +realistic +settings, +time +values +may +include +fractions. + +

+
+
+
+
+ +6.3.3 + +7.3.2.1.3 + + +version + +Update +
+ +
+

+The +update +operations +are +to +replace +or +partially +modify +an +existing +TD. +

+The +update +operations +are +described +below: +

  • +All +name-value +pairs +of + + +A +modified +TD + +MUST + +replace + +an +instance +of + +existing +one +when +submitted +using +an +HTTP + + +VersionInfo +, + +PUT + +request +at + +/things/{id} + +endpoint, + +where +the +name + + +id + +is +a +Vocabulary +Term +included +in + +the +Signature + +identifier + +of +VersionInfo +, + +the +existing +TD. + +The +request + + +MUST + +SHOULD + + +be +serialized +as + +contain + +application/td+json + +Content-Type +header +for + +JSON +members +with +the +Vocabulary +Term +as +name. + +serialization +of +TD. + + +A + +The + +TD +snippet +of +a +version +information + +object +is +given +below: + +validated +in +accordance +with + +Example +10 + + +7.3.2.1.6 + + +{ + ... + "version": { <span class= +"hljs-string">"instance": <span class= +"hljs-string">"1.2.1" }, + ... +} + +Validation +. +Upon +success, +the +server + +MUST + +respond +with +204 +(No +Content) +status. + +

    +The +version +member + +This +operation + +is +intended + +specified + +as +container +for +additional +application- +and/or +device-specific +version +information +based +on +TD +Context +Extensions +. +See + + +updateThing + +property +in + +7.1 + + +7.3.2.4 + + +Semantic +Annotations +for +details. + +API +Specification +(Thing +Model) +. +

    +

    +A +server +that +supports +expirable +TDs +will +realize +such +functionality +as +described +in + +6.3.4 + + +7.3.1.2 + + +Registration +Expiry +. +If + + +securityDefinitions + +ttl + + +(relative +expiry) +is +set +during +the +update +operation, +the +server +will +calculate + +and +set +the + + +security + +expires + + +(absolute +expiry) +value. +

    +

    +In +a +Thing +instance, + +Note: +If + +the +value +assigned + +target +location +does +not +correspond + +to +securityDefinitions +is +a +Map +of +instances +of +SecurityScheme +. +All +name-value +pairs +of +a +Map +of +SecurityScheme +instances +MUST + be +serialized +as +members +of +the +JSON +object +that +results +from +serializing +the +Map +; + +an +existing +TD, + +the +name +of +a +pair +MUST + be +serialized + +request +shall +instead +proceed + +as +a +JSON +string + +Create +operation + +and +respond + +the +value +of +the +pair, + +appropriate +status +code +(see +Create +section). +In +other +words, + +an +instance +of + +HTTP + + +SecurityScheme +, +MUST +be +serialized + +PUT + +request +acts + +as +a +JSON +object. + +create +or +update +operation. + +

    +
  • +
  • +All +name-value +pairs +of +an +instance +of +one +of + + +An +existing +TD + +MUST + +be +partially +modified +when + +the +Subclasses +of + +modified +parts +are +submitted +using +an +HTTP + + +SecurityScheme +, + +PATCH + +request +at + +/things/{id} + +endpoint, + +where +the +name + + +id + +is +a +Vocabulary +Term +included +in + +the +Signature + +identifier + +of +that +Subclass +or +in + +the +Signature +of +SecurityScheme +, + +existing +TD. + +The +partial +update + + +MUST + +be +serialized +as +members +of + +processed +using + +the +JSON +object +that +results +from +serializing +the +SecurityScheme +Subclass +'s +instance, +with +the +Vocabulary +Term + +merge +patch +format +described +in +[ + +RFC7396 + + +as +name. + +The +following +TD +snippet +shows +a +simple +security +configuration +specifying +basic +username/password +authentication +in +the +header. + + +]. + +The +value +given +for + +request + +MUST + +contain + + +in + +application/merge-patch+json + + +is +actually +the +Default +Value +( + +Content-Type + +header +) +and +could +be +omitted. +A +named +security +configuration +must +be +given +in +the +securityDefinitions +map. +That +definition +must +be +activated +by +including +its + +for + +JSON +name +in +the +security +member, +which +can +and +should +be + +serialization + +of +type +string +when +only +one +definition +is +activated. +Example +11 +... +: { + : { + : <span class= +"hljs-string">"basic", + : <span class= +"hljs-string">"header" + } +}, +: <span class= +"hljs-string">"basic_sc", +... +Security +configuration +in + +the +TD +is +mandatory. +At +least +one +security +definition + +merge +patch +document. + +The +input + + +MUST + +be +activated +through +the +security +member +at +the +Thing +level +(i.e., + +in + +Partial +TD + +form +and +conform +to + +the +original + +TD +root +object). + +structure. + + +This +configuration +can +be +seen +as +the +default +security +mechanism +required +to +interact +with + +If + +the +Thing +. +Security +definitions +MAY +also +be +activated +at + +input +contains +members +that +appear +in + +the +form +level +by +including + +original +TD, +their +values +are +replaced. +If + +a +security + +member +does +not +appear + +in +form +objects, +which +overrides +(i.e., +completely +replace) +all +definitions +activated +at +the +Thing +level. +The +nosec +security +scheme +is +provided +for + +the +case + +original +TD, + +that +no +security +is +needed. +The +minimal +security +configuration +for +a +Thing + +member + +is +activation +of + +added. +If + +the +member +is +set +to + + +nosec + +null + + +security +scheme +at +the +Thing +level, +as +shown + +but +appear + +in +the +following +example: +Example +12 +{ + : <span class= +"hljs-string">"https://www.w3.org/2022/wot/td/v1.1", + : <span class= +"hljs-string">"urn:dev:ops:32473-Thing-1234", + : <span class= +"hljs-string">"MyThing", + : <span class= +"hljs-string">"Human readable information.", + : <span class= +"hljs-string">"https://servient.example.com/contact", + <span class= +"hljs-string">"securityDefinitions": { <span class= +"hljs-string">"nosec_sc": { <span class= +"hljs-string">"scheme": <span class= +"hljs-string">"nosec" }}, + : <span class= +"hljs-string">"nosec_sc", + : {...}, + : {...}, + : {...}, + : [...] +} +6.3.4.1 +Multiple +Security +Definitions +To +give +a +more +complex +example, +suppose +we +have +a +Thing +where +all +Interaction +Affordances +require +basic +authentication +except +for +one, +for +which +no +authentication + +original +TD, +that +member + +is +required. +For + +removed. +Members +with +object +values +are +processed +recursively. +After +applying + +the +status +Property +and + +modifications, + +the +toggle +Action, +basic +authentication + +TD +object + +is +required +and +defined +at +the +Thing +level. +For + +validated +in +accordance +with + +7.3.2.1.6 + +Validation +. +Upon +success, + +the +server + +MUST + +respond +with +a +204 +(No +Content) +status. +

    +This +operation +is +specified +as + + +overheating + +partiallyUpdateThing + + +Event, +however, +no +authentication +is +required, +and +hence +the +security +configuration +is +overridden +at +the +form +level. + +property +in + +Example +13 + + +7.3.2.4 + + +{ + ... + "securityDefinitions": { + : {<span class= +"hljs-string">"scheme": <span class= +"hljs-string">"basic"}, + "nosec_sc": {<span class= +"hljs-string">"scheme": <span class= +"hljs-string">"nosec"} + }, + "security": , + ... + : { + : { + ... + : [{ + <span class= +"hljs-string">"href": <span class= +"hljs-string">"https://mylamp.example.com/status" + }] + } + }, + "actions": { + : { + ... + : [{ + <span class= +"hljs-string">"href": <span class= +"hljs-string">"https://mylamp.example.com/toggle" + }] + } + }, + "events": { + : { + ... + : [{ + <span class= +"hljs-string">"href": <span class= +"hljs-string">"https://mylamp.example.com/oh", + <span class= +"hljs-string">"security": <span class= +"hljs-string">"nosec_sc" + }] + } + } +} + +API +Specification +(Thing +Model) +.

    +

    +A +server +that +supports +expirable + +TDs +can +specify +a +combination +of +security +schemes + +will +realize +such +functionality + +as +well. +Below +is +a +TD +snippet +showing +digest +authentication +on +a +proxy +combined +with +bearer +token +authentication +on +the +Thing + +described +in + +7.3.1.2 + +Registration +Expiry + +. +In + +During + +the +digest +scheme, + +partial +update +operation, +if + +the +Default +Value + +resulting + +TD + + +of +in +(i.e., + +has + + +header + +ttl + + +) +is +omitted, +but +still +applies. +Note +that + +(relative +expiry), + +the +corresponding +private +security +configuration +such +as +username/password + +server +will +calculate + +and +tokens +must +be +configured +in +the +Consumer +to +interact +successfully. +When +activating +multiple +security +definitions, +the + +set +a +new + + +security + +expires + + +member +becomes +an +array. + +(absolute +expiry) +value. + +

    +Example +14 +... +: { + : { + : <span class= +"hljs-string">"digest", + : <span class= +"hljs-string">"https://portal.example.com/" + }, + : { + : <span class= +"hljs-string">"bearer", + :<span class= +"hljs-string">"header", + : <span class= +"hljs-string">"jwt", + : <span class= +"hljs-string">"ES256", + <span class= +"hljs-string">"authorization": <span class= +"hljs-string">"https://servient.example.com:8443/" + } +}, +: [<span class= +"hljs-string">"proxy_sc", <span class= +"hljs-string">"bearer_sc"], +... + +

    +However, + +A +patch +operation +is +particularly +useful +to +efficiently +extend + +the +use + +expiry + +of +an +array +with +multiple +elements +to +combine +security +schemes +in + +a +registration +that +uses + +a + +security +element +is +now +deprecated. +A +ComboSecurityScheme + +ttl + + +should +be +used +instead +as +in +the +following +example, +which + +(relative +expiry) +value. +This + +is +exactly +equivalent + +typically +done +by +submitting +an +empty +merge +patch +document, +i.e. +an +empty +JSON +object. +This +effectively +translates + +to +performing +a +partial +update +operation +that +updates +nothing, +but +triggers + +the +one +above: +Example +15 +... +: { + : { + : <span class= +"hljs-string">"digest", + : <span class= +"hljs-string">"https://portal.example.com/" + }, + : { + : <span class= +"hljs-string">"bearer", + :<span class= +"hljs-string">"header", + : <span class= +"hljs-string">"jwt", + : <span class= +"hljs-string">"ES256", + <span class= +"hljs-string">"authorization": <span class= +"hljs-string">"https://servient.example.com:8443/" + }, + : { + : <span class= +"hljs-string">"combo", + : [<span class= +"hljs-string">"proxy_sc", <span class= +"hljs-string">"bearer_sc"] + } +}, +: <span class= +"hljs-string">"combo_sc", +... +6.3.4.2 + +recalculation +of + + +security + +expires + + +(absolute +expiry) +value. +This +expiry +functionality +only +works +if +the +server +supports +it +as +defined + +in +Forms + + +Security +configurations +can +also +be +specified +for +different +forms +within +the +same +Interaction +Affordance + + +7.3.1.2 + +Registration +Expiry + +. +This +may +be +required +for +devices +that +support +multiple +protocols, +for + +

    +

    +The +following + +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 + +merge +patch +document + +to +combine +security +mechanisms +in +an +"OR" +fashion. +In +contrast, +putting +multiple +security +configurations +in + +update +only + +the +same + + +security + +base + + +member +combines +them +in +an +"AND" +fashion, +since +in +that +case +they +would +all +need +to +be +satisfied +to +allow +activation + +and +registration + +expires + +fields + +of +the +Interaction +Affordance +. +Note +that +activating +one +(default) +configuration +at +the +Thing +level +is +still +mandatory. + +a +TD: + +

    +
+
+
+
+
+ +6.3.4.4 + +7.3.2.1.4 + + +OAuth +2.0 +usage + +Deletion +
+ +
+

+As +another +more +complex +example, +OAuth +2.0 +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 +(or +Interaction +Affordance +in +the +case +of +W3C +WoT). +For +example, +in +the +following, +the +status +Property +can + + +A +delete +operation + +MUST + +be +read +by +Consumers + +done + +using +bearer +tokens +containing +the +scope +limited +, +but +the +configure +Action +can +only +be +invoked +with +a +token +containing +the +special +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 +and +are +issued +by +dedicated +web +services +to +users. +In +this +example, + +an +administrator +could +be +issued +tokens +with +both +the + +HTTP + + +limited + +DELETE + + +and + +request +at + + +special + +/things/{id} +, +where + +id + + +scopes, +while +ordinary +users +could +be +provided +with +tokens +with + +is +the +identifier +of + +the +existing +TD. + +A +successful +response + +MUST + +have +204 +(No +Content) +status. + +The +retrieve +operation +is +specified +as + + +limited + +deleteThing + + +scope. + +property +in + +Example +18 + + +7.3.2.4 + + +{ + ... + "securityDefinitions": { + : { + : <span class= +"hljs-string">"oauth2", + : <span class= +"hljs-string">"client", + : <span class= +"hljs-string">"https://example.com/token", + <span class= +"hljs-string">"scopes"] + } + }, + "security": , + ... + : { + : { + ... + : [{ + <span class= +"hljs-string">"href": <span class= +"hljs-string">"https://scopes.example.com/status", + <span class= +"hljs-string">"scopes": [<span class= +"hljs-string">"limited"] + }] + } + }, + "actions": { + : { + ... + : [{ + <span class= +"hljs-string">"href": <span class= +"hljs-string">"https://scopes.example.com/configure", + <span class= +"hljs-string">"scopes": [<span class= +"hljs-string">"special"] + }] + } + }, + ... +} + +API +Specification +(Thing +Model) +.

+
+
+
+
+ +6.3.4.5 + +7.3.2.1.5 + + +API +key +usage + +Listing +
+ +
+

+A +Thing +can +require +an +onboarding +process +that +results +in +the +Consumer +requiring +an +API +key +to +interact +with +the +Thing. +This +API +key +can +be +included +in +the +request +to +the +Thing +in + +The +listing +endpoint +provides + +different +ways +as + +to +query + +the +API +key +scheme +specifies. +Below +is +an +example + +collection + +of +how +it +can +be +used +as +a +URI +template +where +the +API +key +should +be +replaced +in +the +URI +by + +full +TD +objects +from + +the +Consumer +when +sending +an +HTTPS +request. + +directory. + +

+Example +19 +{ + ... + "securityDefinitions": { + : { + : <span class= +"hljs-string">"apikey", + : <span class= +"hljs-string">"uri", + : <span class= +"hljs-string">"adminKey" + } + }, + "security": , + : { + : { + ... + : [{ + <span class= +"hljs-string">"href": <span class= +"hljs-string">"https://example.com/{adminKey}/status", + ... + }] + } + }, + ... +} + +

+To +give +another +example + +In +many +scenarios, +retrieving +parts +instead + +of +the +use + +full +TD +objects +is +preferred +because +only +a +subset + +of +the + +elements +are +needed +(e.g. + + +ComboSecurityScheme + +id + + +in +addition +to +the +use +of +URI +templates +example +shown +above, +suppose +there +is +a +security +scheme +where +a +client +ID + +and + +href + +of + +a +"secret" +key +provided +by +a +cloud +service +provider +must +both +be +embedded +in +the +URL. +Technically, +only +the +key +is +actually +secret +and +must +be +handled +out-of-band, + +property +for +all +TDs) + +and +the +client +ID, +which +is +not +secret, +could +be +embedded +in +the +TD. +However, +if +the +client +ID +cannot +be +easily +rotated +we +may +want +to +avoid +embedding +it +in +the +TD + +to +enhance +privacy. +In +this +case +we +can +combine +two +instances + +save +networking +resources. +The +Search +API +allows +querying +parts + +of +TD +objects; +see + +APIKeySecurityScheme + + +7.3.2.3 + +Search +API +.

+, +both + + +The +directory + +MUST + +allow +retrieval +of +existing +TDs + +using +the +uri +value +for +the + +HTTP + + +in + +GET + + +location +specifier, +to +declare +two +URI +variables. +These +can +then +(in +fact, +they +must) +be +used +in + +requests +at + +the + +href +in +a +Form +where +the +security +scheme +is +active. +An +example +follows: +Example +20 +{ + ... + "securityDefinitions": { + : { + : <span class= +"hljs-string">"apikey", + : <span class= +"hljs-string">"uri", + : <span class= +"hljs-string">"secKey" + }, + "apikey_id": { + : <span class= +"hljs-string">"apikey", + : <span class= +"hljs-string">"uri", + : <span class= +"hljs-string">"secClientID" + }, + "apikey_combo": { + : <span class= +"hljs-string">"combo", + : [<span class= +"hljs-string">"apikey_key",<span class= +"hljs-string">"apikey_id"] + } + }, + "security": , + ... + : { + : { + ... + : [{ + <span class= +"hljs-string">"href": <span class= +"hljs-string">"https://example.com/{secClientID}/status/{secKey}", + ... + }] + } + }, + ... +} +While +not +shown +in +this +example, +it +is +legal +to +declare +additional +URI +template +variables +using +uriVariables + +/things + + +endpoint. + +A +successful +response + +MUST + +have +200 +(OK) +status + +and +include +them +in +the +same +URI +template, +although +the +names +cannot +conflict +with +those +declared +in +security +schemes. +Using +a +specific +prefix +as + +an +array +of +TDs + +in +the +above +example +for +URI +variables +declared +in +security +schemes +can +make +it +easier +to +avoid +name +conflicts. +API +Key +in +Body: +Security +parameters +might +also +be +included +along + +body. + +A +successful +response + +with +the +payload +in +some +systems. +For +example, +suppose +a +system +requires +every +payload +to +be +a + +JSON +object +including +a +member +named + +serialization + +MUST + +contain + + +auth + +application/json + + +whose +value +is +an +object +containing +a +member +called + +or +more +specifically, + + +key + +application/ld+json + + +containing +an +access +key. +Depending +on +the +interaction, +however, +other +elements +of +the +JSON +object +might +vary. +This +situation +can +be +dealt +with +using + +in + +the +body +security +information +location. + +Content-Type +header. + +Note +that +for +this +location, + +the +name +parameter + +default +serialization + +is +actually +a + +JSON +pointer +evaluated +relative +to +the +root +of +the +DataSchema +for +each +interaction +it +is +bound +with, +which +allows +it +to +be +used + +with +payloads +that +vary +in +other +respects. +As +an +example, +here +is +a +light +that +has +a +property +to +set +its +brightness +and +color +and +two +separate +actions +to +turn +it +on + +JSON-LD +syntax, + +and +off. +Although +the +JSON +payloads +are +different +for +these +actions +the +/auth/key +element +occurs +in +the +same +relative +location +so +single +JSON +pointer + +alternative +serializations + +can +be +used. +Note: +if +the +security +key +occurs +in +different +inconsistent +locations, +it +will + +negotiated; +see + +7.3.2.1 + +Things +API +.

+There +may + +be +necessary + +scenarios +in +which +clients +need + +to +use +multiple +security +scheme +definitions. + +retrieve +the +collection +in +small +subsets +of +TDs. +While +the +Search +API +( + +Example +21 + + +7.3.2.3 + + +Search +API + + +{ + ... + "securityDefinitions": { + : { + : <span class= +"hljs-string">"apikey", + : <span class= +"hljs-string">"body", + : <span class= +"hljs-string">"/auth/key" + } + }, + "security": , + ... + : { + : { + ... + : <span class= +"hljs-string">"object", + : { + : { + <span class= +"hljs-string">"type": <span class= +"hljs-string">"number", + ... + }, + "rgb": { + <span class= +"hljs-string">"type": <span class= +"hljs-string">"array", + ... + }, + "auth": { + <span class= +"hljs-string">"type": <span class= +"hljs-string">"object", + <span class= +"hljs-string">"properties": { + : { + <span class= +"hljs-string">"type": <span class= +"hljs-string">"string" + } + }, + "required": [<span class= +"hljs-string">"key"] + } + }, + "required": [<span class= +"hljs-string">"brightness", <span class= +"hljs-string">"rgb", <span class= +"hljs-string">"auth"], + : [{ + <span class= +"hljs-string">"href": <span class= +"hljs-string">"https://example.com/color", + ... + }] + } + }, + "action": { + : { + ... + : { + : { + <span class= +"hljs-string">"type": <span class= +"hljs-string">"object", + <span class= +"hljs-string">"properties": { + : { + <span class= +"hljs-string">"type": <span class= +"hljs-string">"string" + } + }, + "required": [<span class= +"hljs-string">"key"] + } + }, + "required": [], + : [{ + <span class= +"hljs-string">"href": <span class= +"hljs-string">"https://example.com/on", + ... + }] + }, + "off": { + ... + : { + : { + <span class= +"hljs-string">"type": <span class= +"hljs-string">"object", + <span class= +"hljs-string">"properties": { + : { + <span class= +"hljs-string">"type": <span class= +"hljs-string">"string" + } + }, + "required": [<span class= +"hljs-string">"key"] + } + }, + "required": [], + : [{ + <span class= +"hljs-string">"href": <span class= +"hljs-string">"https://example.com/off", + ... + }] + } + }, + ... +} +However, +it +is +rather +annoying +and +redundant +to +add + +) +does +offer + +the +security +information +to +every +data +schema. +It +is +possible + +ability + +to +simplify +this +example +by +using +the +feature +that +the +location +referenced +by +a +JSON +pointer +in + +query + +a +body +location +will +be +automatically +inserted +if + +specific +range, + +it +does + +may + +not +exist. +In +this +case +the +above +example +can + +be +simplified + +optimal, +nor +developer-friendly. + +The +server + +MAY + +support +pagination + +to +return + +the +following. +Note +that + +collection + +in +fact +a +data +schema +will +effectively + +small +subsets. + +The +pagination +must + +be +created +for +the +actions + +based + +on +and +off +to +hold +just + +the +security +information. +Example +22 +{ + ... + "securityDefinitions": { + : { + : <span class= +"hljs-string">"apikey", + : <span class= +"hljs-string">"body", + : <span class= +"hljs-string">"/auth/key" + } + }, + "security": , + ... + : { + : { + ... + : <span class= +"hljs-string">"object", + : { + : { + <span class= +"hljs-string">"type": <span class= +"hljs-string">"number", + ... + }, + "rgb": { + <span class= +"hljs-string">"type": <span class= +"hljs-string">"array", + ... + } + }, + "required": [<span class= +"hljs-string">"brightness", <span class= +"hljs-string">"rgb"], + : [{ + <span class= +"hljs-string">"href": <span class= +"hljs-string">"https://example.com/color", + ... + }] + } + }, + "action": { + : { + ... + <span class= +"hljs-string">"required": [<span class= +"hljs-string">"auth"], + : [{ + <span class= +"hljs-string">"href": <span class= +"hljs-string">"https://example.com/on", + ... + }] + }, + "off": { + ... + : [{ + <span class= +"hljs-string">"href": <span class= +"hljs-string">"https://example.com/off", + ... + }] + } + }, + ... +} +6.3.5 +properties + +following +rules: +

  • +The +value +assigned +to +properties +in +a + + +When +the + + +Thing + +limit + + +instance + +query +parameter + +is +set +to + +a +Map +of +instances +of +PropertyAffordance +. +All +name-value +pairs +of +a +Map +of +PropertyAffordance +instances +MUST + be +serialized +as +members +of +the +JSON +object +that +results +from +serializing +the +Map +; + +positive +integer, + +the +name +of +a +pair + +server + + +MUST + +MAY + + + be +serialized +as + +respond +with + +a +JSON +string +and +the +value + +subset + +of +TDs +totalling +to +less +than +or +equal +to + +the +pair, +an +instance +of +PropertyAffordance +, +MUST +be +serialized +as +a +JSON +object. + +requested +number. + + +
  • +
  • +All +name-value +pairs +of +an +instance + + +When +there +are +more +TDs +after +a +returned +subset + +of +PropertyAffordance +, +where + +the +name +is +a +Vocabulary +Term +included +in +(one +of) + +collection, + +the +Signatures +of +PropertyAffordance +, +InteractionAffordance +, +or +DataSchema +, + +response + + +MUST + +be +serialized +as +members +of +the +JSON +object +that +results +from +serializing +the +PropertyAffordance +instance, +with +the +Vocabulary +Term +as +name. +See +6.3.10 +Data +Schemas +for +details +on +serializing + +contain +a + + +DataSchema + +next + + +Link +header +[ + + +RFC8288 + + +instances. + +The +value +assigned +to +forms +in +an +instance + + +] +with +the +URL + +of +the +next +subset. + +The + + +PropertyAffordance + +next + + +link + + +MUST + +be +serialized +as +a +JSON +array +containing +one +or +more +JSON +object +serializations +as +defined + +include +all +arguments +needed +to +produce +the +same +set +of +data +and +its +ordering, + +in +6.3.9 + +particular +the +same + + +forms + +limit + + +. +A +snippet +for +two +Property +affordances +is + +argument + +given +below: +Example +23 +: +Sample +of +Property +serializations +... +"properties": { + : { + : <span class= +"hljs-string">"boolean", + : [...] + }, + "status": { + : <span class= +"hljs-string">"object", + : { + : { + <span class= +"hljs-string">"type": <span class= +"hljs-string">"number", + <span class= +"hljs-string">"minimum": <span class= +"hljs-number">0.0, + <span class= +"hljs-string">"maximum": <span class= +"hljs-number">100.0 + }, + "rgb": { + <span class= +"hljs-string">"type": <span class= +"hljs-string">"array", + : { + <span class= +"hljs-string">"type": <span class= +"hljs-string">"number", + <span class= +"hljs-string">"minimum", + <span class= +"hljs-string">"maximum": <span class= +"hljs-number">255 + }, + "minItems": , + <span class= +"hljs-string">"maxItems" + } + }, + "required": [<span class= +"hljs-string">"brightness", <span class= +"hljs-string">"rgb"], + : [...] + } +}, +... +6.3.6 +actions +In +a +Thing +instance, + +on + +the +value +assigned +to +actions +is +a +Map +of +instances +of +ActionAffordance +. +All +name-value +pairs +of +a +Map +of +ActionAffordance +instances +MUST + be +serialized + +initial +request + +as +members +of +the +JSON +object +that +results +from +serializing +the +Map +; +the +name +of +a +pair +MUST + be +serialized + +well + +as +a +JSON +string +and + +zero-based + +offset + +argument +anchored +at + +the +value + +beginning + +of +the +pair, +an +instance +of +ActionAffordance +, + +next +subset. + +The +link + + +MUST + +be +serialized +as +a +JSON +object. + +absolute +or +relative +to +directory +API's +base +URL. + + +Moreover, +it +may +include +additional +arguments +that +are +necessary +for +ordering +or +session +management. +
  • + +All +name-value +pairs +of +an +instance +of +ActionAffordance +, +where +the +name +is +a +Vocabulary +Term +included +in +(one +of) +the +Signatures +of +ActionAffordance +or +InteractionAffordance +, + +paged +responses + + +MUST + +be +serialized +as +members +of +the +JSON +object +that +results +from +serializing +the + +contain +a + + +ActionAffordance + +canonical + + +instance, +with +the +Vocabulary +Term +as +name. + +Link +header +[ + + +RFC8288 + +The +values +assigned + + +] +pointing + +to +input + +the +collection + +and +include +an + + +output + +etag + + +in +an +instance + +parameter +to +represent +the +current +state + +of +the +collection. + +The +link +may +be +absolute +or +relative +to +directory +API's +base +URL. +The + + +ActionAffordance + +etag + + +MUST + +value +could + +be +serialized +as +JSON +objects. +They + +a +revision +number, +timestamp, +or +UUID +Version +4, +set +whenever +the +TD +collection +changes +in +a +way +that +affects +the +ordering +of +the +TDs. +The +clients +may + +rely +on +the +Class + + +DataSchema + +etag + + +, +whose +serialization +is +defined +in +6.3.10 +Data +Schemas +. +The + +value +assigned + +to +forms +in +an +instance + +know +whether +the +collection +remains +consistent +across +paginated +retrieval + +of +ActionAffordance + +the +collection. +For +example, +creation +or +deletion +of +TDs +or +update +of +TD +fields +used +for +ordering +may +make +shift +the +calculated +paging +window. +
  • +By +default, +the +collection + + +MUST + +be +serialized +as +a +JSON +array +containing +one +or +more +JSON +object +serializations +as +defined +in +6.3.9 +forms +. +A +TD +snippet +of +an +Action +affordance +is +given +below: +Example +24 +: +Sample + +sorted +using +UTF-8 +lexicographical +order +by +the +unique +identifier + +of +an +Action +serialization + +TDs. + + +... +"actions": { + : { + : <span class= +"hljs-string">"Fade in/out", + <span class= +"hljs-string">"description", + : { + : <span class= +"hljs-string">"object", + : { + : { + <span class= +"hljs-string">"type": <span class= +"hljs-string">"integer", + <span class= +"hljs-string">"minimum", + <span class= +"hljs-string">"maximum": <span class= +"hljs-number">100 + }, + "": { + <span class= +"hljs-string">"type": <span class= +"hljs-string">"integer", + <span class= +"hljs-string">"minimum", + <span class= +"hljs-string">"maximum": <span class= +"hljs-number">100 + }, + "duration": {<span class= +"hljs-string">"type": <span class= +"hljs-string">"number"} + }, + "required": [<span class= +"hljs-string">"to",<span class= +"hljs-string">"duration"] + }, + "output": {<span class= +"hljs-string">"type": <span class= +"hljs-string">"string"}, + "forms": [...] + } +}, +... +6.3.7 + + +The +server + +MAY + +support +sorting +by +other +TD +attributes +using +query +arguments: + + +events + +sort_by + + +In + +to +select + +a +field +(e.g. + + +Thing + +created + + +instance, +the +value +assigned +to + +) +and + + +events + +sort_order + + +is +a +map +of +instances +of + +to +choose +the +order +(i.e. + + +EventAffordance +. +All +name-value +pairs +of +a +Map +of + +asc + +or + + +EventAffordance + +desc + + +instances + +for +ascending +and +descending +ordering). + +A +server + + +MUST + + be +serialized +as +members +of +the +JSON +object + +reject +requests +to +sort +on +fields + +that +results +from +serializing +the +Map +; +the +name +of +a +pair +MUST + be +serialized +as +a +JSON +string +and +the +value +of +the +pair, +an +instance +of +EventAffordance +, +MUST +be +serialized +as + +do +not +have +values +that +are +orderable +basic +types, +with + +a +JSON +object. + +400 +(Bad +Request) +status. + + +All +name-value +pairs +of +an +instance +of +EventAffordance +, +where +the +name +is +a +Vocabulary +Term +included +in +(one +of) + + +If + +the +Signatures +of +EventAffordance +or +InteractionAffordance +, + +server +does +not +support +custom +sorting, +it + + +MUST + +be +serialized +as +members +of +the +JSON +object +that +results +from +serializing + +reject + +the +EventAffordance +instance, + +request + +with +the +Vocabulary +Term +as +name. + +501 +(Not +Implemented) +status. + + +The +values +assigned +to +subscription +, +data +, +and +cancellation +in +an +instance +of +EventAffordance + + +If +sorting +attributes +are +accepted, +they + + +MUST + +be +serialized +as +JSON +objects. +They +rely +on +the +Class +DataSchema +, +whose +serialization +is +defined +in +6.3.10 +Data +Schemas +. +The +value +assigned + +added +consistently + +to +all + + +forms +in +an +instance +of +EventAffordance + +next + + +links. + +Sorting +order + +MUST + +always + +be +serialized +as +a +JSON +array +containing +one +or +more +JSON +object +serializations +as + +defined +in +6.3.9 +forms +. +A +TD +snippet +of +an +Event +object +is +given +below: +Example +25 +: +Sample + +using +lexicographical +ordering +on +a +UTF-8 +encoding + +of +an +Event +serialization + +the +relevant +fields. + + +... +"events": { + : { + : { + : <span class= +"hljs-string">"string" + }, + "forms": [...] + } +}, +... + +
  • +
+

+Event +affordances +have +been +defined +in + +This +above +specification +follows + +a +flexible +manner, +in +order +to +adopt +existing +(e.g., +WebSub +[ +websub +]) +or +customer-oriented +event +mechanisms +(e.g., +Webhooks). +For +this +reason, +subscription +and +cancellation +can +be +defined +according +to +the +desired +mechanism. +Please +find +further +details +in + +subset +of +Linked +Data +Paging + +[ + +WOT-BINDING-TEMPLATES + + +LDP-Paging + + + +]. +Example +A.3 +Webhook +Event +Example +illustrates +how +Events +can +use +subscription +and +cancellation + +] + +to +describe +Webhooks. +6.3.8 +links +All +name-value +pairs +of +an +instance + +allow +optional +pagination + +of +Link +, +where +the +name +is +a +Vocabulary +Term +included +in + +the +Signature + +JSON-LD +array. +Additional +parts + +of +Link +, +MUST + +Linked +Data +Paging +may + +be +serialized +as +members +of +the +JSON +object +that +results +from +serializing +the +Link +instance, +with +the +Vocabulary +Term +as +name. +It +is +recommended +to +follow +the +link +relation +values +as +provided +in +Section +5.3.4.1 +Link +. +The + +implemented +for + +examples +provided +below +demonstrate +the +use +of +different + +to +honour +client's +query +preference +or +to +add +other + +link +relation +types. + +relations +for +semantic +annotation +and +alternative +navigation +links. + +

+

+A +reference +can +be +provided +that +points +to +a +Thing +(e.g., + +The +following +example +provides + +a +controller) +that +controls + +walk-through +of + +the +underlying +unit +(e.g., +a +lamp). +For +this +controlledBy +can +be +used: + +paginated +retrieval +of +TDs: + +

+ +

+In +such +a +case, + + +As +an +alternative +to +an +array +of +TDs +as + +the +URI +Template +variables + +body +of +the +response, +the +server + + +MUST + +MAY + + +send +a +more +verbose +payload +allowing +server-side +information, +such +as +pagination +information, +to + +be +collected +in +the +JSON-object +based +uriVariables +member +either +in +the +Thing +level +or + +included + +in +Interaction +Affordance +level +with + +addition +to + +the +associated +(unique) +variable +names +as +JSON +names. + +actual +data. + + +

+

+The +serialization +of +each +value +in +the +map +assigned +to +uriVariables +in +an +instance +of +Form +MUST +rely +on +the +Class +DataSchema +, +whose +serialization + +alternative +pagination +format + +is +defined +in +6.3.10 +Data +Schemas + +derived +from + +Hydra +Advanced +Concepts +, +more +concretely +the + +Partial +Collection +View + +. +A +TD +snippet + +Adapted +to +our +purposes +and + +using +a +URI +Template + +the + +members + +field +to +accomodate +the +array +of +TDs, +it +looks +as +follows + +for +query +parameters +and +uriVariables +in + +the +Interaction +Affordance +level +is +given +below: + +listing +endpoint: + +

+ +

+Alternatively, +as +defined +in +[ +RFC6570 +], + +To +tell +the +server +which +format +to +send, +the +additional +query +parameter + + +uriVariables + +?format=array|collection + + +can +be +used +for +replacing + +added +to + +the +request. + + +href + +?format=array + + +structure. +An +example +TD + +is +provided +below +where +a +valid +request +to +get + +the +forecast +of +Bogota, +Colombia +would +be +an +HTTP +GET +request + +default +parameter, +does +not +have + +to +http://example.org/weather/bogota +: +Example +32 +{ + : <span class= +"hljs-string">"http://www.w3.org/ns/td", + ... + : { + : { + ... + : { + : { + <span class= +"hljs-string">"type": <span class= +"hljs-string">"string", + <span class= +"hljs-string">"description": <span class= +"hljs-string">"City name to find the weather information for" + } + }, + : [{ + <span class= +"hljs-string">"href": <span class= +"hljs-string">"http://example.org/weather/{city}", + <span class= +"hljs-string">"htv:methodName": <span class= +"hljs-string">"GET" + }] + }, + ... + }, + ... +} +The +two +examples +below +can + +be +also +combined, +while +using + +provided +explicitly, +and +yields +to +a +server +response +of + +the +same + +pure +array +of +TDs. + + +uriVariables + +?format=collection + + +feature. +An +HTTP +GET +request + +should +yield + +to +http://example.org/weather/bogota/?unit=Celsius +can +be +described + +a +server +response +with +the +format + +as +follows: + +described +in + +Example + +33 + +8 + + +{ + : <span class= +"hljs-string">"http://www.w3.org/ns/td", + ... + : { + : { + ... + : { + : { + <span class= +"hljs-string">"type": <span class= +"hljs-string">"string", + <span class= +"hljs-string">"description": <span class= +"hljs-string">"City name to find the weather information for" + }, + : { + <span class= +"hljs-string">"type": <span class= +"hljs-string">"string", + <span class= +"hljs-string">"enum":[<span class= +"hljs-string">"Fahrenheit",<span class= +"hljs-string">"Celsius"], + <span class= +"hljs-string">"description": <span class= +"hljs-string">"Desired unit for the temperature value" + } + }, + : [{ + <span class= +"hljs-string">"href": <span class= +"hljs-string">"http://example.org/weather/{city}/{?unit}", + <span class= +"hljs-string">"htv:methodName": <span class= +"hljs-string">"GET" + }] + }, + ... + }, + ... +} + +. +

+

+uriVariables +are +mainly +for +properties +and +events. +When +retrofitting +an +existing +system, +it +may +be +necessary +to +use +uriVariables +for +actions. +In +general, +it + +The +listing +operation + +is +recommended +to +avoid + +specified +as + + +uriVariables + +things + + +as +much +as +possible +when +a +new +WoT-based +system +is +designed. + +property +in + +7.3.2.4 + +API +Specification +(Thing +Model) +. +

+
+
+
+
+ +6.3.9.2 + +7.3.2.1.6 + + +contentType + +Validation +
+ +
+

+ +The +contentType +member + +syntactic +validation +of +TD +objects +before +storage + +is +used + + +RECOMMENDED + +to +assign +a +media +type + +prevent +common +erroneous +submissions. + +The +server + +SHOULD + +use +at +least + +Minimal +Validation + +as +defined +in + +[ + +RFC2046 + + +wot-thing-description11 + + + +] +to +validate +TDs, + +including +media +type +parameters +as +attribute-value +pairs +separated +by +a +; +character. +Example: +Example +34 +... +: <span class= +"hljs-string">"text/plain; charset=utf-8", +... +6.3.9.3 +response +In +some + +use +cases, +the +form +metadata + +of +the +Interaction +Affordance + + +WoT +Thing +Description +(1.0) +JSON +Schema + + +not +only +describes +the +request, +but +also +provides +metadata +for + +or + +WoT +Thing +Description +1.1 +JSON +Schema +, +and + +the +expected +response. +For +instance, +an +Action +takePhoto +defines +an +input + +JSON + +schema +to +submit +parameter +settings +of +a +camera +(aperture +priority, +timer, +etc.) +using + +defined +in + +A. + +JSON +Schema +for +WoT +Discovery +TD-extensions + +for + +Enriched +TDs +, +as +appropriate +based +on + +the +request +payload +(i.e., +"contentType": +"application/json" +). +The +output + +value + +of +this +action +is +the +photo +taken, +which +is +available +in +JPEG +format, +for +example. +In +such +cases, + +the + +response +member +is +used + +@context +.

+Additional +forms +of +validation +can +be +added + +to +indicate +the +representation +format + +support +various +use +cases. +For +example, +a +use +case +may +require +stateful +validation + +of +the +response +payload +(e.g., +"contentType": +"image/jpeg" +). +Here +no + +input +TDs +to +ensure +that +the + + +output + +version + + +schema + +value + +is +required, +as +the +content +type +fully +specifies +the +representation +format. + +initialized +and +updated +according +to +pre-defined +rules. + +

+

+ +If +present, + +the +value +assigned + +server +fails + +to +response +in +an +instance +of +Form +MUST +be +a +JSON +object. +If +present, + +validate + +the +response +object + +TD +object, +it + + +MUST + +contain +a +contentType +member +as +defined +in + +inform + +the +Class +definition +of +ExpectedResponse +. +A +form +snippet + +client + +with +necessary +details +to +identify +and +resolve + +the +response +member +is +shown +below +based +on +the +takePhoto +Action + +errors. + +The +validation +error + +MUST + +be + +described +above: +Example +35 +{ + ... + "actions": { + : { + ... + : [{ + : <span class= +"hljs-string">"invokeaction", + <span class= +"hljs-string">"href": <span class= +"hljs-string">"http://camera.example.com/api/snapshot", + <span class= +"hljs-string">"contentType": <span class= +"hljs-string">"application/json", + : { + <span class= +"hljs-string">"contentType": <span class= +"hljs-string">"image/jpeg" + } + }] + } + }, + ... +} +6.3.9.4 +contentMediaType +and +contentEncoding + +as +Problem +Details +[ + + +RFC7807 + + +In +some +cases +binary +data +is +embedded +in +text-based +values, +e.g., +a +JSON +string-based +value +embeds +a +base64 +encoded +image. +The +terms +contentMediaType +and + + +] +with +an +extension +field +called + + +contentEncoding +can +be +used + +validationErrors +, +set + +to +clarify +the +context +and +encoding +format +of +such +name-value +pairs. +A +sample +usage + +an +array + +of +objects +with + + +contentMediaType + +field + + +and + +contentEncoding +is +shown +below: +Example +36 +{ + ... + "properties": { + : { + <span class= +"hljs-string">"description": <span class= +"hljs-string">"Provides latest image", + <span class= +"hljs-string">"type": <span class= +"hljs-string">"string", + <span class= +"hljs-string">"contentMediaType": <span class= +"hljs-string">"image/png", + <span class= +"hljs-string">"contentEncoding": <span class= +"hljs-string">"base64", + : [{ + <span class= +"hljs-string">"op": <span class= +"hljs-string">"readproperty", + <span class= +"hljs-string">"href": <span class= +"hljs-string">"coaps://mylamp.example.com/lastPicture", + <span class= +"hljs-string">"cov:methodName": <span class= +"hljs-string">"GET", + <span class= +"hljs-string">"contentType": <span class= +"hljs-string">"application/json" + }] + } + }, + ... +} +6.3.9.5 +Top +level +forms +When +forms + +description + + +fields. + +This + +is +present +at +the +top +level, +it +can +be +used + +necessary + +to +describe +meta +interactions +offered +by +a +Thing +. +For +example, +the +operation +types +readallproperties +and +writeallproperties +are +for +meta +interactions +with +a +Thing +by +which +Consumers +can +read, +write +or +observe +all +properties +at +once. +In + +represent + +the +example +below, + +error +in + +a +forms +member +is +included + +machine-readable +way. + +All +validation +error +responses +described +using +Problem +Details + +MUST + +be +encoded +using +UTF-8. + +Validation +error +responses + +MAY + +report +details + +in +different +languages +using +proactive +negotiation, +if + +the +TD +root +object +and +the +Consumer +can +use +the +submission +target + + +https://mylamp.example.com/properties +both +to +read +or +write +all +Properties +(i.e., +on +, +brightness +, +and +timer + +Accept-Language + + +) +of + +header +field +has +been +set +in + +the +Thing + +HTTP +request +[ + +RFC7231 + + +in +a +single +protocol +transaction. + + +]. + +

+

+ +Example + +37 + +9 + + + +{ + ... + "properties": { + : { + : <span class= +"hljs-string">"boolean", + : [...] + }, + "brightness": { + : <span class= +"hljs-string">"number", + : [...] + }, + "timer": { + : <span class= +"hljs-string">"integer", + : [...] + } + }, + ... + "forms": [{ + : <span class= +"hljs-string">"readallproperties", + : <span class= +"hljs-string">"https://mylamp.example.com/properties", + <span class= +"hljs-string">"contentType", + <span class= +"hljs-string">"htv:methodName": <span class= +"hljs-string">"GET" + }, + { + "op": <span class= +"hljs-string">"writeallproperties", + : <span class= +"hljs-string">"https://mylamp.example.com/properties", + <span class= +"hljs-string">"contentType", + <span class= +"hljs-string">"htv:methodName": <span class= +"hljs-string">"PUT" + }] +} +Thing-level +uriVariables +can +be +used +here +to +supply +further +variables +to +the +operation +or +to +specify +a +list +of +Property +Affordance +names +for +a +readmultipleproperties +operation. +In +the + +is +an + +example +below, +the +unit +for +the +properties +can +be +set +via +such +a +variable +and +the +desired +list +of +properties +can +be +set: + +error +response +with +two +validation +errors. + +

+ +
+
+ + +Issue +99 +: +Define +requirements +and +add +section +for +validation + +
+For + +

+How +much +validation +does + +a +readmultipleproperties +operation, +an +example +HTTP +GET +request + +directory +need + +to +the +URI +https://mylamp.example.com/properties?propertyNames=humidity,temperature&unitSystem=metric +would +return +the +values +humidity +and +temperature +Property +Affordances, +with +the +metric +System +of +Measurement. + +do? + +

+In +the +case +of +operation +type +writeallproperties +, +it +is +expected +that +the +Consumer +provides +all +writable +(non +readOnly +) +properties +and +the +(new) +assigned +values +(e.g., +within +payload). +Similarly, +for +the +writemultipleproperties +operation +type, + +
    +
  1. +If + +it +only +supports +syntactic +queries, + +is +expected +that +the +Consumer +provides +writable +(non +readOnly +) +properties. +On +the +Thing +side, +Thing +is +expected + +JSONSchema +validation +sufficient? +Do +we +also +use +SHACL? +
  2. +If +we +support +SPARQL, +do +we +need + +to +return +readable +(non +writeOnly +) +properties +in + +do +more +to +make +sure + +the +case + +ontologies +used +are +correct? +
  3. +Is +there +a +subset + +of +readmultipleproperties +and +readallproperties +operation +types. + +TD +assertions +we +should +check? +
+
+
+
+
+
+ +6.3.10 + +7.3.2.2 + + +Data +Schemas + +Events +API +
+ +
+

+The +data +schemas +of + +Notification +API +is +to +notify +clients +about + +the +WoT +Thing +Description +defined +through + +changes +to + +TDs + +maintained +within + +the +directory. + +Directories + +MAY + +implement +the +Notification +API. + +DataSchema + +

+

+Class +are +based +on +a +subset +of + + +The +Notification +API + +MUST + +follow + +the +JSON +Schema +terms + +Server-Sent +Events +(SSE) + +[ + +JSON-SCHEMA + + +EVENTSOURCE + + + +]. +Thus, +serializations +of +the +TD +data +schemas +can +be +fed +directly +into +JSON +Schema +validator +implementations + +] +specifications + +to +validate +the +data +exchanged +with +Things +. +Data +schema +serialization +applies + +serve +events + +to +clients +at + + +PropertyAffordance + +/events + + +instances, + +endpoint. + +In +particular, + +the +values +assigned + +server +responds + +to +input + +successful +requests +with +200 +(OK) +status + +and + +output + +text/event-stream + + +in + +Content +Type. +Re-connecting +clients +may +continue +from +the +last +event +by +providing +the +last +event +ID +as + + +ActionAffordance + +Last-Event-ID + + +instances, + +header +value. + +The +server + +SHOULD + +provide +an +event +ID +as + +the +values +assigned +to + + +subscription +, +data +, +and +cancellation + +id + + +field + +in +EventAffordance +instances, + +each +event + +and +the +value +assigned + +respond + +to +uriVariables +in +instances +of +Subclasses +of +InteractionAffordance +(when +a +form +object +uses +a +URI +Template). + +re-connecting +clients +by +delivering +all +missed +events. + +

+

+All +name-value +pairs +of +an +instance +of +one + +The +rest + +of +this +section +describes + +the +Subclasses + +implementation +details +on +top + +of +DataSchema +, +where + +the +name +is +a +Vocabulary +Term +included +in + +SSE +protocol. +Realizing + +the +Signature +of +that +Subclass +or + +notification +functionality +using +other +protocols +such +as +MQTT +are +possible +and +may +be +formalized + +in +the +Signature + +future +versions + +of +DataSchema +, + +this +specification. +

+Event +Types +
+The +server + +MUST + +be +serialized +as +members + +produce +events +attributed +to +the +lifecycle + +of +the +JSON +object +that +results +from +serializing + +Thing +Descriptions +within + +the +directory +using + + +DataSchema + +thing_created +, +thing_updated +, +and + +thing_deleted + + +Subclass +'s +instance, +with +the +Vocabulary +Term +as +name. + +event +types. + + +
+
+Event +Filtering +
+The +API +enables +server-side +filtering +of +events +to +reduce +resource +consumption +by +delivering +only +the +events +required +by +clients. +Client +libraries +may +offer +additional +filtering +capabilities +on +the +client-side. + +

+ +The +value +assigned +to +properties +in +an +instance +of +ObjectSchema + +server + +MUST + +be +serialized +as +a +JSON +object. + +support +event +filtering +based +on +the +event +type +given +by +the +client +upon +subscription. + + +

+

+The +values +assigned +to +enum +, + +For +example, +given +the +URI +Template + + +required +, +and + +/events{/type} +:

  • + +oneOf + +/events/thing_created + + +in +an +instance + +instructs +the +server +to +only +deliver +events + +of +type + + +DataSchema + +thing_created + + +MUST +be +serialized +as +a +JSON +array. + +
  • +
  • +The +value +assigned +to + + +items +in +an +instance +of +ArraySchema + +/events + + +MUST +be +serialized +as +a +JSON +object +or +a +JSON +array +containing +JSON +objects. +A +TD +snippet +data +schema +members +is +given +below. +Note +that + +instructs + +the +surrounding +object +may +be + +server +to +deliver +all +events +

+The +clients +need +to +subscribe +separately +to +receive + +a +data +schema +object +(e.g., +for + +subset +of +the +events +(e.g. +only + + +input + +thing_created + + +and + +output + +thing_deleted + + +) +or + +from +the +server. +When +using +HTTP/2, +multiple +subscriptions +on +the +same +domain +(HTTP +streams) +get +multiplexed +on + +a +Property +object, +which +would +contain +additional +members. + +single +connection. + +

+Example +39 + +
+
+Event +Data +

+: +Sample +of +a +DataSchema + + +The +event +data + +MUST + +contain +the +JSON + +serialization +of +the +event +object. + + +... +"type": , +: { + : { + : <span class= +"hljs-string">"Status", + : <span class= +"hljs-string">"string", + : [<span class= +"hljs-string">"On", <span class= +"hljs-string">"Off", <span class= +"hljs-string">"Error"] + }, + "brightness": { + : <span class= +"hljs-string">"Brightness value", + : <span class= +"hljs-string">"number", + : <span class= +"hljs-number">0.0, + : <span class= +"hljs-number">100.0 + }, + "rgb": { + : <span class= +"hljs-string">"RGB color value", + : <span class= +"hljs-string">"array", + : { + : <span class= +"hljs-string">"number", + <span class= +"hljs-string">"minimum", + <span class= +"hljs-string">"maximum" + }, + "minItems": , + : <span class= +"hljs-number">3 + } +}, +... + +The +terms +readOnly +and +writeOnly +can +be +used +to +signal +which + +event + +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 + +object +is + +a +workaround +when +Properties +of +an +unconventional +Thing + + +Partial +TD + + +exhibit +different +data +for +reading +and +writing, +which +can +be +the +case +when +augmenting +an +existing +device + +or +service +with +a +Thing +Description. + +the +whole + +TD + +object +depending +on +the +request: + +

+
    +
  • +

    +A +TD +snippet +with + + +The +event +data +object + +MUST + +at +least +include + +the +usage + +identifier + +of +readOnly +and +writeOnly +is +given +below: + +the +TD +created, +updated, +or +deleted +at +that +event +in + +Partial +TD + +form. + +

    + +
  • +
  • +

    + +When +the + + +status + +diff + + +Property +is +read, +the +status +data + +query +parameter + +is +returned +using +a +latestStatus +member +in +the +payload. +To +update +the + +set +to + + +status + +true + + +Property, + +and + +the +new +value +must +be +provided +through +a + +event +has + + +newStatusValue + +thing_created + + +member +in + +type, + +the +payload. +As +an +additional +feature, +a +Thing +Description +instance +allows + +server + +MAY + +return + +the +usage +of +a +unit +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-known +Vocabularies +. +See +7. + +whole + +TD +Context +Extensions +for +an +example. +6.4 +Identification +The +JSON-based +serialization +of +Thing +Descriptions +is +identified +by +the +media +type +application/td+json +or +the +CoAP +Content-Format +ID +432 +(see + +object +as +event +data. + +12. +IANA +Considerations +). + +

    + +
  • +
  • +

    +This +section + + +When + +diff + +query +parameter + +is +non-normative. +In +addition + +set + +to + +true + +and + +the +standard +Vocabulary +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 + +event +has + +thing_updated + +type, + +the +Thing +Description +instances +with +additional +(e.g., +domain-specific) +semantics. +It +can +also +be +used +to +import +additional +Protocol +Bindings +or +new +security +schemes +in + +server + +MAY + +inform + +the +future. +For +such +TD +Context +Extensions +, + +client +about + +the +Thing +Descriptions +use + +updated +parts +following + +the +JSON +Merge +Patch +[ + +RFC7396 + +] +format. + +A + + +@context + +thing_updated + + +mechanism +known +from +JSON-LD + +event +data +that +is +based +on +JSON +Merge +Patch + +[ + +json-ld11 + + +RFC7396 + + + +]. +When +using +TD +Context +Extensions +, + +] + +MUST + +always +include + +the +value +of +@context + +identifier + +of +the +Class +Thing +is +an +Array +with +additional +elements + +TD +regardless + +of +type +anyURI +identifying +JSON-LD +context +files +or +Map +containing +namespace +IRIs +as +defined +in +5.3.1.1 +Thing + +whether +it +is +changed. + +. + +

    +

    +The +serialization +rules +for +complex +types +in +6.1 +Mapping +to +JSON +Types +define + +following +example +shows + +the +serialization + +event +triggered +on +update + +of +an +extended +@context +name-value +pair. +A +snippet +with + +the + +TD +Context +Extensions +is +given +below: + +from + +Example + +11 +: +

    + +
  • +
  • +

    +TD +Context +Extensions +allow + + +The + +diff + +query +parameter + +MUST + +be +ignored + +for + +thing_deleted + +events. + +In +other +words, + +the +use +of + +server +shall +not +include + +additional +Vocabulary +Terms + +properties + +in +a +Thing +Description +instance. +If +the +included +namespaces +are +based +on +Class +definitions +such +as +those +provided +by + +the +RDF +Schema +or +OWL, +they +can +be +used +to +annotate +any +Class +instance + +payload + +of +a +Thing +Description +semantically +by +associating +the +instance +to +a +such +an +external +Class +definition. +This +is +done +by +assigning +a +Class +name +to +the + + +@type + +thing_deleted + + +name-value +pair +or +including +Class +name +in +its +Array +value +for +multiple +associations/annotations. +Following +the +serialization +rules +in +6.1 +Mapping +to +JSON +Types +, + +events +when + + +@type + +diff + + +is +either +serialized +as +a +JSON +string +or +as + +set +to + +true +.

  • +When + +a +JSON +array. + +server +which +does +not +support +the + + +@type + +diff + + +query +parameter + +is +requested +with +such +query +parameter, +it + +MUST + +reject + +the +JSON-LD +keyword +[ +json-ld11 +] +used + +request +with +501 +(Not +Implemented) +status. + +This +is + +to +set +the +type +of +a +node. +TD +Context +Extensions +also +allow +the +inclusion +of +additional +name-value +pairs +and +well-defined +values +within +any +Class +instance +of +a +Thing +Description. +These +pairs +and +values +are +defined +through + +inform + +the +included +Vocabulary +Terms +and +are +serialized +as +additional +members +in + +clients +about + +the +corresponding +JSON +objects +or +values + +lack + +of +existing +members, +respectively. +Examples +are +additional +version +metadata +for + +such +functionality +at + +the +Thing +or +units +of +measure +for + +connection +time +to +avoid +runtime +exceptions +caused +by +missing +event + +data +items. + +attributes. + +

    +
  • +
+
+
+

+The +next +subsections +show +some +sample +usage +of +different +kind +of +ontologies + +Notification +API +is +specified +as +three +event +affordances + +in +Thing +Descriptions. + + + +7.1.1 + +7.3.2.4 + + +Example +I: +Additional +Basic +Metadata +The +sample +TD +snippet +below +provides +additional +metadata +terms +from +different +external +context +files +as +provided +in + +API +Specification +(Thing +Model) +, +namely: + + +@context +. +The +version +information +container +is +extended +by +adding +additional +version +information +about +the +used +software +( + +thingCreated +, + +s:softwareVersion +). +schema.org +is +used +for +providing +serial +number + +thingUpdated +, +and +organisation +information +such +as +the +company +name +of +the +Thing +. +The +SAREF +ontology +is +used +to +provide +a +semantic +context +of +the +Thing +( + + +saref:TemperatureSensor +), +and +for +the +unit +assignment +for +the +temperature +property +the +Ontology +of +Units +of +Measure +(OM) +is +used. + +thingDeleted +. +

+
+
+ +Note + +Editor's +note +: +SSE +Authorization +Header + + +
+

+Please +note +that +these +Vocabularies + +Some +early +SSE +implementations +(including +HTML5 +EventSource) +do +not +allow +setting +custom +headers +in +the +initial +HTTP +request. +Authorization +header +is +required +in +few +OAuth2 +flows + +and +ontologies +are +used + +passing +it + +as +examples. +Others +can +be +used +based +on +application +domain + +a +query +parameter +is + +not +advised +. +There +are +polyfills +for +browsers + +and +use +case. + +modern +libraries +which +allow +setting +Authorization +header. + +

+
+
+
+
+
+ +8.3.1 + +7.3.2.4 + + +Protocol +Binding +based +on +HTTP + +API +Specification +(Thing +Model) +
+ +
+

+Per +default + +A +template +for + +the +API +of + +Thing +Description +supports +the +Protocol +Binding +based +on +HTTP +by +including +the +HTTP +RDF +vocabulary +definitions +from +HTTP +Vocabulary +in +RDF +1.0 +[ +HTTP-in-RDF10 +]. +This +vocabulary +can + +Directories +is +given +here +as +a + +Thing +Model +. +The +Thing +Model +is +normative +(except +where +noted) +but +should +not + +be +directly +used +within +TD +instances +by +the +usage +of + +considered +as + +the +prefix +htv +, +which +points + +sole +reference + +to +http://www.w3.org/2011/http# +. +Further +details +of +Protocol +Binding +based +on +HTTP +can +be +found +in +[ +WOT-BINDING-TEMPLATES +]. +To + +implement +or + +interact +with +a +Thing +that +implements +the +Protocol +Binding +based +on +HTTP, +a +Consumer +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, +the +Protocol +Binding +based +on +HTTP +defines +Default +Values +for +the +operation +types +listed +below, +which + +Directory. +Please +refer + +also +aims +at +convergence +of +the +methods +expected +by +Things +(e.g., +GET +to +read, +PUT + +to +write). +When +no +method +is +indicated +in +a +form +representing +an +Protocol +Binding +based +on +HTTP, +a +Default +Value +MUST +be +assumed +as +shown +in + +the +following +table. + +specifications +given +in + + +7.3.2 + +Directory +Service +API +. +

+Vocabulary +term +Default +value +Context +htv:methodName +GET +Form +with +operation +type +readproperty +, +readallproperties +, +readmultipleproperties +htv:methodName +PUT +Form +with +operation +type +writeproperty +, +writeallproperties +, +writemultipleproperties +htv:methodName +POST + +

+The + + +Form + +searchJSONPath + + +with +operation +type + +and + + +invokeaction + +searchXPath + + +For +example, +the +Example +1 + +affordances +given + +in +1. +Introduction +does + +this +Thing +Model +are + +not +contain +operation +types + +normative + +and +HTTP +methods +in +the +forms. +The +following +Default +Values +should +be +assumed + +are +provided + +for +the +forms +in +the +Example +1 +: + +information +only. + +

+Example +49 +with +default +values +for +Protocol +Binding +based +on +HTTP +{ + : <span class= +"hljs-string">"https://www.w3.org/2022/wot/td/v1.1", + : <span class= +"hljs-string">"urn:dev:ops:32473-WoTLamp-1234", + +
{
+    "@context": [
+        "http://www.w3.org/ns/td",
+        "hljs-string">"https://w3c.github.io/wot-discovery/context/discovery-context.jsonld"
+    ],
+    "@type": [        "tm:ThingModel",        "ThingDirectory"
+    ],
+
+    "title": "hljs-string">"MyLampThing",
+    : {
+        : {
+            : <span class=
+"hljs-string">"basic",
+            : <span class=
+"hljs-string">"header"
+        }
+
+"hljs-string">"Thing Description Directory (TDD) Thing Model",
+    "version": {        "model": 
+"hljs-string">"1.0.0-beta.2"
+
+    },
+    : [
+        
+
+    "base": "hljs-string">"{{DIRECTORY_BASE_URL}}",
+    "tm:required": [        "#/properties/things"
+    ],
+    "properties": {
+        : {
+            : <span class=
+
+        "things": {
+            "hljs-attr">"description": "Retrieve all Thing Descriptions",
+            "uriVariables": {                "offset": {                    
+"hljs-attr">"title": "Number of TDs to skip before the page",
+                    
+"hljs-attr">"type": "number",
+                    
+"hljs-attr">"default": 0
+                },
+                "limit": {                    
+"hljs-attr">"title": "Number of TDs in a page",
+                    
+"hljs-attr">"type": "number"
+                },
+                "format": {                    
+"hljs-attr">"title": "Payload format",
+                    
+"hljs-attr">"type": 
+"hljs-string">"string",
+            : <span class=
+"hljs-literal">true,
+
+                    "enum": [
+                        "array",
+                        "hljs-string">"collection"
+                    ],
+                    
+"hljs-attr">"default": "array"
+                },
+                "sort_by": {                    
+"hljs-attr">"title": "Comparator TD attribute for collection sorting",
+                    
+"hljs-attr">"type": "string",
+                    
+"hljs-attr">"default": "id"
+                },
+                "sort_order": {                    
+"hljs-attr">"title": "Sorting order",
+                    
+"hljs-attr">"type": "string",
+                    "enum": [                        "asc",                        "desc"
+                    ],
+                    
+"hljs-attr">"default": "asc"
+                }
+            },
+
+            "forms": [
+                {
+                    "hljs-attr">"op": <span class=
+"hljs-string">"readproperty",
+                    <span class=
+
+"hljs-attr">"href": "hljs-string">"https://mylamp.example.com/status"
+
+"hljs-string">"/things{?offset,limit,format,sort_by,sort_order}",
+                    
+"hljs-attr">"htv:methodName": "GET",
+                    "response": {                        
+"hljs-attr">"description": "Success response",
+                        
+"hljs-attr">"htv:statusCodeValue": 200,
+                        
+"hljs-attr">"contentType": "application/ld+json",
+                        
+"hljs-attr">"htv:headers": [
+                            {
+                                
+"hljs-attr">"htv:fieldName": "Link"
+                            }
+                        ]
+                    },
+                    
+"hljs-attr">"additionalResponses": [
+                        {
+                            
+"hljs-attr">"description": "Invalid query arguments",
+                            
+"hljs-attr">"contentType": "application/problem+json",
+                            
+"hljs-attr">"htv:statusCodeValue": 400
+                        }
+                    ]
+
+                }
+            ]
+        }
+    },
+    "actions": {
+        : {
+
+        "createThing": {
+            "hljs-attr">"description": "Create a Thing Description",
+            "uriVariables": {                "id": {                    
+"hljs-attr">"@type": "ThingID",
+                    
+"hljs-attr">"title": "Thing Description ID",
+                    
+"hljs-attr">"type": "string",
+                    
+"hljs-attr">"format": "iri-reference"
+                }
+            },
+            "input": {                
+"hljs-attr">"description": "The schema is implied by the content type",
+                "type": 
+"hljs-string">"object"
+            },
+
+            "forms": [
+                {
+                    "href": "hljs-string">"https://mylamp.example.com/toggle"
+
+"hljs-string">"/things/{id}",
+                    
+"hljs-attr">"htv:methodName": "PUT",
+                    
+"hljs-attr">"contentType": "application/td+json",
+                    "response": {                        
+"hljs-attr">"description": "Success response",
+                        
+"hljs-attr">"htv:statusCodeValue": 201
+                    },
+                    
+"hljs-attr">"additionalResponses": [
+                        {
+                            
+"hljs-attr">"description": "Invalid serialization or TD",
+                            
+"hljs-attr">"contentType": "application/problem+json",
+                            
+"hljs-attr">"htv:statusCodeValue": 400
+                        }
+                    ]
+
+                }
+            ]
+        }
+    },
+    : {
+        : {
+            : {
+
+        },
+        "createAnonymousThing": {            
+"hljs-attr">"description": "Create an anonymous Thing Description",
+            "input": {                
+"hljs-attr">"description": "The schema is implied by the content type",
+
+                "type": "hljs-string">"string"
+
+"hljs-string">"object"
+
+            },
+            "forms": [
+                {
+                    "href": "hljs-string">"https://mylamp.example.com/oh",
+
+"hljs-string">"/things",
+
+                    "hljs-attr">"subprotocol": <span class=
+"hljs-string">"longpoll"
+
+"hljs-attr">"htv:methodName": "POST",
+                    
+"hljs-attr">"contentType": "application/td+json",
+                    "response": {                        
+"hljs-attr">"description": "Success response including the system-generated URI",
+                        
+"hljs-attr">"htv:headers": [
+                            {
+                                
+"hljs-attr">"description": "System-generated URI",
+                                
+"hljs-attr">"htv:fieldName": "Location"
+                            }
+                        ],
+                        
+"hljs-attr">"htv:statusCodeValue": 201
+                    },
+                    
+"hljs-attr">"additionalResponses": [
+                        {
+                            
+"hljs-attr">"description": "Invalid serialization or TD",
+                            
+"hljs-attr">"contentType": "application/problem+json",
+                            
+"hljs-attr">"htv:statusCodeValue": 400
+                        }
+                    ]
+
+                }
+            ]
+        }
+    }
+}
+{
+    : <span class=
+"hljs-string">"https://www.w3.org/2022/wot/td/v1.1",
+    : <span class=
+"hljs-string">"urn:dev:ops:32473-WoTLamp-1234",
+    : <span class=
+"hljs-string">"MyLampThing",
+    : {
+        : {
+            : <span class=
+"hljs-string">"basic",
+            : <span class=
+"hljs-string">"header"
+        }
+    },
+    : [
+        
+    ],
+    : {
+        : {
+            : <span class=
+
+        },
+        "retrieveThing": {            
+"hljs-attr">"description": "Retrieve a Thing Description",
+            "uriVariables": {                "id": {                    
+"hljs-attr">"@type": "ThingID",
+                    
+"hljs-attr">"title": "Thing Description ID",
+                    
+"hljs-attr">"type": 
+"hljs-string">"string",
+            : <span class=
+
+                    "hljs-attr">"format": "iri-reference"
+                }
+            },
+            "output": {                
+"hljs-attr">"description": "The schema is implied by the content type",
+                "type": 
+"hljs-string">"object"
+            },
+            "safe": 
+"hljs-literal">true,
+            
+"hljs-attr">"idempotent": 
+"hljs-literal">true,
+            "forms": [
+                {
+                    "hljs-attr">"op": <span class=
+"hljs-string">"readproperty",
+
+"hljs-attr">"href": "/things/{id}",
+                    
+"hljs-attr">"htv:methodName": "GET",
+                    "response": {                        
+"hljs-attr">"description": "Success response",
+                        
+"hljs-attr">"htv:statusCodeValue": 200,
+                        
+"hljs-attr">"contentType": "application/td+json"
+                    },
+                    
+"hljs-attr">"additionalResponses": [
+                        {
+                            
+"hljs-attr">"description": "TD with the given id not found",
+                            
+"hljs-attr">"contentType": "application/problem+json",
+                            
+"hljs-attr">"htv:statusCodeValue": 404
+                        }
+                    ]
+                }
+            ]
+        },
+        "updateThing": {            
+"hljs-attr">"description": "Update a Thing Description",
+            "uriVariables": {                "id": {                    
+"hljs-attr">"@type": "ThingID",
+                    
+"hljs-attr">"title": "Thing Description ID",
+                    
+"hljs-attr">"type": "string",
+                    
+"hljs-attr">"format": "iri-reference"
+                }
+            },
+            "input": {                
+"hljs-attr">"description": "The schema is implied by the content type",
+                "type": 
+"hljs-string">"object"
+            },
+            "forms": [
+                {
+
+                    "href": "hljs-string">"https://mylamp.example.com/status",
+
+"hljs-string">"/things/{id}",
+
+                    "htv:methodName": "hljs-string">"GET"
+
+"hljs-string">"PUT",
+                    
+"hljs-attr">"contentType": "application/td+json",
+                    "response": {                        
+"hljs-attr">"description": "Success response",
+                        
+"hljs-attr">"htv:statusCodeValue": 204
+                    },
+                    
+"hljs-attr">"additionalResponses": [
+                        {
+                            
+"hljs-attr">"description": "Invalid serialization or TD",
+                            
+"hljs-attr">"contentType": "application/problem+json",
+                            
+"hljs-attr">"htv:statusCodeValue": 400
+                        }
+                    ]
+
+                }
+            ]
+        }
+    },
+    : {
+        : {
+
+        },
+        "partiallyUpdateThing": {            
+"hljs-attr">"description": "Partially update a Thing Description",
+            "uriVariables": {                "id": {                    
+"hljs-attr">"@type": "ThingID",
+                    
+"hljs-attr">"title": "Thing Description ID",
+                    
+"hljs-attr">"type": "string",
+                    
+"hljs-attr">"format": "iri-reference"
+                }
+            },
+            "input": {                
+"hljs-attr">"description": "The schema is implied by the content type",
+                "type": 
+"hljs-string">"object"
+            },
+
+            "forms": [
+                {
+                    "hljs-attr">"op": <span class=
+"hljs-string">"invokeaction",
+
+"hljs-attr">"href": "/things/{id}",
+                    
+"hljs-attr">"htv:methodName": "PATCH",
+                    
+"hljs-attr">"contentType": "application/merge-patch+json",
+                    "response": {                        
+"hljs-attr">"description": "Success response",
+                        
+"hljs-attr">"htv:statusCodeValue": 204
+                    },
+                    
+"hljs-attr">"additionalResponses": [
+                        {
+                            
+"hljs-attr">"description": "Invalid serialization or TD",
+                            
+"hljs-attr">"contentType": "application/problem+json",
+                            
+"hljs-attr">"htv:statusCodeValue": 400
+                        },
+                        {
+                            
+"hljs-attr">"description": "TD with the given id not found",
+                            
+"hljs-attr">"contentType": "application/problem+json",
+                            
+"hljs-attr">"htv:statusCodeValue": 404
+                        }
+                    ]
+                }
+            ]
+        },
+        "deleteThing": {            
+"hljs-attr">"description": "Delete a Thing Description",
+            "uriVariables": {                "id": {                    
+"hljs-attr">"@type": "ThingID",
+                    
+"hljs-attr">"title": "Thing Description ID",
+                    
+"hljs-attr">"type": "string",
+                    
+"hljs-attr">"format": "iri-reference"
+                }
+            },
+            "forms": [
+                {
+
+                    "href": "hljs-string">"https://mylamp.example.com/toggle",
+
+"hljs-string">"/things/{id}",
+
+                    "htv:methodName": "hljs-string">"POST"
+
+"hljs-string">"DELETE",
+                    "response": {                        
+"hljs-attr">"description": "Success response",
+                        
+"hljs-attr">"htv:statusCodeValue": 204
+                    },
+                    
+"hljs-attr">"additionalResponses": [
+                        {
+                            
+"hljs-attr">"description": "TD with the given id not found",
+                            
+"hljs-attr">"contentType": "application/problem+json",
+                            
+"hljs-attr">"htv:statusCodeValue": 404
+                        }
+                    ]
+
+                }
+            ]
+        }
+    },
+    : {
+        : {
+            : {
+
+        },
+        "searchJSONPath": {            
+"hljs-attr">"description": "JSONPath syntactic search.  This affordance is not normative and is provided for information only.",
+            "uriVariables": {                "query": {                    
+"hljs-attr">"title": "A valid JSONPath expression",
+                    
+"hljs-attr">"type": "string"
+                }
+            },
+            "output": {                
+"hljs-attr">"description": "The schema depends on the given query",
+
+                "type": "hljs-string">"object"
+            },
+            "safe": 
+"hljs-literal">true,
+            
+"hljs-attr">"idempotent": true,
+            "forms": [
+                {
+                    
+"hljs-attr">"href": "/search/jsonpath?query={query}",
+                    
+"hljs-attr">"htv:methodName": "GET",
+                    "response": {                        
+"hljs-attr">"description": "Success response",
+                        
+"hljs-attr">"contentType": "application/json",
+                        
+"hljs-attr">"htv:statusCodeValue": 200
+                    },
+                    
+"hljs-attr">"additionalResponses": [
+                        {
+                            
+"hljs-attr">"description": "JSONPath expression not provided or contains syntax errors",
+                            
+"hljs-attr">"contentType": "application/problem+json",
+                            
+"hljs-attr">"htv:statusCodeValue": 400
+                        }
+                    ]
+                }
+            ]
+        },
+        "searchXPath": {            
+"hljs-attr">"description": "XPath syntactic search.  This affordance is not normative and is provided for information only.",
+            "uriVariables": {                "query": {                    
+"hljs-attr">"title": "A valid XPath expression",
+                    
+"hljs-attr">"type": 
+"hljs-string">"string"
+                }
+            },
+            "output": {                
+"hljs-attr">"description": "The schema depends on the given query",
+                "type": 
+"hljs-string">"object"
+
+            },
+            "safe": "hljs-literal">true,
+            
+"hljs-attr">"idempotent": true,
+
+            "forms": [
+                {
+                    "hljs-attr">"op": <span class=
+"hljs-string">"subscribeevent",
+
+"hljs-attr">"href": "/search/xpath?query={query}",
+                    
+"hljs-attr">"htv:methodName": "GET",
+                    "response": {                        
+"hljs-attr">"description": "Success response",
+                        
+"hljs-attr">"contentType": "application/json",
+                        
+"hljs-attr">"htv:statusCodeValue": 200
+                    },
+                    
+"hljs-attr">"additionalResponses": [
+                        {
+                            
+"hljs-attr">"description": "XPath expression not provided or contains syntax errors",
+                            
+"hljs-attr">"contentType": "application/problem+json",
+                            
+"hljs-attr">"htv:statusCodeValue": 400
+                        }
+                    ]
+                }
+            ]
+        },
+        "searchSPARQL": {            
+"hljs-attr">"description": "SPARQL semantic search",
+            "uriVariables": {                "query": {                    
+"hljs-attr">"title": "A valid SPARQL 1.1. query",
+                    
+"hljs-attr">"type": "string"
+                }
+            },
+            "output": {                
+"hljs-attr">"description": "The schema depends on the given query",
+                "type": 
+"hljs-string">"object"
+            },
+            "safe": 
+"hljs-literal">true,
+            
+"hljs-attr">"idempotent": true,
+            "forms": [
+                {
+
+                    "href": "hljs-string">"https://mylamp.example.com/oh",
+
+"hljs-string">"/search/sparql?query={query}",
+
+                    "hljs-attr">"subprotocol": <span class=
+"hljs-string">"longpoll"
+
+"hljs-attr">"htv:methodName": "GET",
+                    "response": {                        
+"hljs-attr">"description": "Success response",
+                        
+"hljs-attr">"contentType": "application/json",
+                        
+"hljs-attr">"htv:statusCodeValue": 200
+                    },
+                    
+"hljs-attr">"additionalResponses": [
+                        {
+                            
+"hljs-attr">"description": "SPARQL query not provided or contains syntax errors",
+                            
+"hljs-attr">"contentType": "application/problem+json",
+                            
+"hljs-attr">"htv:statusCodeValue": 400
+                        }
+                    ]
+                },
+                {
+                    
+"hljs-attr">"href": "/search/sparql",
+                    
+"hljs-attr">"htv:methodName": "POST",
+                    "response": {                        
+"hljs-attr">"description": "Success response",
+                        
+"hljs-attr">"contentType": "application/json",
+                        
+"hljs-attr">"htv:statusCodeValue": 200
+                    },
+                    
+"hljs-attr">"additionalResponses": [
+                        {
+                            
+"hljs-attr">"description": "SPARQL query not provided or contains syntax errors",
+                            
+"hljs-attr">"contentType": "application/problem+json",
+                            
+"hljs-attr">"htv:statusCodeValue": 400
+                        }
+                    ]
+
+                }
+            ]
+        }
+    }
+}
+In
+the
+case
+of
+a
+forms
+entry
+that
+has
+multiple
+op
+values
+the
+usage
+of
+the
+htv:methodName
+is
+not
+permitted.
+A
+TD
+Processor
+will
+extend
+the
+multiple
+op
+values
+to
+separate
+forms
+entries
+and
+associates
+a
+single
+operation
+with
+the
+default
+assumption.
+The
+address
+information
+(e.g.
+href
+)
+and
+other
+metadata
+are
+taken
+over
+in
+the
+extended
+version.
+Example
+50
+extended
+forms
+in
+case
+of
+multiple
+values
+in
+op
+{
+    : <span class=
+"hljs-string">"https://www.w3.org/2022/wot/td/v1.1",
+    : <span class=
+"hljs-string">"urn:dev:ops:32473-WoTLamp-1234",
+    : <span class=
+"hljs-string">"MyLampThing",
+    : {
+        : {
+            : <span class=
+"hljs-string">"basic",
+            : <span class=
+"hljs-string">"header"
+        }
+
+    },
+    : [
+        
+    ],
+    : {
+        : {
+            : <span class=
+"hljs-string">"string",
+
+    "events": {
+        "thingCreated": {
+            "hljs-attr">"description": "Registration of Thing Descriptions inside the directory",
+            "uriVariables": {                "diff": {                    
+"hljs-attr">"description": "Receive the full created TD as event data",
+                    
+"hljs-attr">"type": "boolean"
+                }
+            },
+            "data": {                
+"hljs-attr">"title": "Partial/Full TD",
+                "type": 
+"hljs-string">"object"
+            },
+
+            "forms": [
+                {
+                    "hljs-attr">"op" : [<span class=
+"hljs-string">"readproperty", <span class=
+"hljs-string">"writeproperty"],
+
+"hljs-attr">"op": "subscribeevent",
+
+                    "href": "hljs-string">"https://mylamp.example.com/status"
+
+"hljs-string">"/events/thing_created{?diff}",
+                    
+"hljs-attr">"subprotocol": "sse",
+                    "htv:headers": [
+                        {
+                            
+"hljs-attr">"description": "ID of the last event for reconnection",
+                            
+"hljs-attr">"htv:fieldName": "Last-Event-ID"
+                        }
+                    ],
+                    "response": {                        
+"hljs-attr">"contentType": "text/event-stream"
+                    }
+
+                }
+            ]
+        }
+    }
+}
+{
+    : <span class=
+"hljs-string">"https://www.w3.org/2022/wot/td/v1.1",
+    : <span class=
+"hljs-string">"urn:dev:ops:32473-WoTLamp-1234",
+    : <span class=
+"hljs-string">"MyLampThing",
+    : {
+        : {
+            : <span class=
+"hljs-string">"basic",
+            : <span class=
+"hljs-string">"header"
+        }
+    },
+    : [
+        
+    ],
+    : {
+        : {
+            : <span class=
+"hljs-string">"string",
+
+        },
+        "thingUpdated": {            
+"hljs-attr">"description": "Updates to Thing Descriptions within the directory",
+            "uriVariables": {                "diff": {                    
+"hljs-attr">"description": "Include TD changes inside event data",
+                    
+"hljs-attr">"type": "boolean"
+                }
+            },
+            "data": {                
+"hljs-attr">"title": "Partial TD",
+                "type": 
+"hljs-string">"object",
+                
+"hljs-attr">"contentMediaType": "application/merge-patch+json"
+            },
+
+            "forms": [
+                {
+                    "op": "hljs-string">"readproperty",
+
+"hljs-string">"subscribeevent",
+
+                    "href": "hljs-string">"https://mylamp.example.com/status",
+
+"hljs-string">"/events/thing_updated{?diff}",
+
+                    "hljs-attr">"htv:methodName": <span class=
+"hljs-string">"GET"
+                },
+
+"hljs-attr">"subprotocol": "sse",
+                    "htv:headers": [
+                        {
+                            
+"hljs-attr">"description": "ID of the last event for reconnection",
+                            
+"hljs-attr">"htv:fieldName": "Last-Event-ID"
+                        }
+                    ],
+                    "response": {                        
+"hljs-attr">"contentType": "text/event-stream"
+                    }
+                }
+            ]
+        },
+        "thingDeleted": {            
+"hljs-attr">"description": "Deletion of Thing Descriptions from the directory",
+            "data": {                
+"hljs-attr">"title": "Partial TD",
+                "type": 
+"hljs-string">"object"
+            },
+            "forms": [
+                {
+                    "op": "hljs-string">"writeproperty",
+
+"hljs-string">"subscribeevent",
+
+                    "href": "hljs-string">"https://mylamp.example.com/status",
+
+"hljs-string">"/events/thing_deleted",
+
+                    "hljs-attr">"htv:methodName": <span class=
+"hljs-string">"PUT"
+
+"hljs-attr">"subprotocol": "sse",
+                    "htv:headers": [
+                        {
+                            
+"hljs-attr">"description": "ID of the last event for reconnection",
+                            
+"hljs-attr">"htv:fieldName": "Last-Event-ID"
+                        }
+                    ],
+                    "response": {                        
+"hljs-attr">"contentType": "text/event-stream"
+                    }
+
+                }
+            ]
+        }
+    }
+}
+
+
+8.3.2 +Other +Protocol +Bindings +The +number +of +Protocol +Bindings +a +Thing +can +implement +is +not +restricted. +Other +Protocol +Bindings +(e.g., +for +CoAP, +MQTT, +or +OPC +UA) +are +intended +to +be +standardized +in +separate +documents +such +as +a +protocol +Vocabulary +similar +to +HTTP +Vocabulary +in +RDF +1.0 +[ +HTTP-in-RDF10 +] +or +specifications +including +Default +Value +definitions. +Such +protocols +can +be +simply +integrated +into +the +TD +by +the +usage +of +the +TD +Context +Extension +mechanism +(see +7. +TD +Context +Extensions +). +Please +refer +to +[ +WOT-BINDING-TEMPLATES +] +for +information +on +how +to +describe +IoT +platforms +and +ecosystems. + +
+
+ +Editor's +note + +: +Context +URIs + +
+

+Needs +to +be +updated +to +include +points +noted +in +TD +Issue +1348 +. +Note +that +separate +Security +and +Privacy +Consideration +sections + +The +context +URIs + +are +now +required, +so +this +section +has +been +refactored. + +tentative +and +subject +to +change. + +

+
+
+
+
+
+
+
+

+ +9. + +8. + + +Security +Considerations +

+ + +
+

+This +section + +Security + +is +non-normative. +In +general +the +security +measures +taken +to +protect + +a +cross-cutting +issue +that +needs +to +be +considered +in +all + +WoT +system +will +depend +on +the +threats + +building +blocks + +and +attackers +that +system +may +face + +WoT +implementations. +This +chapter +summarizes +some +general +issues + +and +guidelines +to +help +preserve + +the +value + +security + +of +the +assets +needs +to +protect. +A + +concrete +WoT +discovery +implementations. +For +a +more + +detailed +discussion + +and +complete +analysis + +of +both + +security +(and +privacy) +considerations +for +the +Web +of +Things, +including +a +threat +model +that +can +be +adapted +to +various +circumstances, +is +presented +in + +and +privacy +issues, +see + +the +informative +document + + +WoT +Security +and +Privacy +Guidelines + +specification + +[ + +WOT-SECURITY-GUIDELINES + + +WOT-SECURITY + + + +]. +This +section +discusses +only +security +risks +and +possible +mitigations +directly +relevant +to +the + +WoT +Thing +Description. +A + +and + +WoT +Thing +Description +can +describe +both +secure + +TDDs +are +also +web +services + +and +insecure +network +interfaces. +When +a +Thing +Description +is +retro-fitted + +should +be +implemented +using +best +practices +for +web +services. +In +addition + +to +an +existing +network +interface, +no +change +in + +the +specific + +security +status +of +the +network +interface +is +to +be +expected. +The +use +of +a +WoT +Thing +Description +introduces + +considerations +below, + +the +privacy + +security + +risks +given + +and +mitigations +discussed + +in +guides +such +as + +the +following +sections. +After +each +risk, +we +suggest +some +possible +mitigations. + +OWASP +Top +10 +[ + +OWASP-Top-10 + +] +should +be +evaluated, +and +if +applicable, +addressed. + +

+
+
+

+9.1 + + +8.1 + + +TD +Interception +and +Tampering +Risk + +Denial +of +Service + +

+ + +
+

+Intercepting + +Certain +functions +of +the +directory +service, +in +particular +search +queries, +may +require +significant +resources +to +execute + +and +tampering +with +TDs + +this +fact + +can +be +used +to +launch +man-in-the-middle +attacks, +for +example + +denial +of +service +(DoS) +attacks +against +WoT +Thing +Description +Directory +services. +In +such +an +attack +a +WoT +Directory +would +be +overloaded + +by +rewriting +URLs +in +TDs +to +redirect +accesses + +requests +from +the +attacker +and +unable + +to +a +malicious +intermediary +that +can +capture +or +manipulate +data. + +service +other +requests. + +

+
+
+Mitigation: + +Mitigations: + +
+
+Obtain + +
    +
  • + +A +WoT + +Thing +Descriptions +only +through +mutually +authenticated +secure +channels. +This +ensures +that +the +Consumer +and + +Description +Directory +implementation + +SHOULD + +limit + +the +server +are +both +sure + +number + +of +queries +per +unit +time +from + +the +identity + +same +requestor. +
  • +A +WoT +Thing +Description +Directory +implementation + +SHOULD + +limit +the +complexity + +of +queries +(for +example, + +the +other +party +to + +total +length +of + +the +communication. +This +is +also +necessary +in +order +to +deliver +TDs +only + +query +expression +or +its +depth). +
  • +A +WoT +Thing +Description +Directory +implementation + +SHOULD + +use +a +watchdog +timer + +to +authorized +users. + +abort +queries +that +take +more +than +a +certain +maximum +(implementation-configurable) +amount +of +time. +
+
+
+
+
+
+9.2 + +

+ +8.2 + + +Context +Interception + +Amplification + +and +Tampering +Risk + +Distributed +Denial +of +Service + +

+ + +
+

+Intercepting +and +tampering +with +context +files +can + +It +may +also + +be +used + +possible + +to +facilitate + +use +elements +of +WoT +Discovery +mechanisms +to +launch +distributed +denial +of +service +(DDoS) + +attacks +by +modifying + +against +other +targets. +In +such +an +attack + +the +interpretation + +WoT +Discovery +service +itself +is +not +the +target. +Instead, +an +aspect + +of +vocabulary. +Mitigation: +Ideally +context +files + +the +WoT +Discovery +service + +would +only + +be +obtained +through +secure +channels +established +by +mutual +authentication +but +it +is +notable +(and +unfortunate) + +exploited +to +generate +amplified +network +traffic + +that +many +contexts +are +indicated +using +HTTP +URLs, +which +are +vulnerable + +overloads +a +third +party, +the +actual +target. +Such +an +attack +has +two +requirements: +first, +the +ability + +to +interception +and +modification +if +dereferenced. +However, +if +context +files +are +immutable +and +cached, + +redirect +traffic +to +a +third +party, + +and +dereferencing +is +avoided +whenever +possible, +then +this +risk + +second, +an +intermediary +service +that + +can +be +reduced. +If +it +is +necessary + +exploited + +to +fetch +a +context +file, +an +implementation +may +also +attempt + +amplify +network +traffic +from +the +attacker. +Redirection +of +network +traffic +is +possible +in +some +protocols, +such +as +unsecured +CoAP, +by +modifying +source +information +in +headers. +Amplification +is +possible +by +taking +advantage +of +three +multiplicative +factors: +the +ratio +of +request + +to +response +payload +sizes, + +use +HTTPS +(HTTP +over +TLS) +even +when +only + +of +"observe" +in +protocols +like +CoAP +(which +can +give +multiple +results +for +one +request), +and +use +of +multicast +(which +can +allow +multiple +servers +to +respond +to +one +request). +Services +which +do +not +support +authentication +are +ideal +intermediaries +for +such + +an +HTTP +URL +is +given. +10. +Privacy +Considerations + +indirect +attack. +Unfortunately, +the +Introduction +mechanisms +for +WoT +Discovery +are +meant +to +provide +open +access +mechanisms +to +initiate +discovery +and +might +be +exploited +for +this +purpose. +

+Mitigations: +
  • + +Open +implementations +of +Introduction +mechanisms + +SHOULD +NOT + +support +observe +or +similar +extended +result +subprotocols. + +
  • +
  • +This +section +is +non-normative. + + +Open +implementations +of +Introduction +mechanisms + +SHOULD +NOT + + +Privacy +risks +will +depend +on + +respond +to +multicast +requests +unless +this +is +absolutely +required +by + +the +association + +protocol. + +If +support +for +multicast +is +required, +in +the +case + +of +Things +with +identifiable +people +and +both + +CoAP, + +the +direct +information +and + +recommendations +made +in +[ + +RFC9175 + +] + +SHOULD + +be +applied. + +Note +however +that +in + +the +inferred +information +available +from +such +an +association. +A +detailed +discussion + +case + +of +privacy +(and +security) +considerations +for + +discovery + +the +Web + +number + +of +Things, +including +a +threat +model + +servers + +that +can +be +adapted + +might +respond + +to +various +circumstances, +is +presented + +a +multicast +request +will +generally +not +be +known +in +advance, + +in +which +case + +the +informative +document + +mitigations +proposed +in + +[ + +WOT-SECURITY-GUIDELINES + + +RFC9175 + + + +]. +This +section +discusses +only +privacy +risks +and +possible +mitigations +directly +relevant + +] +may +not +be +effective. +
  • +Limit +the +size +of +responses + +to +the +WoT +Thing +Description. + +minimum. + +The +use + +total +size + +of +a +WoT +Thing +Description +introduces +the +privacy +risks +given +in +the +following +sections. +After +each +risk, +we +suggest +some +possible +mitigations. +10.1 +Context +Fetching +Fetching + +responses +to +an +Introduction + +SHOULD + +be +less +than +3x + +the +vocabulary +files +given +in + +size +of + +the +@context +member + +total +size + +of +request, +and +this +should +include + +any +JSON-LD + +error +responses. + +This +is +consistent +with +DDOS +mitigations +in + +[ + +json-ld11 + + +RFC9000 + + + +] +document +can +be +a +privacy +risk. +In +the +case +of +the +WoT, +an +attacker +can +observe + +(QUIC) +and +HTTP/3. +Here +"total +size" +includes +any +headers +required +by + +the +protocol +itself. +
  • +Introductions + +SHOULD + +rate-limit +responses +to +any +particular +request +source. +
  • +Introduction +mechanisms +on +a +segmented + +network +traffic +produced +by + +behind +a +firewall +(e.g. +a +LAN) + +SHOULD +NOT + +respond +to +requests +that +are +(apparently) +from +outside +that +LAN. +
+Of +particular +concern +are +Introduction +mechanisms +that +can +return +multiple +results, + +such +fetches + +as +CoRE-RD + +and +can + +DID. +It +may +be +necessary +to + +use +the +metadata +of +the +fetch, + +authentication/authorization +on + +such +Introduction +mechanisms + +as +the +destination +IP +address, +to +infer +information +about +the +device +especially +if +domain-specific +vocabularies +are +used. +This +is +a +risk +even + +well + +if +the +connection +is +encrypted, +and + +other +mitigations +above +are +not +sufficient. +A +recommended +alternative + +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 + +move +multiple +results +from +such +Introductions + +into +the +interpreting +device, + +a +WoT +TDD, +which +can +then +be +protected +by +appropriate +authentication + +and +not +fetched +at +all, +with +the +URI +in + +authorization +measures. +Then + +the +@context +member +serving + +open +Introduction +mechanism + +only +as +an +identifier +of +the +(known) +vocabulary. +This +requires + +has +to +return +one +result, + +the +use + +URL + +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 + +TDD. +Introduction +mechanisms + +that +are +visible +on + +the +context +file +will + +open +internet +should + +be +available +locally + +especially +careful + +to +systems +interpreting + +implement + +the +metadata +in +a +Thing +Description. + +above +mitigations, +and +perhaps +avoid +Introduction +mechanisms +that +can +return +multiple +URLs +completely. + +
+
+
+
+
+

+ +10.2 + +8.3 + + +Immutable +Identifiers + +Self-Discovery +on +LANs + +

+ + +
+

+A +Thing +Description +containing +an +identifier +( +id +) + +On +a +LAN, +certificates +and +browsers + +may +describe + +not +be +able +to +property +set +up +TLS +for +HTTPS +because +browsers +expect +certificates +pointing +to + +a +Thing +that + +publicly-visible +URL. +Using +HTTP + +is +associated + +common +practice +inside +LANs +but +in +combination + +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 + +self-description +it +means +that +WoT +Things +would + +be +sold +or +given + +essentially +be +making +TDs +visible + +to +another +person +and +the +known +ID +used + +everyone +with +access + +to +track +that +person. + +the +private +LAN. +Even +if +security +mechanisms +such +as +HTTP +passwords +were +used, +these +are +not +effective +(they +can +be +easily +discovered +by +a +traffic +analyser) +without +transport +security. + +

+
+
+Mitigation: + +Mitigations: + +
+
+All +identifiers +should +be +mutable, +and +there +should + +

+ +PSK +(pre-shared +keys) + +SHOULD + +be +a +mechanism +to +update +the +id + +used +if +possible +on +LANs, +meaning +one + +of +a +Thing +. +Specifically, + +the +id +of +a +Thing +should +not +be +fixed + +ciphersuites + +in +hardware. + +[ + +RFC4279 + +]. + +This +does, +however, +conflict +with +the +Linked +Data +ideal + +does +require + +that +identifiers + +Things + +are +fixed +URIs. +In +many +circumstances +it +will +be +acceptable +to +only +allow +updates +to +identifiers +if + +assigned +PSKs +in + +a +Thing + +common +security +domain, +which + +is +reinitialized. +In +this +case +as +a +software +entity + +typically +done +by +following +an +onboarding +process. +Unfortunately, +specific +onboarding +processes +are +currently +out +of +scope +of + +the +old +Thing +ceases +to +exist +and +a +new +Thing + +WoT +specifications. +

+An +alternative + +is +created. +This +can +be +sufficient + +to +break +a +tracking +chain +when, +for +example, +a +device + +depend +on +local +network +security +(i.e. +WEP). +This + +is +sold +to +a +new +owner. +Alternatively, +if +more +frequent +changes +are +desired +during + +not + +the +operational +phase +of +a +device, + +best +solution +from + +a +mechanism +can +be +put +into +place +to +notify +only +authorized +users + +security +or +privacy +point + +of +the +change + +view +but +may +be +acceptable + +in +identifier +when +a +change +is +made. + +some +contexts. + +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 + +all +users +with + +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. +10.3 +Fingerprinting +As +noted +above, +the +id +member + +network +would + +in +a +TD +can +pose +a +privacy +risk. +However, +even +if +the +id +is +updated +as +described + +turn +have +access + +to +mitigate +its +tracking +risk, +it +may +still + +all +TDs +via +self-description. + +If +Things +cannot + +be +possible +to +associate +a +TD + +individually +secured + +with +a +particular +physical +device, + +transport +security + +and +from +there +to +an +identifiable +person, +through +fingerprinting. +Even +if + +authentication +and +authorization, + +a +specific +device +instance +cannot +be +identified +through +fingerprinting, +it +may + +separate +network + +SHOULD + +be +possible +to +infer +the +type +of + +set +up, +i.e. +with +an +alternative +SSID, +and +used +only +for +IoT +devices. + +Using + +a +device +from + +segmented +network +reduces + +the +information +in + +need +for +distributing + +the +TD, +such +as + +password +to +this +network +to +those +who +need +access +to + +the +set +of +interactions, +and +use +this +type + +IoT +devices +connected + +to +infer +private +information +about +an +identifiable +person, +such +as +a +medical +condition. + +it. + +

+Mitigation: +Only +authorized +users +should + +

+Another +alternative +is +to +use +a +reverse +proxy +service +based +in +the +cloud. +Secure +setup +can + +be +provided + +accomplished +if +the +IoT +device +has + +access +to +the +Thing +Description +for +a +Thing +, +and +only +the +amount +of +information +needed +for + +cloud, +since + +the +level +of +authorization + +proxy +server +can +have +a +public +URL + +and +the +initial +connection +can + +use +case +should +be +provided. +If +the +TD +is +only +distributed +to +authorized +users +through + +HTTPS, +then +open +a + +secure +and +confidential +channels, +for +example +through + +tunnel +over + +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 + +websocket. +The +proxy +can +in +turn +re-expose + +a +particular +use +case + +secure +endpoint, +and +possible +add +authentication. +The +disadvantages + +of +a +TD +should +be +omitted +whenever +possible. +For +example, +for + +this +approach +including +depending +on + +an +ad-hoc +connection + +external +cloud +service +and +the +need + +to +expose +an +external +access +point +(which +is +itself + +a +device +where +the +Consumer +does +not +store +state +about +the +Thing, +the +id + +security +risk). +The +first +disadvantage + +can +be +omitted. +If + +addressed +by +hosting + +the +Consumer +does +not +need +certain +interactions +for +its +use +case, +they +can +be +omitted. +If + +proxy +service +locally +and +exposing +a +public +URL +using +e.g. +dynamic +DNS +if + +the +Consumer + +local +server + +is +not +authorized +to +use +certain +interactions, +they +can +likewise +be +omitted. + +connected +through +an +ISP. + +If +the +Consumer +does +not +have +any +capability +to +display +human-readable +information +such +as +titles +or +descriptions, +they +can + +Things +cannot + +be +omitted +or +replaced + +individually +secured + +with +zero-length +strings. + +transport +security +and +authentication +and +authorization, +then +they + +MAY + +be +made +available +for +general +access +via +a +proxy +that +can +provide +suitable +access +controls. +

+
+
+
+
+
+
+

+10.4 + + +9. + + +Globally +Unique +Identifiers + +Privacy +Considerations +

+ +
+

+Globally +unique +identifiers +pose +a +privacy +risk +if +a +centralized +authority + +Privacy + +is +needed +to +create +and +distribute +them, +since +then +a +third +party +has +knowledge +of +the +identifiers. +Mitigation: +The +id +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 + +cross-cutting +issue + +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 + +considered + +in +the +system +design; +for +example, +by +detecting +duplicates + +all +WoT +building +blocks + +and +regenerating +IDs +when +necessary. +The +scope +of +IDs +also +does +not +need +to +be +global: +it +is +acceptable + +WoT +implementations. +This +chapter +summarizes +some +general +issues +and +guidelines + +to +use +identifiers +that +only +distinguish +Things +in +a +certain +context, +such +as +within + +help +preserve +the +privacy +of +concrete +WoT +discovery +implementations. +For + +a +home +or +factory. +10.5 +Inferencing + +more +detailed +and +complete +analysis + +of +Personally +Identifiable +Information + +both +security +and +privacy +issues, +see +the + +WoT +Security +and +Privacy +Guidelines + +specification +[ + + +WOT-SECURITY + + + +]. +

+

+In +many +locales, +in +order + +The +WoT +discovery +architecture +is +designed + +to +protect + +avoid +a +dependence +on + +the +privacy +of +users, +there +are +legal +requirements + +existing +discovery +schemes +by +using +a +two-phase +approach +and +allowing + +for +the +handling + +enforcement + +of +personally +identifiable +information, +that +is, +information +that +can +be +associated + +authorization +before +metadata +release. +However +several +privacy +risks +still +exist. +These +are +listed +below +along + +with +a +particular +person. +Such +information +can + +possible +mitigations. +The +level + +of +course +be +generated +by +IoT +devices +directly. +However, + +risk +to +privacy +in +particular +depends +on + +the +existence + +use +case + +and +metadata +of +IoT +devices +(the +kind +of +data +stored +in + +whether +there +is + +a +Thing +Description) +can +also +contain +or +be +used +to +infer +personally +identifiable +information. +This +information +can +be +as +simple +as +the +fact + +risk + +that +information +related +to + +a +certain + +person +owns + +might +be +distributed +in + +a +certain +type + +fashion +inconsistent +with +the +privacy +desires + +of +device, +which +can +lead +to +additional +inferences +about + +that +person. +For +privacy +we +distinguish +the +following +broad +classes +of +use +case +scenarios: + +

+
+
+Mitigation: + +Institutional + +
+
+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 + +Both +the +Things +producing +metadata +and +the +Consumers + +of +personally +identifiable +data +generated + +that +metadata +are +owned +and +controlled + +by +an +institution +or +representatives +of +an +institution. +Example: +Automation +in + +a +Thing +is +often +obtained +when + +factory +where + +a +Thing +is +paired +with + +control + +system +consuming +the +data, +which + +is +frequently +also +when +the +Thing +Description +is +registered +with +a +local +directory +or +the +system +consuming + +accessing + +the +Thing +Description + +state +of +an +assembly +line + +in +order +to +access +the +device. +In +this +case, +consent +for +using +data +from +a +Thing +can +be +combined +with +consent +for +accessing + +evaluate +quality. +
+Service +
+The +Things +producing +metadata +are +owned +and +controlled +by +an +institution +or +representatives +of +an +institution +while + +the +Thing +Description + +consumers +are +individuals. +Example: +driver + +of +an +electric +vehicle +accessing + +the +Thing +. +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. +11. +Thing +Model +Note +The +following +section +has +its +origin + +a +charge +station + +in +[ +wot-thing-description +], +Annex +C. +Here +Thing +Description +Template +is +renamed + +order + +to +Thing +Model +, +but +keeps +the +same +intention. +For +this +version + +check +status + +of +a +charge. +
+Personal +
+Both + +the +specification, +Thing +Model + +Things +producing +metadata + +and +its +model +features +(e.g., +extensions, +referencing, +obligations, +placeholder) +are +formal +introduced. +For +Thing +Model, +an +own +content +type +is +under +discussion. +Please +note +this +section +is +in +work +in +progress. +11.1 +Basic +Concept +The +figure +below +illustrates + +the +relation + +Consumers + +of +the +Thing +Model + +that +metadata +are +owned + +and +Thing +Description +. +A +Thing +Model +mainly +describes +interaction +affordances +such +as + +controlled +by + +the +Properties +, +Actions +, + +same +individual. +Example: +A +smart +home +control +system +for +charging +an +electric +car +from +home-attached +solar +panels, +both +home + +and +Events + +car +owned +by +the +same +person. +
+Personal +Peer-to-Peer +
+The +Things +producing +metadata + +and +common +metadata. +This +kind + +the +Consumers + +of +template +should +be +valid + +that +metadata +are +owned + +and +followed + +controlled +by +different +individuals. +Example: +A +smart +home +control +system + +for +all +instantiated +Thing +Descriptions + +charging +a +guest's +electric +car +from +home-attached +solar +panels. +
+Institutional +Peer-to-Peer +
+The +Things +producing +metadata +and +the +Consumers +of + +that +metadata + +are +relied +on +this +Thing +Model +. +This +paradigm +can +be +compared +with +abstract +class +or +interface +definition +(~Thing +Model) +in +object-oriented +programming +to +create +objects +(~Thing +Descriptions). +Figure +5 +Thing +Model + +owned + +and +its +relation + +controlled +by +different +institutions. +Example: +A +utility +provides +and +manages +power +delivered + +to +the +Thing +Description. +The +Thing +Model +is + +a +logical +description +of + +factory, +and + +the +factory +provides +an + +interface +and +possible +interaction +with +Thing +'s +Properties +, +Actions +, +and +Events +, +however +it +does +not +contain +Thing +instance-specific +information, +such +as +concrete +protocol + +for +the +utility +to +negotiate +on-demand +power + +usage +(e.g., +IP +address), +or +even +a +serial +number + +reductions. +
+Client +
+The +Things +producing +metadata +are +owned + +and +GPS +location. +However, +Thing +Models +allows +to +include, +e.g., +security +schemes +if +they +apply +to + +controlled +by +an +individual +while + +the +entire +class + +consumers +are +an +institution +or +representatives + +of +instances +the +model +describes. +They +might +have +URLs +(e.g., +like +token +servers) +that +might +need + +an +institution. +Example: +A +personal +electric +vehicle +exposes +an +interface + +to +be +omitted +or +parameterized +(with +templates) +although +in + +a +lot +of +cases +these +might +also +be +given. +Thing +Model + +public +charging +station +so +that +the +charging +station + +can +be +serialized +in + +evaluate + +the +same +JSON-based +format +as +a +Thing +Description +which +also +allows +JSON-LD +processing. +Note +that +a +Thing +Model +cannot +be +validated +in + +charge +status +of + +the +same +way +as +Thing +Description +instances +due +to +some +missing +mandatory +terms. +11.2 +Thing +Model +Declaration + +vehicle. +
+

+A +Thing +Model +is +recognized +by +the +top +level +@type +. +Thing +Model +definitions +MUST +use + +All +of +these +in +fact +carry +privacy +risks. +Even +in + +the +keyword +@type +at +top +level +and +a +value + +case + +of +type +string +or +array +that +equals +or +respectively +contains +tm:ThingModel +. +The +prefix +tm + +factory +automation, +there + +is +defined +within +Thing +Descriptions +' +context +and +points +to + +the +Thing +Model +namespace +as +defined +in +4. +Namespaces +. +It +is +intended + +chance + +that +vocabulary +from +the +tm +context +only + +data +about +employee +performance +would + +be +used +in +Thing +Model +definitions +and +are +removed +or +replaced +when +Thing +Descriptions +are +generated +(also +see +11.4 +Derivation +of +Thing +Description +Instances +). +A +Thing +Model +MAY +NOT +contain +instance +specific +Protocol +Binding + +captured + +and +security +information +such +as +endpoint +addresses. +Consequently, +Thing +Model +definitions +will +also + +would +have +to + +be +valid +if +there +are +no +JSON +members +like +forms +, +base +, +securityDefinitions +, +and +security +. +Thing +Models +are +also +valid +even +if +these +JSON +members +are +used +(e.g., +as +template), +however, +the +nested +mandatory +members +like +href +are +omitted. +Example +3 +shows +a +valid +sample +lamp +Thing +Model +without +any +protocol +and +security +information. + +managed +appropriately. + +

+11.3 +Modeling +Tools + +

+In +the +context +of +Thing +Model +definitions +specific +features +are +introduced +that +can +be +used +for +Thing +modelling. +11.3.1 +Versioning +Over +time, +Thing +Model +definitions +may +change + +following +we +make +frequent +reference +to +"tracking". +This +term +covers +multiple +privacy +risks, +including +location +tracking + +and +must +be +made +identifiable +through +versioning. + +behavioral +profiling. + +In +that +case + +general, + +the +string-based +term +model +can +be +used +within + +definition +of +"profiling" +given +in +Article +4 +of + +the +version +container +to +provide +a +version +pattern +like + +GDPR + +[ + +SEMVER + + +GDPR-Defs + + + +]. +The +following +snippet +shows +the +usage +of +model +in +a +Thing +Model +instance. +Example +51 +: +Thing +Model +versioning +{ + ... + "" : <span class= +"hljs-string">"tm:ThingModel", + : <span class= +"hljs-string">"Lamp Thing Model", + : <span class= +"hljs-string">"Lamp Thing Description Model", + <span class= +"hljs-string">"version" : {"model" : <span class= +"hljs-string">"1.0.0" }, + ... +} +Due + +] +is + +to +the +definition +of +Thing +Model +the +term +instance +can + +be +omitted +within +the +version +container. + +considered +equivalent +to +"tracking" +as +used +in +this +document. + +

+

+When +Thing +Models +are +updated +and +have +a +new +version, +this +may +affect +other +Thing +Models +that +use +the +extension +and +import +features +(see +Section +11.3.2 +Extension + +With +these +definitions + +and +Import +). +In + +categories +established, +we +will +now +discuss + +some +cases +it +is +also +useful +to +reflect +a +new +version +in +the +file +name +and/or +in +a +corresponding +URL +to +identify +the +version. + +specific +privacy +risks +and +potential +mitigations. + +

+
+
+

+ +11.3.2 + +9.1 + + +Extension + +Location +Tracking + +and +Import + +Profiling +

+ +
+

+A +Thing +Model +can +extend +an +existing +Thing +Model +by +using +the +tm:extends +mechanism +announced +in + +discovery +service +may +potentially +allow + +the +links +definition: +A +Thing +Model +MUST +use +at +least +one +links +entry +with +"rel":"tm:extends" +that +targets + +approximate +location +of + +a +Thing +Model +that +is + +person +to + +be +extended. +The +Thing +Model +will +inherit +all +definitions +from +the +extended +Thing +Model +. +There + +determined +without +their +consent. +This +risk +occurs +in +some +specific +circumstances +which +can +be +avoided +or +mitigated. +It + +is +the +opportunity + +also +similar + +to +extend + +the +existing +definition +with +further +metadata + +risk +posed + +by +providing +further +JSON +name-value +pairs +from +the +existing +TD +information +model +( +5. +TD +Information +Model +) +or +using +the +context +extension +concept +( +7. +TD +Context +Extensions +). +A +Thing +Model +can +also +overwrite +existing +definitions + +other +network +services + +such +as +title(s) + +DHCP + +and +maximum +etc.. + +DNS. +

+For +this +risk +to +occur, + +there +exist +two +limitations: +A +Thing +Model +SHOULD +NOT +overwrite +the +JSON +names +defined +within +the +properties +, +actions +, +and/or +events +Map +of +the +extended +Thing +Model +. +Definitions +SHOULD +NOT + +first +has +to + +be +overwritten +in + +an +IoT +device +that +can +be +reliably +associated +with +a +person's +location, + +such +as + +a +way + +necessary +medical +device +or +a +vehicle. +Note + +that +possible +instance +values +are +no +longer +valid +compared +to +the +origin +extended +definitions. +Those +assertions +preserve + +the +semantics +throughout +of +the +extended +Thing +Model +. +E.g., +it +is + +risk +only +applies +to +personal +use +cases, + +not +allowed +that +a +"minimum":2 +from +a +extended +Thing +Model +can + +institutional +ones. +Secondly, +the +device +has +to + +be +overwritten +with +"minimum":0 +. +Meanwhile, +overwriting + +configured +to +register +automatically + +with +"minimum":5 +would +work +since +all +instances +values +will +always +fulfill + +the +restrictions +of + +nearest +directory +service. +In +this +case, + +the +extended +Thing +Model +(also +see +Figure +Figure +6 +for +further +explanation). +Lets +assume +we +have +a +basic +model +description +as +provided +in + +location +of + +the +following +example: +Example +52 +: +Basic +On/Off +Thing +Model +Definition +{ + : [<span class= +"hljs-string">"https://www.w3.org/2022/wot/td/v1.1"], + : <span class= +"hljs-string">"tm:ThingModel", + : <span class= +"hljs-string">"Basic On/Off Thing Model", + : { + : { + : <span class= +"hljs-string">"boolean" + } + } +} +Now +it +is +designed +a +new + +device +class +model +called +'Smart +Lamp +Control' +that +should + +can + +be +used +as +template +for +creating +TD +instances. +This +model +will +reuse + +inferred +from + +the +existing +definition + +network +range + +of +the +'Basic +On/Off +Thing +Model' + +directory +service + +and +extend +it +with +a +dim +property: +Example +53 +: +Smart +Lamp +Control +Thing +Model +Definition +{ + : [<span class= +"hljs-string">"https://www.w3.org/2022/wot/td/v1.1"], + : <span class= +"hljs-string">"tm:ThingModel", + : <span class= +"hljs-string">"Smart Lamp Control with Dimming", + : [{ + : <span class= +"hljs-string">"tm:extends", + : <span class= +"hljs-string">"http://example.com/BasicOnOffTM", + : <span class= +"hljs-string">"application/td+json" + }], + : { + : { + : <span class= +"hljs-string">"Dimming level" + : <span class= +"hljs-string">"integer", + : <span class= +"hljs-number">0, + : <span class= +"hljs-number">100 + } + } +} +Please +note +that + +the +title +is +overwritten +and +will +be +used +when +TD +instances +are +created +(also +see +in +the +next +subsection +11.4 +Derivation +of +Thing +Description +Instances +). +The +tm:extends +feature +only +permits +inheriting +all +definitions +of +one +Thing +Model +. +In +many +use +cases, +however, +it +is +desired +only +to +import +pieces +of +definitions + +location + +of +one +or +more +existing +Thing +Models +. +For +doing +this, + +the +tm:ref +term +is +introduced +that +provides + +person +inferred +from + +the +location +of +an +existing +(sub-)definition +that +should +be +reused. +The +tm:ref +value +MUST +follow + +the +pattern + +device. +

+There +are +a +few +variants +of +this: + +

+

+Location +tracking +is +not + +the +same +level +of +the +tm:ref +declaration +that +provides + +only +profiling +risk. +In +general, +"profiling" +includes +any +mechanism +used +to +evaluate +information +about + +a +new +value. +This +process +MUST +follow + +person, +including +economic +status, +health, +preferences, +interests, +reliability, +and +behavior. +Some +of + +the +JSON +Merge +Patch +algorithm +as +defined + +metadata + +in +[RFC7396] +where +the +content + +a +TD +can +be +used +to +infer +information + +of +this +kind +if + +the +referenced +definition +is +patched +with +the +new +provided +JSON +name-value +pairs. +It +is +noted +that +the +values + +described +Thing + +can +also +be +based +on +a +JSON +object +or +array +, +or +simply + +be +associated +with + +a +null +value. +null +would +result +to +a +removal + +person. +Some + +of +existing +JSON +name-value +pair +in + +the +target. + +mitigations +below +are +also +applicable +to +this +more +general +definition +of +profiling. + +

+

+Similar + +Some +of +these +risks +are +shared +by +similar +services. +For +example, +DCHP +automatically +responds + +to +tm:extends + +requests +for +IP +addresses +on +a +local +network, +and +devices +typically +provide +an +identifier +(a +MAC +address) +as +part +of +this +process, + +and +to +keep + +the +semantic +meaning, +definitions +SHOULD +NOT +be +overwritten +in +such + +DHCP +server +maintains + +a +way +that +possible +instance +values +are +no +longer +valid +compared + +registry. +In +theory, +someone +with +access + +to +the +origin +referenced +definition. +The +following +example +shows + +DHCP +server +in, +say, + +a +new +TM +definition +that +overwrites +( +maximum +), +enhances +( +unit +), + +cafe, +could +use +this +information +to +track +someone's +phone + +and +removes +( +title +) +existing +definitions +from +Example +53 +. + +infer +their +location. + +

+Example +55 + +
+
+Mitigations: +
+There +are +a +few +options +to +mitigate +these +risks: +
  • +: +Smart +Lamp +Control +extend + + +To +avoid +location +tracking + +and +overwrite +existing +definitions + +other +forms +of +profiling, +a +WoT +Thing +associated +with +a +person + +MAY + +disable +registration +with +public +directories. + + +{ + : [<span class= +"hljs-string">"https://www.w3.org/2022/wot/td/v1.1"], + : <span class= +"hljs-string">"tm:ThingModel", + : <span class= +"hljs-string">"Smart Lamp Control", + : { + : { + :<span class= +"hljs-string">"http://example.com/SmartLampControlwithDimming.tm.jsonld#/properties/dim", + : <span class= +"hljs-literal">null, + : <span class= +"hljs-number">80, + : <span class= +"hljs-string">"%" + } + } +} +Based +on +the +JSON +Merge +Patch +algorithm +the +{"title": +null,"maximum": +80,"unit" +: +"%"} + +Registration + +would +act +as +a +patch +for +the +referenced +origin +content +{"title": +"Dimming +level", +"type": +"integer", +"minimum": +0, +"maximum": +100} +. +The +tm:extends +and +the +import +mechanism +based +on +tm:ref +can +also + +still + +be +used + +possible +with +personal +directories, +for +example, +a +home +gateway, +but +a +user +could +disable +registration + +at +other +locations. +This +has + +the +same +time + +disadvantage +that +functionality +is +lost: +personal +devices +cannot +be +discovered + +in +a +TM +definition. +The +following +example +extends +the +TM +from +Example +52 +and +imports + +public +locations. +This +could +be +addressed +by +having +internet-accessible +private +discovery +services. +For +example, + +the +status +and +dim +definitions +from +Example +3 +and +Example +53 +respectively. +Example +56 +: +Smart +Lamp +Control +Thing +Model + +user's +home +gateway +could +provide +an +internet-accessible +service, +but + +with +extend +and +import +mechanism +{ + : [<span class= +"hljs-string">"https://www.w3.org/2022/wot/td/v1.1"], + : <span class= +"hljs-string">"tm:ThingModel", + : <span class= +"hljs-string">"Smart Lamp Control", + : [{ + : <span class= +"hljs-string">"extends", + : <span class= +"hljs-string">"http://example.com/BasicOnOffTM", + : <span class= +"hljs-string">"application/td+json" + }], + : { + : { + :<span class= +"hljs-string">"http://example.com/LampTM.tm.jsonld#/properties/status" + }, + : { + :<span class= +"hljs-string">"http://example.com/LampWithDimmingTM.tm.jsonld#/properties/dim" + } + } +} +The +following +figure +summarizes +the +allowable +override +behaviour +of +the +extension +and +imports +TM +functions +presented +in +this +section. +Three +Thing +Models + +access +control +limiting + +use +the +tm:ref +or +tm:extends +feature + +to +reuse +TM +definitions + +authorized +users. +
  • +To +avoid +location +tracking +and +other +forms + +of +the +Smart +Lamp +Control +Thing +Model +. +The +first + +profiling, +a +WoT + +Thing +Model +imports +and +overwrites +the +maximum +value +to +120 +within +the +dimmer +property. +However, +this +results +in +possible +instance +values +(at +runtime) +that + +associated +with +a +person + +SHOULD + +use +anonymous +TDs +when +registering +with +a +public +directories. + +In +some +cases, +it + +may +not + +be +in +the +range +of +the +original +dim +definition +between +0 + +possible +to +use +anonymous +TDs + +and +100 +of +the +dim +definition +of +the +Smart +Lamp +Control +Thing +Model. +Thus, +such + +omit +explicit +IDs +from +TDs +submitted +to + +a +Thing +Model +definition +is +not +allowed. +The +second +model +overwrites +the +property +type +value +by +number +. +Again, + +TDD. +In + +this +case +the +TDD + +will +potentially +result + +generate +a +local +ID +valid +only + +in +numeric +dim +values + +that +are +not +accepted +by + +TDD. +This +does, +however, +complicate +update +since + +the +definition +of + +client +needs +to +remember + +the +origin +dim +type +definition +(integer) +of + +local +ID +assigned +by + +the +Smart +Lamp +Control +Thing +Model +. +The +last +model +is +defined +in +a +correct +way. +The +new +ranges +of +dim +produce +potential +instance +values +that +are + +TDD. +Anonymous +TDs + +also +fulfilled + +do +not +prevent +tracking + +by +the +original +dim +definition. + +other +means, +such +as +fingerprinting. +
  • +Figure +6 +Overwriting +behavior + + +To +avoid +location +tracking +and +other +forms + +of +profiling, +a +WoT + +Thing +Models +. + +associated +with +a +person + +MAY + +periodically +generate +new +IDs. + + +11.3.3 +Composition +In +some +applications, + +Using +fixed +IDs +makes + +it +is +beneficial + +exceptionally +easy + +to +reuse +existing +Thing +Model +definitions + +track +devices. +This +problem +also +occurs +in +DHCP +with +MAC +address + +and +compose +them +into + +there +is + +a +similar +partial +mitigation: +generate + +new +IoT +system. +An +example +would +be +that + +random +IDs +periodically. +There +are +however, + +a +new +Smart +Ventilator +is +designed +to +consist + +few +issues. +First + +of +two +sub/child +Thing +Model +definitions +such +as +a +Ventilation +Thing +Model +that +provides +on/off +and +adjustRpm +capabilities, +and +an +LED +Thing +Model +that +provides +dimmable +and +RGB +capabilities. +Example +57 +Top +level/parent +Smart +Ventilator +Thing +Model +Smart +Ventilator +TM +Ventilation +TM +LED +TM +<pre class="SmartVentilator exampleTab1 selected" aria-busy= +"false">{ + "@context": "https://www.w3.org/2022/wot/td/v1.1", + "@type": "tm:ThingModel", + "title": "Smart Ventilator Thing Model", + "version" : { "model" : "1.0.0" }, + "links": [ + { + "rel": "tm:submodel", + "href": "./Ventilation.tm.jsonld", + "type": "application/tm+json", + "instanceName": "ventilation" + }, + { + "rel": "tm:submodel", + "href": "./LED.tm.jsonld", + "type": "application/tm+json", + "instanceName": "led" + } + ], + "properties" : { + "status" : {"type": "string", "enum": ["On", "Off", "Error"]} + } +} +<code class= +"hljs">{ + "@context": "https://www.w3.org/2022/wot/td/v1.1", + "@type": "tm:ThingModel", + "title": "Ventilator Thing Model", + "version": { + "model": "1.0.0" + }, + "properties": { + "switch": { + "type": "boolean", + "description": "True=On; False=Off" + }, + "adjustRpm": { + "type": "number", + "minimum": 200, + "maximum": 1200 + } + } +} +{ + "@context": "https://www.w3.org/2022/wot/td/v1.1", + "@type": "tm:ThingModel", + "title": "LED Thing Model", + "version": { + "model": "1.0.0" + }, + "properties": { + "R": { + "type": "number", + "description": "Red color" + }, + "G": { + "type": "number", + "description": "Green color" + }, + "B": { + "type": "number", + "description": "Blue color" + } + }, + "actions": { + "fadeIn": { + "title": "fadeIn", + "input": { + "type": "number", + "description": "fadeIn in ms" + } + }, + "fadeOut": { + "title": "fadeIn", + "input": { + "type": "number", + "description": "fadeOut in ms" + } + } + } +} +Such +composition +can + +all, +other +identification +information +in +the +TD +needs +to + +be +introduced + +hidden. +For +example, +client +IDs +issued + +by +CSPs +for +API +security +should +be +omitted +from +TDs +if +they +cannot +be +easily +changed. +Second, +if + +the +usage +of +the +links +container. +If +it +is +desired +to +provide +information +that + +device +generates + +a +Thing +Model +consists +of +one +or +more +(sub-) +Thing +Models +, +the +links +entries +MUST +use + +new +ID, + +the +"rel":"tm:submodel" +that +targets + +user +may +still +need + +to +know + +the +(sub-) +Thing +Models +. +Optionally +an +instanceName +can +be +provided +to +associate +an +individual +name + +current +ID + +to +find + +the +composed +(sub-) +Thing +Model +. + +device +via +discovery. + +This +is +useful +when +multiple +similar +Thing +Model +definitions +are +composed +and +needs +to +be +distinguished. +Different +strategies +can +be +followed +to +generate +Thing +Descriptions +from +composed +Thing +Model +definitions. +The +default +recommendation +is +to +generate +from +each +parent +and +sub/child +Thing +Model +a +corresponding +Thing +Descriptions +(also +see +11.4 +Derivation +of +Thing +Description +Instances +). +The +composition +relation + +can +be +reflected + +accomplished +however + +by +the +collection +and +item +relation +types +in +the +links +container +of +the +Thing +Descriptions +. +An +example +based +on +Smart +Ventilation + +generating +new +IDs +using +a +deterministic +cryptographic +generator +that + +is +given +here: +Example +58 +Thing +Descriptions + +a +function + +of +the +Smart +Ventilator +Top +level +Smart +Ventilator +TD +Ventilation +TD +LED +TD +<pre class="SmartVentilator exampleTab1 selected" aria-busy= +"false">{ + "@context": "https://www.w3.org/2022/wot/td/v1.1", + "title": "Smart Ventilator", + "securityDefinitions": { + "basic_sc": { + "scheme": "basic", + "in": "header" + } + }, + "security": "basic_sc", + "links": [ + { + "rel": "item", + "href": "./Ventilation.td.jsonld", + "type": "application/td+json" + }, + { + "rel": "item", + "href": "./LED.td.jsonld", + "type": "application/td+json" + }, + { + "rel": "type", + "href": "./SmartVentilator.tm.jsonld", + "type": "application/tm+json" + } + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "On", + "Off", + "Error" + ], + "forms": [ + { + "href": "http://127.0.13.232:4563/status" + } + ] + } + } +} +<code class= +"hljs">{ + "@context": "https://www.w3.org/2022/wot/td/v1.1", + "title": "Ventilator", + "securityDefinitions": { + "basic_sc": { + "scheme": "basic", + "in": "header" + } + }, + "security": "basic_sc", + "links": [ + { + "rel": "collection", + "href": "./SmartVentilation.td.jsonld", + "type": "application/td+json" + }, + { + "rel": "type", + "href": "./Ventilation.tm.jsonld", + "type": "application/tm+json" + } + ], + "security": "basic_sc", + "properties": { + "switch": { + "type": "boolean", + "description": "True=On; False=Off", + "forms": [ + { + "href": "http://127.0.13.212:4563/switch" + } + ] + }, + "adjustRpm": { + "type": "number", + "minimum": 200, + "maximum": 1200, + "forms": [ + { + "href": "http://127.0.13.212:4563/adjustRpm" + } + ] + } + } +} +{ + "@context": "https://www.w3.org/2022/wot/td/v1.1", + "title": "LED Thing Model", + "securityDefinitions": { + "basic_sc": { + "scheme": "basic", + "in": "header" + } + }, + "security": "basic_sc", + "links": [ + { + "rel": "collection", + "href": "./SmartVentilation.td.jsonld", + "type": "application/td+json" + }, + { + "rel": "type", + "href": "./LED.tm.jsonld", + "type": "application/tm+json" + } + ], + "properties": { + "R": { + "type": "number", + "description": "Red color", + "forms": [ + { + "href": "http://127.0.13.211:4563/R" + } + ] + }, + "G": { + "type": "number", + "description": "Green color", + "forms": [ + { + "href": "http://127.0.13.211:4563/G" + } + ] + }, + "B": { + "type": "number", + "description": "Blue color", + "forms": [ + { + "href": "http://127.0.13.211:4563/B" + } + ] + } + }, + "actions": { + "fadeIn": { + "title": "fadeIn", + "input": { + "type": "number", + "description": "fadeIn in ms" + }, + "forms": [ + { + "href": "http://127.0.13.211:4563/fadeIn" + } + ] + }, + "fadeOut": { + "title": "fadeOut", + "input": { + "type": "number", + "description": "fadeOut in ms" + }, + "forms": [ + { + "href": "http://127.0.13.211:4563/fadeOut" + } + ] + } + } +} +A +single + +current +time. +However, +note +that +regenerating +IDs +alone +does +not +make +tracking +impossible +since +a + +TD +can +also + +might + +be +generated +which +contains + +fingerprinted. +Also, +updating +an +ID +might +be +observable +to + +the +interaction +definitions + +owner + +of +the +top +level/parent +Thing +Model + +directory +service, +who +could +track + +and +all +interaction +definitions +of +all +sub/child +Thing +Models +. +To +avoid +name +collisions +of + +record + +the +sub/child +interaction +names +it + +updated +ID. +Even +if +the +TD + +is +recommended +to +rename + +deleted +and +reinserted + +the +JSON +name + +association +could +be +inferred. +This +is +however +exactly +parallel + +to +the +instanceName +followed + +situation + +with +'_' + +DHCP + +and +the +interaction +name + +rotation + +of +the +sub/child +Thing +Model +. +The +following +example +shows + +MAC +addresses. +In +general, +however, +generating +new +IDs +at +least +for +each +service +or +person +to +which + +a +generated +(self-contained) +Thing +Description +of +the +Smart +Ventilator +Thing +Model. +Example +59 +: +Self-contained + +TD +of +the +Smart +Ventilator +TM +{ + : <span class= +"hljs-string">"https://www.w3.org/2022/wot/td/v1.1", + : <span class= +"hljs-string">"Smart Ventilator", + : { + : { + : <span class= +"hljs-string">"basic", + : <span class= +"hljs-string">"header" + } + }, + : <span class= +"hljs-string">"basic_sc", + : [ + { + : <span class= +"hljs-string">"type", + : <span class= +"hljs-string">"./SmartVentilator.tm.jsonld", + : <span class= +"hljs-string">"application/tm+json" + } + ], + : { + : { + : <span class= +"hljs-string">"string", + : [ + , + , + + ], + : [ + { + <span class= +"hljs-attr">"href": <span class= +"hljs-string">"http://127.0.13.232:4563/status" + } + ] + }, + : { + : <span class= +"hljs-string">"boolean", + <span class= +"hljs-attr">"description": <span class= +"hljs-string">"True=On; False=Off", + : [ + { + <span class= +"hljs-attr">"href": <span class= +"hljs-string">"http://127.0.13.212:4563/switch" + } + ] + }, + : { + : <span class= +"hljs-string">"number", + : <span class= +"hljs-number">200, + : <span class= +"hljs-number">1200, + : [ + { + <span class= +"hljs-attr">"href": <span class= +"hljs-string">"http://127.0.13.212:4563/adjustRpm" + } + ] + }, + : { + : <span class= +"hljs-string">"number", + <span class= +"hljs-attr">"description": <span class= +"hljs-string">"Red color", + : [ + { + <span class= +"hljs-attr">"href": <span class= +"hljs-string">"http://127.0.13.211:4563/R" + } + ] + }, + : { + : <span class= +"hljs-string">"number", + <span class= +"hljs-attr">"description": <span class= +"hljs-string">"Green color", + : [ + { + <span class= +"hljs-attr">"href": <span class= +"hljs-string">"http://127.0.13.211:4563/G" + } + ] + }, + : { + : <span class= +"hljs-string">"number", + <span class= +"hljs-attr">"description": <span class= +"hljs-string">"Blue color", + : [ + { + <span class= +"hljs-attr">"href": <span class= +"hljs-string">"http://127.0.13.211:4563/B" + } + ] + } + }, + : { + : { + : <span class= +"hljs-string">"fadeIn", + : { + : <span class= +"hljs-string">"number", + <span class= +"hljs-attr">"description": <span class= +"hljs-string">"fadeIn in ms" + }, + : [ + { + <span class= +"hljs-attr">"href": <span class= +"hljs-string">"http://127.0.13.211:4563/fadeIn" + } + ] + }, + : { + : <span class= +"hljs-string">"fadeOut", + : { + : <span class= +"hljs-string">"number", + <span class= +"hljs-attr">"description": <span class= +"hljs-string">"fadeOut in ms" + }, + : [ + { + <span class= +"hljs-attr">"href": <span class= +"hljs-string">"http://127.0.13.211:4563/fadeOut" + } + ] + } + } +} +11.3.4 +Required +In +some +cases +it + +is +desirable + +supplied +makes +it +harder + +to +enforce +which +interaction +affordances +are +mandatory + +connect +registration +events +at +different +locations + +and +have + +times. +It +is +also +prudent + +to +be +implemented + +generate +new +identifiers +upon +major +changes + +in +configuration, +such +as +unregistering +from + +a +Thing +Description +instance + +local +network + +or +can +be +always +expected +by +the +Thing +Model +. +To +guarantee +the +implementation +of +particular +kinds +of +interaction +models, +Thing +Model +definitions +MUST +use +the +JSON +member +name +tm:required +. +tm:required +MUST +be + +hub +and +registering +with + +a +JSON +array +at + +new +one +(which +typically +indicates +a +change +in +ownership). +There +is +a +related +issue +with +long-lived +IP +addresses +which +might +need +to +be +updated +periodically +to +mitigate +tracking. +In + +the +top +level. +The +value + +context + +of +tm:required +MUST +provide +JSON +Pointer + +ipv6 + +[ + +RFC6901 + + +RFC8981 + + + +] +references +to +the +required +interaction +model +definitions. +The +JSON +Pointers +of +tm:required +MUST +resolve +to +an +entire +interaction +affordance +Map +definition. +The +following +sample +shows +the +usage +of +tm:required +for +the +Property +interaction +status +and +Action +interaction +toggle +. +Example +60 +: +Thing +Model + +discusses +this. +Finally, +there +is +a +problem + +with +the +tm:required +term +for +interaction +affordances. +{ + : [<span class= +"hljs-string">"https://www.w3.org/2022/wot/td/v1.1"], + : <span class= +"hljs-string">"tm:ThingModel", + : <span class= +"hljs-string">"Lamp Thing Model", + : <span class= +"hljs-string">"Lamp Thing Description Model", + : [ + , + + ], + : { + : { + <span class= +"hljs-attr">"description": <span class= +"hljs-string">"current status of the lamp (on|off)", + : <span class= +"hljs-string">"string", + : <span class= +"hljs-literal">true + } + }, + : { + : { + <span class= +"hljs-attr">"description": <span class= +"hljs-string">"Turn the lamp on or off" + } + }, + : { + : { + <span class= +"hljs-attr">"description": <span class= +"hljs-string">"Lamp reaches a critical temperature (overheating)", + : {<span class= +"hljs-attr">"type": <span class= +"hljs-string">"string"} + } + } +} +Since +the +Event +overheating + +devices +that +require +immutable +identifiers, +e.g. +medical +devices +in +such +jurisdictions. +This + +is +not +mandatory +it +may +not +be +available + +discussed + +in +a +Thing +Description +instance. +11.3.5 +Placeholder + +[ + + +wot-thing-description11 + + +A +Thing +Model + + +], +but +in +summary +the +problem + +can +specify +which +terms +should + +be +used +in +a +TD +instance, +but +their +values + +avoided +if +such +immutable +identifiers + +are +unspecific + +made +available +only +as +protected +properties, +e.g. +via +affordances +requiring +authentication, +not +in +the +TD, + +and +are +first +known +during +TD +instantiation. +In +such +a +case + +the +placeholder +labeling +MAY +be +used +in +Thing +Model +that +MUST +be +substituted +with +a +concrete +value +when + +TD +instance + +identifier +itself +(if +used) + +is +created +from +the +Thing +Model. +The +string-based +pattern + +independent + +of +the +placeholder +MUST +follow +a +valid +pattern +based +on +the +regular +expression +{{2}[ +-~]+}{2} +(e.g., +{{ +PLACEHOLDER_IDENTIFIER +}} +). +The +characters +between +{{ + +immutable +identifier, + +and +}} +are +used +as +identifier +name +of +the +placeholder. +The +identifier +name +can +be +used +to +identify +the +placeholder +for +the +substitution +process. +A +placeholder + +so + +can +only + +be +applied +within + +made +mutable. +
  • +To +reduce + +the +value + +risk + +of +the +JSON +name-value +pair +and +the +value +has + +negative +location +inferencing, +access + +to +private +directories + +SHOULD + +be +a +JSON +string. + +limited +by +using +access +controls. + + +In +the +case +that +a +non +string-based +value +of +a +JSON +name-value +pair +should +have +a +placeholder, +the +value +must +be +(temporarily) +typed +as +string. +After +replacing +the +placeholder, +e.g. +when +creating +a +Thing +Description +instance, +the +original +type +can +be +applied +with + +If +an +attacker +cannot +access + +the +corresponding +replaced +value. +The +following +Thing +Model +example +defines +different +placeholders. +The +placeholder +map +is +used + +service, +they +cannot +retrieve +information + +to +apply +the +replacement +and + +infer +location. +Access +rights +provided + +to +transform +the +intended +value +type. +Example +61 +Thing +Description +generation +from +Thing +Model +Thing +Model +Placeholder +Map +Thing +Description +<pre class="thingmodel exampleTab1 selected" aria-busy= +"false">{ + "@context": ["https://www.w3.org/2022/wot/td/v1.1"], + "@type" : "tm:ThingModel", + "title": "Thermostate No. {{THERMOSTATE_NUMBER}}", + "base": "mqtt://{{MQTT_BROKER_ADDRESS}}", + "properties": { + "temperature": { + "description": "Shows the current temperature value", + "type": "number", + "minimum": -20, + "maximum": "{{THERMOSTATE_TEMPERATURE_MAXIMUM}}", + "observable" : "{{THERMOSTATE_TEMPERATURE_OBSERVABLE}}" + } + } + ... +} +<code class= +"hljs">{ + "THERMOSTATE_NUMBER": 4, + "MQTT_BROKER_ADDRESS" : "192.168.178.72:1883", + "THERMOSTATE_TEMPERATURE_MAXIMUM": 47.7, + "THERMOSTATE_TEMPERATURE_OBSERVABLE" : true +} +<pre class="thingdescription exampleTab1" aria-busy= +"false">{ + "@context": ["https://www.w3.org/2022/wot/td/v1.1"], + "@type" : "Thing", + "title": "Thermostate No. 4", + "base": "mqtt://192.168.178.72:1883", + "properties": { + "temperature": { + "description": "Shows the current temperature value", + "type": "number", + "minimum": -20.0, + "maximum": 47.7, + "observable" : true + } + } + ... +} +11.4 +Derivation + +guests +(e.g. +for +Peer-to-Peer +Personal +scenarios) +should +be +appropriately +time-limited. +Use + +of +Thing +Description +Instances +Thing +Models +can + +long +time-to-live +values +may + +be +used +as +templates +to +generate +a +Thing +Description +based +on +the +restrictions +defined + +appropriate + +in +Sections +5. +TD +Information +Model +and +6. +TD +Representation +Format +. +During +this +process +missing +data +such +as +communication +and +security +metadata +have +to +be +complemented +to +create +valid +Thing +Description +instances. +A +Thing +Model +MUST + +other +cases. +In +addition, +TDs +should + +be +defined +in +such +a +way +that +there +are +no +inconsistencies +that +would +result + +updated + +in +a +Thing +Description +not +being +able +to +meet + +directory +only +when +they +change. +For +example, + +the +requirements +as +described +in +Section +5. + +TD +Information +Model +and +6. +TD +Representation +Format +. +A +TM-to-TD +generator +to +derive +a +Thing +Description +instance +from +a +Thing +Model +transforms +it +to + +for + +a +Partial +TD +using +the +following +steps: +Copy +all +definitions +from +the +input +Thing +Model +to +the +resulting +Partial +TD +instance. +If +used, +the +extension +and +imports +feature +MUST + +car +may +only + +be +resolved + +updated +when +new +car +firmware +is +available +providing +new +services, + +and +represented +in + +the +Partial +TD +instance +according +to +11.3.2 +Extension +and +Import +. +If +used, +links +element +entry +with +"rel":"tm:extends" +MUST + +time-to-live +might + +be +removed +from +the +current +Partial +TD + +set +at +one +month +(covering +most +absences). + +
  • +The +tm:ThingModel +value +of +the +top-level +@type +MUST +to +be +replaced +by +the +value +Thing + +
  • + +When +explicit +location +information +is +available, +whether +stored + +in +the +Partial + +a + +TD +instance. +If +the +tm:required +feature +is +used +based +on +Section +11.3.4 +Required +, +the +required +interactions + +or +available +in +a +property, +additional +care + + +MUST + +SHOULD + + +be +taken +over + +to +only +share + +the +Partial + +TD +instance. +If +used, +all +placeholders +(see +Section +11.3.5 +Placeholder +) +in + +and/or +access +to + +the +Thing +Model +MUST +be +replaced + +device + +with +a +valid +corresponding +value +in + +trusted +partners, +including +directories. + +If + +the +Partial + +TD +. +Finally, + +must +be +shared +with + +a +TM-to-TD +generator +will +take + +public +directory, + +the +resulting +Partial +TD +and +transform +it +into +a +Thing +Description +with +this +last +step +Missing +communication +and/or +security +metadata +details + +location +information + + +MUST + +MAY + + +be +completed +in +the +Thing +Description +instance +based +on +Section +6.3.4 +securityDefinitions +and +security +and/or +6.3.9 +forms + +stripped. + +. + +
  • +
+Thing +description +instances +that +follow +a +Thing +Model +can +carry +the +information +regarding +which +type +of +Thing +Model +is +derived. +In +this +context, +the +linking +concept +can +be +used +with +"rel" +: +"type" +(also +see +Section +5.3.4.1 +Link +), +as +shown +in +the +following +example: +Example +62 +Linking +Thing +Description +to +a +Thing +Model +Definition +Thing +Model +Thing +Description +<pre class="selected exampleTab2 thingmodel" aria-busy= +"false">{ + ... + "@type": "tm:ThingModel", + "title": "Smart Pump", + "description": "Smart Pump live plant and simulator", + "id": "urn:smart:device:wot:pump", + "version" : {"model" : "1.0.0" }, + ... +} +<pre class="exampleTab2 thingdescription" aria-busy= +"false">{ + ... + "@type": "Thing", + "title": "Smart Pump", + "description": "Smart Pump live plant and simulator", + "id": "urn:smart:device:wot:pump:instance:1", + "version" : {"instance": "1.0.0", + "model" : "1.0.0" }, + "links" : [{ + "rel" : "type", + "href" : "http://example.com/ThingModelPool/Pump", + "type": "application/td+json" + }], + ... +} +Please +note +that +a +TD +can +only +be +an +instance +of +one +TM +at +a +time. +That +means +for +Thing +Descriptions: +The +links +array +can +use +the +entry +with +"rel" +: +"type" +a +maximum +of +once. + +
+
+
+
+
+

+ +11.5 + +9.2 + + +Examples + +Query +Tracking + +

+ + +
+

+The +following +Thing +Model +extends +the +model +as +shown +in +Example +53 + +A +directory +service +could +potentially +record + +and +overwrites + +track +queries +by +an +individual, +identifying +that +individual +by +their +authenticated +identity +provided. +Then + +the +maximum +value + +set + +of +the +dim +property +Example +63 +: +Extending +Smart +Control +Lamp + +queries +associated + +with +a +modified +dim +constrained +{ + : [<span class= +"hljs-string">"https://www.w3.org/2022/wot/td/v1.1"], + : <span class= +"hljs-string">"tm:ThingModel", + : [{ + : <span class= +"hljs-string">"tm:extends", + : <span class= +"hljs-string">"http://example.com/SmartControlLampTM", + : <span class= +"hljs-string">"application/td+json" + }], + : { + : { + : <span class= +"hljs-number">200 + } + } +} +The +expected +Thing +Description +that +is +derived +from +this +Thing +Model +would + +an +individual +could + +be +(with +HTTP +Binding + +used +to +profile +that +individual, + +and +basic +security +applied): + +specific +queries +may +also +reveal +personal +information +about +an +individual. + +

+Example +64 +: +Thing +Description +{ + "@context": ["https://www.w3.org/2022/wot/td/v1.1"], + "@type" : "Thing", + "title": "Smart Lamp Control", + "securityDefinitions": { + "basic_sc": {"scheme": "basic", "in": "header"} + }, + "security": "basic_sc", + "links" : [{ + "rel": "type", + "href": "url/to/SmartLampControlModifiedDimTM", + "type": "application/td+json" + } + ], + "properties" : { + "onOff : { + "type: "boolean", + "forms": [{"href": "https://smartlamp.example.com/onoff"}] + }, + "dim" : { + "type": "integer", + "minimum": 0, + "maximum": 200, + "forms": [{"href": "https://smartlamp.example.com/dim"}] + } + } +} +12. +IANA +Considerations +12.1 +application/td+json +Media +Type +Registration + +
+
+Type +name: +application +Subtype +name: +td+json +Required +parameters: +None +Optional +parameters: +None +Encoding +considerations: +See +RFC 6839, +section +3.1 +. +Security +considerations: + +Mitigations: + +
+
+See +RFC 8259, +section +12 +. + +

+Since +WoT +Thing +Description +is +intended +to +be +a +pure +data +exchange +format +for +Thing +metadata, +the +serialization +SHOULD +NOT +be +passed +through +a +code +execution +mechanism +such +as +JavaScript's +eval() +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 + + +When +accessing + +a +JSON-LD +1.1 +processor, +which +typically +follows +links +to +remote +contexts +(i.e., +TD +context +extensions, +see +W3C +WoT +Thing +Description, +section +7 +) +automatically, +resulting +in +the +transfer +of +files +without +the +explicit +request +of +the +Consumer +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), + +public +directory, +like +any +other +public +web +service, +users +and + +implementations +in +general + + +SHOULD + +statically +cache +vetted +versions +of +their +supported +context +extensions +and +not +to +follow +links +to +remote +contexts. + +use +an +anonymous +identity +provider. + + +Supported +context +extensions + +In +particular, +OAuth2 + +can +be +managed +through +a +secure +software +update +mechanism +instead. +Context +Extensions +(see +W3C +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 + +provide +tokens +which +don't +identify +specific +individuals, + +they +may +modify +the +TD +Information +Model +in +a +way +that +could +compromise +security. +For +this +reason, +Consumer +again +SHOULD +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. +Consumers +SHOULD +treat +any +TD +metadata +with +due +skepticism. +Interoperability +considerations: +See +RFC 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 +the +W3C +Web +of +Things, +that +is, +Things +, +Consumers +, +and +Intermediaries +as +defined +in +the +Web +of +Things +(WoT) +Architecture +. +Fragment +identifier +considerations: +See +RFC 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 +12.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. + +just +assert +access +rights +proven +elsewhere. + +

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

+ +A. + +10. + + +Example +Thing +Description +Instances + +Performance +Considerations + +

+ + +
+

+ +This +section +is +non-normative. + +

+
+
+

+ +A.1 + +10.1 + + +MyLampThing +Example +with +CoAP +Protocol +Binding + +Incremental +Transfer + +

+ + +
+

+Feature + + +TD + +objects +are +not +constrained +in +size. +They +may +become +expensive +to +process +and +transfer +individually +or +collectively. +A +single +TD +or +a + +list +of +the +Thing +: + +TDs +could +be +too +large +for +a +constrained +device, +serving +its +own +TD +to +consumers, +submitting +it +to +a +directory, +or +consuming +other +TDs. +To +meet +such +requirements, +servers +should +support +incremental +transfer +of +payloads +using +protocol-specific +mechanisms: + +

+ +

+Most +HTTP +servers +and +clients +automatically +process + +the +illuminance + +data +(number + +that + +is +serialized + +transferred + +in +text +format) +to +the +topic +/illuminance +by +the +MQTT +broker +running +behind + +chunks. +Memory-constrained +clients +should +consider +consuming + +the +address +192.168.1.187:1883. + +received +data +incrementally, +instead +of +trying +to +load +a +whole +object +in +memory +for +de-serialization. +

+Example +66 + + +11. + + +IANA +Considerations +

+ +: +MyIlluminanceSensor +with +MQTT +Protocol +Binding +{ + : <span class= +"hljs-string">"https://www.w3.org/2022/wot/td/v1.1", + : <span class= +"hljs-string">"MyIlluminanceSensor", + : <span class= +"hljs-string">"urn:dev:ops:32473-WoTIlluminanceSensor-1234", + <span class= +"hljs-attr">"securityDefinitions": {<span class= +"hljs-attr">"nosec_sc": {<span class= +"hljs-attr">"scheme": <span class= +"hljs-string">"nosec"}}, + : [<span class= +"hljs-string">"nosec_sc"], + : { + : { + :{<span class= +"hljs-attr">"type": <span class= +"hljs-string">"integer"}, + : [ + { + <span class= +"hljs-attr">"href": <span class= +"hljs-string">"mqtt://192.168.1.187:1883/illuminance", + <span class= +"hljs-attr">"contentType": <span class= +"hljs-string">"text/plain", + <span class= +"hljs-attr">"op": <span class= +"hljs-string">"subscribeevent" + } + ] + } + } +} + +
+
+
+

+A.3 + + +11.1 + + +Webhook +Event +Example + +Well-Known +URI +Registration + +

+ + +
+

+Feature +list +of +the +Thing +: +Title: +WebhookThing +Context +Extensions: +use +HTTP +Protocol +Binding +supplements +(htv +prefix +already +included +in +TD +context) +Offered +affordances: +1 +Event +Security: +none +Protocol +Binding: +HTTP +Comment: +WebhookThing +provides +an +Event +affordance +temperature +which +periodically +pushes +the +latest +temperature +value +to +the +Consumer +using +a +Webhook +mechanism, +where +the +Thing +sends +POST +requests +to +a +callback +URI +provided +by +the +Consumer +. +To +describe +this, +the +subscription +member +defines +a +write-only +parameter +callbackURL +, +which +must +be +submitted +through +the +subscribeevent +form. +The +read-only +parameter +subscriptionID +is +returned +by +the +subscription. +The +WebhookThing + +IANA + +will +then +periodically +POST +to +this +callback +URI +with +a +payload +defined +by +data +. +To +unsubscribe, +the +Consumer +has +to +submit +the +unsubscribeevent +form +with +the +subscriptionID +as +described +in +cancellation +. +Alternatively, +uriVariables +approache +can + +be +used +that +informs +the +Consumer + +asked + +to +include + +allocate + +the +subscriptionID +string + +following +value + +into +the +Well-Known + +URI +that +have +to +be +called +with +the +delete +method +(see +tab +'With +uriVariables'). +In +such +setup, +the +cancellation +container +can +be +obmitted. +In +general, +this +example +can +be +further +automated +by +using +a +TD +Context +Extension +to +include +proper +semantic +annotations. +Example +67 + +defined +in +[ + + +RFC8615 + + +Temperature +Event +with +subscription +and +cancellation +Without +uriVariables +With +uriVariables +<pre class="without exampleTab1 selected" aria-busy= +"false">{ + "@context": "http://www.w3.org/ns/td", + "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 + } + } + }, + "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/cancel", + "htv:methodName": "POST" + } + ] + } + } +} +<code class= +"hljs">{ + "@context": "http://www.w3.org/ns/td", + "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." + }, + "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. + +11.2 + + +JSON +Schema +for +TD +Instance +Validation + +Service +Name +Registration +

+ +
+

+This +section +is +non-normative. +Below +is +a +JSON +Schema + +IANA +will +be +asked +to +allocate +the +following +value +into +Service +Name +and +Transport +Protocol +Port +Number +Registry +defined +in + +[ + +JSON-SCHEMA + + +RFC6335 + + + +] +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 + + +
+
+
+

+C. + + +11.3 + + +JSON-LD +Context +Usage + +CoRE +Resource +Types +Registration +

+ +
+

+This +section +is +non-normative. +The +present +specification +introduces +the +TD +Information +Model +as +a +set +of +constraints +over +different +Vocabularies +, +i.e. +sets +of +Vocabulary +Terms +. +This +section +briefly +explains +how +a +machine-readable +definition +of +these +constraints +can + +IANA +will + +be +integrated + +asked +to +allocate +the +following +values + +into +client +applications, +by +making +use +of + +the +mandatory + +Resource +Type +( + + +@context + +rt= + + +) +Link +Target +Attribute +Values +sub-registry + +of +a +TD +document. +Accessing + +the +TD +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 + +Constrained +Restful +Environments +(CoRE) +Parameters +registry + +defined +as +logical +axioms + +in +the +RDF +format, +readily +interpretable +by +client +programs. +All +Vocabulary +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 + + +RFC6690 + + + +]. +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/2022/wot/td/v1.1 + +

+includes +the +following +mappings +(among +others): + + + + + + + + + + + + + + + + +... + + +
+Value + +Description + +Reference +
+ +properties + +wot.thing + + + +→ +https://www.w3.org/2019/wot/td#hasPropertyAffordance + +Thing +Description +of +a +Thing + + +object + + +→ +https://www.w3.org/2019/wot/json-schema#ObjectSchema + + +6.4 + +CoRE +Link +Format +and +CoRE +Resource +Directory + +
+ +basic + +wot.directory + + + +→ +https://www.w3.org/2019/wot/security#BasicSecurityScheme + +Directory +Description +of +a + +Thing +Description +Directory + + +href + + +→ +https://www.w3.org/2019/wot/hypermedia#hasTarget + + +6.4 + +CoRE +Link +Format +and +CoRE +Resource +Directory + +
+This + +
+
+
+
+

+ +A. + +JSON +file +follows +the +JSON-LD +1.1 +syntax +[ + +Schema +for +WoT +Discovery +TD-extensions +

+JSON-LD11 + + +]. +Numerous +JSON-LD +libraries +can +automatically +process +the +@context +of +a +TD +and +expand +all +the + +
+The +following + +JSON +strings +it +includes. +Once +every +Vocabulary +Term +of +a +TD +is +expanded +to +a +IRI, + +Schema +specifies + +the +second +step +consists + +extensions +used + +in +dereferencing +this +IRI +to +get +fragments +of +the +TD +Information +Model +that +refer +to +that +Vocabulary +Term + + +Enriched +TDs + +. +For +instance, +dereferencing +the +IRI +https://www.w3.org/2019/wot/json-schema#ObjectSchema +results +in +an +RDF +document +stating +that +the +term +ObjectSchema +is +a +Class + +It +can +be +used +for +validating + +TDs + + +and +more +precisely, + +by + +a +sub-class +of +DataSchema +. +Such +logical +axioms +are +represented +in +RDF +using +formalisms +of +various +complexity: +here, +sub-class +relations +are +expressed +as +RDF +Schema +axioms +[ +RDF-SCHEMA + + +TDD + + +]. +Moreover, +these +axioms +may +be +serialized +in +various +formats. +Here, +they +are +serialized + +as +prescribed + +in +the +Turtle +format +[ +TURTLE + + +]: +<pre class= +"nohighlight"><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> +. + + +7.3.2.1.6 + +Validation +.
{  "title": 
+"hljs-string">"WoT Discovery TD-extensions Schema - 21 May 2021",
+  "description": 
+"hljs-string">"JSON Schema for validating TD instances with WoT Discovery extensions",
+  "$schema ": 
+"hljs-string">"http://json-schema.org/draft/2019-09/schema#",
+  "type": 
+"hljs-string">"object",
+  "properties": {    "registration": {      "type": 
+"hljs-string">"object",
+      "properties": {        "created": {          "type": 
+"hljs-string">"string",
+          "format": 
+"hljs-string">"date-time"
+        },
+        "expires": {          "type": 
+"hljs-string">"string",
+          "format": 
+"hljs-string">"date-time"
+        },
+        "retrieved": {          "type": 
+"hljs-string">"string",
+          "format": 
+"hljs-string">"date-time"
+        },
+        "modified": {          "type": 
+"hljs-string">"string",
+          "format": 
+"hljs-string">"date-time"
+        },
+        "ttl": {          "type": 
+"hljs-string">"number"
+        }
+      }
+    }
+  }
+}
+
+
+
+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 +header +Accept: +text/turtle +in +their +request. + +
+
+
+

+ +D. + +B. + + +Recent +Specification +Changes +

+ + +
+
+
+

+ +D.1 + +B.1 + + +Changes +from +Second +Public +Working +Draft +7 + +2 + +June +2021 +Working +Draft + +

+ + +
+

+ +5.3.3 + +B.2 + + +Security +Vocabulary +Definitions +: +In +section + +Changes +from +24 +November +2020 +First +Public +Working +Draft +

+5.3.3.4 +BasicSecurityScheme + + +, +the +assignment +of +the +in +member +was +clarified. + +
+ +
+D.2 +Changes +from +First +Public +Working +Draft +24 +November +2020 +Changes +from +First +Public +Working +Draft +24 +November +2020 +are +described +in +the +Second +Public +Working +Draft +. + +
+
+
+

+ +E. + +C. + + +Acknowledgements + +Acknowledgments + +

+ + +
+

+The +editors +would +like +to +special +thank +Matthias +Kovatsch +(co-editor +of +TD +1.0), +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 + +Many + +thanks +to +the + +W3C + +staff +and +all +other +current +and +former + +active +Participants +of +the + +W3C + +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. + +
+Note +Temporary +ReSpec +fix +regarding +non-listed +references: +[ +RFC6068 +], +[ +RFC3966 +], +[ +html +], +[ +RFC6750 +], +[ +RFC7519 +], +[ +RFC7797 +], +[ +RFC8392 +], +[ +RFC7516 +], +[ +LDML +], +[ +SEMVER +], +[ +RFC7617 +], +[ +RFC7616 +] + +
+
+

+ +F. + +D. + + +References +

+ + +
+
+
+

+ +F.1 + +D.1 + + +Normative +references +

+ + +
+
+[APPMANIFEST] + +
+[CoRE-RD] + +
+
+ + +CoRE +Resource +Directory +. +Christian +Amsüss; +Zach +Shelby; +Michael +Koster; +Carsten +Bormann; +Peter +van +der +Stok. +IETF. +2 +November +2020. +URL: + +https://tools.ietf.org/html/draft-ietf-core-resource-directory-26 +
+[DID-CORE] +
+ +Web +Application +Manifest + +Decentralized +Identifiers +(DIDs) +v1.0 + + +. +Marcos +Caceres; +Kenneth +Christiansen; +Matt +Giuca; +Aaron +Gustafson; +Daniel +Murphy; +Anssi +Kostiainen. + +Manu +Sporny; +Amy +Guy; +Markus +Sabadello; +Drummond +Reed. + +W3C. +17 +February +2022. + +3 +August +2021. + +W3C +Working +Draft. + +Proposed +Recommendation. + +URL: +https://www.w3.org/TR/appmanifest/ + + +https://www.w3.org/TR/did-core/ + + +
+[BCP47] + +
+[EVENTSOURCE] + +
+
+ + +Tags +for +Identifying +Languages + +Server-Sent +Events + + +. +A. +Phillips, +Ed.; +M. +Davis, +Ed.. +IETF. +September +2009. +Best +Current +Practice. + +Ian +Hickson. +W3C. +28 +January +2021. +W3C +Recommendation. + +URL: +https://www.rfc-editor.org/rfc/rfc5646 + + +https://www.w3.org/TR/eventsource/ + + +
+[ECMA-262] + +
+[GDPR-Defs] + +
+
+ + +ECMAScript +Language +Specification + +General +Data +Protection +Regulation +(GDPR) +Article +4 +- +Definitions + + +. +Ecma +International. + +European +Union +(EU) +and +the +European +Economic +Area +(EEA). + +URL: +https://tc39.es/ecma262/multipage/ + + +https://gdpr-info.eu/art-4-gdpr/ + + +
+[RFC2046] + +
+[JSON-LD11] + +
+
+ + +Multipurpose +Internet +Mail +Extensions +(MIME) +Part +Two: +Media +Types + +JSON-LD +1.1 + + +. +N. +Freed; +N. +Borenstein. +IETF. +November +1996. +Draft +Standard. + +Gregg +Kellogg; +Pierre-Antoine +Champin; +Dave +Longley. +W3C. +16 +July +2020. +W3C +Recommendation. + +URL: +https://www.rfc-editor.org/rfc/rfc2046 + + +https://www.w3.org/TR/json-ld11/ +
+[OWASP-Top-10] +
+OWASP +Top +Ten +. +OWASP. +URL: + +https://owasp.org/www-project-top-ten/ + + +
+
+[RFC2119] +
+
+ + +Key +words +for +use +in +RFCs +to +Indicate +Requirement +Levels + +. +S. +Bradner. +IETF. +March +1997. +Best +Current +Practice. +URL: + +https://www.rfc-editor.org/rfc/rfc2119 + +
+[RFC3339] + +
+[RFC2782] + +
+
+ + +Date +and +Time +on + +A +DNS +RR +for +specifying + +the +Internet: +Timestamps +. +G. +Klyne; +C. +Newman. +IETF. +July +2002. +Proposed +Standard. +URL: +https://www.rfc-editor.org/rfc/rfc3339 +[RFC3629] +UTF-8, +a +transformation +format + +location + +of +ISO +10646 +. +F. +Yergeau. +IETF. +November +2003. +Internet +Standard. +URL: +https://www.rfc-editor.org/rfc/rfc3629 +[RFC3986] +Uniform +Resource +Identifier +(URI): +Generic +Syntax + +services +(DNS +SRV) + + +. +T. +Berners-Lee; +R. +Fielding; + +A. +Gulbrandsen; +P. +Vixie; + +L. +Masinter. + +Esibov. + +IETF. +January +2005. +Internet + +February +2000. +Proposed + +Standard. +URL: +https://www.rfc-editor.org/rfc/rfc3986 + + +https://www.rfc-editor.org/rfc/rfc2782 + + +
+[RFC3987] + +
+[RFC4122] + +
+
+ + +Internationalized +Resource +Identifiers +(IRIs) + +A +Universally +Unique +IDentifier +(UUID) +URN +Namespace + + +. +P. +Leach; + +M. +Duerst; +M. +Suignard. + +Mealling; +R. +Salz. + +IETF. +January + +July + +2005. +Proposed +Standard. +URL: +https://www.rfc-editor.org/rfc/rfc3987 + + +https://www.rfc-editor.org/rfc/rfc4122 + + +
+
+[RFC4279] +
+
+ + +Pre-Shared +Key +Ciphersuites +for +Transport +Layer +Security +(TLS) + +. +P. +Eronen, +Ed.; +H. +Tschofenig, +Ed.. +IETF. +December +2005. +Proposed +Standard. +URL: + +https://www.rfc-editor.org/rfc/rfc4279 + +
+[RFC6570] + +
+[RFC6335] + +
+
+ + +URI +Template + +Internet +Assigned +Numbers +Authority +(IANA) +Procedures +for +the +Management +of +the +Service +Name +and +Transport +Protocol +Port +Number +Registry + + +. +J. +Gregorio; +R. +Fielding; + +M. +Hadley; + +Cotton; +L. +Eggert; +J. +Touch; + +M. +Nottingham; +D. +Orchard. + +Westerlund; +S. +Cheshire. + +IETF. +March +2012. +Proposed +Standard. + +August +2011. +Best +Current +Practice. + +URL: +https://www.rfc-editor.org/rfc/rfc6570 + + +https://www.rfc-editor.org/rfc/rfc6335 + + +
+[RFC6749] + +
+[RFC6690] + +
+
+ + +The +OAuth +2.0 +Authorization +Framework + +Constrained +RESTful +Environments +(CoRE) +Link +Format + + +. +D. +Hardt, +Ed.. + +Z. +Shelby. + +IETF. +October + +August + +2012. +Proposed +Standard. +URL: +https://www.rfc-editor.org/rfc/rfc6749 + + +https://www.rfc-editor.org/rfc/rfc6690 + + +
+[RFC6901] + +
+[RFC6762] + +
+
+ + +JavaScript +Object +Notation +(JSON) +Pointer + +Multicast +DNS + + +. +P. +Bryan, +Ed.; +K. +Zyp; + +S. +Cheshire; + +M. +Nottingham, +Ed.. + +Krochmal. + +IETF. +April + +February + +2013. +Proposed +Standard. +URL: +https://www.rfc-editor.org/rfc/rfc6901 + + +https://www.rfc-editor.org/rfc/rfc6762 + + +
+[RFC7252] + +
+[RFC6763] + +
+
+ + +The +Constrained +Application +Protocol +(CoAP) + +DNS-Based +Service +Discovery + + +. +Z. +Shelby; +K. +Hartke; +C. +Bormann. + +S. +Cheshire; +M. +Krochmal. + +IETF. +June +2014. + +February +2013. + +Proposed +Standard. +URL: +https://www.rfc-editor.org/rfc/rfc7252 + + +https://www.rfc-editor.org/rfc/rfc6763 + + +
+[RFC8174] + +
+[RFC7231] + +
+
+ + +Ambiguity +of +Uppercase +vs +Lowercase +in +RFC +2119 +Key +Words + +Hypertext +Transfer +Protocol +(HTTP/1.1): +Semantics +and +Content + + +. +B. +Leiba. + +R. +Fielding, +Ed.; +J. +Reschke, +Ed.. + +IETF. +May +2017. +Best +Current +Practice. + +June +2014. +Proposed +Standard. + +URL: +https://www.rfc-editor.org/rfc/rfc8174 + + +https://httpwg.org/specs/rfc7231.html + + +
+[RFC8252] + +
+[RFC7396] + +
+
+ + +OAuth +2.0 +for +Native +Apps + +JSON +Merge +Patch + + +. +W. +Denniss; + +P. +Hoffman; + +J. +Bradley. + +Snell. + +IETF. +October +2017. +Best +Current +Practice. +URL: +https://www.rfc-editor.org/rfc/rfc8252 +[RFC8259] +The +JavaScript +Object +Notation +(JSON) +Data +Interchange +Format +. +T. +Bray, +Ed.. +IETF. +December +2017. +Internet + +2014. +Proposed + +Standard. +URL: +https://www.rfc-editor.org/rfc/rfc8259 + + +https://www.rfc-editor.org/rfc/rfc7396 + + +
+[RFC8288] + +
+[RFC7807] + +
+
+ + +Web +Linking + +Problem +Details +for +HTTP +APIs + + +. +M. +Nottingham. + +Nottingham; +E. +Wilde. + +IETF. +October +2017. + +March +2016. + +Proposed +Standard. +URL: +https://httpwg.org/specs/rfc8288.html + + +https://www.rfc-editor.org/rfc/rfc7807 + + +
+[RFC8628] + +
+[RFC7959] + +
+
+ + +OAuth +2.0 +Device +Authorization +Grant + +Block-Wise +Transfers +in +the +Constrained +Application +Protocol +(CoAP) + + +. +W. +Denniss; +J. +Bradley; +M. +Jones; +H. +Tschofenig. + +C. +Bormann; +Z. +Shelby, +Ed.. + +IETF. +August +2019. + +2016. + +Proposed +Standard. +URL: +https://www.rfc-editor.org/rfc/rfc8628 + + +https://www.rfc-editor.org/rfc/rfc7959 + + +
+[SEMVER] + +
+[RFC8174] + +
+
+ + +Semantic +Versioning +2.0.0 + +Ambiguity +of +Uppercase +vs +Lowercase +in +RFC +2119 +Key +Words + + +. +Tom +Preston-Werner. +26 +December + +B. +Leiba. +IETF. +May + +2017. +Best +Current +Practice. + +URL: +https://semver.org/ + + +https://www.rfc-editor.org/rfc/rfc8174 + + +
+[websub] + +
+[RFC8288] + +
+
+ + +WebSub + +Web +Linking + + +. +Julien +Genestoux; +Aaron +Parecki. +W3C. +23 +January +2018. +W3C +Recommendation. + +M. +Nottingham. +IETF. +October +2017. +Proposed +Standard. + +URL: +https://www.w3.org/TR/websub/ + + +https://httpwg.org/specs/rfc8288.html + + +
+[XMLSCHEMA11-2-20120405] + +
+[RFC8615] + +
+
+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/ +F.2 +Informative +references +[ACE] + + + +Authentication +and +Authorization +for +Constrained +Environments +(ACE) +using +the +OAuth +2.0 +Framework +(ACE-OAuth) + +Well-Known +Uniform +Resource +Identifiers +(URIs) + + +. +L. +Seitz; +G. +Selander; +E. +Wahlstroem; +S. +Erdtman; +H. +Tschofenig. + +M. +Nottingham. + +IETF. +27 +March + +May + +2019. +Internet-Draft. +URL: +https://datatracker.ietf.org/doc/html/draft-ietf-ace-oauth-authz-24 +[html] +HTML +Standard +. +Anne +van +Kesteren; +Domenic +Denicola; +Ian +Hickson; +Philip +Jägenstedt; +Simon +Pieters. +WHATWG. +Living + +Proposed + +Standard. +URL: +https://html.spec.whatwg.org/multipage/ + + +https://www.rfc-editor.org/rfc/rfc8615 + + +
+[HTTP-in-RDF10] + +
+[RFC8981] + +
+
+ + +HTTP +Vocabulary + +Temporary +Address +Extensions +for +Stateless +Address +Autoconfiguration + +in +RDF +1.0 + +IPv6 + + +. +Johannes +Koch; +Carlos +A. +Velasco; +Philip +Ackermann. +W3C. +2 + +F. +Gont; +S. +Krishnan; +T. +Narten; +R. +Draves. +IETF. + +February +2017. +W3C +Working +Group +Note. + +2021. +Proposed +Standard. + +URL: +https://www.w3.org/TR/HTTP-in-RDF10/ + + +https://www.rfc-editor.org/rfc/rfc8981 + + +
+[IANA-MEDIA-TYPES] + +
+[RFC9000] + +
+
+ + +Media +Types + +QUIC: +A +UDP-Based +Multiplexed +and +Secure +Transport + + +. +IANA. + +J. +Iyengar, +Ed.; +M. +Thomson, +Ed.. +IETF. +May +2021. +Proposed +Standard. + +URL: +https://www.iana.org/assignments/media-types/ + + +https://www.rfc-editor.org/rfc/rfc9000 + + +
+[IANA-URI-SCHEMES] + +
+[RFC9175] + +
+
+ + +Uniform +Resource +Identifier +(URI) +Schemes + +Constrained +Application +Protocol +(CoAP): +Echo, +Request-Tag, +and +Token +Processing + + +. +IANA. + +C. +Amsüss; +J. +Preuß +Mattsson; +G. +Selander. +IETF. +February +2022. +Proposed +Standard. + +URL: +https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml + + +https://www.rfc-editor.org/rfc/rfc9175 + + +
+[JSON-LD11] + +
+[SPARQL11-OVERVIEW] + +
+
+ + +JSON-LD + +SPARQL + +1.1 +Overview + + +. +Gregg +Kellogg; +Pierre-Antoine +Champin; +Dave +Longley. + +The +W3C +SPARQL +Working +Group. + +W3C. +16 +July +2020. + +21 +March +2013. + +W3C +Recommendation. +URL: +https://www.w3.org/TR/json-ld11/ + + +https://www.w3.org/TR/sparql11-overview/ + + +
+[JSON-SCHEMA] + +
+[wot-architecture11] + +
+
+ + +JSON +Schema +Validation: +A +Vocabulary +for +Structural +Validation + +Web + +of +JSON + +Things +(WoT) +Architecture +1.1 + + +. +Austin +Wright; +Henry +Andrews; +Geraint +Luff. +IETF. +19 +March +2018. +Internet-Draft. + +Michael +Lagally; +Ryuichi +Matsukura; +Toru +Kawaguchi; +Kunihiko +Toumura; +Kazuo +Kajimoto. +W3C. +24 +November +2020. +W3C +Working +Draft. + +URL: +https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01 + + +https://www.w3.org/TR/wot-architecture11/ + + +
+[JSON-SCHEMA-ONTOLOGY] + +
+[wot-thing-description11] + +
+
+ + +JSON +Schema +in +RDF + +Web +of +Things +(WoT) +Thing +Description +1.1 + + +. +Sebastian +Käbisch; +Takuki +Kamiya; +Michael +McCool; + +Victor +Charpenay; +Maxime +Lefrançois; +María +Poveda +Villalón. + +Charpenay. + +W3C. +11 +March +2022. +W3C +Working +Draft. + +URL: +https://www.w3.org/2019/wot/json-schema +[LDML] +Unicode +Technical +Standard +#35: +Unicode +Locale +Data +Markup +Language +(LDML) +. +Mark +Davis; +CLDR +Contributors. +URL: +https://unicode.org/reports/tr35/ + + +https://www.w3.org/TR/wot-thing-description11/ + + +
+[LINKED-DATA] + +
+[wot-usecases] + +
+
+ + +Linked +Data +Design +Issues + +Web +of +Things +(WoT): +Use +Cases + + +. +Tim +Berners-Lee. + +Michael +Lagally; +Michael +McCool; +Ryuichi +Matsukura; +Tomoaki +Mizushima. + +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. + +15 +October +2020. +Editor's +Draft. + +URL: +http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/mqtt-v3.1.1.html + + +https://w3c.github.io/wot-usecases/ + + +
+[OPENAPI] + +
+[xpath-31] + +
+
+ + +OpenAPI +Specification: +Version +3.0.1 + +XML +Path +Language +(XPath) +3.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 + +Jonathan +Robie; +Michael +Dyck; +Josh +Spiegel. +W3C. +21 +March + +2017. +W3C +Recommendation. + +URL: +https://swagger.io/specification/ + + +https://www.w3.org/TR/xpath-31/ + + +
+[RDF-SCHEMA] + +
+
+
+ +
+
+[JSONPATH] + +
+
+ + +The +tel +URI + +JSONPath: +Query +expressions + +for +Telephone +Numbers + +JSON + + +. +H. +Schulzrinne. + +Stefan +Gössner; +Glyn +Normington; +Carsten +Bormann. + +IETF. +December +2004. +Proposed +Standard. + +DRAFT. + +URL: +https://www.rfc-editor.org/rfc/rfc3966 + + +https://datatracker.ietf.org/doc/html/draft-ietf-jsonpath-base + + +
+[RFC6068] + +
+[LDP-Paging] + +
+
+ + +The +'mailto' +URI +Scheme + +Linked +Data +Platform +Paging +1.0 + + +. +M. +Duerst; +L. +Masinter; +J. +Zawinski. +IETF. +October +2010. +Proposed +Standard. + +Steve +Speicher; +John +Arwe; +Ashok +Malhotra. +W3C. +30 +June +2015. +W3C +Working +Group +Note. + +URL: +https://www.rfc-editor.org/rfc/rfc6068 + + +https://www.w3.org/TR/ldp-paging/ + + +
+[RFC6750] + +
+[REST-IOT] + +
+
+ + +The +OAuth +2.0 +Authorization +Framework: +Bearer +Token +Usage + +RESTful +Design +for +Internet +of +Things +Systems + + +. +M. +Jones; +D. +Hardt. + +Ari +Keranen; +Matthias +Kovatsch; +Klaus +Hartke. + +IETF. +October +2012. +Proposed +Standard. + +11 +May +2020. + +URL: +https://www.rfc-editor.org/rfc/rfc6750 + + +https://tools.ietf.org/html/draft-irtf-t2trg-rest-iot-06 + + +
+[RFC7231] + +
+[RFC7230] + +
+
+ + +Hypertext +Transfer +Protocol +(HTTP/1.1): +Semantics + +Message +Syntax + +and +Content + +Routing + + +. +R. +Fielding, +Ed.; +J. +Reschke, +Ed.. +IETF. +June +2014. +Proposed +Standard. +URL: +https://httpwg.org/specs/rfc7231.html + + +https://httpwg.org/specs/rfc7230.html + + +
+[RFC7516] + +
+[RFC7540] + +
+
+ + +JSON +Web +Encryption +(JWE) + +Hypertext +Transfer +Protocol +Version +2 +(HTTP/2) + + +. +M. +Jones; +J. +Hildebrand. +IETF. +May +2015. +Proposed +Standard. +URL: +https://www.rfc-editor.org/rfc/rfc7516 +[RFC7519] +JSON +Web +Token +(JWT) +. + +Belshe; +R. +Peon; + +M. +Jones; +J. +Bradley; +N. +Sakimura. + +Thomson, +Ed.. + +IETF. +May +2015. +Proposed +Standard. +URL: +https://www.rfc-editor.org/rfc/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://www.rfc-editor.org/rfc/rfc7797 + + +https://httpwg.org/specs/rfc7540.html + + +
+[RFC8392] + +
+[RFC8323] + +
+
+ + +CBOR +Web +Token +(CWT) + +CoAP +(Constrained +Application +Protocol) +over +TCP, +TLS, +and +WebSockets + + +. +M. +Jones; +E. +Wahlstroem; + +C. +Bormann; + +S. +Erdtman; + +Lemay; + +H. +Tschofenig. + +Tschofenig; +K. +Hartke; +B. +Silverajan; +B. +Raymor, +Ed.. + +IETF. +May + +February + +2018. +Proposed +Standard. +URL: +https://www.rfc-editor.org/rfc/rfc8392 +[sdw-bp] +Spatial +Data +on +the +Web +Best +Practices +. +Jeremy +Tandy; +Linda +van +den +Brink; +Payam +Barnaghi. +W3C. +28 +September +2017. +W3C +Working +Group +Note. +URL: +https://www.w3.org/TR/sdw-bp/ +[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. +7 +March +2022. +W3C +Working +Group +Note. +URL: +https://www.w3.org/TR/string-meta/ +[TURTLE] +RDF +1.1 +Turtle +. +Eric +Prud'hommeaux; +Gavin +Carothers. +W3C. +25 +February +2014. +W3C +Recommendation. +URL: +https://www.w3.org/TR/turtle/ +[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/vocab-ssn/ +[w3c-basic-geo] +Basic +Geo +(WGS84 +lat/long) +Vocabulary +. +Dan +Brickley. +W3C +Semantic +Web +Interest +Group. +1 +February +2006. +URL: +https://www.w3.org/2003/01/geo/ + + +https://www.rfc-editor.org/rfc/rfc8323 + + +
+[WOT-ARCHITECTURE] + +
+[RFC8552] + +
+
+ + +Web + +Scoped +Interpretation + +of +Things +(WoT) +Architecture +1.1 +. +Michael +Lagally; +Ryuichi +Matsukura; +Toru +Kawaguchi; +Kunihiko +Toumura; +Kazuo +Kajimoto. +W3C. +November +2020. +URL: +https://www.w3.org/TR/wot-architecture11/ +[WOT-BINDING-TEMPLATES] +Web + +DNS +Resource +Records +through +"Underscored" +Naming + +of +Things +(WoT) +Binding +Templates + +Attribute +Leaves + + +. +Michael +Koster; +Ege +Korkan. +W3C. +30 +January +2020. +W3C +Working +Group +Note. + +D. +Crocker. +IETF. +March +2019. +Best +Current +Practice. + +URL: +https://www.w3.org/TR/wot-binding-templates/ + + +https://www.rfc-editor.org/rfc/rfc8552 + + +
+[WOT-SECURITY-GUIDELINES] + +
+[WOT-SECURITY] + +
+
+ + +Web +of +Things +(WoT) +Security +and +Privacy +Guidelines + +. +; +Michael +McCool; + +Elena +Reshetova. +W3C. +March +2019. +URL: +https://w3c.github.io/wot-security/ +[WOT-THING-DESCRIPTION] +Web +of +Things +(WoT) +Thing +Description +. +Sebastian +Käbisch; +Takuki +Kamiya; +Michael +McCool; +Victor +Charpenay; +Matthias +Kovatsch. +W3C. +9 +April +2020. +W3C +Recommendation. +URL: +https://www.w3.org/TR/wot-thing-description/ +[xml] +Extensible +Markup +Language +(XML) +1.0 +(Fifth +Edition) +. +Tim +Bray; +Jean +Paoli; + +Reshetova; + +Michael +Sperberg-McQueen; +Eve +Maler; +François +Yergeau +et +al. + +McCool. + +W3C. +26 + +6 + +November +2008. + +2019. + +W3C +Recommendation. + +Working +Group +Note. + +URL: +https://www.w3.org/TR/xml/ + + +https://www.w3.org/TR/wot-security/ + + +
+
+
+
+ + + + + + + + + + + + + + + + + +Permalink +Referenced +in: +§ +5.2 +Preliminaries +(2) +(3) +(4) +(5) +(6) +Permalink +Referenced +in: +§ +5.2 +Preliminaries +(2) +(3) + + + + + + + +