Click HERE to see how Saviynt Intelligence is transforming the industry. |
05/29/2024 04:14 AM - last edited on 05/30/2024 07:54 AM by Sunil
Hi All,
I'm trying to integrate InsightVM application as REST integration (rapid7 api ) in v23.10 version and I'm not able to import accounts through pagination as i don't find related pagination logics in the example jsons. Looking for similar pagination samples for below api response.
pagination response from rapid7 api :
"page": {
"number": 0,
"size": 10,
"totalResources": 75,
"totalPages": 8
},
"links": [
{
"href": "https://XXXX:3780/api/3/users?page=0&size=10&sort=id,asc",
"rel": "first"
},
{
"href": "https://XXXX:3780/api/3/users?page=0&size=10&sort=id,asc",
"rel": "self"
},
{
"href": "https://XXXX:3780/api/3/users?page=1&size=10&sort=id,asc",
"rel": "next"
},
{
"href": "https://XXXXX:3780/api/3/users?page=7&size=10&sort=id,asc",
"rel": "last"
}
]
Issue at hand:
Response has no pagination params. response and response header does not have any useful pagination parameters to use.
I have attached the ImportAccountJson formats with diff pagination which i tried, still I am able to import only 10 accounts from the target.
[This message has been edited by moderator to mask sensitive info]
Solved! Go to Solution.
05/30/2024 07:50 AM - edited 05/30/2024 07:52 AM
Hello @mahammed_raffi
Please try with the below JSON with pagination - page type to import accounts. Ensure you provide the valid accesstoken and URL
{
"accountParams": {
"connection": "acctAuth",
"createUsers": false,
"processingType": "SequentialAndIterative",
"includeExistingInActiveAccounts": true,
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://XXXXX:3780/api/3/users",
"httpHeaders": {
"Content-Type": "application/json",
"Authorization": ""
},
"httpMethod": "GET"
},
"listField": "resources",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "id~#~char",
"name": "name~#~char",
"displayName": "name~#~char",
"customproperty1": "login~#~char",
"customproperty2": "email~#~char",
"customproperty3": "enabled~#~char",
"status": "enabled~#~char",
"customproperty10": "STORE#ACC#ENT#MAPPINGINFO~#~char"
},
"pagination": {
"page": {
"pageSizeParam": "size",
"pageSize": 10,
"pageRecordCount": "completeResponseMap.page.count",
"pageNumberParam": "page",
"totalCountPath": "completeResponseMap.page.totalResources",
"firstPageNumber": 0
}
}
}
}
}
}
05/31/2024 01:40 AM
Thank you @Vedanth-BK . It worked now !!
06/19/2024 01:45 PM - edited 06/19/2024 02:58 PM
Hello Vedanth,
What does pageRecordCount means and what is it used for within Saviynt?
"pageRecordCount": "completeResponseMap.page.count",
Does this pagination work with HTTP Post method? I need pass the complicated Search Criteria as Post data.
How should I figure out the pageNumber and pageSize from response body AND set them into my Search Criteria JSON String which will be used for search criteria Post data for next page search?
Thanks,