-
Notifications
You must be signed in to change notification settings - Fork 8
/
index.html
3344 lines (3215 loc) · 151 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en-US">
<head>
<link rel="stylesheet" href="testing/atrisk.css">
<meta charset="utf-8" />
<title>Web of Things (WoT) Profile</title>
<script class="remove" src="https://www.w3.org/Tools/respec/respec-w3c"></script>
<script class="remove">
var respecConfig = {
lint: {
"no-headingless-sections": false,
},
specStatus: "ED",
maxTocLevel: 6,
processVersion: 2019,
shortName: "wot-profile",
copyrightStart: 2020,
group: "wg/wot",
wgPublicList: "public-wot-wg",
edDraftURI: "https://w3c.github.io/wot-profile/",
githubAPI: "https://api.github.com/repos/w3c/wot-profile",
issueBase: "https://www.github.com/w3c/wot-profile/issues",
previousPublishDate: "2020-11-24",
previousMaturity: "FPWD",
editors: [{
name: "Michael Lagally",
w3cid: "47166",
company: "Oracle Corp.",
companyURL: "https://www.oracle.com/"
},
{
name: "Ben Francis",
w3cid: "51527",
company: "Invited Expert"
},
{
name: "Michael McCool",
w3cid: "93137",
company: "Intel Corp.",
companyURL: "https://www.intel.com/"
},
{
name: "Ryuichi Matsukura",
w3cid: "64284",
company: "Fujitsu Ltd.",
companyURL: "https://www.fujitsu.com/"
},
{
name: "Sebastian Kaebisch",
w3cid: "43064",
company: "Siemens AG",
companyURL: "https://www.siemens.com/"
},
{
name: "Tomoaki Mizushima",
w3cid: "98915",
company: "Internet Research Institute, Inc.",
companyURL: "https://www.iri.co.jp/"
}],
otherLinks: [
{
key: "Contributors",
data: [{
value: "In the GitHub repository",
href: "https://github.com/w3c/wot-profile/graphs/contributors"
}]
}, {
key: "Repository",
data: [{
value: "We are on GitHub",
href: "https://github.com/w3c/wot-profile/"
}, {
value: "File a bug",
href: "https://github.com/w3c/wot-profile/issues"
}, {
value: "Contribute",
href: "https://github.com/w3c/wot-profile/pulls"
}]
}],
localBiblio: {
"JSON-SCHEMA": {
title: "JSON Schema Validation: A Vocabulary for Structural Validation of JSON",
href: "https://tools.ietf.org/html/draft-handrews-json-schema-validation-01",
authors: ["Austin Wright", "Henry Andrews", "Geraint Luff"],
status: "Internet-Draft",
date: "19 March 2018",
publisher: "IETF"
},
"ISO-6709": {
title: "ISO-6709:2008 : Standard representation of geographic point location by coordinates",
href: "https://www.iso.org/standard/39242.html",
status: "Published",
date: "2008-07",
publisher: "ISO"
},
"H2020-CREATE-IoT": {
title: "H2020 – CREATE-IoT Project - Recommendations for commonalities and interoperability profiles of IoT platforms",
href: "https://european-iot-pilots.eu/wp-content/uploads/2018/11/D06_02_WP06_H2020_CREATE-IoT_Final.pdf",
status: "Published",
date: "2018-11",
publisher: "IoT European Large-Scale Pilots Programme"
}
}
};
</script>
<style>
.rfc2119-assertion {
background-color: rgb(230, 230, 230)
}
</style>
</head>
<body>
<section id="abstract">
<p>
The <em>WoT Profile Specification</em> defines a Profiling Mechanism and an <em>HTTP Basic Profile</em>,
which enables <em>out of the box interoperability</em>
among things and devices. <em>Out of the box interoperability</em> implies,
that devices can be integrated into various application scenarios without
deep level adaptations. Typically only minor configuration operations are
necessary (such as entering a network key, or IP address)
to use the device in a certain scenario.
These actions can be done by anyone without specific training.
</p>
The HTTP Basic Profile defines a set of <em>constraints
and rules</em>, which compliant thing descriptions have to adopt
to guarantee interoperability.
</p>
<p>
These rules are prescriptive, to ensure that
compliant implementations satisfy the semantic guarantees
implied by them. We call this set of rules a <em>Profile</em>.
</p>
<p>
The <strong>WoT Profile Specification</strong> as defined in
this document serves two purposes:
</p>
<ul>
<li>It defines a generic <strong><a href="#profiling-mechanism">Profiling
Mechanism</a></strong> which provides a mechanism to describe a
profile in an unambiguous way. This mechanism can be
used to define additional profiles.
</li>
<li>In addition, it defines a <strong><a href="#http-basic-profile">HTTP Basic
Profile</a></strong> of the Thing Description, which
contains protocol binding rules for HTTP.
<p>The <em>normative</em> HTTP Basic Profile is complemented by two
<em>informative profiles for events</em>: The <a href=#sec-http-sse-profile>HTTP SSE Profile</a>
and the <a href="#sec-http-webhook-profile">HTTP Webhook Profile</a>.
<p>
In the current version of this document these event bindings are provided in <em>informative</em>
sections, to illustrate how these event mechanisms could be supported in other profiles.
</p>
<p>It is planned that future versions of this document <em>normatively</em> define
these event mechanisms.
</p>
<p>This specification defines a set of normative constraints
that apply to <em>all</em> profiles defined by this document.</p>
<p>
<p>
<span class="rfc2119-assertion" id="profile-abstract-1">
A TD that is compliant to the HTTP Basic Profile MUST adhere to
both the common constraints and the protocol binding.</span>
</p>
</li>
</ul>
<p>
Devices that constrain their use of the Thing Description to
the HTTP Basic Profile can interoperate with each other
out-of-the-box.
</p>
<p>Note that the HTTP Basic Profile is not exclusive. Device implementers are free to adopt
other features of the Thing Description that go beyond the constraints
of the HTTP Basic Profile, however the interoperability guarantees of the HTTP Basic Profile
hold only for the HTTP Basic Profile subset.
</p>
<p>Future versions of this document may contain other profiles,
e.g. a profile for digital twins and a profile for resource constrained devices.</p>
<section>
<h3>Motivation for a Profile</h3>
</section>
<p>
<p id="profile-abstract-2">
The W3C WoT Thing Architecture [[wot-architecture11]] and
WoT Thing Description [[wot-thing-description11]] define a
powerful description mechanism and a format to describe
myriads of very different devices, which may be connected
over various protocols.
The format is very flexible and open
and puts very few normative requirements on devices that
implement it.</p>
<p>
However, this flexibility de-facto prevents
interoperability, since, without additional <strong>rules</strong>,
it allows implementers to make many choices that do not
provide <strong>guarantees</strong> of common behavior
between implementations.
</p>
</section>
<section id='sotd'></section>
<section id="intro">
<h1 id="introduction">Introduction</h1>
<p>
The W3C WoT Architecture [[wot-architecture11]] and the WoT
Thing Description [[wot-thing-description11]]
have been developed as a versatile format, that allows
describing the interactions between multiple devices and
protocols.
</p>
<p>
This flexibility permits an easy integration of new device
types and protocols, however it risks interoperability,
since there are <em>no guarantees</em> that two devices
which are formally spec-compliant, will be able to
communicate.
</p>
<p>To increase adoption of the WoT specifications,
interoperability between on premise devices, edge devices
and the cloud is essential. Even if every manufacturer is
implementing the current Thing Description specification in
full flexibility, there is no interoperability guarantee;
many choices are still left to the implementations and there
are very few normative requirements that a device has to
fulfill.</p>
<section>
<h3>Deployment Scenarios</h3>
<p>A Thing Description can be used in two fundamentally
different deployment scenarios:</p>
<ul>
<li>a "brown-field" scenario, where it is created
to describe the interactions with existing systems.</li>
<li>a "green-field" scenario, where a device model
and a thing description are developed together.</li>
</ul>
<p>
For green field deployments, where the implementations
are being carried out and corresponding thing
descriptions are being created, it is easier to achieve
full interoperability by using a small, extensible <a href="#http-basic-profile">HTTP Basic
Profile</a>.
</p>
<p>In the brown field area, due to the nature of
existing deployments and protocols, a broad spectrum of
variations and potentially high complexity of thing
descriptions inhibits interoperability and will most
likely lead to additional profiles of the <a>WoT Thing Description</a>
and domain-specific thing consumer implementations.</p>
<p>
The WoT HTTP Basic Profile can be used by green field
deployments and gives guidance to new implementers of
the WoT specifications.
</p>
</section>
<!-- Use Cases -->
<section id="profile-use-cases">
<h2>Use Cases and Requirements</h2>
<p>
A set of over 30 use cases for the Web of Things were contributed by stakeholders
from multiple industries for various application domains.
These have been published in the WoT Use Cases and Requirements document [[wot-usecases]].
</p>
<p>
Based on these use cases a set of requirements have been derived which drive the development
of the W3C Web of Things specification family.
Several of these domains require easy integration of devices from multiple vendors,
in other words, out-of-the-box interoperability.
However, the descriptive approach taken by the WoT specifications generally leads
to a large variety of different protocols and data formats,
which can work against out-of-the box interoperability.
</p>
<p>
For example, a WoT Thing Description (TD) can in theory include a description based on a
networking protocol unknown to a device that wishes to connect to it.
To ensure interoperability without additional customization (e.g. by writing software or
performing complex setup or configuration steps),
the range of such choices needs to be limited to a finite set so that a consumer
of a Thing Description can be sure it will be able to interact with any possible Thing.
A finite set of customization choices is also important for implementing devices with a fixed code base.
Defining such constraints leads to the profile mechanism and the HTTP Basic Profile.
</p>
<p>
In addition to multiple vertical use cases that will use HTTP(S) for their implementations,
there are horizontal use cases that are addressed by this profile specification.
The primary focus is to enable Multi-Vendor system integration with out of the box interoperability.
</p>
<section id="profile-use-case-MVSE">
<h2>Multi-Vendor System Integration - Out of the box interoperability</h2>
Users of devices want to process data from all devices that conform to a class of devices in a uniform way.
They need a guarantee that they are able to correctly interact with all affordances of the Thing
that complies with this class of devices.
Different interpretations of the same Thing Description, that lead to different behaviour, should not be
possible.
Users want to integrate devices in existing scenarios out of the box, i.e. with close to zero configuration
tasks.
</section>
</section>
<section id="why-profile">
<h2 id="why-define-a-profile">
Why a <a>Profile</a>?
</h2>
<p>
During the recent WoT Plugfests there were many
de-facto agreements on the use of a small constrained
subset of interaction patterns and protocol choices.
These de-facto agreements select a common subset of the
<a>WoT Thing Description</a>, based on
proven interoperability among manufacturers.
</p>
<p>
<span class="rfc2119-assertion" id="profile-why-a-basic-profile-1-x">
The <a href="#http-basic-profile">HTTP Basic Profile</a> contains additional
normative requirements that MUST be satisfied by devices
to be compliant to the profile.</span>
</p>
<figure id="http-basic-Profile-figure">
<img src="images/WoT-HTTP-Baseline-Profile.png" class="wot-profiles" alt="http-baseline-Profile-Picture" />
<figcaption>WoT HTTP Basic Profile - A Subset of Affordances</figcaption>
</figure>
<p>
Adoption of the <a href="#http-basic-profile">HTTP Basic Profile</a> will
significantly limit the implementation burden of device
and cloud implementors.
</p>
<p>
The HTTP Basic Profile was defined with the
following main goals:
</p>
<ul>
<li>guarantee interoperability among all
implementations of the profile.</li>
<li>limit the implementation complexity.</li>
</ul>
<p>It makes choices on the required metadata fields as
well as the supported interactions and protocol
endpoints. It introduces some constraints on data
schemas for properties and actions which are required
for resource constrained devices in real-world
deployments. The format does not forbid the use of
additional elements of the <a>WoT Thing Description</a> for vendor specific
extensions, however this will impact interoperability.</p>
</section>
<section>
<h2 id="out-of-the-box-interoperability">Out-of-the-box
interoperability</h2>
<p>
Devices, which implement the <a href="#http-basic-profile">HTTP Basic Profile</a>, are <strong>out-of-the-box
interoperable</strong> with other HTTP Basic Profile
compliant devices. Furthermore, the HTTP Basic Profile
simplifies device validation and compliance testing
since a corresponding conformance test suite can be
defined.
</p>
<p>
The following classification adopts the terminology as described in the
"H2020 – CREATE-IoT Project - Recommendations for commonalities and
interoperability profiles of IoT platforms" [[?H2020-CREATE-IoT]]
report.
The definitions below have been adapted to reflect the scope of the WoT profile.
</p>
<h3 id="out-of-the-box-interoperability-technical-interop">Technical Interoperability</h3>
<p><em>Technical Interoperability</em> is usually associated with communication protocols and the
infrastructure needed for those protocols to operate. This implies agreeing on a common protocol
(e.g. HTTP / TCP/IP) and providing additional clarifications, where required.
</p>
<h3 id="out-of-the-box-interoperability-syntactic-interop">Syntactic Interoperability</h3>
<p><em>Syntactic Interoperability</em> is usually associated with data formats and encodings along with
techniques for compressing them. Examples for these formats and encodings in the WoT are JSON,
XML, JSON-LD, UTF-8 payloads.
</p>
<h3 id="out-of-the-box-interoperability-semantic-interop">Semantic Interoperability</h3>
<p>
<em>Semantic Interoperability</em> is associated with a common understanding of the behavior of communication
partners.
In the profile context, it includes a common interpretation of (synchronous and asynchronous) action semantics,
a common event model, how to set/get multiple properties, writable properties,
a common error model and error messages.
</p>
<p>
Domain specific ontologies, e.g. semantic interop of automotive and medical devices exceed the scope of the
profile.
</p>
<h3 id="out-of-the-box-interoperability-organisational-interop">Organisational Interoperability</h3>
<p>
<em>Organisational Interoperability</em> in the profile context implies that any consumer,
which conforms with a given profile can interact with any Thing which conforms
with the same profile, without additional customization.
</p>
<p>
Organisational Interoperability also requires commonly agreed approaches to security,
trust and privacy, i.e. a consumer is provided access to Things only, when these
common terms and conditions are applied.
</p>
<p>
Devices created by various engineers, vendors and SDOs that satisfy the requirements
of the profile specification can be integrated with compliant consumers without additional customization.
This works across infrastructures, regions and cultures.
</p>
</section>
<section>
<h2>Structure of this document</h2>
<section class="ednote">to be added.</section>
</section>
</section>
<section id="conformance">
<p>
A device or consumer implementation complies with this specification if it follows
the normative statements in the present document.
<!--p>
A JSON Schema [[?JSON-SCHEMA]] to validate the compliance of a Thing Description
with the HTTP Basic Profile is provided in Appendix <a href="#basic-profile-json-schema"></a>.
</p-->
</section>
<section id="terminology">
<h2 id="x3-terminology">Terminology</h2>
<p>The fundamental WoT terminology such as
<dfn class="lint-ignore">Thing</dfn>,
<dfn class="lint-ignore">Consumer</dfn>,
<dfn class="lint-ignore">Thing Description</dfn> (<dfn class="lint-ignore">TD</dfn>),
<dfn class="lint-ignore">WoT Thing Description</dfn>,
<dfn class="lint-ignore">Partial TD</dfn>,
<dfn class="lint-ignore">Thing Model</dfn> (<dfn class="lint-ignore">TM</dfn>),
<dfn class="lint-ignore">Interaction Model</dfn>,
<dfn class="lint-ignore">Interaction Affordance</dfn>,
<dfn class="lint-ignore">Property</dfn>,
<dfn class="lint-ignore">Action</dfn>,
<dfn class="lint-ignore">Event</dfn>,
<dfn class="lint-ignore">Protocol Binding</dfn>,
<dfn class="lint-ignore">Servient</dfn>,
<dfn class="lint-ignore">Vocabulary</dfn>,
<dfn class="lint-ignore">Term</dfn>,
<dfn id="dfn-vocab-term" class="lint-ignore">Vocabulary Term</dfn>,
<dfn class="lint-ignore">WoT Interface</dfn>, and
<dfn class="lint-ignore">WoT Runtime</dfn>
are defined in <a href="https://www.w3.org/TR/wot-architecture/#terminology">Section 3</a>
of the WoT Architecture specification [[?WOT-ARCHITECTURE]].
<p>
For convenience of the reader, we use the terms <em>keyword</em>
and <em>field</em> for the linguistic notion <em>vocabulary term</em>
as defined in the <em>Thing Description</em> Specification.
</p>
<p>
We use the terms <em>device</em> and <em>thing</em> in an
interchangeable manner.
</p>
<h4 id="additional-definitions-">Additional Definitions</h4>
<dl>
<dt>
<dfn class="export">Profile</dfn>
</dt>
<dd>A technical specification which provides a set of assertions such that
any <a href="#dfn-consumer">Consumer</a> which conforms with the those
assertions is <a href="#out-of-the-box-interoperability">out-of-the-box
interoperable</a> with any <a href="#dfn-thing">Thing</a> which also
conforms with those assertions.
</dd>
</dl>
</section>
<!-- Profiling mechanism -->
<section id="profiling-mechanism">
<h2>Profiling Mechanism</h2>
<p>
<span class="rfc2119-assertion" id="profiling-mechanism-1">
In order to conform with a profile, a
<a href="https://www.w3.org/TR/wot-architecture/#dfn-thing">Web Thing</a>
MUST conform with all the normative statements in the profile's
specification.
</span>
</p>
<p>
<span class="rfc2119-assertion" id="profiling-mechanism-2">
In order to denote that a given
<a href="https://www.w3.org/TR/wot-architecture/#dfn-thing">Web Thing</a>
conforms to one or more profiles, its Thing Description MUST include a
<a href="https://w3c.github.io/wot-thing-description/#thing">
<code>profile</code></a> member [[wot-thing-description11]].
</span>
<span class="rfc2119-assertion" id="profiling-mechanism-3">
The value of the <code>profile</code> member MUST be set to either a
valid URI [[RFC3986]] identifying a single profile, or an array of valid
URIs identifying multiple profiles.
</span>
</p>
<p>
<span class="rfc2119-assertion" id="profiling-mechanism-4">
In order to use a <code>profile</code> member in a Thing Description,
the <code>@context</code> member MUST contain the anyURI
<code>https://www.w3.org/2022/wot/td/v1.1</code> in order to denote that
the document is using version 1.1 of the Thing Description
specification. [[wot-thing-description11]].
</span>
</p>
<pre class="example">
{
"@context": "https://www.w3.org/2022/wot/td/v1.1",
"id": "urn:dev:ops:32473-WoTLamp-1234",
"profile": "https://www.w3.org/2022/wot/profile/http-basic/v1",
"title": "My Lamp",
"description": "A web connected lamp",
...
}
</pre>
<pre class="example">
{
"@context": "https://www.w3.org/2022/wot/td/v1.1",
"id": "urn:dev:ops:32473-WoTLamp-1234",
"profile": [
"https://www.w3.org/2022/wot/profile/http-basic/v1",
"https://www.w3.org/2022/wot/profile/http-sse/v1"
],
"title": "My Lamp",
"description": "A web connected lamp",
...
}
</pre>
</section>
<!-- Common -->
<section id="common-constraints">
<h1>Common Constraints</h1>
<p>
The following sections are applicable for all of the HTTP profiles defined by this document.
</p>
<!-- Identifiers TODO -->
<!-- Accessibility -->
<section id="common-constraints-accessibilityy">
<h2 id="accessibility">Accessibility</h2>
<p>Authors of <a>Thing Descriptions</a> must ensure that the things described by them are accessible to
users with disabilities.
</p>
<p><span class="rfc2119-assertion" id="common-constraints-a11y-1">
It is REQUIRED to provide a <code>title</code> that can be automatically rendered in a non-visual way
(e.g. using a screen reader)
for things that may be used in deployments with users with disabilities.</span>
</p>
<p><span class="rfc2119-assertion" id="common-constraints-a11y-2">
It is highly RECOMMENDED to provide a <code>description</code> that can be automatically rendered in a non-visual way
(e.g. using a screen reader)
for things that may be used in deployments with users with disabilities.</span>
</p>
<section class="ednote">
This is just a baseline set of requirements, which needs additional input from the APA group.
It needs to be clarified which TD elements are used by people with disabilities and to which these constraints are applied.
</section>
</section>
<!-- Units -->
<section id="sdec-common-constraints-units">
<h2 id="units">Units</h2>
<p>Authors of <a>Thing Descriptions</a> should be aware that units
that are common in their geographic region are not globally applicable
and may lead to misinterpretation with drastic consequences.
</p>
<p><span class="rfc2119-assertion" id="common-constraints-units">
It is highly RECOMMENDED to provide a <code>unit</code>,
if a value has a physical quantity.</span>
</p>
<p><span class="rfc2119-assertion" id="common-constraints-units-metric">
It is highly RECOMMENDED to use the metric system (SI units)
for devices that are used in global deployments.</span>
</p>
</section>
<!-- Date Format -->
<section id="common-constraints-date-format">
<h2 id="date-format">Date Format</h2>
<p>
<span class="rfc2119-assertion" id="common-constraints-date-format-1">
All date and time values MUST use the <code>date-time</code> format
defined in [[RFC3339]].</span>
</p>
<pre class="example">
<code>2022-09-21T23:20:50.52Z</code>
</pre>
<p class="note">
In order to reduce ambiguity, RFC 3339 only permits an hour with a value
between 00 and 23 (not 24), and time zones expressed as a numerical
offset relative to UTC. The suffix "Z" when applied to a time denotes a
UTC offset of 00:00.
</p>
</section>
<!-- Security -->
<section id="common-constraints-security">
<h2>Security</h2>
<div class="rfc2119-assertion" id="common-constraints-security-1">
<p>
Below is a list of <a
href="https://w3c.github.io/wot-thing-description/#sec-security-vocabulary-definition">
security schemes</a> [[wot-thing-description]] which conformant Web
Things MAY use:
</p>
<ul>
<li>
<a href="https://w3c.github.io/wot-thing-description/#nosecurityscheme">
<code>NoSecurityScheme</code>
</a>
</li>
<li>
<a href="https://w3c.github.io/wot-thing-description/#basicsecurityscheme">
<code>BasicSecurityScheme</code>
</a>
</li>
<li>
<a href="https://w3c.github.io/wot-thing-description/#oauth2securityscheme">
<code>OAuth2SecurityScheme</code> with the <code>code</code> or <code>client</code> flow.
</a>
</li>
</ul>
</div>
<p><span class="rfc2119-assertion" id="common-constraints-security-2">
Conformant Consumers MUST support at least all of these security schemes.</span>
</p>
<p><span class="rfc2119-assertion" id="common-constraints-security-3">
A Thing MAY implement multiple security schemes.</span>
</p>
<p><span class="rfc2119-assertion" id="common-constraints-security-4">
A Thing MUST support at least one of the above security schemes.</span>
</p>
<p><span class="rfc2119-assertion" id="common-constraints-security-6">
Conformant Consumers MUST support security bootstrapping for all
implemented security schemes, as defined in
<a href="https://w3c.github.io/wot-discovery/#exploration-secboot">Security Bootstrapping</a>
in the WoT Discovery [[wot-discovery]] specification.
</span></p>
<p><span class="rfc2119-assertion" id="common-constraints-security-7">
Conformant Things which require authentication in order to retrieve
their Thing Description MUST implement security bootstrapping, as
defined in
<a href="https://w3c.github.io/wot-discovery/#exploration-secboot">Security Bootstrapping</a>
in the WoT Discovery [[wot-discovery]] specification.
</span></p>
</section>
<!-- Discovery -->
<section id="common-constraints-discovery">
<h2>Discovery</h2>
<p class="rfc2119-assertion" id="common-constraints-discovery-1">
A Web Thing's Thing Description [[wot-thing-description]] MUST be
retrievable from a
<a href="https://w3c.github.io/wot-architecture/#dfn-wot-thing-description-server">
Thing Description Server</a> [[wot-architecture11]] using an HTTP
[[HTTP11]] URL provided by a
<a href="https://w3c.github.io/wot-discovery/#introduction-mech">
Direct Introduction Mechanism</a> [[wot-discovery]].
</p>
</section>
<!-- Links -->
<section id="common-constraints-links">
<h2>Links</h2>
<p>Hypermedia links in the HTTP Profiles are significantly constrained to ensure a common interpretation
and interoperability between things and consumers.</p>
<p>
<span class="rfc2119-assertion" id="common-constraints-links-1">The following keywords are defined for links in the
HTTP profiles and MAY be present in profile-compliant TDs with the constraints defined by this section.</span>
<p>
<span class="rfc2119-assertion" id="common-constraints-links-2">Other keywords for links MAY
be present in a TD, however their interpretation is undefined
in the context of the HTTP profiles</span>
<span class="rfc2119-assertion" id="common-constraints-links-3">These other link types MAY
be ignored by all profile-compliant consumers.</span>
</p>
<section class=note>
<p>
These links enable consumers to interpret linked content that is provided by the link target in an unambiguous way.
This interpretation is a "best effort" mechanism, that depends on the capabilities of the consumer.
A consumer with a browser could render HTML content, a consumer with a PDF engine can display PDF content,
a consumer with a dot-matrix display only can display icons.
</p>
<p>For consumers that can render images or documents this implies to display appropriate documentation
to a human reader.</p>
<p>Consumers that are capable of working with nested things and thing model structures are able
to navigate between things and thing models in a well defined way.</p>
</section>
<!-- TD 5.3.4.1 -->
<table class="def">
<thead>
<tr>
<th>Keyword</th>
<th>Type</th>
<th>Constraint</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>href</code></td>
<td>IRI of the link target</td>
<td>mandatory,<code>anyURI</code></td>
</tr>
<tr>
<td><code>type</code></td>
<td>media type [RFC2046] of the link target</td>
<td>mandatory, the supported set of media types is defined in
<a href="#sec-link-relation-types">Media Types for Link Targets</a> below.
</td>
</tr>
<tr>
<td><code>rel</code></td>
<td>link relation type <a href="https://www.iana.org/assignments/link-relations/link-relations.xhtml">IANA
Link Relations</a></td>
<td>mandatory, the supported subset of relation types is described in
<a href="#sec-link-relation-types">Link Relation Types</a> below.
</td>
</tr>
<tr>
<td><code>sizes</code></td>
<td>string with icon dimensions</td>
<td>mandatory for <code>icon</code> link targets, forbidden otherwise.</td>
</tr>
<tr>
<td><code>hreflang</code></td>
<td><code>array of string</code> with valid language tags according to [BCP47]</td>
<td>optional.</td>
</tr>
</tbody>
</table>
<section id="sec-link-relation-types">
<h3>Link Relation Types</h3>
<table class="def">
<thead>
<tr>
<th>Relation Type</th>
<th>Constraint</th>
<th>Remarks</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>icon</code></td>
<td>supported media types: <code>image/png</code>, <code>image/jpeg</code>. </td>
</tr>
<tr>
<td><code>type</code></td>
<td>link target MUST be a profile-compliant <a>Thing Model</a></td>
<td>No other types are defined in the Profile.</td>
</tr>
<tr>
<td><code>service-doc</code></td>
<td>human readable documentation, supported formats are Unicode Text, markdown, HTML and PDF.</td>
<td></td>
</tr>
<tr>
<td><code>collection</code></td>
<td>link target is a collection of things or thing models.</td>
<td></td>
</tr>
<tr>
<td><code>item</code></td>
<td>link target is a collection member of the thing or thing model.</td>
<td></td>
</tr>
</tbody>
</table>
</section>
<section id="sec-link-media-types">
<h3>Media Types for Link Targets</h3>
<span class="rfc2119-assertion" id="common-constraints-links-media-types-1">The following media types from <a
href="https://www.iana.org/assignments/media-types/media-types.xhtml">IANA</a>
MAY be used as the link targets of profile compliant TDs with the constraints in this section.</span>
<span class="rfc2119-assertion" id="common-constraints-links-media-types-2">Other media types MAY
be present in a TD, however their heir interpretation is undefined
in the context of the HTTP profiles and they MAY be ignored by all profile-compliant consumers.</span>
<table class="def">
<thead>
<tr>
<th>Type</th>
<th>Constraint</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>text/plain</code></td>
<td>charset=UTF-8</td>
</tr>
<tr>
<td><code>text/html</code></td>
<td></td>
</tr>
<tr>
<td><code>text/markdown</code></td>
<td>charset=UTF-8</td>
</tr>
<tr>
<td><code>text/pdf</code></td>
<td></td>
</tr>
<td><code>application/json</code></td>
<td></td>
</tr>
<tr>
<td><code>application/ld+json</code></td>
<td></td>
</tr>
<tr>
<td><code> application/octet-stream</code></td>
<td></td>
</tr>
<tr>
<td><code>image/jpeg</code></td>
<td></td>
</tr>
<tr>
<td><code>image/png</code></td>
<td></td>
</tr>
</tbody>
</table>
</section>
<p>
<span class="rfc2119-assertion" id="common-constraints-links-media-types-4">
If a Consumer encounters a link with "rel": "icon" and "type": "image/*" and it is capable of rendering images in
the
provided format, then it SHOULD interpret the link as an icon for the Thing and display it to the user.
</span>
</p>
<p>
<span class="rfc2119-assertion" id="common-constraints-links-media-types-5">
If a Consumer encounters a link with "rel": "alternate" and "type": "text/html" and it is capable of rendering an
HTML
page and accepting user input, then it SHOULD interpret the link as a user interface for the Thing and provide a
means
for the user to follow that link and view and interact with the HTML page.
</section>
</p>
<p>
<span class="rfc2119-assertion" id="common-constraints-links-media-types-6">
If a Consumer encounters a link with "rel": "service-doc" and "type": "text/plain", "type": "text/html" or "type":
"text/pdf", and is capable of rendering documents in the provided format, then it SHOULD interpret the link as a
user
manual for the Thing and provide a means for the user to follow that link and read the user manual.
</section>
</p>
<p>
<span class="rfc2119-assertion" id="common-constraints-links-media-types-7">
If a Consumer encounters a link with "rel": "item" and "type": "application/td+json" and is capable of rendering a
hierarchical tree of Things, then it should interpret the link as an indication that the target is a sub-Thing of
the
current Thing and render this in a meaningful way to the user.
</span>
</p>
<p>
<span class="rfc2119-assertion" id="common-constraints-links-media-types-8">
If a Consumer encounters a link with "rel": "collection" and "type": "application/td+json" and is capable of
rendering a
hierarchical tree of Things, then it should interpret the link as an indication that the target describes a Thing
(e.g.
a group, system of Things or Thing Directory) which contains the current Thing and render this in a meaningful way
to
the user.
</span>
</p>
</section>
<!-- Errors -->
<section id="common-constraints-errors">
<h3 id="error-responses">Errors</h3>
<p>
<span class="rfc2119-assertion" id="common-constraints-errors-1">
If any of the operations defined in the protocol bindings of HTTP
profiles are unsuccessful then the Web Thing MUST send an HTTP
response with an HTTP error code which describes the reason for the
failure.</span>
</p>
<div class="rfc2119-assertion" id="common-constraints-errors-2">
<p>
It is RECOMMENDED that error
responses use one of the following HTTP error codes:
</p>
<ul>
<li><code>400 Bad Request</code></li>
<li><code>401 Unauthorized</code></li>
<li><code>403 Forbidden</code></li>
<li><code>404 Not Found</code></li>
<li><code>500 Internal Server Error</code></li>
<li><code>503 Service Unavailable</code></li>
</ul>
</div>
<p>
<span class="rfc2119-assertion" id="common-constraints-errors-3">
A Web Thing MAY respond with 3xx status codes for the purposes of
redirection, caching or authentication.</span>
<span class="rfc2119-assertion" id="common-constraints-errors-4">
A Web Thing MUST NOT respond with a <code>300 Multiple Choices</code>
status code.</span>
</p>
<p>
<span class="rfc2119-assertion" id="common-constraints-errors-5">
Web Things MAY respond with other valid HTTP error codes
(e.g. <code>418 I'm a teapot</code>).</span>
<span class="rfc2119-assertion" id="common-constraints-errors-6">
Consumers MAY interpret other valid HTTP error codes as a generic <code>4xx</code> or <code>5xx</code>
error with no special defined behaviour.</span>
</p>
<p>
<span class="rfc2119-assertion" id="common-constraints-errors-7">
If an HTTP error response contains a body, the content of that body
MUST conform with the Problem Details format [[RFC7807]].</span>
</p>
</section>
<!-- Default Language -->
<section id="sec-default-language">
<h2>Default Language</h2>
<p><span class="rfc2119-assertion" id="common-constraints-default-language">
One Map contained in an <code>@context Array</code> MUST contain a name-value pair
that defines the default language for the Thing Description,
where the name is the Term <code>@language</code> and the value
is a well-formed language tag as defined by [BCP47]
(e.g., en, de-AT, gsw-CH, zh-Hans, zh-Hant-HK, sl-nedis).</span>
</span>
</section>
</section>
<!-- HTTP Basic Profile -->
<section id="http-basic-profile">
<h2>HTTP Basic Profile</h2>
<p>This section defines the HTTP Basic Profile, which includes a
<a href="#http-basic-profile-protocol-binding">Protocol Binding</a>
for reading and writing properties and invoking, querying and cancelling
actions.
</p>
<p>This profile may be used in conjunction with the
<a href="#sec-http-sse-profile">HTTP SSE Profile</a> or the
<a href="#sec-http-webhook-profile">HTTP Webhook Profile</a> in order to provide
operations for observing properties and listening for events.
</p>
<p>
<span class="rfc2119-assertion" id="http-basic-profile-1">
In order to conform with the HTTP Basic Profile, Web Things and
Consumers MUST also conform with all of the assertions in the
<a href="#common-constraints">Common Constraints</a>
section.
</span>
</p>
<!-- Identifier -->
<section id="http-basic-profile-identifier">
<h2>Identifier</h2>
<p><span class="rfc2119-assertion" id="http-basic-profile-identifier-1">
In order to denote that a given
<a href="https://www.w3.org/TR/wot-architecture/#dfn-thing">Web Thing</a>
conforms to the HTTP Basic Profile, its Thing Description MUST have a
<a href="https://w3c.github.io/wot-thing-description/#thing">
<code>profile</code></a> member [[wot-thing-description]] with a value
of <code>https://www.w3.org/2022/wot/profile/http-basic/v1</code>.</span>
</p>
</section>