====== Pagination ====== A **pagination** represents a single page of items (which may be any JSON data type) along with some metadata about the total number of items and how to access the previous and next pages, if present. It is used for example in [[objects:actor|actors']] feed endpoints, to split up the data into more readily consumable chunks and to avoid making clients load too much at once. ===== Schema ===== * page: int>0 required((1 = first page)) * totalPages: int>0 required * totalItems: int required((total across all pages, not just this current one)) * nextPage: uri(pagination) optional * previousPage: uri(pagination) optional * items: array required ===== Example ===== { "page": 1, "totalPages": 5, "totalItems": 100, "nextPage": "https://example.social/actor/1/basicFeed?page=2", "previousPage": null, "items": [ "https://example.social/note/345", "https://example.social/note/678", "https://example.social/interaction/23", ... ] }