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.
Validation of the document by the Working Group is expected by the end of June 2019.
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.
IRI: https://www.w3.org/2019/wot/hypermedia#AdditionalExpectedResponse
In the domain of | hctl:schema 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
In the domain of | hctl:additionalReturns hctl:forContentCoding hctl:forContentType hctl:forSubProtocol hctl:hasOperationType hctl:hasTarget hctl:returns |
In the range of | td:hasForm |
IRI: https://www.w3.org/2019/wot/hypermedia#Link
In the domain of | hctl:hasAnchor hctl:hasRelationType hctl:hasTarget hctl:hintsAtMediaType |
In the range of | td:hasLink |
IRI: https://www.w3.org/2019/wot/hypermedia#additionalOutputSchema
Domain includes | hctl:AdditionalExpectedResponse |
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#hasAnchor
Domain includes | hctl:Link |
IRI: https://www.w3.org/2019/wot/hypermedia#hasOperationType
Domain includes | hctl:Form |
IRI: https://www.w3.org/2019/wot/hypermedia#hasRelationType
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#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#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 |
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.