Operation-Specific Configuration Parameters
The following is a list of operation-specific configuration parameters for SailPoint Web Services.
Enables configuration using cURL command.
Note
You can configure an operation using cURL Command or through the Context URL, Method, Header, and Body. While configuring an operation through the cURL Command, the Context URL, Method, Header and Body operation-specific parameters are not accessible.
The endpoint cURL command for an operation which contains the complete request URL, Method, Header, and Body is provided in the following example:
curl --location --request POST 'https://api.dropbox.com/2/team/members/list' \
--header 'Authorization: $application.accesstoken$' \
--header 'Content-Type: application/json' \
--data-raw '{"limit":1}'
-
The complete request URL:
https://api.dropbox.com/2/team/members/list
Note
The URL must be inhttp://
orhttps://
format. You can add a placeholder URL, but it must havehttp://
orhttps://
in the beginning of the URL string. You can't use a placeholder URL on its own. -
The Method:
POST
--header 'Authorization: $application.accesstoken$' \
--header 'Content-Type: application/json' \
-
Header is labeled
-
Body:
--data-raw '{"limit":1}'
Context URL specific to the operation.
For example:
/api/core/v3/securityGroups?startIndex=0&count=100&fields=%40all&sort=lastNameAsc
The following are the keywords that are used in the Context URL along with the placeholder, $
:
-
plan
-
response
-
application
-
getobject
-
authenticate
For more information on the Keywords, refer to Keywords.
Important
If the context URL contains certain special characters, you may need to disable the skipEncodingDecodingUrl
key. For more information, refer to Troubleshooting.
Special characters that may cause issues with the context URL may include, but aren't limited to; commas (,
), open and close parentheses or brackets (()
, []
, and {}
), or pound signs (#
).
Select one of the following types of HTTP method supported by the respective operation:
-
GET
-
PUT
-
POST
-
DELETE
-
PATCH
(Optional) To view the header value in plain text, you must provide it in encrypted form. The encrypted value can be obtained from the IdentityIQ Console.
The following example displays the sample header key and header value:
Authorization 1:vQaPY5LvJVbpsaig0nE56Q==
where:
-
Header Key – Authorization
-
Header Value – 1:vQaPY5LvJVbpsaig0nE56Q==
Note
- Content-Type header value must contain type matching any XML formats that is, application/XML or text/XML or */XML.
- JSON request, JSON response: Content-Type= application/JSON (optional), Accept (optional)
- XML request, XML response: Content-Type= application/XML or text/XML or */XML (required), Accept (optional)
- JSON request, XML response: Content-Type=application/JSON (optional), Accept= application/XML or text/XML or */XML (required)
Standard HTTP body used to post data with request. You can send data in either of the following format:
-
form-data – (Applicable only for JSON) Key value. You must set the data that has to pass in the key value
-
raw – Data to be sent in request body.
For endpoint configuration, user must provide the XML payload by selecting the raw format.
For example:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:bsvc="urn:com.workday/bsvc">
<soapenv:Header>
<Security xmlns=
"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
...
</Security>
</soapenv:Header>
<soapenv:Body>
...
</soapenv:Body>
</soapenv:Envelope>
The following keywords are used in the Body along with the placeholder, $
:
-
plan
-
response
-
application
-
getobject
-
authenticate
Handling '$' Character In the URL and the Body
The Web Services connector extracts and handles the $
character, in the URL and body, along with the placeholders.
The following table provides the details of the placeholder:
Request |
Description |
---|---|
URL |
If the URL contains placeholders not present in provisioning plan, response, or application, then the connector removes the value from the Request URL. |
Header |
If the header contains a value not present in provisioning plan, response, or application, then the connector removes the key value from the Request Header. |
The JSON request with the placeholder in the Body / Payload |
If the body contains a placeholder not present in the provisioning plan, response, or application, then the connector removes the key value from the JSON payload. Refer to the following example: Copy
If the plan does not contain the title attribute request, the connector removes the title key and value: Copy
|
The XML request having placeholder in the Body / Payload |
If the body contains a placeholder not present in provisioning plan, response, or application, then the connector removes the value from the XML payload. Refer to the following example: Copy
If the plan does not contain the Copy
|
Escape Characters in the Body of a SOAP Request
You can use the following format for escaping a characters used for request/XML syntax:
<![CDATA[*+_value_+*]]>
For example, <![CDATA[CC&SD]]>
results in "CC&SD".
The character set, "&
" produces an ampersand (&) in the output. If you were to use a literal ampersand in the request without escaping the character, it might cause errors.
(For XML Web Services) XPath Namespace Mapping – XML Namespace Prefix and the corresponding Namespace URL identify uniquely named elements and attributes in the XML request/response.
If there exists any non-standard XML Namespace in the response, configure it in the XML Namespace mapping where the key is Namespace Prefix and value is the Namespace URL.
Note
The absence of non-standard XML Namespaces results in errors while parsing responses.
If a default Namespace is present, add a temporary Namespace Prefix with the default Namespace URL in the XML Namespace mappings. Use this temporary prefix in the XPATH elements within the scope of the default Namespace.
For example, refer to Example 1: XML response for mapping the payload in XML Response Configuration.
Root Path – Common path present in the JSON/XML response. The root path must be common for all the above attributes mentioned in the Response Attribute Mapping. Default: $
For example:
-
For JSON –
$.members.profile
-
For XML –
//wd:Response_Data/wd:Worker/wd:Worker_Data
Successful Response Code – Successful response code expected by the respective Web Service operation.
This field accepts HTTP status code in .csv format (For example, 200, 201, 203).
If the list does not contain any value, the status codes from 200 to 299 are checked.
There could be a situation where successful status code may start with 2; in this situation you can provide 2**
.
Before Operation Rule – Rule that invokes before performing any operation such as account aggregation, enable account, or disable account.
After Operation Rule – Rule that invokes after performing any operation such as account aggregation, enable account, or disable account.
(Applicable only for operations of type aggregation and get object)
Provide the parent endpoint name for endpoint chaining. If multiple endpoints of the same operation type exist and there are no parent endpoint configuration provided, then each endpoint behaves as an independent endpoint.
Note
For more information on operation-specific configurations, refer to Connector Operation Configuration.
Operation Rules
Web Services uses the following operation rules:
-
Web Service Before Operation Rule
-
Web Service After Operation Rule
The Before Operation and After Operation rules provide a mechanism to implement custom code agnostic to the Web Service. If the code generates any sensitive information that would be used by the connector for the operation, then the sensitive values must be added to the LogContext to prevent them from being included in the logs.
For more information, refer to Web Services Before/After Operation Rule.
Use the following code to add the sensitive values generated by the rules to the LogContext:
{code}
import connector.common.logging.LogContext;
...
LogContext.addSensitiveValue("secret-value");
{code}
For more information on Web Services Before/After Operation Rule, refer to Web Services Before/After Operation Rule.
Saving Parameters in Web Services Connector
The Web Services Connector can permanently store the values for application objects. Configure the connector to save the parameters using the connectorStateMap in the Before and After Operation rules in the Web Service Connector. The following are examples of Before and After Operation rules.
Map updatedInfoMap = new HashMap();
requestEndPoint.setFullUrl(requestEndPoint.getFullUrl().replaceAll("&&", "&"));
Map connectorStateMap = new HashMap();
connectorStateMap.put("accesstoken","Bearer accessTokenGeneratedInBeforeRuleScript");
updatedInfoMap.put("updatedEndPoint",requestEndPoint);
updatedInfoMap.put("connectorStateMap",connectorStateMap);
return updatedInfoMap;
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){
System.out.println("Parsed response is not null");
for (Map iterateMap : parsedResponseObject) {
if (iterateMap != null ) {
Set keySet = iterateMap.keySet();
for (String s : keySet) {
System.out.println(s);
if (s.equals("given_name")) {
String forStr = (String) iterateMap.get("given_name");
forStr = "TEST"+ forStr;
System.out.println("forStr: " + forStr );
iterateMap.put("given_name", forStr);
}
}
}
}
updatedMapInfo.put("data", parsedResponseObject);
}
Map connectorStateMap = new HashMap();
connectorStateMap.put("refresh_token","refreshTokenGeneratedInAfterRuleScript");
updatedInfoMap.put("connectorStateMap",connectorStateMap);
return updatedMapInfo;