Binding: HTTPS
This specification defines a RESTful API over HTTPS for the Catalog Protocol.
1 Introduction
1.1 Prerequisites
The
<base>
notation indicates the base URL for a Catalog Service endpoint. For example, if the base Catalog URL isapi.example.com
, the URLhttps://<base>/catalog/request
will map tohttps//api.example.com/catalog/request
.All request and response messages must use the
application/json
media type.
1.2 Catalog Error
In the event of a request error, the Catalog Service must return an appropriate HTTP code and a Catalog Error in the response body.
2 Path Bindings
Endpoint | Method | Description |
---|---|---|
https://provider.com/catalog/request |
| Section 2.1.1 |
https://provider.com/catalog/datasets/:id |
| Section 2.2.1 |
2.1 The catalog/request
Endpoint (Provider-side)
catalog/request
Endpoint (Provider-side)2.1.1 POST
Request
The Catalog Request Message corresponds to POST https://<base>/catalog/request
:
The
Authorization
header is optional if the Catalog Service does not require authorization. If present, the contents of theAuthorization
header are detailed in the Authorization section.The
filter
property is optional. If present, thefilter
property can contain an implementation-specific filter expression or query to be executed as part of the Catalog request. If a filter expression is not supported by an implementation, it must return a HTTP 400 (Bad Request) response.
Response
If the request is successful, the Catalog Service must return an HTTP 200 (OK) with a response body containing a Catalog (which is a profiled DCAT Catalog type described by the Catalog Protocol).
2.2 The catalog/datasets/:id
Endpoint (Provider-side)
catalog/datasets/:id
Endpoint (Provider-side)2.2.1 GET
Request
The Dataset Request Message corresponds to GET https://<base>/catalog/datasets/:id}
:
The
Authorization
header is optional if the Catalog Service does not require authorization. If present, the contents of theAuthorization
header are detailed in the Authorization section.
Response
If the request is successful, the Catalog Service must return an HTTP 200 (OK) with a response body containing a Dataset (which is a DCAT Dataset type described by the Catalog Protocol).
3 Technical Considerations
3.1 Pagination
A Catalog Service may paginate the results of a Catalog Request Message. Pagination data must be specified using Web Linking and the HTTP Link
header. The Link
header will contain URLs for navigating to previous and subsequent results. Only the next
and previous
link relation types must be supported. Note that the content and structure of the link query parameters is not defined by the current specification.
The following request sequence demonstrates pagination:
Second page response:
Last page response:
3.2 Compression
Catalog Services MAY compress responses to a Catalog Request by setting the Content-Encoding
header to gzip
as described in the HTTP 1.1 Specification.
4 The Well-Known Proof Metadata Endpoint
When an implementation supports protected Datasets, it may offer a proof metadata endpoint clients can use to determine proof requirements. If the implementation offers a proof data endpoint, it must use the dspace-trust
Well-Known Uniform Resource Identifier at the top of the path hierarchy:
The contents of the response is a JSON object defined by individual trust specifications and not defined here.
Note that if multiple Connectors are hosted under the same base URL, an arbitrary path segment appended to the base well-known URL can be used, for example, https://example.com/.well-known/dspace-trust/connector1.
In this case, the document retrievable at the dspace-trust
path segment must contain all the child paths.
Last updated