Click HERE to see how Saviynt Intelligence is transforming the industry. |
10/16/2023 11:58 PM
Hi Team,
Using "url": "https://******/ECM/api/v5/getUser" we can get max 500 users in Postman so I understand to increase the displayed number we have to use user pagination but where do we have to use this pagination in Postman.
could you please provide some samples and guidance on same?
Thank you,
Sandeep
10/17/2023 09:26 PM
Hello @sandeepverma,
To retrieve records with pagination, you currently need to manually set the "Offset" and "Max" values in the URL, as demonstrated below:
Please note that the default setting for "Max" is 500, and you'll need to adjust the "Offset" and "Max" values as needed to fetch the desired records. If you wish to retrieve a greater number of records, this will require changes at the database level,
If you require assistance with fetching a larger set of records, please consider raising a support ticket for further guidance.
Thanks.
11/30/2023 11:21 PM
Hi @sandeepverma ,
whats about that approach:
{{SSM_url}}/ECM/{{SSM_path}}/user?q=accountExpired:0&fields=firstname,lastname,username&sort=username&order=desc&offset={{offset}}&max={{max}}
var jsonData = JSON.parse(responseBody);
if (jsonData.count==0) {
pm.collectionVariables.set("offset",0)
} else {
pm.collectionVariables.set("offset",parseInt(pm.collectionVariables.get("offset")) + parseInt(pm.collectionVariables.get("max")))
}
In my environment it paginates correct and I get all users in the subsequent results.
good luck 🙂
Regards
11/30/2023 11:38 PM
@sandeepverma
small addition to my former post.
To reflect your concrete URL in question, the provided information should be working with small corrections and of course that code is just a proof which needs for sure a rework to get production ready 🙂
{{SSM_url}}/ECM/{{SSM_path}}/getUser?offset={{offset}}&max={{max}}
var jsonData = JSON.parse(responseBody);
if (jsonData.displaycount==0) {
pm.collectionVariables.set("offset",0)
} else {
pm.collectionVariables.set("offset",parseInt(pm.collectionVariables.get("offset")) + parseInt(pm.collectionVariables.get("max")))
}
10/18/2023 05:35 AM
Hi @sudeshjaiswal,
Currently, I have one query here suppose I have 2500 users in Saviynt, can we achieve using max and offset in URL or do we have to reach out and raise a support ticket with Saviynt?
Thank you,
Sandeep
10/18/2023 07:24 AM
Hello @sandeepverma,
I would suggest to reach out to support team as it required DB level changes and ask them to increase the size from 500 to 2500 in the table.
Thanks,