From 535bdafe3854e50377ce767123c23e9595ff029c Mon Sep 17 00:00:00 2001 From: Mikko Nieminen Date: Fri, 6 Sep 2024 15:28:09 +0200 Subject: [PATCH] add api docs pagination section (#1489) --- docs/source/app_projectroles_api_rest.rst | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/source/app_projectroles_api_rest.rst b/docs/source/app_projectroles_api_rest.rst index 43c19a44..10629a54 100644 --- a/docs/source/app_projectroles_api_rest.rst +++ b/docs/source/app_projectroles_api_rest.rst @@ -101,6 +101,25 @@ field upon a successfully processed request. For creation views, the ``sodar_uuid`` of the created object is returned along with other object fields. +Pagination +---------- + +From SODAR Core V1.0 onwards, list views support pagination unless otherwise +specified. Pagination can be enabled by providing the ``?page=x`` query string +in the API request. This will change the return data into a paginated format. +Example: + +.. code-block:: python + + { + 'count' 170, + 'next': 'api/url?page=3', + 'previous': 'api/url?page=1', + 'results': [ + # ... + ] + } + Projectroles REST API Versioning ================================