The Cursored Page pattern adds cursor-management affordances to the Page pattern, giving clients control over the pagination of the list’s elements.
If the Paged resource follows the List pattern, then the Cursor Entry resource will contain a cursor field to change the cursor configuration with. However, if the Paged resource presents a data-oriented list of elements, those data elements may contain a
cursor field that can be used to change the cursor pagination start or end point with the Cursor resource.
If instead of utilizing the List pattern, the Paged resource is a list of data, then the individual elements must have a
cursor property that can be used in the Cursor form to change the paged cursor position.
See the Cursor resource reference for more details on how to change the page size and cursor position.
See the documentation for Paged resource.
Points to a Cursor resource that can configure the cursor pagination.
Points to individual Cursor Entry resources in the List. This relationship is required for paged List resources using the Cursored Page pattern. See the List Entry description for more details about this resource profile.
Profile: <https://level3.rest/patterns/page/cursor#cursor-entry-resource>, <https://level3.rest/patterns/list#entry-resource>
In a List resource, the cursor entries are individual List Entry resources that contain a field with the entry’s cursor value. This value is used to change the pagination point via the Cursor resource. Lists that use the Cursored Page resource must provide Cursor Entry resources with the
| ||The Entry’s cursor value. Useful for changing the start or end point of the pagination configuration.|
The Cursor resource is a form to change the cursor pagination configuration. It is a Lookup resource containing the current configuration. The client can specify the page size and either the
after cursor to select a different page point to navigate through. Once the client submits the lookup, the redirects to the Paged resource configured with this configuration.
| ||The number of elements per page. If not present in the form, the current page size configuration will be used.|
| ||The cursor value to view preceding elements from. The element at this cursor will not be presented. The Paged resource’s |
| ||The cursor value to view proceeding element from. The element at this cursor will not be presented.|
If the client only wants to change the page size, but keep the same cursor position, then they only need to post the
size field in the form. If they wish to change the position of the cursor, they supply either the
after field in the form. This
cursor value comes from either the Cursor Entry resource or the
cursor property of an element in a resource’s list data.
Points to the Paged resource that this Cursor resource configures.
Copyright © 2019, 2020, 2021 Matt Bishop
This work is licensed under a Creative Commons Attribution-NoDerivatives 4.0 International License.