Pagination
This page describes the pagination implementation used for the API endpoints that supports or requires pagination to be utilized.
Some of the endpoints available for Signaturgruppen Privilege Management API uses pagination parameters and returns a x-pagination header which is used by the integrating API to traverse the data in an iterative way.
Pagination request parameters
The APIs that support pagination will accept the following query parameters:
Request parameter | Description |
---|---|
startEntryIndexTimeUtc | Can be null. The non-inclusive start date for entries for this request. Setting null initiates a request starting from the first entry available. |
pageSize | Default: 200, max: 2000. Size of response entries. |
lastId | Can be null. ID of last entry received in a previous query. Must be set, if startEntryIndexTimeUtc is set. |
Pagination x-pagination response header
All results from APIs that support pagination will set the x-pagination header, which has the following form
x-pagination: {"startEntryIndexTimeUtc":null,"lastEntryIndexTimeUtc":"2021-07-02T09:00:57.2377164+00:00","lastId":"ecbaffd8-70e4-4dff-bf8b-a627baf18246","responseCount":200,"hasPrevious":false,"hasNext":true}
This results states, that the query started from the beginning (null), returned 200 entries (default page size) and that the last entry was created at 2021-07-02T09:00:57.2377164+00:00 and had ID ecbaffd8-70e4-4dff-bf8b-a627baf18246. Further, the hasPrevious:false states that no previous page queries are available (this was the first, using null) and hasNext:true indicates that there are more entries to search for.
Example: assignedOwnedIdentityPrivileges/getAll
The assignedOwnedIdentityPrivileges/getAll API endpoint is an example of a pagination enabled API.
curl -X 'POST' \
'https://pp.netseidbroker.dk/privileges-api/api/v1/organizations/DKXXXXXXXX/assignedOwnedIdentityPrivileges/getAll?pageSize=2' \
-H 'accept: text/plain' \
-H 'Authorization: Bearer eyJh...oIgw' \
-H 'Content-Type: application/json' \
-d '{
}'
Returns the result:
{
"assignedOwnedIdentityPrivileges": [
{
"id": "e960e166-e4f...",
...
"organizationScope": "DKYYYYYYYY",
...
"createdTimestamp": "2021-04-15T07:29:26.5709557+00:00",
"updatedTimestamp": "2023-04-13T08:32:43.2762946+00:00"
},
{
"id": "8c..",
...
"organizationScope": "DKZZZZZZZZ",
...
"createdTimestamp": "2021-04-15T07:29:26.5767801+00:00",
"updatedTimestamp": "2023-04-13T08:33:01.6815642+00:00"
}
]
}
and the header:
x-pagination: {"startEntryIndexTimeUtc":null,"lastEntryIndexTimeUtc":"2021-04-15T07:29:26.5767801+00:00","lastId":"8c..","responseCount":2,"hasPrevious":false,"hasNext":true}
The next request is then
curl -X 'POST' \
'https://pp.netseidbroker.dk/privileges-api/api/v1/organizations/DK29915938/assignedOwnedIdentityPrivileges/getAll?startEntryIndexTimeUtc=2021-04-15T07%3A29%3A26.5767801%2B00%3A00&pageSize=2&lastId=8c..' \
-H 'accept: text/plain' \
-H 'Authorization: Bearer eyJh...oIgw' \
-H 'Content-Type: application/json' \
-d '{
}'