Comment on page
Binding: HTTPS
This specification defines a RESTful API over HTTPS for the [Catalog Protocol].
- 1.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
. - 2.All request and response messages must use the
application/json
media type.
In the event of a request error, the catalog service must return an appropriate HTTP code and a CatalogError in the response body.
Field | Type | Description |
---|---|---|
code | string | An optional implementation-specific error code. |
reasons | Array[object] | An optional array of implementation-specific error objects. |
POST https://provider.com/catalog/request
Authorization: ...
{
"@context": "https://w3id.org/dspace/v0.8/context.json",
"@type": "dspace:CatalogRequestMessage",
"dspace:filter": {}
}
The
Authorization
header is optional if the catalog service does not require authorization. If present, the contents of the Authorization
header are detailed in the Authorization section.The
filter
property is optional. If present, the filter
property can contain an implementation-specific filter expression or query to be executed as part of the catalog request.If the request is successful, the catalog service must return a response body containing a Catalog which is a profiled DCAT
Catalog
type described by the Catalog Protocol Specification.GET https://provider.com/catalog/datasets/{id}
Authorization: ...
The
Authorization
header is optional if the catalog service does not require authorization. If present, the contents of the Authorization
header are detailed in the Authorization section.If the request is successful, the catalog service must return a response body containing a Dataset which is a DCAT
Dataset
type described by the Catalog Protocol Specification.A catalog service may require authorization. If the catalog service requires authorization, requests must include an HTTP
Authorization
header with a token. The semantics of such tokens are not part of this specification.- Versioning will be done via URLs. TBD.
A catalog service may paginate the results of a
CatalogRequestMessage
. Pagination data is specified using Web Linking and the HTTP Link
header. The Link
header will contain URLs for navigating to previous and subsequent results. The following request sequence demonstrates pagination:Link: <https://provider.com/catalog?page=2&per_page=100>; rel="next"
{
"@context": "https://w3id.org/dspace/v0.8/context.json",
"@type": "dcat:Catalog"
...
}
Second page response:
Link: <https://provider.com/catalog?page=1&per_page=100>; rel="previous"
Link: <https://provider.com/catalog?page=3&per_page=100>; rel="next"
{
"@type": "dcat:Catalog"
...
}
Last page response:
Link: <https://provider.com/catalog?page=2&per_page=100>; rel="previous"
{
"@type": "dcat:Catalog"
...
}
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.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:/.well-known/dspace-trust
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, a path segment appended to the base well-known URL can be used, for example,
https://example.com/.well-known/dspace-trust/connector1.
Last modified 3d ago