Copyright © 2023 World Wide Web Consortium. W3C® liability, trademark and permissive document license rules apply.
This document introduces an ontology for links and forms, the main hypermedia controls in use on the Web. This ontology offers, among others, a means to reify RDF statements interpreted as links between Web resources. It also provides a versatile exchange format for links and forms in RESTful Web applications.
Hypermedia controls are of importance in the fields of the Web of Things and the Embedded Web, in particular in the W3C Thing Description model and the IETF Constrained RESTful Application Language.
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/.
Validation of the document by the Working Group is expected by the end of June 2019.
This document was published by the Web of Things Working Group as an Editor's Draft.
Publication as an Editor's 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 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 03 November 2023 W3C Process Document.
The concept of Representational State Transfer (REST) [rest] is at the core of most modern Web applications. The state of a Web resources, exposed via a collection of Web resources, can be browsed by clients by following links and acted upon by submitting forms to servers.
Links and forms have always be present in Web technologies, including HTML [html]. Web linking [rfc8288] is a fundamental principle of the Web architecture that can be leveraged to drive applications, e.g. when a server returns a link to a newly created resource as the result of a client's request. Conversely, forms, are request templates that servers can expose to clients for them to fill in with client-specific information and send back to servers. Forms are similar in spirit to operation desriptions as defined by the Open API Specification [openapis] or by the Hydra RDF vocabulary [hydra].
Links and forms are generically referred to as hypermedia controls. They are of increasing importance in the fields of the Web of Things and the Embedded Web, which respectively led to the standardization of the Thing Description (TD) model [wot-thing-description] and the Constrained RESTful Application Language (CoRAL) [coral]. The present hypermedia controls ontology is an attempt to formalize the concepts these two standards specify.
Please note that the Turtle version of the ontology can be always obtained by doing content negotiation as explained in
Appendix D of the Thing Description Recommendation. You can
include Accept: text/turtle
in the request to
obtain the Turtle version of this ontology.
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 fundamental WoT terminology such as Thing, Consumer, Thing Description (TD), Interaction Model, Interaction Affordance, Property, Action, Event, Protocol Binding, Servient, etc. is defined in Section 3 of the WoT Architecture specification [WOT-ARCHITECTURE].
The Thing Description terminology such as TD Information Model, TD Document, Term (Vocabulary Term), etc. is defined in Section 3 of the WoT Thing Description specification [WOT-THING-DESCRIPTION].
IRI:
https://www.w3.org/2019/wot/hypermedia#AdditionalExpectedResponse
In the domain of | hctl:hasAdditionalOutputSchema hctl:isSuccess |
In the range of | hctl:additionalReturns |
IRI:
https://www.w3.org/2019/wot/hypermedia#ExpectedResponse
In the range of | hctl:returns |
IRI:
https://www.w3.org/2019/wot/hypermedia#Form
IRI:
https://www.w3.org/2019/wot/hypermedia#Link
In the domain of | hctl:hasAnchor hctl:hasHreflang hctl:hasRelationType hctl:hasSizes hctl:hasTarget hctl:hintsAtMediaType |
In the range of | td:hasLink |
IRI:
https://www.w3.org/2019/wot/hypermedia#additionalReturns
Domain includes | hctl:Form |
Range includes | hctl:AdditionalExpectedResponse |
IRI:
https://www.w3.org/2019/wot/hypermedia#hasAdditionalOutputSchema
DataSchema
object,
the name of a previous definition given in a
schemaDefinitions
map must be used.
Domain includes | hctl:AdditionalExpectedResponse |
IRI:
https://www.w3.org/2019/wot/hypermedia#hasOperationType
Domain includes | hctl:Form |
IRI:
https://www.w3.org/2019/wot/hypermedia#returns
Domain includes | hctl:Form |
Range includes | hctl:ExpectedResponse |
IRI:
https://www.w3.org/2019/wot/hypermedia#forContentCoding
Domain includes | hctl:Form |
Range includes | schema:Text |
IRI:
https://www.w3.org/2019/wot/hypermedia#forContentType
Domain includes | hctl:Form |
Range includes | schema:Text |
IRI:
https://www.w3.org/2019/wot/hypermedia#forSubProtocol
Domain includes | hctl:Form |
Range includes | schema:Text |
IRI:
https://www.w3.org/2019/wot/hypermedia#hasAnchor
Domain includes | hctl:Link |
IRI:
https://www.w3.org/2019/wot/hypermedia#hasHreflang
Domain includes | hctl:Link |
IRI:
https://www.w3.org/2019/wot/hypermedia#hasRelationType
Domain includes | hctl:Link |
IRI:
https://www.w3.org/2019/wot/hypermedia#hasSizes
Domain includes | hctl:Link |
IRI:
https://www.w3.org/2019/wot/hypermedia#hasTarget
Domain includes | hctl:Form hctl:Link |
IRI:
https://www.w3.org/2019/wot/hypermedia#hintsAtMediaType
Domain includes | hctl:Link |
Range includes | schema:Text |
IRI:
https://www.w3.org/2019/wot/hypermedia#isSuccess
Domain includes | hctl:AdditionalExpectedResponse |
Range includes | schema:Boolean |
No AnnotationProperty found in the ontology.
The following table gives alignment between the hypermedia controls ontology and Hydra, an alternative vocabulary for hypermedia-driven Web APIs. Each row represents a close match between two classes. These alignments are not to be understood as formal semantic equivalences but rather as hints to Hydra users.
hctl:Link |
hydra:Link |
hctl:Form |
hydra:Operation |
Same terms as specified by JSON hyper-schema and the TD model.
OCF example (equivalent to an OpenAPI definition). HTTP in RDF vocabulary.
Either as RDF statements or as reified statements. Primarily for WoT compatibility but also e.g. to include validity metadata.