Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

When retrieving large collection sets, it can be useful to paginate the results.  Pagination of the collection results automatically happens when the number of items in the collection is greater than the value of the itemsPerPage query parameter.

Available Parameters

ArgumentTypeDescription
itemsPerPageintNumber of items to include in the returned collection.   Defaults to 30.  Can be set to a maximum of 100.
pageintThe page number of the result set to retrieve.





Paginated Collection
# GET /api/resource?itemsPerPage=2

{
    "@context": "/api/contexts/resource",
    "@id": "/api/resource",
    "@type": "hydra:Collection",
    "hydra:member": [
        {
            "@id": "/api/resource/6487dac824624d66b9fac36cc909667f",
            "@type": "resource",
            "id": "6487dac824624d66b9fac36cc909667f"
            }
        },
		{
            "@id": "/api/resource/dacb0fa01a4d4ddf801427ac2bd59958",
            "@type": "resource",
            "id": "dacb0fa01a4d4ddf801427ac2bd59958"
            }
        },
    ],
    "hydra:totalItems": 54,
    "hydra:view": {
        "@id": "/api/resource?itemsPerPage=2&page=1",
        "@type": "hydra:PartialCollectionView",
        "hydra:first": "/api/resource?itemsPerPage=2&page=1",
        "hydra:last": "/api/resource?itemsPerPage=2&page=27",
        "hydra:next": "/api/resource?itemsPerPage=2&page=2"
    }
}
  • No labels