Web Services: Paging issue

I am trying to handle the pagination in a web services connector.

The response I get in the body includes the token for the next page, which I need to add to the endpoint url, ie:

{
“timestamp": ‘2025-02-13T20:34:57.0976269Z’,
“nextpagetoken“:”/v0c3NfkkqXXXXXXXXXXXXXXXXXXXXXXXXXX”,
“count": 50,
“data": [
{
“id": 1,
“externalId": ‘aaa’,
“userName": ‘aaa’,
“lastName": ‘aaa’,
“middleName": null
},
{
“id": 2,
“externalId": bbb,
“userName": ‘bbb’,
“lastName": ‘bbb’,
}
.
.
.
}

I can retrieve the value nextpagetoken but my root path should be “$”, however, when I try to get the values for Response Mapping of the form:
firstname = data[*].firstName
external ID = data[*].externalId
this does not work.

It only works if my root path is “data[*]” but since my root is now “data”, I can no longer retrieve the value “nextpagetoken” for paging. Is there any way to solve this?

Thank you very much for your support.
Regards.

Hi,

You can use “$response.nextpagetoken”. $response refers to response body object from API call.

-Abhinov

Thanks for the support, it works!

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.