Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

REST - accountParams - Mapping AccountIds returned as List

UwarajWaman
New Contributor III
New Contributor III

Hi,

I am working on a REST connector. Following is the API response where I get all account ids as a list. I am struggling to map these account ids in 'accountParams'. Any ideas how these accounts can be imported?

API Response -

 

{
     "id": 1,
     "result": [
          "1000071",
          "1000101",
          "1000136",
          "1001213",
          "1000101",
          "wamanu",
          "pardesia"
}

 

If I mention ListField as "result", what will be colsToPropsMap?

If I mention ListField as "", will I be able to use colsToPropsMap as "accountID": "result~#~char"?

Is there a way to use 'list' as dataType in colsToPropsMap?

Any other way I can import these account?

Thanks,

Uwaraj

5 REPLIES 5

UwarajWaman
New Contributor III
New Contributor III

Hi all,

Any help on this issue is greatly appreciated. I would like to know if it's at all possible to parse the response if the 'List Field' contains 'list of elements' rather than 'list of objects with key-value' pairs. Lot of APIs return the response in this way and I am not able to find any solution to how to parse it in Saviynt.

Possible to parse following response -

{
     "results":[
          {
               "id": "1001"
          },
          {
               "id": "1002"
          }
     ]
}

How to parse following variation of the response -

{
     "results":[
          "1001",
          "1002"
     ]
}

Thanks,

Uwaraj

Hi UwarajWaman,

The list of accounts must be in the Key-value pair to be imported.

Thank you 

Thanks for the reply @Vedanth_BK .

Is there a way to pre-process such responses in Saviynt before feeding into colsToPropsMap? Or do we have to build a wrapper to pre-process the response outside Saviynt? We have lot of APIs which return responses like in second example which are valid JSONs but cannot be parsed in Saviynt.

There is no preprocessing available for rest connector however you can try Jar connector where you might be able to achieve your use case


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Thanks @rushikeshvartak. I'll go through the documentation for Jar connector.