# Keywords

The Web Service source supports the following keywords for various configuration attributes such as Authentication URL, Headers, Body (JSON and Form-data) for a single or multiple endpoints.

## plan

Used for configuring the provisioning operations such as create account and update account. For example:

Authentication URL - `/api/core/v3/people/$plan.nativeIdentity$`

**JSON Body example for plan**:

```json
{"new_members": [
   {
  "email": "$plan.email$",
  "first_name": "$plan.first_name$",
  "surname": "$plan.surname$",
  "send_welcome_email": $plan.send_welcome_email$,
  "role": {
   ".tag": "member_only"
  }
}
]
}
```

## response

Used for multiple endpoints, where the response from the first endpoint is provided as an input for the second endpoint. For example, there are two endpoints for account aggregation:

- The first endpoint returns a response as a list of `member_ids` that is an input for the second endpoint.
- The second endpoint's JSON body is: `{"members_info":[{"member_id":"$response.member_id$"}]}`

## application

Used to get other configuration attributes from the current source. For example:

```text
"$application.<accesstoken>$",
```

Where `<accesstoken>` is a source configuration attribute.

## getobject

Used while performing the `Aggregate Account` operation (get a single account details). The `$getobject` allows you to use any attribute of the account. For example, `$getObject.lastLoginDate$`.

- JSON body:

  ```json
  {"members": [
     {
    ".tag": "member_id",
    "member_id": "$getobject.nativeIdentity$"
  }
  ]
  }
  ```
- Authentication URL for get object:

  ```text
  /api/v4/admin/$getobject.nativeIdentity$
  ```

## nativeIdentity

Indicates the `AccountID` identity attribute in the plan or during the `getobject` operation. For example, `nativeIdentity` is used along with the keyword as follows:

- **getobject** - `$getobject.nativeIdentity$`
- **plan** - `$plan.nativeIdentity$`

> [!NOTE]
>
> There may be instances where `nativeIdentity` is present in the account request for account creation. In such cases, `nativeIdentity` may occasionally reflect different values.

## planNativeIdentity

Represents the Plan's `nativeIdentity` in the Provisioning plan. For example, `planNativeIdentity` is used along with the keyword as follows:

- **plan** - `$plan.planNativeIdentity$`

Web Services can be configured with the native identity from the provisioning plan using the placeholder `$plan.planNativeIdentity$`.

> [!NOTE]
>
> There is a possibility that `nativeIdentity` may be present in the account creation request. It may sometimes correspond to different values.

## authenticate

To provide the username and password in the endpoint configuration, use the following placeholders:

```text
$authenticate.username$
$authenticate.password$
```

Refer to [Pass-Through Authentication](<https://documentation.sailpoint.com/connectors/web_services/va/help/configuring.html#pass-through-authentication>) for more information on configuration.

> [!NOTE]
>
> SailPoint recommends using a placeholder in the body and URL rather than adding sensitive information directly. For example:
>
> ```text
> https://TESTMACHINE:9096/users/user/$application.accesstoken$
> ```
>
> Attributes mapped to a raw JSON response may contain formatted values similar to `".tag": "member_id"`, such as:
>
> ```text
> ['.tag']
> ['@etag']
> ['@@test']
> ['complex.name']
> ['role name']
> ['role_name']
> ```

## Using Expression Language

The Web Services virtual appliance-based connector supports expression language in URLs, Header values, and in the Body section.

The following objects can support expression language when you use them with placeholders:

- Response
- Plan
- Application

### Writing Expression Language

To use expressions in a Web Services configuration, wrap them with `_#`.

Placeholders can be used within an expression. For example:

```text
_#$response.data$.length()_#
```

One or more placeholders can be used with an expression. For example:

```text
_#$application.city$.concat($application.city2$)_#
```

Expressions can also be written without any placeholder. For example:

```text
_#'hello'.concat('world')_#
```

To represent a value in the URL, Header values, and Body sections, you can also use multiple expressions. For example:

```text
"Address" : "_#$application.city$.concat($application.city2$)_# lane name, street name,  _#$application.city2$.concat($application.city$)_#"
```

You can configure consecutive expressions. For example:

```text
_#$application.city$.concat($application.city2$)_#_#$application.city2$.concat($application.city$)_#
```

To provide a string or literal value, enter it within single quotes (`'`). For example:

```text
_#'hello'.concat('world')_#
```

### Supported Operations

The connector supports using expression language for the following operations.

#### String (Literal) Operations

| Operation | Description |
| --- | --- |
| `concat` | Concatenates strings. |
| `length` | Returns the length of a string. |
| `toUpperCase` | Converts a string to uppercase. |
| `toLowerCase` | Converts a string to lowercase. |
| `replace` | Replaces a substring within a string. |
| `substring` | Extracts a substring. |

#### Relational Operators

The connector supports six relational operators. `[SPACE]` has no impact within the expression for relational operations.

| Operator |  |
| --- | --- |
| `>` | Greater than |
| `<` | Less than |
| `==` | Equal to |
| `!=` | Not equal to |
| `>=` | Greater than or equal to |
| `<=` | Less than or equal to |

#### Arithmetic Operators

The connector supports five arithmetic operators. `[SPACE]` has no impact within the expression for arithmetic operations.

| Operator |  |
| --- | --- |
| `+` | Addition |
| `-` | Subtraction |
| `/` | Division |
| `*` | Multiplication |
| `%` | Modulus |

#### Logical Operators

The connector supports three logical operators. `[SPACE]` has no impact within the expression for logical operations.

| Operator |  |
| --- | --- |
| `&&` | Logical AND |
| `\|\|` | Logical OR |
| `!` | Logical NOT |

### Support for Expression Language in URLs, Headers, and Body

Refer to [Support for Expression Language in the Header Values](<https://documentation.sailpoint.com/connectors/web_services/va/help/http_operations.html#support-for-expression-language-in-the-header-values>) and [Support for Expression Language in the Body](<https://documentation.sailpoint.com/connectors/web_services/va/help/http_operations.html#support-for-expression-language-in-the-body>).
