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 sql script in a REST import call as part of body

Aashish-Handa
Regular Contributor
Regular Contributor

Hi Team,

We would like to import account information from the target application using the REST OOTB connector, which is working fine from Postman and is giving us the response , but when used in ImportAccountEntJSON it gives a 200 response but with an internal error, hence not importing any accounts. Please find the import rest call below:

"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://hostname/Redrock/Query",
"httpParams": {
"script": "Select * from User ORDER BY Username COLLATE NOCASE"
},
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpMethod": "GET",
"httpContentType": "application/json"
},
"listField": "Result.Results.Row",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "ID~#~char",
"customproperty7": "StatusEnum~#~char"
},
"makeProcessingStatus": true
}

Please find the error log below:

{"log":"2023-12-18 12:32:25,207 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService - Got Webservice API Response: [headers:[Cache-Control: no-cache, no-store, must-revalidate, Pragma: no-cache, Content-Type: application/json; charset=utf-8, Expires: -1, Vary: Accept-Encoding, X-CFY-TX-PN: pod1011, X-CFY-TX-ID: f86e5a9f078f478787dc565a81eca7ff, X-CFY-TX-DT: MTIvMTgvMjAyMyAxMjozMjoyNSBQTQ__, X-Frame-Options: SAMEORIGIN, P3P: CP=\"NON COR ADMa CURa DEVa OUR IND COM UNI NAV INT PRE LOC ONL PHY STA ONL\", Strict-Transport-Security: max-age=31536000; includeSubDomains, X-Robots-Tag: noindex, nofollow, Date: Mon, 18 Dec 2023 12:32:24 GMT], responseText:{\"success\":false,\"Result\":null,\"Message\":\"Object reference not set to an instance of an object.\",\"MessageID\":\"_I18N_System.NullReferenceException\",\"Exception\":\"No additional diagnostic information is available.\",\"ErrorID\":\"bfa4d8df-9d59-4f4b-817f-cee23e0e29b2:f86e5a9f078f478787dc565a81eca7ff\",\"ErrorCode\":null,\"IsSoftError\":false,\"InnerExceptions\":null}, cookies:[], statusCode:200]\n","stream":"stdout","time":"2023-12-18T12:32:25.208049745Z"}

Would like to understand if an sql script can be used in such a way that I have been using, or else something that I can do to reference the objects while import call.

Please let me know for any other information as well.

Thanks

4 REPLIES 4

rushikeshvartak
All-Star
All-Star

Can you share postman screenshot


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

Aashish-Handa
Regular Contributor
Regular Contributor

Sure @rushikeshvartak . Please find below:

AashishHanda_0-1702970180008.png

Please let me know for anything else.

Thanks

Aashish-Handa
Regular Contributor
Regular Contributor

Hello,

Were you able to find any resolution to the issue?

Thanks

Check with app team / documentation of target product about above error occurred 


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