Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Pagination Synatx for links type for REST Connector

mahammed_raffi
New Contributor
New Contributor

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]

3 REPLIES 3

Vedanth-BK
Regular Contributor
Regular Contributor

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
          }
        }
      }
    }
  }
}

 

 

 

Thank you
Vedanth B.K
If you find my response helpful and it works, Hit the 'Kudos' button and accept it as a solution!!

Thank you @Vedanth-BK . It worked now !!

alc
Regular Contributor
Regular Contributor

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,