and more in a single search tool across platforms. Read the announcement here. |
12/12/2023 02:31 PM - edited 12/12/2023 02:32 PM
Hello,
Below is our response from an API call with Infor. Note, there are no 'links' in the headers of the response:
I am trying to use the link found in the "rel": "next" section. I am also trying to make some manipulations to the reference URL so that we can actually use the URL to return results. Below is the pagination I am trying:
12/12/2023 06:24 PM
Refer example 1 from https://docs.saviyntcloud.com/bundle/REST-v23x/page/Content/Developers-Handbook.htm
12/13/2023 06:19 AM
example 1 does not have the issue of each link (next, prev, self) being called as "href". We are trying to only use HREF where REL = NEXT.
12/15/2023 12:19 AM
@Kshah - Could you try the following:
"pagination": {
"nextUrl": {
"nextUrlPath": "${urlNextPath=''; ArrayList arr = response?.completeResponseMap?._links; if(arr.size()>0){arr.eachWithIndex{ val, idx -> if(val.rel?.equals('next')){ urlPathNext=val.href;}}} return 'https://TestSite.com/path1/path2/path3/Employee'+urlPathNext;}
}
}
12/15/2023 07:22 AM
Hi Rajesh,
Trying that pagination returns same error message on syntax:
Got null response statusCode with erroMsg - [error:Error Illegal character in path at index 1: ${urlNextPath=''; ArrayList arr = response?.completeResponseMap?._links; if(arr.size()>0){arr.eachWithIndex{ val, idx -> if(val.rel?.equals('next')){ urlPathNext=val.href;}}} return 'BaseURL'+urlPathNext;}]
Any suggestion?