Pagination
1min
all top level api resources have support for bulk fetches through “list” api methods for example, you can list breeds https //documentation digitail io/get a list of breeds , list pets https //documentation digitail io/get a list of pets , and list invoices https //documentation digitail io/get a list of invoices these list api methods share a common structure and accept, at a minimum, the following two parameters page , per page the per page parameters refers to the maximum number of resources to be returned in one bulk fetch the parameter is limited at 1000 for performance purposes if ommited, the parameter defaults to the value 15 the page parameter refers to the current page of the pagination and will only return the entities from (page 1) per page to page per page if ommitted, the paramter defaults to the value of 1 all paginated responsed will have the entities wrapped in a data attribute and will contain two additional metadata attributes links and meta links offer useful shorcuts to retrieving the first, last, previous or next page while metadata contains information such as the total number of resources available, the number of resources on the current page, etc example payload json { "data" \[{}, entities here , {}], "links" { "first" "https //vet digitail io/api/v1/entities?page=1", "last" "https //vet digitail io/api/v1/entities?page=10", "prev" null, "next" "https //vet digitail io/api/v1/entities?page=2" }, "meta" { "current page" 1, "last page" 10, "from" 1, "to" 15, "per page" 15, "total" "98", "path" "/api/v1/entities" } }