Click HERE to see how Saviynt Intelligence is transforming the industry. |
09/05/2024 12:09 PM
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"
}
]
}
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
}
}
Solved! Go to Solution.
09/05/2024 01:21 PM
@Testy so you see any error in log? Is it not importing all?
09/06/2024 06:20 AM
it's importing just the 1st page, but in the logs i can sort of see its running infinite up to page 200s.
{
"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
}
}
}
}
}
}
09/06/2024 06:35 AM
Can you share requested information
09/05/2024 01:29 PM
09/09/2024 06:36 AM
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
response body (no next url)
{ "users": [ { "id": "123421343214" }, { "id": "123421343215" }, { "id": "123421343216" }, { "id": "123421343217" } ] }
09/11/2024 06:33 AM
it worked with
"pagination": {
"nextUrl": {
"nextUrlPath": "https://example.com/api/users?
},
"offset": {
"offsetParam": "page",
"batchParam": "limit",
"batchSize": 1,
"totalCountPath": "headers.x-total-count"
}
}