HTTP Request Access in YARRRML

Unofficial Draft

More details about this document
Latest published version:
https://w3id.org/imec/rml/yarrrml/spec/access/httprequest/
Latest editor's draft:
https://w3id.org/imec/rml/yarrrml/spec/access/httprequest/
Editors:
Els de Vleeschauwer (Ghent University – imec – IDLab)
Ben De Meester (Ghent University – imec – IDLab)
This Version
https://w3id.org/imec/rml/yarrrml/spec/access/httprequest/20250312/
Previous Version
https://w3id.org/imec/rml/yarrrml/spec/access/httprequest/20250226/

Abstract

This extension of [YARRRML] applies the semantics specified by the RML extension for [RML-HTTP-REQUEST-ACCESS], describing the access to a web resource (both as source and as target), modelled as a simplified HTTP request with optional authentication.

1. Overview

This section is non-normative.

1.1 Document conventions

We assume readers have basic familiarity with [RDF], [RML] and [YARRRML] concepts.

In this document, examples assume the following namespace prefix bindings unless otherwise stated:

Prefix Namespace
rml: http://w3id.org/rml/
rmle: https://w3id.org/imec/rml/ns/extensions#
htv: http://www.w3.org/2011/http#
ex: http://example.org/
foaf: http://xmlns.com/foaf/0.1/

The examples are contained in color-coded boxes. We use the Turtle syntax [Turtle] to write RDF.

1.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.

2. HTTP Requests

HTTP requests can define the access for a data source or a target in resp. the sources or the targets collections of a [YARRRML] document.

To describe an HTTP request access, [YARRRML] is extended with following keys for the sources and targets collection:

methodName
HTTP method name of the HTTP request.
Datatype: string.
headers
Headers of the HTTP request.
Datatype: collection or sequence of collections.
rel
Link relation in the Link header for retrieving the URI of a Linked HTTP Request.
Datatype: string.
authentication
The key of an authentication, defined in the authentications collection.
Datatype: string.

The following values extend the supported values for the key type for data sources and targets:

Data source type or target type Value
Direct HTTP Request directhttprequest
Linked HTTP Request linkedhttprequest

2.1 Headers

This key's value describes one or more headers, as a collection or sequence of collections. A collection describing one header has following keys:

name
The name of the header.
Datatype: string.
value
The value of the header.
Datatype: string.

2.2 Default values for HTTP requests as data source

If unspecified, the value of the key methodName is by default "GET".

If unspecified, the accept header is by default derived from the reference formulation of the data source, following the table below:

referenceFormulation accept
csv text/plain
jsonpath application/json
xpath application/xml
xquery application/xml

2.3 Default values for HTTP requests as target

If unspecified, the value of the key methodName is by default PUT.

If unspecified, the content-type header is by default derived from the serialization of the target, following the table below:

serialization contentType
jsonld application/ld+json
n3 text/n3
ntriples application/n-triples
nquads application/n-quads
turtle text/turtle
trig application/trig

2.4 Authentications

A authentication is defined in the authentications collection in the root of the YARRRML document. Each authentication is added to this collection via a key-value pair. The key has to be unique for every authentication. The key's value is a collection with the keys described below.

type
The type of the authentication.
Datatype: string.
email
Email for the authentication.
Datatype: string.
password
Password for the authentication.
Datatype: string.
oidcIssuer
OIDC issuer for the authentication.
Datatype: string.
webId
WebID for the authentication.
Datatype: string.

2.4.1 Type

This key's value describes what type of authentication is used, so that the correct way of authenticating be determined. The following values are supported:

Authentication type Value
CSS Client Credentials Authentication cssclientcredentials

3. Examples

3.1 Direct HTTP request as data source

In the following example a data source is defined using a direct HTTP request.

3.2 Direct HTTP request as data source, with defaults

The above example can be shortened, counting on the defaults defined in the RML HTTP Request Access specification.

3.3 Direct HTTP request and linked HTTP request as target, with authentication

In the following example two targets are defined: lt_persons using a direct HTTP request and lt_persons_acl uses a linked HTTP request using rel relation acl. Both targets require authentication, using the same email, password, webId, and oidcIssuer parameters.

A. References

A.1 Normative references

[RDF]
RDF 1.1 Concepts and Abstract Syntax. W3C. 25 February 2014. W3C Recommendation. URL: https://www.w3.org/TR/rdf11-concepts/
[RML]
RDF Mapping Language. URL: https://kg-construct.github.io/rml-resources/portal/
[Turtle]
RDF 1.1 Turtle. W3C. 25 February 2014. W3C Recommendation. URL: https://www.w3.org/TR/turtle/
[YARRRML]
YARRRML. 26 January 2023. Unofficial Draft. URL: https://w3id.org/imec/rml/yarrrml/spec/

A.2 Informative references

[RML-HTTP-REQUEST-ACCESS]
RML HTTP Request Access. 13 January 2025. Unoffical Draft. URL: https://w3id.org/imec/rml/specs/access/httprequest