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

SuccessResponses for REST Connection are Failing

Wes
New Contributor III
New Contributor III

Hello!

I am experiencing an issue in my CreateAccountJSON where my successResponses are not being recognized.

The account still gets provisioned in the target system, but this is the error we get in the Provisioning Comments of the subject user's pending task: 

Wes_0-1711485512001.png

For reference, here is my CreateAccountJSON successResponses attribute:

"successResponses": [
    {
        "message": "\"1\""
     },
     {
        "statusCode": "202"
      }
]
 
I've even tried this while only using "message" or only using "statusCode" and neither of those work on their own.
 
We are expecting a response code 202 from the target system or this message (from Postman):Wes_1-1711485654717.png

Has anyone experienced this before? Let me know if you see any errors with what I have!

 

Thank you,

- Wes

5 REPLIES 5

rushikeshvartak
All-Star
All-Star

You can use either message or HTTP Status code.


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

Wes
New Contributor III
New Contributor III

Hi Rushikesh,

I have tried using one or the other (message vs statusCode) on their own and I see the same error described above.

Thank you,

- Wes

CR
Regular Contributor III
Regular Contributor III

did you tried like below:

successResponses": {
"statusCode": [
202
]}

 


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

Wes
New Contributor III
New Contributor III

Hi Raghu,

It looks like I haven't formatted the statuscode this way before, it worked as intended! Thank you for your help and to Rushikesh for the assist!

Thank you,

- Wes

Falcon
Saviynt Employee
Saviynt Employee

Disclaimer - This is an AI generated response and feedback on this thread will be used to fine tune.

The issue you're encountering with successResponses not being recognized in your CreateAccountJSON configuration, despite the account provisioning successfully in the target system, could be due to the way the success conditions are defined and how the response from the target system is structured.

Looking at your configuration for successResponses, it seems there might be a misalignment between expected and actual response formats or values from the target system. Let's address potential issues and provide a corrected approach:

1. Correct Use of statusCode

statusCode should be an integer, not a string. When specifying HTTP status codes in successResponses, ensure they are provided as numeric values without quotes.

2. Correct Interpretation of message

When matching a message in the response, ensure the value exactly matches what the target system returns, including any quotations or additional formatting. If the message is a JSON object or nested, you might need to use responsePath to navigate to the correct value within the response.

3. Combination of statusCode and message

If both a specific statusCode and a message within the response body indicate success, you might need to adjust your configuration to accurately reflect this. However, it's important to note that typically statusCode or message independently determine success.

Corrected CreateAccountJSON Configuration:

Assuming you expect a 202 status code or a specific message in the response, the configuration should look something like this:

 

"successResponses": [
  {
    "statusCode": 202
  },
  {
    "responsePath": "path.to.message",
    "values": ["expected message"]
  }
]

 

Notes:

  • "statusCode": 202 is provided as an integer.
  • "responsePath" and "values": These are hypothetical keys assuming you need to navigate through a JSON response to find a specific success message. Replace "path.to.message" with the actual JSON path to the message in the response, and "expected message" with the exact message string you're looking for.
  • Since you haven't provided the exact message format or content you're expecting, replace "expected message" with the exact text (including any special characters or spacing) you anticipate in the success scenario.