---
title: Imperva
slug: connectors/imperva
docTags: 
createdAt: 2026-06-09T16:29:55.346Z
---

The Imperva connector allows for automated policy management and enhanced security operations by integrating Imperva's cybersecurity solutions with the Swimlane platform.

Imperva, a leading provider of cybersecurity solutions, offers an API for managing security policies and configurations. The Imperva connector for Swimlane Turbine allows users to seamlessly retrieve, modify, and update security policies, enhancing their security posture without the need for complex coding. By integrating with Imperva, Swimlane Turbine users can leverage advanced security settings, manage policy exceptions, and ensure consistent protection across their digital assets. This connector empowers security teams to automate their policy management tasks, ensuring swift and accurate security responses.

The Imperva connector integrates with Imperva Cloud Services to manage and retrieve policies. This integration allows users to automate policy management tasks, enhancing security and compliance workflows.

## Limitations

None to date

## Supported Versions

This connector supports the latest version of the Imperva Policies API.

## Additional Docs

Links to third party vendor’s API documentation:

- [Imperva Policies API Documentation](https://docs.imperva.com/bundle/cloud-application-security/page/policies-api-definition.htm)
- [Authentication link](https://docs.imperva.com/bundle/api-docs/page/api/authentication.htm)

## Configuration

### Prerequisites

To effectively utilize the Imperva connector with Swimlane Turbine, ensure you have the following prerequisites:

- API Key Authentication:
  - URL: The endpoint URL for the Imperva API.
  - API Key: Your unique identifier to authenticate with the Imperva API.
  - API ID: The API ID associated with your Imperva account for identification.

## Authentication Methods

The following authentication methods are supported for this connector:

### API Key Authentication

**Setup Instructions:**

1. Log in to your Imperva Cloud Services account.
2. Navigate to the API section and generate a new API key.
3. Copy the API Id and API key and use it in the connector configuration.
4. The url will be [https://www.api.imperva.com](https://www.api.imperva.com)

- [Link for creating API keys](https://docs.imperva.com/bundle/cloud-application-security/page/settings/api-keys.htm)

**Troubleshooting Tips:**

- Ensure the API key has the necessary permissions.
- Verify that the API key is not expired or revoked.

## Capabilities

This connector provides the following capabilities:

- Get Policy
- Modify Policy
- Update Policy

### Get Policy

Retrieve policy details.

### Modify Policy

Modify an existing policy (partial update).
When sending the content in the "data" attribute, it will be appended and not overwritten. When updating an existing policy settings or exceptions, the relevant id (policy settings or exception id) must be provided.

### Update Policy

Overwrite an existing policy(full update)

## Additional Documentation

- [Imperva Connector Documentation](https://docs.swimlane.com/connectors/imperva)
- [Imperva API Documentation](https://docs.imperva.com/)

# Configurations

## Imperva API Authentication

Authenticates using API Key and API ID.

### Configuration Parameters

| **Parameter** | **Description**           | **Type** | **Required** |
| ------------- | ------------------------- | -------- | ------------ |
| url           | A URL to the target host. | string   | Required     |
| x-API-Key     | API Key                   | string   | Required     |
| x-API-Id      | API ID                    | string   | Required     |

# Actions

## Get Policy

Retrieves the details of a specified policy in Imperva using the policyId as a required path parameter.

### Endpoint

- **URL:** `/policies/v2/policies/{{policyId}}`
- **Method:** `GET`

### Input

| **Argument Name**          | **Type** | **Required** | **Description**                                                                                                                                                                                                                                                                                                                                                |
| -------------------------- | -------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parameters.caid`          | number   | Optional     | By default, the policy is retrieved for the account (A) associated with the API credentials used for authentication. To retrieve the policy for a different account (an account under the account (A)), specify the account ID.                                                                                                                                |
| `parameters.extended`      | boolean  | Optional     | Optional to get full policy data. Default is false. When set to false, the response returns basic policy details such as name, ID, and policy type, according to GetLeanPoliciesResponse. This is the default value. If set to true, the response returns full policy details, including current configuration and settings, according to GetPoliciesResponse. |
| `path_parameters.policyId` | string   | Required     | The policy ID.                                                                                                                                                                                                                                                                                                                                                 |

### Input Example

`{"parameters":{"caid":20,"extended":true},"path_parameters":{"policyId":"string"}}`

### Output

| **Parameter**             | **Type** | **Description**                  |
| ------------------------- | -------- | -------------------------------- |
| `status_code`             | number   | HTTP status code of the response |
| `reason`                  | string   | Response reason phrase           |
| `value`                   | object   | Value for the parameter          |
| `value.id`                | number   | Unique identifier                |
| `value.policyType`        | string   | Type of the resource             |
| `value.name`              | string   | Name of the resource             |
| `value.description`       | string   | Value for the parameter          |
| `value.lastModified`      | string   | Value for the parameter          |
| `value.lastModifiedBy`    | number   | Value for the parameter          |
| `value.lastUserModified`  | string   | Value for the parameter          |
| `value.numberOfAssets`    | number   | Value for the parameter          |
| `value.isMarkedAsDefault` | boolean  | Value for the parameter          |
| `isError`                 | boolean  | Error message if any             |

### Output Example

`{"status_code":200,"response_headers":{},"reason":"OK","json_body":{"value":{"id":10,"policyType":"ACL","name":"Block ip Policy","description":"string","lastModified":"2024-10-10T06:54:37.640Z","lastModifiedBy":0,"lastUserModified":"string","numberOfAssets":0,"isMarkedAsDefault":true},"isError":false}}`

## Modify Policy

Appends content to an existing Imperva policy without overwriting, using the 'data' attribute and requires a policyId.

### Endpoint

- **URL:** `/policies/v2/policies/{{policyId}}`
- **Method:** `POST`

### Input

| **Argument Name**                    | **Type** | **Required** | **Description**                                                                                                                                                                                                                 |
| ------------------------------------ | -------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parameters.caid`                    | number   | Optional     | By default, the policy is retrieved for the account (A) associated with the API credentials used for authentication. To retrieve the policy for a different account (an account under the account (A)), specify the account ID. |
| `path_parameters.policyId`           | string   | Required     | The policy ID.                                                                                                                                                                                                                  |
| `name`                               | string   | Optional     | The Policy name.                                                                                                                                                                                                                |
| `description`                        | string   | Optional     | The Policy description.                                                                                                                                                                                                         |
| `enabled`                            | boolean  | Optional     | Enable or disable the policy. A WAF Rules policy is always created in the enabled state, and cannot be disabled.                                                                                                                |
| `accountId`                          | number   | Optional     | The Account ID Of the Policy.                                                                                                                                                                                                   |
| `policyType`                         | string   | Optional     | The Policy type.                                                                                                                                                                                                                |
| `defaultPolicyConfig`                | array    | Optional     | Sets the specified policy as default for the account, or indicates that the policy is set as default. A default policy is used by any new website added to the account.                                                         |
| `defaultPolicyConfig.id`             | number   | Optional     | The ID of this default policy configuration.                                                                                                                                                                                    |
| `defaultPolicyConfig.accountId`      | number   | Optional     | The account ID.                                                                                                                                                                                                                 |
| `defaultPolicyConfig.assetType`      | string   | Optional     | The type of asset on which the policy is applied.                                                                                                                                                                               |
| `defaultPolicyConfig.policyId`       | number   | Optional     | The ID of this policy.                                                                                                                                                                                                          |
| `policySettings`                     | array    | Optional     | Parameter for Modify Policy                                                                                                                                                                                                     |
| `policySettings.id`                  | number   | Optional     | The Policy Settings ID.                                                                                                                                                                                                         |
| `policySettings.policyId`            | number   | Optional     | The Policy ID of this setting.                                                                                                                                                                                                  |
| `policySettings.settingsAction`      | string   | Optional     | The action taken by Imperva when a policy rule is triggered.                                                                                                                                                                    |
| `policySettings.policySettingType`   | string   | Optional     | The PolicySettings type.                                                                                                                                                                                                        |
| `policySettings.data`                | object   | Optional     | Response data                                                                                                                                                                                                                   |
| `policySettings.data.geo`            | object   | Optional     | Response data                                                                                                                                                                                                                   |
| `policySettings.data.geo.countries`  | array    | Optional     | Country Codes array.                                                                                                                                                                                                            |
| `policySettings.data.geo.continents` | array    | Optional     | Continent Codes array.                                                                                                                                                                                                          |
| `policySettings.data.ips`            | array    | Optional     | Response data                                                                                                                                                                                                                   |
| `policySettings.data.urls`           | array    | Optional     | Response data                                                                                                                                                                                                                   |
| `policySettings.data.urls.pattern`   | string   | Optional     | URL pattern for rule.                                                                                                                                                                                                           |
| `policySettings.data.urls.url`       | string   | Optional     | URL value.                                                                                                                                                                                                                      |

### Input Example

`{"parameters":{"caid":20},"json_body":{"name":"Block ip Policy","description":"This is policy blocks all requests from Europe.","enabled":true,"accountId":10,"policyType":"ACL","defaultPolicyConfig":[{"id":10,"accountId":10,"assetType":"WEBSITE","policyId":8}],"policySettings":[{"id":10,"policyId":10,"settingsAction":"BLOCK","policySettingType":"IP/GEO/URL","data":{"geo":{"countries":["AE","AC"],"continents":["APAC","US"]},"ips":["string"],"urls":[{"pattern":"EQUALS","url":"/test"}]},"policyDataExceptions":[{"id":10,"policySettingsId":55,"data":[{"exceptionType":"GEO","values":["string"]}],"comment":"exclude all ips for pen tests","summary":"string"}]}]},"path_parameters":{"policyId":"string"}}`

### Output

| **Parameter**                              | **Type** | **Description**                  |
| ------------------------------------------ | -------- | -------------------------------- |
| `status_code`                              | number   | HTTP status code of the response |
| `reason`                                   | string   | Response reason phrase           |
| `value`                                    | object   | Value for the parameter          |
| `value.name`                               | string   | Name of the resource             |
| `value.description`                        | string   | Value for the parameter          |
| `value.enabled`                            | boolean  | Value for the parameter          |
| `value.accountId`                          | number   | Unique identifier                |
| `value.policyType`                         | string   | Type of the resource             |
| `value.defaultPolicyConfig`                | array    | Value for the parameter          |
| `value.defaultPolicyConfig.id`             | number   | Unique identifier                |
| `value.defaultPolicyConfig.accountId`      | number   | Unique identifier                |
| `value.defaultPolicyConfig.assetType`      | string   | Type of the resource             |
| `value.defaultPolicyConfig.policyId`       | number   | Unique identifier                |
| `value.policySettings`                     | array    | Value for the parameter          |
| `value.policySettings.id`                  | number   | Unique identifier                |
| `value.policySettings.policyId`            | number   | Unique identifier                |
| `value.policySettings.settingsAction`      | string   | Value for the parameter          |
| `value.policySettings.policySettingType`   | string   | Type of the resource             |
| `value.policySettings.data`                | object   | Response data                    |
| `value.policySettings.data.geo`            | object   | Response data                    |
| `value.policySettings.data.geo.countries`  | array    | Response data                    |
| `value.policySettings.data.geo.continents` | array    | Response data                    |
| `value.policySettings.data.ips`            | array    | Response data                    |
| `value.policySettings.data.urls`           | array    | Response data                    |
| `value.policySettings.data.urls.pattern`   | string   | Response data                    |

### Output Example

`{"status_code":200,"response_headers":{},"reason":"OK","json_body":{"value":{"name":"Block ip Policy","description":"This is policy blocks all requests from Europe","enabled":true,"accountId":10,"policyType":"ACL","defaultPolicyConfig":[],"policySettings":[]},"isError":false}}`

## Update Policy

Overwrite an existing policy on Imperva by providing the policy ID and updated settings including name, status, type, and configuration.

### Endpoint

- **URL:** `/policies/v2/policies/{{policyId}}`
- **Method:** `PUT`

### Input

| **Argument Name**                    | **Type** | **Required** | **Description**                                                                                                                                                                                                                 |
| ------------------------------------ | -------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parameters.caid`                    | number   | Optional     | By default, the policy is retrieved for the account (A) associated with the API credentials used for authentication. To retrieve the policy for a different account (an account under the account (A)), specify the account ID. |
| `path_parameters.policyId`           | string   | Required     | The policy ID.                                                                                                                                                                                                                  |
| `name`                               | string   | Optional     | The Policy name.                                                                                                                                                                                                                |
| `description`                        | string   | Optional     | The Policy description.                                                                                                                                                                                                         |
| `enabled`                            | boolean  | Optional     | Enable or disable the policy. A WAF Rules policy is always created in the enabled state, and cannot be disabled.                                                                                                                |
| `accountId`                          | number   | Optional     | The Account ID Of the Policy.                                                                                                                                                                                                   |
| `policyType`                         | string   | Optional     | The Policy type.                                                                                                                                                                                                                |
| `defaultPolicyConfig`                | array    | Optional     | Sets the specified policy as default for the account, or indicates that the policy is set as default. A default policy is used by any new website added to the account.                                                         |
| `defaultPolicyConfig.id`             | number   | Optional     | The ID of this default policy configuration.                                                                                                                                                                                    |
| `defaultPolicyConfig.accountId`      | number   | Optional     | The account ID.                                                                                                                                                                                                                 |
| `defaultPolicyConfig.assetType`      | string   | Optional     | The type of asset on which the policy is applied.                                                                                                                                                                               |
| `defaultPolicyConfig.policyId`       | number   | Optional     | The ID of this policy.                                                                                                                                                                                                          |
| `policySettings`                     | array    | Optional     | Parameter for Update Policy                                                                                                                                                                                                     |
| `policySettings.id`                  | number   | Optional     | The Policy Settings ID.                                                                                                                                                                                                         |
| `policySettings.policyId`            | number   | Optional     | The Policy ID of this setting.                                                                                                                                                                                                  |
| `policySettings.settingsAction`      | string   | Optional     | The action taken by Imperva when a policy rule is triggered.                                                                                                                                                                    |
| `policySettings.policySettingType`   | string   | Optional     | The PolicySettings type.                                                                                                                                                                                                        |
| `policySettings.data`                | object   | Optional     | Response data                                                                                                                                                                                                                   |
| `policySettings.data.geo`            | object   | Optional     | Response data                                                                                                                                                                                                                   |
| `policySettings.data.geo.countries`  | array    | Optional     | Country Codes array.                                                                                                                                                                                                            |
| `policySettings.data.geo.continents` | array    | Optional     | Continent Codes array.                                                                                                                                                                                                          |
| `policySettings.data.ips`            | array    | Optional     | Response data                                                                                                                                                                                                                   |
| `policySettings.data.urls`           | array    | Optional     | Response data                                                                                                                                                                                                                   |
| `policySettings.data.urls.pattern`   | string   | Optional     | URL pattern for rule.                                                                                                                                                                                                           |
| `policySettings.data.urls.url`       | string   | Optional     | URL value.                                                                                                                                                                                                                      |

### Input Example

`{"parameters":{"caid":20},"json_body":{"name":"Block ip Policy","description":"This is policy blocks all requests from Europe.","enabled":true,"accountId":10,"policyType":"ACL","defaultPolicyConfig":[{"id":10,"accountId":10,"assetType":"WEBSITE","policyId":8}],"policySettings":[{"id":10,"policyId":10,"settingsAction":"BLOCK","policySettingType":"IP/GEO/URL","data":{"geo":{"countries":["AE","AC"],"continents":["APAC","US"]},"ips":["string"],"urls":[{"pattern":"EQUALS","url":"/test"}]},"policyDataExceptions":[{"id":10,"policySettingsId":55,"data":[{"exceptionType":"GEO","values":["string"]}],"comment":"exclude all ips for pen tests","summary":"string"}]}]},"path_parameters":{"policyId":"string"}}`

### Output

| **Parameter**                        | **Type** | **Description**                              |
| ------------------------------------ | -------- | -------------------------------------------- |
| `status_code`                        | number   | HTTP status code of the response             |
| `reason`                             | string   | Response reason phrase                       |
| `name`                               | string   | Name of the resource                         |
| `description`                        | string   | Output field: description                    |
| `enabled`                            | boolean  | Output field: enabled                        |
| `accountId`                          | number   | Unique identifier                            |
| `policyType`                         | string   | Type of the resource                         |
| `defaultPolicyConfig`                | array    | Output field: defaultPolicyConfig            |
| `defaultPolicyConfig.id`             | number   | The ID of this default policy configuration. |
| `defaultPolicyConfig.accountId`      | number   | Unique identifier                            |
| `defaultPolicyConfig.assetType`      | string   | Type of the resource                         |
| `defaultPolicyConfig.policyId`       | number   | Unique identifier                            |
| `policySettings`                     | array    | Output field: policySettings                 |
| `policySettings.id`                  | number   | Unique identifier                            |
| `policySettings.policyId`            | number   | Unique identifier                            |
| `policySettings.settingsAction`      | string   | Output field: policySettings.settingsAction  |
| `policySettings.policySettingType`   | string   | Type of the resource                         |
| `policySettings.data`                | object   | Response data                                |
| `policySettings.data.geo`            | object   | Response data                                |
| `policySettings.data.geo.countries`  | array    | Response data                                |
| `policySettings.data.geo.continents` | array    | Response data                                |
| `policySettings.data.ips`            | array    | Response data                                |
| `policySettings.data.urls`           | array    | Response data                                |
| `policySettings.data.urls.pattern`   | string   | Response data                                |
| `policySettings.data.urls.url`       | string   | Response data                                |

### Output Example

`{"status_code":200,"response_headers":{},"reason":"OK","json_body":{"name":"Block ip Policy","description":"This is policy blocks all requests from Europe","enabled":true,"accountId":10,"policyType":"ACL","defaultPolicyConfig":[{}],"policySettings":[{}]}}`

# Response Headers

| **Header**   | **Description**                                       | **Example**                   |
| ------------ | ----------------------------------------------------- | ----------------------------- |
| Content-Type | The media type of the resource                        | application/json              |
| Date         | The date and time at which the message was originated | Thu, 01 Jan 2024 00:00:00 GMT |
