# Configuration Parameters

For the Web Services source you can configure the values of the following attributes using the SailPoint REST API. For the usage of the SailPoint REST APIs for the following attributes and keys, refer to:

- API to get source details - [list-sources](<https://developer.sailpoint.com/docs/api/list-sources-v-1/>)
- API to get a specific source's current schema details - [list-schemas](<https://developer.sailpoint.com/docs/api/get-source-schemas-v-1/>)
- API to add a new schema attribute to a source - [create-schema](<https://developer.sailpoint.com/docs/api/create-source-schema-v-1/>)
- [SailPoint REST API - Update Source (Partial)](<https://developer.sailpoint.com/docs/api/update-source-v-1>)

## createAccountWithEntReq

By default, the Web Services source creates an account for a `Create Account` operation and then adds the entitlements one by one. For example, if there are three entitlements (Role, Group, Profile), the source executes three requests and three API calls are sent.

Adding the `createAccountWithEntReq` attribute merges all the entitlement requests in a single API call. Use the `createAccountWithEntReq` attribute key with the value `true` to enable the functionality of sending entitlements with create account in a single request to the managed system.

Default value: `false`

## possibleHttpErrors

When an API endpoint does not send expected error codes to flag failure conditions, the connector can be configured with all possible HTTP error codes and messages that the API endpoint returns, which result in failure of operations.

Use the `possibleHttpErrors` attribute with `["errorCodes","errorMessages"]` as the value.

Occasionally, the Web Services connector returns the HTTP status code `200` but the response payload may contain errors. In this case, the connector must fail the request, or an OAuth token generation must try to regenerate the token.

You can also configure these possible HTTP error codes and messages to specify invalid or expired token errors. In this case, the connector regenerates and saves the token for OAuth 2.0 authentication, then retries the operation with the newly generated access token.

> [!NOTE]
>
> This flag is not applicable for child endpoints.

## objectNotFoundErrorMsg

Based on the error message list, the source decides whether to display the `objectNotFoundErrorMsg` error. For example, you can create an entry for `objectNotFoundErrorMsg` with a custom error message to identify multiple exceptions by setting the `objectNotFoundErrorMsg` attribute key with `["404: Not Found", "404"]` as the value.

## updateAttrWithChangePassword

To enable single requests for change password and update operations, use the `updateAttrWithChangePassword` attribute key with `true` as a value.

If the value of the `updateAttrWithChangePassword` attribute is `true` in the source and the plan contains no attribute request named "password" (change password), then the specific Update operation type endpoint is invoked.

Setting the value of the `updateAttrWithChangePassword` attribute to `true` does not include requests for add or remove entitlements. These requests are executed independently.

## disableCookies

By default, the Web Services source supports cookies. Disable cookies by adding the `disableCookies` attribute key with `true` as a value. This attribute is not applicable for the authentication API call operation.

## addRemoveEntInSingleReq

Add or remove multiple entitlements such as Role, Permissions, or Profile. To send multiple entitlement requests in a single request to the managed system, set the value of the `addRemoveEntInSingleReq` parameter to `true` as shown in the following example:

```xml
<entry key="addRemoveEntInSingleReq">
    <value>
        <Boolean>true</Boolean>
    </value>
</entry>
```

If `addRemoveEntInSingleReq` is set to `true`, then the payload for entitlements must also be set as shown in the following example:

```text
{"group_id" : $plan.groups$,
"permission":$plan.permission$,
"roles": $plan.roles$
}
```

## skipGetObjectInCreate

The Web Services SaaS connector supports the `skipGetObjectInCreate` attribute (Boolean) to skip the `getObject` call if it is present during the Create provisioning operation.

## deleteStatus

This attribute marks whether an object is deleted during delta aggregation. To set the value of `deleteStatus`, set the value as shown in the following example:

```xml
<entry key="deleteStatus" value="deleted=true"/>
```

## retryDelay

By default, the connector waits 30 seconds between automatic retries for HTTP 429 and HTTP 503 errors. The connector performs a maximum of three retries per request. The connector determines the delay in the following order:

- `retryDelay` - If this attribute is set to a positive integer on the source, the connector uses this fixed value first.
- `Retry-After` header - If no valid `retryDelay` exists, the connector uses the numeric value (in seconds) provided in the `Retry-After` header.
- Fallback - If neither of the previous values is valid or present, the connector defaults back to 30 seconds.

> [!NOTE]
>
> Additional configurable attributes are available beyond those documented here. Refer to the SailPoint REST API links above to list a source's current configuration and confirm available attribute keys before setting a new one.

## Configuration for Response

When configuring the Web Services source, map the schema attribute as follows for JSON and XML.

### JSON Response Configuration

Single endpoint - In a JSON response, all the attributes can be mapped as follows, considering the Root Path as `$.list`:

```text
Id = id
displayName = displayName
username = jive.username
enabled = jive.enabled
emails = emails[*].value
```

Multiple endpoints - Refer to the following response example for the first and second endpoints:

| Type | Response Example | Response Mapping |
| --- | --- | --- |
| First endpoint | `{"meta": {...}, "resources": ["01dcc3dd-5b72-4fb2-a43b-424e092bd6af", "032b704e-1467-48b3-ad70-29a04f1a20ab", "042ab092-918f-4ed3-97eb-196fbe917e77"], "errors": []}` | Response Attribute Mapping: `uid = $`. Root Path: `$.resources.*` |
| Second endpoint | Context URL - `/users/entities/users/v1?ids=$response.uid$`. Example: `{"meta": {...}, "resources": [{"uid": "john.doe@santander.us", "firstName": "John", "lastName": "Doe", "uuid": "01dcc3dd-5b72-4fb2-a43b-424e092bd6af", "customer": "81971f9d094d494bae5a5fd97052509f"}], "errors": []}` | Response Attribute Mapping: `firstName = $.resources[0].firstName`, `lastName = $.resources[0].lastName`. Root Path: not required |

Parsing JSON array - The following is an example for parsing a JSON array:

```json
[1,10,21,31,46,89,90,67,88,98,101]
```

The response mapping for the above example is:

- Response Attribute Mapping (`id` is an attribute in the schema): `id = $`
- Root Path: `$.*`

### XML Response Configuration

Example 1 - XML response for mapping:

```xml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns="urn:partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:sf="urn:sobject.partner.soap.sforce.com">
 <soapenv:Header>
      .....
 </soapenv:Header>
 <soapenv:Body>
    <queryResponse>
       <result xsi:type="QueryResult">
         <done>true</done>
         <queryLocator xsi:nil="true"/>
         <records xsi:type="sf:sObject">
           <sf:type>User</sf:type>
           <sf:Id>123456</sf:Id>
           <sf:Alias>Alias</sf:Alias>
           <sf:City xsi:nil="true"/>
           <sf:CommunityNickname>CName1</sf:CommunityNickname>
           <sf:Email>test@test.com</sf:Email>
           <sf:IsActive>false</sf:IsActive>
           <sf:Username>test@test.com</sf:Username>
           <sf:FirstName>Test</sf:FirstName>
           <sf:LastName>Test</sf:LastName>
         </records>
        <size>1</size>
         </result>
     </queryResponse>
   </soapenv:Body>
</soapenv:Envelope>
```

Example 2 - XML response for mapping:

```xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><userList id="5457373">
<name>DillardsEveryone</name>
  <memberList>
    <listMember>example@example.com</listMember>
    <listMember>gage5.test5@test5.dillards.com</listMember>
  </memberList>
</userList>
```

For more specific examples of the JSON and XML format responses or inputs for the supported fields or operations on the Web Services source, refer to [Operations Reference](<https://documentation.sailpoint.com/connectors/web_services/saas/help/operations_reference.html>).
