Click HERE to see how Saviynt Intelligence is transforming the industry. |
05/21/2024 10:14 AM
Hi All,
We have an XML based API which we are connecting use REST in Saviynt. It gives us the sessionid in reponse as below but we are not able to capture the same through response or as token.
Note: we are trying to do with XML to JSON conversion but for simplicity we tried with call1 & call2.
Response XML that comes is as below:
<NETBOX sessionid="*********">
<RESPONSE command="SearchPersonData" num="1"><CODE>SUCCESS</CODE></RESPONSE></NETBOX>
Below is our importaccount json
{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {
"inactivateAccountsNotInFile": false,
"correlateInactiveAccounts": true,
"accountThresholdValue": 40000,
"deleteAccEntForActiveAccounts": false
},
"includeExistingInActiveAccounts": true,
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"connection": "acctAuth",
"http": {
"url": "http://********/nbws/goforms/nbapi",
"httpHeaders": {
"Content-Type": "text/xml"
},
"httpParams": "<NETBOX-API><COMMAND name=\"Login\" num=\"1\"><PARAMS><USERNAME>*******</USERNAME><PASSWORD>********</PASSWORD></PARAMS></COMMAND></NETBOX-API>",
"httpContentType": "text/xml",
"httpMethod": "POST"
}
},
"call2": {
"callOrder": 1,
"stageNumber": 1,
"connection": "acctAuth",
"http": {
"url": "http://********/nbws/goforms/nbapi",
"httpHeaders": {
"Content-Type": "application/xml"
},
"httpParams": "<NETBOX-API sessionid=${response.call1.message.NETBOX._sessionid}><COMMAND name=\"SearchPersonData\" num=\"1\"><PARAMS></PARAMS></COMMAND></NETBOX-API>",
"httpContentType": "application/xml",
"httpMethod": "POST"
},
"listField": "NETBOX.RESPONSE.DETAILS.PEOPLE.PERSON",
"keyField": "accountID",
"colsToPropsMap": {
"name": "PERSONID~#~char",
"accountID": "PERSONID~#~char",
"status": "DELETED~#~char",
"customproperty1": "FIRSTNAME~#~char",
"customproperty2": "LASTNAME~#~char"
},
"statusConfig": {
"active": "FALSE",
"inactive": "TRUE"
}
}
}
}
}
05/22/2024 09:02 PM
Hello @sandeepsingh,
Can you please share the xml response along with debug log.
Thanks.
05/27/2024 05:12 AM
Hi @sudeshjaiswal ,
Here you go.
05/28/2024 01:25 AM
@sandeepsingh Could you please share the import log, and also enable the show log= true and share the import log.
05/28/2024 01:44 AM - edited 05/28/2024 01:47 AM
"Date Timestamp (UTC)","Service Name","Class Name","Thread Name","Log Level","Message"
"2024-05-23T09:39:39.515+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-xrkrg","DEBUG","Calling Webservice Url - http://**.**.**.**/ahch/goforms/nbapi with httpParams - <NETBOX-API sessionid="${response.call1.message.NETBOX._sessionid}"><COMMAND name="SearchPersonData" num="1"><PARAMS></PARAMS></COMMAND></NETBOX-API>"
"2024-05-23T09:39:39.844+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-xrkrg","DEBUG","Got Webservice API Response: [headers:[Date: Thu, 23 May 2024 09:39:39 GMT, Server: Apache, X-Content-Type-Options: nosniff, X-Frame-Options: sameorigin, Content-Security-Policy: frame-ancestors 'self', Content-Type: text/xml, Vary: Accept-Encoding, Keep-Alive: timeout=5, max=100, Connection: Keep-Alive], responseText:<NETBOX><RESPONSE><APIERROR>5</APIERROR></RESPONSE></NETBOX>|, cookies:[], statusCode:200]"
"2024-05-23T09:39:39.482+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-xrkrg","DEBUG","Got Webservice API Response: [headers:[Date: Thu, 23 May 2024 09:39:39 GMT, Server: Apache, X-Content-Type-Options: nosniff, X-Frame-Options: sameorigin, Content-Security-Policy: frame-ancestors 'self', Content-Type: text/html;charset=utf-8, Content-Language: en, Content-Length: 1155, Keep-Alive: timeout=5, max=100, Connection: Keep-Alive], responseText:<!doctype html><html lang="en"><head><title>HTTP Status 406 – Not Acceptable</title><style type="text/css">h1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} h2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} h3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} body {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} b {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} p {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;} a {color:black;} a.name {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 406 – Not Acceptable</h1><hr class="line" /><p><b>Type</b> Status Report</p><p><b>Description</b> The target resource does not have a current representation that would be acceptable to the user agent, according to the proactive negotiation header fields received in the request, and the server is unwilling to supply a default representation.</p><hr class="line" /><h3></h3></body></html>, cookies:[], statusCode:406]"
"2024-05-23T09:39:39.156+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-7-xrkrg","DEBUG","Calling Webservice Url - http://**.**.**.**/ahch/goforms/nbapi with httpParams - <NETBOX-API><COMMAND name="Login" num="1"><PARAMS><USERNAME>SAVIYNT</USERNAME><PASSWORD=******/PASSWORD=******/PARAMS></COMMAND></NETBOX-API>"
"2024-05-23T09:30:00.708+00:00","ecm-worker","generic.GenericProvisioningService","quartzScheduler_Worker-4-xrkrg","DEBUG","Webservice response successfully received"
"2024-05-23T09:30:00.708+00:00","ecm-worker","generic.GenericProvisioningService","quartzScheduler_Worker-4-xrkrg","DEBUG","GenericProvisioningService - Calling REST callRestWebService : https://*************.saviyntcloud.com/ECMv6/api/userms/sync/endpointsAndEntitlements/173635?enableDeltaSync=true"
"2024-05-23T09:30:00.848+00:00","ecm-worker","generic.GenericProvisioningService","quartzScheduler_Worker-4-xrkrg","DEBUG","Webservice response successfully received"
"2024-05-23T09:30:00.101+00:00","ecm-worker","generic.GenericProvisioningService","quartzScheduler_Worker-4-xrkrg","DEBUG","GenericProvisioningService - Calling REST callRestWebService : https://*************.saviyntcloud.com/ECMv6/api/auth/login"
@sudeshjaiswal , here you go. seems session id is coming from call1 but is not passed to call2, we were able to see that in logs as well.
05/28/2024 10:16 PM
Hello @sandeepsingh,
You may refer this post for the construction of your json,
https://forums.saviynt.com/t5/identity-governance/not-able-to-get-list-of-objects-in-fieldlist-rest-...
Thanks
05/30/2024 06:06 AM
Hi @sudeshjaiswal ,
Its not a soap based app. but still tried no luck.
05/30/2024 07:44 AM
Hello @sandeepsingh,
In import json you cannot map attributes from call 1 response to call2, Hence it is not possible.
There is already an idea in place for the similar request would request you to vote and provide the valid bussiness use case on the same.
: https://ideas.saviynt.com/ideas/EIC-I-5499
Thanks.