Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Pagination for Pages

Testy
Regular Contributor
Regular Contributor

what is the proper pagination syntax if my response looks like this and my response header has x-total-count? 

URL: https://example.com/api/users?page=0

{
"users": [
{
"id": "123"
},
{
"id": "456"
},
{
"id": "789"
}
]
}

 

Response Headers
x-total-count700

I've tried with the suggested, but it seems to go past how many pages i actually have.:

"pagination": {
"page": {
"pageSizeParam": "size",
"pageSize": 25,
"pageRecordCount": "25",
"pageNumberParam": "page",
"totalCountPath": "headers.x-total-count",
"firstPageNumber": 0
}
}

6 REPLIES 6

NM
Honored Contributor II
Honored Contributor II

@Testy so you see any error in log? Is it not importing all?

Testy
Regular Contributor
Regular Contributor

it's importing just the 1st page, but in the logs i can sort of see its running infinite up to page 200s.


Testy_0-1725628781410.png

{
"accountParams": {
"connection": "userAuth",
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://example.com/api/users?page=0",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/x-www-form-urlencoded",
"httpMethod": "GET"
},
"listField": "users",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "id~#~char"
},
"pagination": {
"page": {
"pageSizeParam": "size",
"pageSize": 25,
"pageRecordCount": "25",
"pageNumberParam": "page",
"totalCountPath": "headers.x-total-count",
"firstPageNumber": 0
}
}
}
}
}
}

Can you share requested information


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

rushikeshvartak
All-Star
All-Star
  • Please share
    • Full JSON from Saviynt
    • Postman screenshot
    • Postman curl command
    • Logs from saviynt in text format

Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

hi @rushikeshvartak apologies i glanced over your message

importaccountJSON:
{ "accountParams": { "connection": "userAuth", "processingType": "SequentialAndIterative", "call": { "call1": { "callOrder": 0, "stageNumber": 0, "http": { "url": "https://example.com/api/users?page=0", "httpHeaders": { "Authorization": "${access_token}" }, "httpContentType": "application/x-www-form-urlencoded", "httpMethod": "GET" }, "listField": "users", "keyField": "accountID", "colsToPropsMap": { "accountID": "id~#~char" }, "pagination": { "page": { "pageSizeParam": "size", "pageSize": 25, "pageRecordCount": "25", "pageNumberParam": "page", "totalCountPath": "headers.x-total-count", "firstPageNumber": 0 } } } } } }

i can't share the screenshot of postman for confidentiality reasons but its a GET Request with URL with something like "https://example.com/api/users?page=0", nothing in the headers nor body. 

Response header 

Testy_0-1725888964605.png

response body (no next url)

{ "users": [ { "id": "123421343214" }, { "id": "123421343215" }, { "id": "123421343216" }, { "id": "123421343217" } ] }

Testy
Regular Contributor
Regular Contributor

it worked with 

"pagination": {
"nextUrl": {
"nextUrlPath": "https://example.com/api/users?
},
"offset": {
"offsetParam": "page",
"batchParam": "limit",
"batchSize": 1,
"totalCountPath": "headers.x-total-count"
}
}