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

Custom Rest API Issues

GPS
New Contributor III
New Contributor III

Hello All,

I am trying to establish Rest API integration for one of the applications, but I am having issues with it.

Create Account JSON:

 

{
    "call": [
        {
            "name": "createUser",
            "connection": "acctAuth",
            "url": "https://cloud.net/rightAngle/PFJ/CustomServices/PFJSecurityService.asmx/CreateUser?userName=youngj",
            "httpMethod": "POST",
            "httpHeaders": {
                "X-Auth-Token": "2fac967e",
                "Content-Type": "text/xml; charset=utf-8"
            },
            "httpContentType": "application/x-www-form-urlencoded",
            "successResponses": {
                "statusCode": [
                    200
                ]
            },
            "unsuccessResponses": {
                "statusCode": [
                    500,
                    401,
                    400,
                    403,
                    404,
                    409,
                    502
                ]
            }
        }
    ]
}

 


Postman Response:

Screenshot 2024-07-09 at 11.04.09 PM.png

Create Account: Error Logs

2024-07-09T23:09:59-05:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-5-7nqjn-DEBUG-Exit generatePasswordFromJsonOrRule

2024-07-09T23:09:59-05:00-ecm-worker-services.SaviyntCommonUtilityService-quartzScheduler_Worker-5-7nqjn-DEBUG-Enter getStandardBindingVariable

2024-07-09T23:09:59-05:00-ecm-worker-services.SaviyntCommonUtilityService-quartzScheduler_Worker-5-7nqjn-DEBUG-Exit getStandardBindingVariable

2024-07-09T23:09:59-05:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-5-7nqjn-DEBUG-Total Call: 1

2024-07-09T23:10:00-05:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-5-7nqjn-DEBUG-pastResponse: [headers:null, statusCode:400, description:null, status:Failed]

2024-07-09T23:10:00-05:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-5-7nqjn-DEBUG-Enter getAuditForFailedCall

2024-07-09T23:10:00-05:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-5-7nqjn-DEBUG-connection: acctAuth

2024-07-09T23:10:00-05:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-5-7nqjn-DEBUG-Inside pullObjectsByRest

2024-07-09T23:10:00-05:00-ecm-worker-rest.RestUtilService-quartzScheduler_Worker-5-7nqjn-DEBUG-Got showLogs = true

2024-07-09T23:10:00-05:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-5-7nqjn-DEBUG-Calling Webservice Url - https://cloud.net/rightAngle/PFJ/CustomServices/PFJSecurityService.asmx/CreateUser?userName=youngj with httpParams - null

2024-07-09T23:10:00-05:00-ecm-worker-services.HttpClientUtilityService-quartzScheduler_Worker-5-7nqjn-DEBUG-calling executeRequestWithTimeoutConfig for api...

2024-07-09T23:10:00-05:00-ecm-worker-services.HttpClientUtilityService-quartzScheduler_Worker-5-7nqjn-DEBUG-Enter getTimeOutConfig

2024-07-09T23:10:00-05:00-ecm-worker-services.HttpClientUtilityService-quartzScheduler_Worker-5-7nqjn-DEBUG-connectionType: REST

2024-07-09T23:10:00-05:00-ecm-worker-services.HttpClientUtilityService-quartzScheduler_Worker-5-7nqjn-DEBUG-connectionTimeoutConfig before guardRail validation: null

2024-07-09T23:10:00-05:00-ecm-worker-services.HttpClientUtilityService-quartzScheduler_Worker-5-7nqjn-DEBUG-INFO: connectionTimeoutConfig is null, setting it to default value

2024-07-09T23:10:00-05:00-ecm-worker-services.HttpClientUtilityService-quartzScheduler_Worker-5-7nqjn-DEBUG-Final connectionTimeoutConfig after guardRail validation: [connectionTimeout:10, writeTimeout:60]

2024-07-09T23:10:00-05:00-ecm-worker-services.HttpClientUtilityService-quartzScheduler_Worker-5-7nqjn-DEBUG-calling api...

2024-07-09T23:10:00-05:00-ecm-worker-services.HttpClientUtilityService-quartzScheduler_Worker-5-7nqjn-DEBUG-before calling executeRequestWithHeaders for api...

2024-07-09T23:10:00-05:00-ecm-worker-services.HttpClientUtilityService-quartzScheduler_Worker-5-7nqjn-DEBUG-isFipsEnabled = false

2024-07-09T23:10:00-05:00-ecm-worker-services.HttpClientUtilityService-quartzScheduler_Worker-5-7nqjn-DEBUG-getHttpClient - proxyParams : null

2024-07-09T23:10:00-05:00-ecm-worker-services.HttpClientUtilityService-quartzScheduler_Worker-5-7nqjn-DEBUG-getHttpClient - sslSocketFactory : null

2024-07-09T23:10:00-05:00-ecm-worker-services.HttpClientUtilityService-quartzScheduler_Worker-5-7nqjn-DEBUG-setting connection timeout to 10 seconds and request timeout to 60 seconds

2024-07-09T23:10:00-05:00-ecm-worker-services.HttpClientUtilityService-quartzScheduler_Worker-5-7nqjn-DEBUG-getHttpClient - HttpClientBuilder.create().build() called.

2024-07-09T23:10:00-05:00-ecm-worker-services.HttpClientUtilityService-quartzScheduler_Worker-5-7nqjn-DEBUG-called executePostRequestWithHeaders for api...

2024-07-09T23:10:00-05:00-ecm-worker-services.HttpClientUtilityService-quartzScheduler_Worker-5-7nqjn-DEBUG-after calling executeRequestWithHeaders for api...

2024-07-09T23:10:00-05:00-ecm-worker-services.HttpClientUtilityService-quartzScheduler_Worker-5-7nqjn-DEBUG-called api...

2024-07-09T23:10:00-05:00-ecm-worker-services.HttpClientUtilityService-quartzScheduler_Worker-5-7nqjn-DEBUG-timeout validated for api...

2024-07-09T23:10:00-05:00-ecm-worker-services.HttpClientUtilityService-quartzScheduler_Worker-5-7nqjn-DEBUG-got response for api...

2024-07-09T23:10:00-05:00-ecm-worker-rest.RestUtilService-quartzScheduler_Worker-5-7nqjn-DEBUG-Got showLogs = true

2024-07-09T23:10:00-05:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-5-7nqjn-DEBUG-Got Webservice API Response: [headers:[Content-Type: text/html; charset=us-ascii, Server: Microsoft-HTTPAPI/2.0, Date: Wed, 10 Jul 2024 04:10:00 GMT, Connection: close, Content-Length: 311], responseText:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">|<HTML><HEAD><TITLE>Bad Request</TITLE>|<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>|<BODY><h2>Bad Request</h2>|<hr><p>HTTP Error 400. The request is badly formed.</p>|</BODY></HTML>|, cookies:[], statusCode:400]

2024-07-09T23:10:00-05:00-ecm-worker-rest.RestUtilService-quartzScheduler_Worker-5-7nqjn-DEBUG-pullObjectsByRest - responseStatusCode ::400

2024-07-09T23:10:00-05:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-5-7nqjn-DEBUG-Exception in converting responseText to Map

2024-07-09T23:10:00-05:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-5-7nqjn-DEBUG-Entered getResponseHeaders method

2024-07-09T23:10:00-05:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-5-7nqjn-DEBUG-responseError : null

2024-07-09T23:10:00-05:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-5-7nqjn-DEBUG-isAuthError: false

2024-07-09T23:10:00-05:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-5-7nqjn-DEBUG-pullObjectsByRest - responseMap.size : 0

2024-07-09T23:10:00-05:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-5-7nqjn-DEBUG-pullObjectsByRest - objectList.size : 1

2024-07-09T23:10:00-05:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-5-7nqjn-ERROR-Call response: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">|<HTML><HEAD><TITLE>Bad Request</TITLE>|<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>|<BODY><h2>Bad Request</h2>|<hr><p>HTTP Error 400. The request is badly formed.</p>|</BODY></HTML>|

2024-07-09T23:10:00-05:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-5-7nqjn-ERROR-Exception in validateResponse while parsing the target response

2024-07-09T23:10:00-05:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-5-7nqjn-ERROR-callResponseMap: [:]

2024-07-09T23:10:00-05:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-5-7nqjn-DEBUG-showResponse: null

2024-07-09T23:10:00-05:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-5-7nqjn-DEBUG-createNewUser - temp.status - Failed

2024-07-09T23:10:00-05:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-5-7nqjn-DEBUG-doBreak: true

2024-07-09T23:10:00-05:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-5-7nqjn-DEBUG-Response size: 2

2024-07-09T23:10:00-05:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-5-7nqjn-DEBUG-Enter encryptHeaders

2024-07-09T23:10:00-05:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-5-7nqjn-DEBUG-Exit encryptHeaders

2024-07-09T23:10:00-05:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-5-7nqjn-DEBUG-Task Response: {"auditDetails":{"createUser":[{"headers":null,"statusCode":400,"description":null,"status":"Failed"}]},"createUser":{"headers":null,"statusCode":400,"description":null,"status":"Failed"}}

2024-07-09T23:10:00-05:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-5-7nqjn-DEBUG-accountId: null

 

 

1 REPLY 1

rushikeshvartak
All-Star
All-Star
{
    "call": [
        {
            "name": "createUser",
            "connection": "acctAuth",
            "url": "https://cloud.net/rightAngle/PFJ/CustomServices/PFJSecurityService.asmx/CreateUser?userName=youngj",
            "httpMethod": "POST",
            "httpHeaders": {
                "X-Auth-Token": "2fac967e",
                "Content-Type": "text/xml; charset=utf-8",
 "Authorization": "${access_token}"
            },
            "httpContentType": "application/x-www-form-urlencoded",
            "successResponses": {
                "statusCode": [
                    200
                ]
            },
            "unsuccessResponses": {
                "statusCode": [
                    500,
                    401,
                    400,
                    403,
                    404,
                    409,
                    502
                ]
            }
        }
    ]
}

Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.