Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Page Pattern

The Page pattern adds pagination links to resources that have multiple elements. The List pattern often applies the Page pattern to give clients the ability to page through the list’s entries. However, another type of data-providing resource, like an Info resource, may contain a large sequence of elements that can page its data with this pattern.

A Paged resource has links to the previous and next pages. An API may add additional pagination links to specific page markers, like “first” and “last,” if their experience requires them.

Clients manage Page size and placement in the list with either the Offset Page pattern or the Cursored Page pattern. While not required, these patterns give the client control over how to formulate the pages. A Paged resource may choose to offer either pattern, depending on their data source and the desired user experience.

  • Offset Page pattern offers pagination with page size and page offset positioning. A client can position the page offset in the overall list and jump to any section of the Paged list.
  • Cursored Page pattern paginates a list with a cursor and page size, but the client is unaware of their position in the whole list.

Paged Resource

profile: <https://level3.rest/patterns/page#paged-resource>

The Paged resource can present any profile. The profile choice does not affect pagination.

next

rel="https://level3.rest/patterns/page#next"

Points to another Paged resource that contains the next page of elements. This relationship is similar in concept to IANA’s next link relation, which is defined by HTML 5 as the next document in a sequence.

previous

rel="https://level3.rest/patterns/page#previous"

Points to another Paged resource that contains the previous page of elements. This relationship is similar in concept to IANA’s previous link relation, which is defined by HTML 5 as the previous document in a sequence.

Specifications

HTML 5 Link Types: section 4.8.6


© 2019-2023 Matt Bishop
Creative Commons Licence
This work is licensed under a Creative Commons Attribution-NoDerivatives 4.0 International License.