WP OctoDocs

Pagination and sorting

How list endpoints page and sort.

List endpoints return one page at a time: the page's contents under data, the paging state under meta (current page, per page, total) and the neighbouring pages under links.

ParameterMeaning
pagethe page to return, starting at 1
per_pagehow many records per page
sort_bythe field to sort by, where the endpoint supports it
GET /api/v1/dashboard/websites?page=2&per_page=25&sort_by=name

The reference page of each list endpoint states which parameters it accepts and which fields it can sort by.