Share all details related to your problem, including any error messages you may have received.
Hello,
We are working on application integration using WebServices connector with REST APIs. We would like to know if there is below option available in connector/SailPoint config:
Application APIs are returning 200 success http status code but there are validation messages in the response body which we need to read and then mark the task in SailPoint as complete/fail.
Is it something feasible to do?
You may use below sample rule and put your logic as per your expectation.
<Rule language="beanshell" name="Example WebServices AfterRule" type="WebServiceAfterOperationRule">
<Signature returnType="Object">
<Inputs>
<Argument name="log">
<Description>The log object associated with the SailPointContext.
</Description>
</Argument>
<Argument name="context">
<Description>A sailpoint.api.SailPointContext object that can be used to query the database if necessary.
</Description>
</Argument>
<Argument name="application">
<Description>The application whose data file is being processed.</Description>
</Argument>
<Argument name="requestEndPoint">
<Description>The current request information contain header, body ,response object</Description>
</Argument>
<Argument name="processedResponseObject">
<Description>Response Object processed by the Web services connector</Description>
</Argument>
<Argument name="rawResponseObject">
<Description>Response Object returned from the end system</Description>
</Argument>
<Argument name="restClient">
<Description>REST Client Object</Description>
</Argument>
</Inputs>
<Returns>
<Argument name="Map which contains updated Account/Group List and connectorStateMap">
<Description>Update information Map which contains parsed list of accounts/groups and connectorStateMap</Description>
</Argument>
</Returns>
</Signature>
<Source>
<![CDATA[
import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Iterator;
Map updatedMapInfo = new HashMap();
if (parsedResponseObject != null){
log.info("Parsed response is not null");
////Put your logic here
}
return updatedMapInfo;
]]>
</Source>
</Rule>