05/03/2023 01:54 PM
Hi All,
I'm trying to integrate JIRA CLOUD application as REST integration in 2023 version and I'm not able to import accounts through pagination as i don't find related pagination logics in the example jsons.
Issue at hand:
Response has no pagination params. response and responnse header does not have any useful pagination parameters to use.
Please find the attached log snippet and importAcctJson
Any help on this would be really appreciated.
Solved! Go to Solution.
05/04/2023 01:15 AM
Please try using following sample
"pagination": {
"nextUrl": {
"nextUrlPath": "${response?.completeResponseMap?.next_page==null?null:response.completeResponseMap.next_page}"
}
}
Use the value in the response to paginate into the next pages if the next_page attribute contains a value, else the pagination stops
Refer to following document : https://docs.saviyntcloud.com/bundle/REST-v23x/page/Content/Developers-Handbook.htm
05/04/2023 08:47 AM
Hi Rakesh,
Thanks for the response, I still see the below error:
{"log":"04-May-2023 15:39:07.510 WARNING [quartzScheduler_Worker-7] groovy.sql.BatchingStatementWrapper.processResult Problem executing batch - expected result length of 1000 but got 0\n","stream":"stderr","time":"2023-05-04T15:39:07.511009209Z"}"
05/04/2023 11:44 AM - edited 05/04/2023 11:47 AM
Can you try with the below and see if it works. This is created based on the pagination example given on https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#special-request-headers
Hope you are integrating the same.
{
"pagination": {
"page": {
"pageSizeParam": "maxResults",
"pageSize": 50,
"pageRecordCount": "completeResponseMap.maxResults",
"pageNumberParam": "startAt",
"totalCountPath": "completeResponseMap.total",
"firstPageNumber": 0
}
}
}
05/05/2023 12:38 PM
Hi Sahil,
I do see this in connector reference document but it doesnot work either.
05/08/2023 09:15 AM
Can you update ConfigJSON param in the REST connection with value {"showLogs":true} if not done already. Run the import and share the log snippet.
05/18/2023 09:00 AM
Hi Sahil,
I was able to achieve the pagination by removing the duplication of pagination params in the url (harcoded)
05/18/2023 09:09 AM
Can you share the final format you are using.
05/18/2023 09:30 AM
Sure here is my pagination block:
"pagination": {
"offset": {
"offsetParam": "startAt",
"batchParam": "maxResults",
"batchSize": 100,
"totalCountPath": xxxx
}
and URl: https://xxxx/rest/api/3/users/search - right way to use when you have pagination,
I was duplicating https://equifax-sandbox-525.atlassian.net/rest/api/3/users/search?startAt=0&maxResults=xxx in the url even though I have pagination logic.