Skip to content

Commit

Permalink
Add pagination and filter changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmarino committed Feb 13, 2024
1 parent 2276b45 commit da6a122
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
15 changes: 9 additions & 6 deletions catalog/catalog.binding.https.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Authorization: ...

- The `Authorization` header is optional if the [Catalog Service](../model/terminology.md#catalog-service) does not require authorization. If present, the contents of the `Authorization` header are detailed in the [Authorization section](#13-authorization).

- 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](../model/terminology.md#catalog) request.
- 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](../model/terminology.md#catalog) request. If a filter expression is not supported by an implementation, it must return a HTTP 400 (Bad Request) response.

##### Response

Expand Down Expand Up @@ -100,10 +100,13 @@ If the request is successful, the [Catalog Service](../model/terminology.md#cata

### 3.2 Pagination

A [Catalog Service](../model/terminology.md#catalog-service) may paginate the results of a [Catalog Request Message](./catalog.protocol.md#21-catalog-request-message). Pagination data is specified using [Web Linking](https://datatracker.ietf.org/doc/html/rfc5988) and the HTTP `Link` header. The `Link` header will contain URLs for navigating to previous and subsequent results. The following request sequence demonstrates pagination:
A [Catalog Service](../model/terminology.md#catalog-service) may paginate the results of a [Catalog Request Message](./catalog.protocol.md#21-catalog-request-message). Pagination data must be specified using [Web Linking](https://datatracker.ietf.org/doc/html/rfc5988) 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:

```http request
Link: <https://provider.com/catalog?page=2&per_page=100>; rel="next"
Link: <https://provider.com/catalog?continuationToken=f59892315ac44de8ab4bdc9014502d52>; rel="next"
{
"@context": "https://w3id.org/dspace/v0.8/context.json",
Expand All @@ -115,8 +118,8 @@ Link: <https://provider.com/catalog?page=2&per_page=100>; rel="next"
Second page response:

```http request
Link: <https://provider.com/catalog?page=1&per_page=100>; rel="previous"
Link: <https://provider.com/catalog?page=3&per_page=100>; rel="next"
Link: <https://provider.com/catalog?continuationToken=f59892315ac44de8ab4bdc9014502d52>; rel="previous"
Link: <https://provider.com/catalog?continuationToken=f59892315ac44de8ab4bdc9014502d52>; rel="next"
{
"@type": "dcat:Catalog",
Expand All @@ -127,7 +130,7 @@ Link: <https://provider.com/catalog?page=3&per_page=100>; rel="next"
Last page response:

```http request
Link: <https://provider.com/catalog?page=2&per_page=100>; rel="previous"
Link: <https://provider.com/catalog?continuationToken=f59892315ac44de8ab4bdc9014502d52>; rel="previous"
{
"@type": "dcat:Catalog",
Expand Down
4 changes: 2 additions & 2 deletions catalog/catalog.protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ All messages must be serialized in JSON-LD compact form as specified in the [JSO

The Catalog Request Message is message sent by a [Consumer](../model/terminology.md#consumer) to a [Catalog Service](../model/terminology.md#catalog-service). The [Catalog Service](../model/terminology.md#catalog-service) must respond with a [Catalog](#31-ack---catalog), which is a valid instance of a [DCAT Catalog](https://www.w3.org/TR/vocab-dcat-3/#Class:Catalog).

- The message may have a `filter` property which contains an implementation-specific query or filter expression type supported by the [Catalog Service](../model/terminology.md#catalog-service).
- The message may have a `filter` property which contains an implementation-specific query or filter expression type supported by the [Catalog Service](../model/terminology.md#catalog-service).

- The [Catalog Service](../model/terminology.md#catalog-service) may require an authorization token. Details for including that token can be found in the protocol binding, e.g., [Catalog HTTPS Binding](./catalog.binding.https.md). Similarly, pagination may be defined in the protocol binding.

Expand Down Expand Up @@ -184,4 +184,4 @@ When a [Catalog](../model/terminology.md#catalog) contains protected [Datasets](

### 4.4 Catalog Brokers

A [Dataspace](../model/terminology.md#dataspace) may include Catalog Brokers. A Catalog Broker is a [Consumer](../model/terminology.md#consumer) that has trusted access to 1..N upstream [Catalog Services](../model/terminology.md#catalog-service) and advertises their respective [Catalogs](../model/terminology.md#catalog) as a single [Catalog Service](../model/terminology.md#catalog-service). The broker is expected to honor upstream access control requirements.
A [Dataspace](../model/terminology.md#dataspace) may include Catalog Brokers. A Catalog Broker is a [Consumer](../model/terminology.md#consumer) that has trusted access to 1..N upstream [Catalog Services](../model/terminology.md#catalog-service) and advertises their respective [Catalogs](../model/terminology.md#catalog) as a single [Catalog Service](../model/terminology.md#catalog-service). The broker is expected to honor upstream access control requirements.

0 comments on commit da6a122

Please sign in to comment.