Imperva Cloud Application Security
App · 22 actions
Manage the websites Imperva protects: block IP addresses, countries and URLs, set threat protection, add custom rules, apply policies, purge the cache, and read visits, statistics and audit events.
Actions
| Action | What it does |
|---|---|
| Add site | Add a website to the account. |
| Apply policy to site | Apply a policy to a website. |
| Create custom rule | Add a custom security rule to a website: alert on, block or challenge the requests its filter matches. |
| Delete custom rule | Delete a website's custom rule. |
| Delete site | Remove a website from Imperva. |
| Get account | Get the account's plan, name and settings. |
| Get audit events | List who did what in the account: sign-ins, setting changes and API calls. |
| Get custom rule | Get a website's custom rule. |
| Get policy | Get a policy with its settings. |
| Get site | Get a website's status, DNS records to set, and security settings, optionally running checks first. |
| Get traffic statistics | Get visits, hits, bandwidth, caching, threats and custom rule statistics for the account or one website. |
| Get visits | List recent visits to a website, newest first, optionally only those Imperva acted on, or from one country or IP address. |
| List data centers | List a website's origin data centers and their servers. |
| List policies | List the account's security policies: access lists, allow lists and WAF settings shared across websites. |
| List site rules | List a website's custom security rules and delivery rules. |
| List sites | List the websites the account protects, 50 at a time unless a page size is given. |
| List sub-accounts | List the sub-accounts the account manages. |
| Purge site cache | Clear a website's cached content, or only the resources matching a pattern. |
| Remove policy from site | Stop applying a policy to a website. |
| Set blocked or allowed list | Replace a website's blocked IP addresses, allowed IP addresses, blocked countries or blocked URLs with the values given. |
| Set threat protection | Choose what Imperva does when it finds SQL injection, cross-site scripting, illegal resource access, remote file inclusion or a backdoor on a website. |
| Update custom rule | Replace a custom rule's name, action, filter and whether it's on. |
Add site
Add a website to the account. If it's already there, its status comes back.
Inputs
- Domain
domaintextRequired - The website's domain, such as www.example.com.
- Account ID
account_idtext - A sub-account or managed account to act on. Leave empty for the connected account.
- Send setup emails
send_site_setup_emailstrue/false - Email the account's users the DNS and SSL setup steps. Defaults to off.
- Reference ID
ref_idtext - Your own reference for the site.
Outputs
dataobject- The response from Imperva Cloud Application Security.
Example output
{
"data": {
"acceleration_level": "example",
"account_id": 1,
"active": "example",
"display_name": "example",
"dns": [
{
"dns_record_name": "example",
"set_data_to": [
"example"
],
"set_type_to": "example"
}
],
"domain": "example",
"ips": [
"example"
],
"original_dns": [
{
"dns_record_name": "example",
"set_data_to": [
"example"
],
"set_type_to": "example"
}
],
"res": 1,
"res_message": "example",
"security": {},
"site_creation_date": 1,
"site_id": 1,
"status": "example",
"warnings": [
{}
]
}
}Apply policy to site
Apply a policy to a website.
Inputs
- Site
site_idnumberRequired - The website, by its Imperva site ID.At least 1.
- Policy
policy_idtextRequired - The policy.
Outputs
dataobject- The response from Imperva Cloud Application Security.
Example output
{
"data": {
"applied": true,
"policy_id": "example",
"site_id": "example"
}
}Create custom rule
Add a custom security rule to a website: alert on, block or challenge the requests its filter matches.
Inputs
- Site
site_idnumberRequired - The website, by its Imperva site ID.At least 1.
- Name
nametextRequired - The rule's name.
- Action
rule_actiontextRequired - What the rule does to matching requests.One of:
RULE_ACTION_ALERT(Alert),RULE_ACTION_BLOCK(Block the request),RULE_ACTION_BLOCK_USER(Block the session),RULE_ACTION_BLOCK_IP(Block the IP address),RULE_ACTION_CAPTCHA(Require a CAPTCHA),RULE_ACTION_RETRY(Require cookie support),RULE_ACTION_INTRUSIVE_HTML(Require JavaScript support). - Filter
filtertext - Which requests the rule matches, in Imperva's rule syntax, such as ClientIP == 192.0.2.10. Leave empty to match every request.
- Enabled
enabledtrue/false - Whether the rule is on. Defaults to on.
Outputs
dataobject- The response from Imperva Cloud Application Security.
Example output
{
"data": {
"action": "example",
"enabled": true,
"filter": "example",
"name": "example",
"rule_id": 1
}
}Delete custom rule
Delete a website's custom rule.
Inputs
- Site
site_idnumberRequired - The website, by its Imperva site ID.At least 1.
- Rule ID
rule_idnumberRequired - The rule's ID, which Create custom rule and List site rules return.At least 1.
Outputs
dataobject- The response from Imperva Cloud Application Security.
Example output
{
"data": {
"deleted": true,
"rule_id": "example"
}
}Delete site
Remove a website from Imperva. Its traffic stops being protected.
Inputs
- Site
site_idnumberRequired - The website, by its Imperva site ID.At least 1.
Outputs
dataobject- The response from Imperva Cloud Application Security.
Example output
{
"data": {
"res": 1,
"res_message": "example"
}
}Get account
Get the account's plan, name and settings.
Inputs
- Account ID
account_idtext - A sub-account or managed account to act on. Leave empty for the connected account.
Outputs
dataobject- The response from Imperva Cloud Application Security.
Example output
{
"data": {
"account": {},
"res": 1,
"res_message": "example"
}
}Get audit events
List who did what in the account: sign-ins, setting changes and API calls.
Inputs
- Account ID
account_idtext - A sub-account or managed account to act on. Leave empty for the connected account.
- Time range
time_rangetext - A named time range. Use From and To instead for your own range.One of:
today,last_7_days(Last 7 days),last_30_days(Last 30 days),last_90_days(Last 90 days),month_to_date(Month to date). - From
start_timedate and time - The start of your own time range.
- To
end_timedate and time - The end of your own time range.
- Event type
typetext - Only events of this type, such as audit.account_login.
- Page size
page_sizenumber - How many to return, up to 100.From 1 to 100.
- Page
page_numnumber - The page to return, counting from 0.At least 0.
Outputs
dataobject- The response from Imperva Cloud Application Security.
Example output
{
"data": {
"audit_events": [
{}
],
"res": 1,
"res_message": "example"
}
}Get custom rule
Get a website's custom rule.
Inputs
- Site
site_idnumberRequired - The website, by its Imperva site ID.At least 1.
- Rule ID
rule_idnumberRequired - The rule's ID, which Create custom rule and List site rules return.At least 1.
Outputs
dataobject- The response from Imperva Cloud Application Security.
Example output
{
"data": {
"action": "example",
"enabled": true,
"filter": "example",
"name": "example",
"rule_id": 1
}
}Get policy
Get a policy with its settings.
Inputs
- Policy
policy_idtextRequired - The policy.
Outputs
dataobject- The response from Imperva Cloud Application Security.
Example output
{
"data": {
"isError": true,
"value": {
"accountId": 1,
"description": "example",
"enabled": true,
"id": 1,
"isMarkedAsDefault": true,
"name": "example",
"policySettings": [
{
"data": {},
"policySettingType": "example",
"settingsAction": "example"
}
],
"policyType": "example"
}
}
}Get site
Get a website's status, DNS records to set, and security settings, optionally running checks first.
Inputs
- Site
site_idnumberRequired - The website, by its Imperva site ID.At least 1.
- Checks
testslist - Checks to run before answering.One or more of:
domain_validation(Domain validation),services,dns.
Outputs
dataobject- The response from Imperva Cloud Application Security.
Example output
{
"data": {
"acceleration_level": "example",
"account_id": 1,
"active": "example",
"display_name": "example",
"dns": [
{
"dns_record_name": "example",
"set_data_to": [
"example"
],
"set_type_to": "example"
}
],
"domain": "example",
"ips": [
"example"
],
"original_dns": [
{
"dns_record_name": "example",
"set_data_to": [
"example"
],
"set_type_to": "example"
}
],
"res": 1,
"res_message": "example",
"security": {},
"site_creation_date": 1,
"site_id": 1,
"status": "example",
"warnings": [
{}
]
}
}Get traffic statistics
Get visits, hits, bandwidth, caching, threats and custom rule statistics for the account or one website.
Inputs
- Statistics
statslistRequired - The statistics to get.One or more of:
visits_timeseries(Visits timeseries),hits_timeseries(Hits timeseries),bandwidth_timeseries(Bandwidth timeseries),requests_geo_dist_summary(Requests by country),visits_dist_summary(Visits by client),caching,caching_timeseries(Caching timeseries),threats,incap_rules(Custom rules),incap_rules_timeseries(Custom rules over time). - Site
site_idnumber - One website. Leave empty for the whole account.At least 1.
- Account ID
account_idtext - A sub-account or managed account to act on. Leave empty for the connected account.
- Time range
time_rangetext - A named time range. Defaults to the last 7 days; use From and To for your own range.One of:
today,last_7_days(Last 7 days),last_30_days(Last 30 days),last_90_days(Last 90 days),month_to_date(Month to date). - From
start_timedate and time - The start of your own time range.
- To
end_timedate and time - The end of your own time range.
Outputs
dataobject- The response from Imperva Cloud Application Security.
Example output
{
"data": {
"bandwidth_timeseries": [
{}
],
"caching": {},
"caching_timeseries": [
{}
],
"hits_timeseries": [
{}
],
"incap_rules": [
{}
],
"incap_rules_timeseries": [
{}
],
"requests_geo_dist_summary": {},
"res": 1,
"res_message": "example",
"threats": [
{}
],
"visits_dist_summary": [
{}
],
"visits_timeseries": [
{}
]
}
}Get visits
List recent visits to a website, newest first, optionally only those Imperva acted on, or from one country or IP address.
Inputs
- Site
site_idnumberRequired - The website, by its Imperva site ID.At least 1.
- Time range
time_rangetext - A named time range. Use From and To instead for your own range.One of:
today,last_7_days(Last 7 days),last_30_days(Last 30 days),last_90_days(Last 90 days),month_to_date(Month to date). - From
start_timedate and time - The start of your own time range.
- To
end_timedate and time - The end of your own time range.
- Security events
securitylist - Only visits Imperva handled this way, such as blocked IP addresses or SQL injection.One or more of:
api.threats.action.block_request(Block the request),api.threats.action.block_user(Block the user),api.threats.action.block_ip(Block the IP address),api.threats.action.alert(Alert only),api.threats.sql_injection(SQL injection),api.threats.cross_site_scripting(Cross-site scripting),api.threats.illegal_resource_access(Illegal resource access),api.threats.remote_file_inclusion(Remote file inclusion),api.threats.backdoor(Backdoor protection). - Country
countrytext - Only visits from this two-letter country code.
- IP address
iptext - Only visits from this IP address.
- Include live visits
list_live_visitstrue/false - Include visits still in progress. Defaults to on.
- Page size
page_sizenumber - How many to return, up to 100.From 1 to 100.
- Page
page_numnumber - The page to return, counting from 0.At least 0.
Outputs
dataobject- The response from Imperva Cloud Application Security.
Example output
{
"data": {
"res": 1,
"res_message": "example",
"visits": [
{
"actions": [
{}
],
"clientApplication": "example",
"clientIPs": [
"example"
],
"clientType": "example",
"country": [
"example"
],
"countryCode": [
"example"
],
"endTime": 1,
"entryPage": "example",
"hits": 1,
"id": "example",
"pageViews": 1,
"securitySummary": {},
"siteId": 1,
"startTime": 1,
"userAgent": "example"
}
]
}
}List data centers
List a website's origin data centers and their servers.
Inputs
- Site
site_idnumberRequired - The website, by its Imperva site ID.At least 1.
Outputs
dataobject- The response from Imperva Cloud Application Security.
Example output
{
"data": {
"DCs": [
{}
],
"res": 1,
"res_message": "example"
}
}List policies
List the account's security policies: access lists, allow lists and WAF settings shared across websites.
Inputs
None.
Outputs
dataobject- The response from Imperva Cloud Application Security.
Example output
{
"data": {
"isError": true,
"value": [
{
"accountId": 1,
"description": "example",
"enabled": true,
"id": 1,
"isMarkedAsDefault": true,
"name": "example",
"policySettings": [
{
"data": {},
"policySettingType": "example",
"settingsAction": "example"
}
],
"policyType": "example"
}
]
}
}List site rules
List a website's custom security rules and delivery rules.
Inputs
- Site
site_idnumberRequired - The website, by its Imperva site ID.At least 1.
- Security rules
include_security_rulestrue/false - Include the security rules. Defaults to on.
- Delivery rules
include_delivery_rulestrue/false - Include the delivery rules (redirects and rewrites). Defaults to on.
- Page size
page_sizenumber - How many to return, up to 100.From 1 to 100.
- Page
page_numnumber - The page to return, counting from 0.At least 0.
Outputs
dataobject- The response from Imperva Cloud Application Security.
Example output
{
"data": {
"delivery_rules": {},
"incap_rules": {},
"res": 1,
"res_message": "example"
}
}List sites
List the websites the account protects, 50 at a time unless a page size is given.
Inputs
- Account ID
account_idtext - A sub-account or managed account to act on. Leave empty for the connected account.
- Page size
page_sizenumber - How many to return, up to 100.From 1 to 100.
- Page
page_numnumber - The page to return, counting from 0.At least 0.
Outputs
dataobject- The response from Imperva Cloud Application Security.
Example output
{
"data": {
"res": 1,
"res_message": "example",
"sites": [
{
"acceleration_level": "example",
"account_id": 1,
"active": "example",
"display_name": "example",
"dns": [
{
"dns_record_name": "example",
"set_data_to": [
"example"
],
"set_type_to": "example"
}
],
"domain": "example",
"ips": [
"example"
],
"original_dns": [
{
"dns_record_name": "example",
"set_data_to": [
"example"
],
"set_type_to": "example"
}
],
"security": {},
"site_creation_date": 1,
"site_id": 1,
"status": "example",
"warnings": [
{}
]
}
]
}
}List sub-accounts
List the sub-accounts the account manages.
Inputs
- Account ID
account_idtext - A sub-account or managed account to act on. Leave empty for the connected account.
- Page size
page_sizenumber - How many to return, up to 100.From 1 to 100.
- Page
page_numnumber - The page to return, counting from 0.At least 0.
Outputs
dataobject- The response from Imperva Cloud Application Security.
Example output
{
"data": {
"res": 1,
"res_message": "example",
"resultList": [
{}
]
}
}Purge site cache
Clear a website's cached content, or only the resources matching a pattern.
Inputs
- Site
site_idnumberRequired - The website, by its Imperva site ID.At least 1.
- Pattern
purge_patterntext - Only resources whose names match: name (contains), ^name (starts with) or name$ (ends with). Leave empty to purge everything.
Outputs
dataobject- The response from Imperva Cloud Application Security.
Example output
{
"data": {
"res": 1,
"res_message": "example"
}
}Remove policy from site
Stop applying a policy to a website.
Inputs
- Site
site_idnumberRequired - The website, by its Imperva site ID.At least 1.
- Policy
policy_idtextRequired - The policy.
Outputs
dataobject- The response from Imperva Cloud Application Security.
Example output
{
"data": {
"applied": true,
"policy_id": "example",
"site_id": "example"
}
}Set blocked or allowed list
Replace a website's blocked IP addresses, allowed IP addresses, blocked countries or blocked URLs with the values given. An empty list clears it.
Inputs
- Site
site_idnumberRequired - The website, by its Imperva site ID.At least 1.
- List
rule_idtextRequired - Which list to replace.One of:
api.acl.blacklisted_ips(Blocked IP addresses),api.acl.whitelisted_ips(Allowed IP addresses),api.acl.blacklisted_countries(Blocked countries and continents),api.acl.blacklisted_urls(Blocked URLs). - IP addresses
ipslist - For an IP list: IP addresses, ranges or CIDR blocks, such as 192.0.2.1, 192.0.2.1-192.0.2.100 or 192.0.2.0/24.
- Countries
countrieslist - For blocked countries: two-letter country codes, such as RU.
- Continents
continentslist - For blocked countries: continent codes (AF, AN, AS, EU, NA, OC, SA).One or more of:
AF,AN,AS,EU,NA,OC,SA. - URLs
urlslist - For blocked URLs: paths on the site, such as /admin.
- URL match
url_patterntext - For blocked URLs: how each path is matched. Defaults to contains.One of:
contains,equals,prefix,suffix,not_equals(Not equals),not_contains(Not contains),not_prefix(Not prefix),not_suffix(Not suffix).
Outputs
dataobject- The response from Imperva Cloud Application Security.
Example output
{
"data": {
"res": 1,
"res_message": "example"
}
}Set threat protection
Choose what Imperva does when it finds SQL injection, cross-site scripting, illegal resource access, remote file inclusion or a backdoor on a website.
Inputs
- Site
site_idnumberRequired - The website, by its Imperva site ID.At least 1.
- Threat
rule_idtextRequired - The threat.One of:
api.threats.sql_injection(SQL injection),api.threats.cross_site_scripting(Cross-site scripting),api.threats.illegal_resource_access(Illegal resource access),api.threats.remote_file_inclusion(Remote file inclusion),api.threats.backdoor(Backdoor protection). - Action
security_rule_actiontextRequired - What to do when it's found.One of:
api.threats.action.block_request(Block the request),api.threats.action.block_user(Block the user),api.threats.action.block_ip(Block the IP address),api.threats.action.alert(Alert only),api.threats.action.quarantine_url(Quarantine the URL (backdoors only)),api.threats.action.disabled(Ignore).
Outputs
dataobject- The response from Imperva Cloud Application Security.
Example output
{
"data": {
"res": 1,
"res_message": "example"
}
}Update custom rule
Replace a custom rule's name, action, filter and whether it's on.
Inputs
- Site
site_idnumberRequired - The website, by its Imperva site ID.At least 1.
- Rule ID
rule_idnumberRequired - The rule's ID, which Create custom rule and List site rules return.At least 1.
- Name
nametextRequired - The rule's name.
- Action
rule_actiontextRequired - What the rule does to matching requests.One of:
RULE_ACTION_ALERT(Alert),RULE_ACTION_BLOCK(Block the request),RULE_ACTION_BLOCK_USER(Block the session),RULE_ACTION_BLOCK_IP(Block the IP address),RULE_ACTION_CAPTCHA(Require a CAPTCHA),RULE_ACTION_RETRY(Require cookie support),RULE_ACTION_INTRUSIVE_HTML(Require JavaScript support). - Filter
filtertext - Which requests the rule matches, in Imperva's rule syntax, such as ClientIP == 192.0.2.10. Leave empty to match every request.
- Enabled
enabledtrue/false - Whether the rule is on. Defaults to on.
Outputs
dataobject- The response from Imperva Cloud Application Security.
Example output
{
"data": {
"action": "example",
"enabled": true,
"filter": "example",
"name": "example",
"rule_id": 1
}
}