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

How to use multiple REST API calls in ImportAccountEntJSON

adityachadde
New Contributor III
New Contributor III

Hi,

We want to reconcile the accounts from the target application using REST Connection.

In postman first, we need to send get request to get the username then we need to use the username present in the response to get the user data. 

Is this possible to achieve this using a REST connection?

In the REST Connector guide, there is no ImportAccountEntJSON sample present for this.

We are trying with below Json but it is not working

{
"accountParams":{
"connection":"acctAuth",
"processingType":"SequentialAndIterative",
"successResponses": {
"statusCode": [
200,
201,
202,
203,
204,
205
]
},
"call":{
"call1":{
"callOrder":0,
"stageNumber":0,
"http":{
"url":"8080/dctm-rest/repositories/edocintactive/users",
"httpHeaders":{
"Authorization":"Basic **************************************************************",
"Accept":"application/json"
},
"httpContentType":"application/json",
"httpMethod":"GET"
},
"listField":"entries",
"keyField":"accountID",
"colsToPropsMap":{
"accountID":"title~#~char",
"name":"title~#~char"
}
}
},
"call2": {
"callOrder": 0,
"stageNumber": 0,
"showJobHistory": true,
"http": {
"url": "8080/dctm-rest/repositories/edocintactive/users/username",
"httpHeaders": {
"Authorization": "Basic ********************************************",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "entries",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "title~#~char",
"name": "title~#~char",
"customproperty1":"user_source~#~char",
"customproperty2":"user_ldap_dn~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
}
}
}
}

Best Regards,

Thank You

7 REPLIES 7

rushikeshvartak
All-Star
All-Star

PFA 

 


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

Hi @rushikeshvartak,

We want to use it for accounts and entitlements import.

This format is for userimport Json

Could you please give us the format which we can use in the accounts and entitlements import Json.

Best Regards,

Aditya chadde

{
"accountParams":{
"connection":"acctAuth",
"processingType":"SequentialAndIterative",
"successResponses": {
"statusCode": [
200,
201,
202,
203,
204,
205
]
},
"call":{
"call1":{
"callOrder":0,
"stageNumber":0,
"http":{
"url":"/edocintactive/users",
"httpHeaders":{
"Authorization":"Basic ******************************************************",
"Accept":"application/json"
},
"httpContentType":"application/json",
"httpMethod":"GET"
},
"listField":"entries",
"keyField":"accountID",
"colsToPropsMap":{
"accountID":"title~#~char",
"name":"title~#~char"
}
},
"call2": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "/users/$26F400-C72T24U93J40",
"httpHeaders": {
"Authorization": "Basic *****************************************************",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "properties",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "title~#~char",
"name": "title~#~char",
"customproperty1":"user_source~#~char",
"customproperty2":"user_ldap_dn~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
}
}
}
}
}

 

Could you please review the above json, check what is the issue with the above json and provide the correct JSON Format to reconcile the accounts and entitlements.

Best Regards,

Aditya chadde

Refer 

processing type and cp31 revalidate the logic from below link

https://saviynt.freshdesk.com/support/solutions/articles/43000521736-rest-connector-guide%C2%A0


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

Hi @rushikeshvartak,

AccountEntImportJson which I'm using is working fine when I'm Hardcoding the user's username in  call2 as below:

url": "/users/$26F400-C72T24U93J40",

But here instead of hardcoding the username we want to insert it dynamically. I have tried below samples but it is not working suggest the valid sample to dynamically pass the username from the first API Call.

url/users/${response.call1.message.entries.title}

url/users/${response.call1.message.title}

url/users/${call1.message.entries.title}

url/users/${response.call1.message.title}

url/users/${response.call1.message.entries[0].title}

all above samples are not working in the JSON Getting below error as 

Error - to Import Data correctly: NullResponseFromTarget.

Please help us with this.

Best Regards,

Aditya Chadde

Hi @Paul_Meyer,

It is not working.