Announcing the SAVIYNT KNOWLEDGE EXCHANGE unifying the Saviynt forums, documentation, training, and more in a single search tool across platforms. Click HERE to read the Announcement.

REST Connector How to configure SuccessResponse Path

prajakta
New Contributor III
New Contributor III

Hi Experts,

REST connector is configured to create accounts in target system. I need help in configuring success and unsuccess response in the createAccountJson as the API response code for success and failure is 200. However, the response body has status field eg. 

Successful creation response :

{
"result": [
{
"display_value": "FirstName LastName",
"record_link": "<url>",
"status": "inserted",
"sys_id": "bf6ca4ec475c2dd08eec4876736d435a"
}
]
}

Unsuccessful creation response

{
"result": [
{
"status": "error",
"error_message":"The Manager field value is Not Found in the system"
}
]
}

I tried configuring below but didnt work : 

"successResponses": {
"response.result[0].status": "inserted"
},

"unsuccessResponses": {
"response.result[0].status": "error"
}

Thanks in advance.

Prajakta

7 REPLIES 7

rushikeshvartak
All-Star
All-Star

Application Team can't change APIs ?

 

Share your current JSON


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

Hi Rushikesh,

Thanks for the response.

Very less chances that application team can change. However before requesting application team to change the API's, I wanted to check the integration feasibility with Svaiynt.

PFA create account json

Thanks,

Prajakta

  "successResponses": [
        {
          "message": "ProfileID Created Successfully"
        },
        {
          "message": "ProfileID Updated Successfully"
        }
      ]

 

 

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


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

prajakta
New Contributor III
New Contributor III

Tried this option but its not evaluating the task status :

"successResponses": [
{
"message": "updated"
},
{
"message": "inserted"
},
{
"call1.message.result.status": "updated"
}
]

Logs :

rest.RestProvisioningService - callResponseMap: [import_set:ISET0299864, staging_table:u_saviynt_user_identities, result:[[transform_map:Saviynt User Identities, table:sys_user, display_name:name, display_value:Ashleigh1 Saad, record_link:https://<url>/sys_user/84516f5d479829108eec4876736d4362, status:inserted, sys_id:84516f5d479829108eec4876736d4362]]]"
"ecm-worker","2023-01-09T11:57:53.438+00:00","2023-01-09T11:57:53.230205881Z stdout F 2023-01-09 11:57:53,230 [quartzScheduler_Worker-4] DEBUG rest.RestProvisioningService - showResponse: true"
"ecm-worker","2023-01-09T11:57:53.438+00:00","2023-01-09T11:57:53.230254882Z stdout F 2023-01-09 11:57:53,230 [quartzScheduler_Worker-4] DEBUG rest.RestProvisioningService - createNewUser - temp.status - Failed"

prajakta
New Contributor III
New Contributor III

Hi @rushikeshvartak , 

I also tried this config but no luck, let me know if you have any other suggestion to try ?

"successResponses": {

        "call1.message.result.status": "updated"

      }

Logs

"ecm-worker","2023-01-09T11:04:52.439+00:00","2023-01-09T11:04:52.118578586Z stdout F 2023-01-09 11:04:52,118 [quartzScheduler_Worker-7] ERROR rest.RestProvisioningService - callResponseMap: [import_set:ISET0299864, staging_table:u_saviynt_user_identities, result:[[transform_map:Saviynt User Identities, table:sys_user, display_name:name, display_value:Ashleigh1 Saad, record_link:https://<url>/sys_user/b4d587151b142510f0b1edb2b24bcbac, status:updated, sys_id:b4d587151b142510f0b1edb2b24bcbac]]]"
"ecm-worker","2023-01-09T11:04:52.439+00:00","2023-01-09T11:04:52.118622386Z stdout F 2023-01-09 11:04:52,118 [quartzScheduler_Worker-7] DEBUG rest.RestProvisioningService - showResponse: true"
"ecm-worker","2023-01-09T11:04:52.439+00:00","2023-01-09T11:04:52.118638586Z stdout F 2023-01-09 11:04:52,118 [quartzScheduler_Worker-7] DEBUG rest.RestProvisioningService - successResponses key: call1.message.result.status, value: updated"
"ecm-worker","2023-01-09T11:04:52.439+00:00","2023-01-09T11:04:52.118645786Z stdout F 2023-01-09 11:04:52,118 [quartzScheduler_Worker-7] DEBUG rest.RestProvisioningService - successResponseText: null"
"ecm-worker","2023-01-09T11:04:52.439+00:00","2023-01-09T11:04:52.118648986Z stdout F 2023-01-09 11:04:52,118 [quartzScheduler_Worker-7] DEBUG rest.RestProvisioningService - successResponseValues: updated"
"ecm-worker","2023-01-09T11:04:52.439+00:00","2023-01-09T11:04:52.118668286Z stdout F 2023-01-09 11:04:52,118 [quartzScheduler_Worker-7] DEBUG rest.RestProvisioningService - createNewUser - temp.status - Failed"

Thanks,

Prajakta

 

Sivagami
Valued Contributor
Valued Contributor

Try something like this

"successResponses": {
"result[0].status": "inserted"
}

-Siva

prajakta
New Contributor III
New Contributor III

Thank you @Sivagami, its working as expected.

Thank you @rushikeshvartak for the support