{ "opencollection": "1.0.0", "info": { "name": "Cloud Application Security Account Management Site Management API", "version": "1.0" }, "request": { "auth": { "type": "apikey", "key": "x-API-Key", "value": "{{x-API-Key}}", "placement": "header" } }, "items": [ { "info": { "name": "Site Management", "type": "folder" }, "items": [ { "info": { "name": "Add a cache rule", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/performance/caching-rules/add", "params": [ { "name": "action", "value": "HTTP_CACHE_CREATE_TAG", "type": "query", "description": "Rule action. See Possible action parameter values.
Possible action parameter values:
" }, { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on." }, { "name": "name", "value": "rule1", "type": "query", "description": "Rule name." }, { "name": "filter", "value": "URL == /admin", "type": "query", "description": "Rule will trigger only a request that matches this filter. For more details on filters, see Syntax Guide." }, { "name": "ttl", "value": "TTL value", "type": "query", "description": "Rule TTL. Only relevant when action is HTTP_CACHE_MAKE_STATIC or HTTP_CACHE_CLIENT_CACHE_CTL" }, { "name": "ttl_unit", "value": "SECONDS", "type": "query", "description": "Rule TTL time unit.
Must be one of SECONDS, MINUTES, HOURS, DAYS or WEEKS. If no time unit is provided, SECONDS is used.
Only relevant when action is HTTP_CACHE_MAKE_STATIC or HTTP_CACHE_CLIENT_CACHE_CTL" }, { "name": "differentiated_by_value", "value": "cookie name", "type": "query", "description": "Value to differentiate by. HTTP_CACHE_DIFFERENTIATE_BY_HEADER - header name, HTTP_CACHE_DIFFERENTIATE_BY_COOKIE - cookie name, HTTP_CACHE_DIFFERENTIATE_BY_GEO - geo location
(ISO 3166-1 alpha-2 country codes ), otherwise irrelevant." }, { "name": "params", "value": "{a,b,c}", "type": "query", "description": "Comma separated list of parameters to ignore." }, { "name": "all_params", "value": "true", "type": "query", "description": "When set to true: all parameters in cache key will be ignored.
Default: false.
Relevant for HTTP_CACHE_IGNORE_PARAMS action" }, { "name": "tag_name", "value": "tag example", "type": "query", "description": "The name of the tag to add." }, { "name": "text", "value": "suffix", "type": "query", "description": "Add text to the cache key as suffix. Relevant for the HTTP_CACHE_ENRICH_CACHE_KEY action" } ] }, "docs": "Use this operation for adding a cache rule" }, { "info": { "name": "Delete a cache rule", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/performance/caching-rules/delete", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on." }, { "name": "rule_id", "value": "3746", "type": "query", "description": "ID of the rule to change." } ] }, "docs": "Use this operation for deleting a cache rule" }, { "info": { "name": "Enable or disable cache rule", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/performance/caching-rules/enable", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on." }, { "name": "rule_id", "value": "3746", "type": "query", "description": "Numeric identifier of the site to operate on." }, { "name": "enable", "value": "true", "type": "query", "description": "When true, the rule will be enabled. Set to false to disable." } ] }, "docs": "Use this operation for enabling or disable cache rule" }, { "info": { "name": "List cache rules for a given site", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/performance/caching-rules/list", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on." }, { "name": "page_size", "value": "75", "type": "query", "description": "The number of objects to return in the response.
Default is 50.
Maximum: 100" }, { "name": "page_num", "value": "0", "type": "query", "description": "The page to return starting from 0. Default is 0." } ] }, "docs": "Use this operation for representing cache rules for a given site" }, { "info": { "name": "Edit a cache rule", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/performance/caching-rules/edit", "params": [ { "name": "action", "value": "HTTP_CACHE_CREATE_TAG", "type": "query", "description": "Rule action. See Possible action parameter values.
Possible action parameter values:
" }, { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on." }, { "name": "rule_id", "value": "3746", "type": "query", "description": "ID of the rule to change." }, { "name": "name", "value": "rule1", "type": "query", "description": "Rule name." }, { "name": "filter", "value": "URL == /admin", "type": "query", "description": "Rule will trigger only a request that matches this filter. For more details on filters, see Syntax Guide." }, { "name": "ttl", "value": "TTL value", "type": "query", "description": "Rule TTL. Only relevant when action is HTTP_CACHE_MAKE_STATIC or HTTP_CACHE_CLIENT_CACHE_CTL" }, { "name": "ttl_unit", "value": "SECONDS", "type": "query", "description": "Rule TTL time unit.
Must be one of SECONDS, MINUTES, HOURS, DAYS or WEEKS. If no time unit is provided, SECONDS is used.
Only relevant when action is HTTP_CACHE_MAKE_STATIC or HTTP_CACHE_CLIENT_CACHE_CTL" }, { "name": "differentiated_by_value", "value": "cookie name", "type": "query", "description": "Value to differentiate by. HTTP_CACHE_DIFFERENTIATE_BY_HEADER - header name, HTTP_CACHE_DIFFERENTIATE_BY_COOKIE - cookie name, HTTP_CACHE_DIFFERENTIATE_BY_GEO - geo location
(ISO 3166-1 alpha-2 country codes ), otherwise irrelevant." }, { "name": "params", "value": "{a,b,c}", "type": "query", "description": "Comma separated list of parameters to ignore." }, { "name": "all_params", "value": "true", "type": "query", "description": "When set to true: all parameters in cache key will be ignored.
Default: false.
Relevant for HTTP_CACHE_IGNORE_PARAMS action" }, { "name": "tag_name", "value": "tag1", "type": "query", "description": "The name of the tag to add." }, { "name": "text", "value": "cache", "type": "query", "description": "Add text to the cache key as suffix. Relevant for the HTTP_CACHE_ENRICH_CACHE_KEY action" } ] }, "docs": "Use this operation for editing a cache rule" }, { "info": { "name": "Add data center", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/dataCenters/add", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on." }, { "name": "name", "value": "DataCenter", "type": "query", "description": "The new data center's name." }, { "name": "server_address", "value": "1.1.1.1", "type": "query", "description": "The server's address. Possible values: IP, CNAME" }, { "name": "lb_algorithm", "value": "LB_LEAST_PENDING_REQUESTS", "type": "query", "description": "Data center load balancing algorithm. Possible values are:
LB_LEAST_PENDING_REQUESTS - Server with least pending requests
LB_LEAST_OPEN_CONNECTIONS - Server with least open connections
LB_SOURCE_IP_HASH - Server by IP hash
RANDOM - Random server
WEIGHTED - Server by weight" }, { "name": "is_enabled", "value": "true", "type": "query", "description": "Enables the data center." }, { "name": "is_content", "value": "true", "type": "query", "description": "The data center will be available for specific resources (Forward Delivery Rules)." } ] }, "docs": "Use this operation for adding data center to site." }, { "info": { "name": "Edit site", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/dataCenters/edit", "params": [ { "name": "dc_id", "value": "10", "type": "query", "description": "The data center's ID." }, { "name": "name", "value": "DataCenter", "type": "query", "description": "The new data center's name." }, { "name": "is_enabled", "value": "true", "type": "query", "description": "Enables the data center." }, { "name": "is_standby", "value": "true", "type": "query", "description": "Defines the data center as standby for failover." }, { "name": "is_content", "value": "true", "type": "query", "description": "The data center will be available for specific resources (Forward Delivery Rules)." } ] }, "docs": "Use this operation to editing site's data center" }, { "info": { "name": "Resume traffic to your active data centers", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/dataCenters/resume", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on." } ] }, "docs": "When at least one active data center is back up, you have to manually reroute your traffic back to the active data center.
Traffic does not revert automatically to your active data centers." }, { "info": { "name": "delete site", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/dataCenters/delete", "params": [ { "name": "dc_id", "value": "10", "type": "query", "description": "The data center's ID." } ] }, "docs": "Use this operation for deleting site datacenter." }, { "info": { "name": "Add datacenter ", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/dataCenters/servers/add", "params": [ { "name": "dc_id", "value": "10", "type": "query", "description": "The data center's ID." }, { "name": "server_address", "value": "1.1.1.1", "type": "query", "description": "Server IP address." }, { "name": "is_disabled", "value": "true", "type": "query", "description": "Enables the data center" }, { "name": "is_standby", "value": "true", "type": "query", "description": "Set the server as Active (P0) or Standby (P1) (Boolean)." } ] }, "docs": "Use this operation to adding datacenter server." }, { "info": { "name": "Delete datacenter ", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/dataCenters/servers/delete", "params": [ { "name": "server_id", "value": "10", "type": "query", "description": "Server ID." } ] }, "docs": "Use this operation to deleting datacenter server." }, { "info": { "name": "Edit datacenter", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/dataCenters/servers/edit", "params": [ { "name": "server_id", "value": "10", "type": "query", "description": "Server ID." }, { "name": "server_address", "value": "1.1.1.1", "type": "query", "description": "The IP address of the server to modify." }, { "name": "is_enabled", "value": "true", "type": "query", "description": "Enable or disable the server (Boolean)." }, { "name": "is_standby", "value": "true", "type": "query", "description": "Set the server as Active (P0) or Standby (P1) (Boolean)." } ] }, "docs": "Use this operation to editing datacenter server." }, { "info": { "name": "List site's data centers", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/dataCenters/list", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on." } ] }, "docs": "Use this operation for listing site's data centers including datacenters servers." }, { "info": { "name": "Set Data Center Origin PoP", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/datacenter/origin-pop/modify", "params": [ { "name": "dc_id", "value": "10", "type": "query", "description": "Numeric identifier of the data center to operate on." }, { "name": "origin_pop", "value": "lax, for Los Angeles", "type": "query", "description": "The ID of the PoP that serves as an access point between Imperva and the customer’s origin server. For example: “lax”, for Los Angeles." } ] }, "docs": "Set an origin PoP for a given data center." }, { "info": { "name": "Get Data Center Recommended Origin PoPs", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/datacenter/origin-pop/recommend", "params": [ { "name": "dc_id", "value": "10", "type": "query", "description": "Numeric identifier of the data center to operate on." } ] }, "docs": "Get a list of recommended origin PoPs for a given data center." }, { "info": { "name": "Modify Caching Mode", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/performance/cache-mode", "params": [ { "name": "cache_mode", "value": "static_and_dynamic", "type": "query", "description": "Possible values:
" }, { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on." }, { "name": "dynamic_cache_duration", "value": "5_min", "type": "query", "description": "Profile dynamic pages and cache duration. Pass a number followed by '_' and one of: hr | min | sec | days | weeks.
Default: 5_min" }, { "name": "aggressive_cache_duration", "value": "1_hr", "type": "query", "description": "Cache resource duration. Pass a number followed by '_' and one of: hr | min | sec | days | weeks
Default: 1_hr" } ] }, "docs": "Use this operation to edit basic site caching settings." }, { "info": { "name": "Get Caching Mode", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/performance/cache-mode/get", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on." } ] }, "docs": "Use this operation to get a site's caching mode." }, { "info": { "name": "Purge Resources", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/performance/purge", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on." }, { "name": "resource_url", "value": "/home", "type": "query", "description": "Comma separated list of URLs where the resource is located." }, { "name": "resource_pattern", "value": "prefix", "type": "query", "description": "Comma separated list of pattern. One of: contains | equals | prefix | suffix | not_equals | not_contains | not_prefix | not_suffix" }, { "name": "should_purge_all_site_resources", "value": "true", "type": "query", "description": "Should purge all cached resources on site.
Possible values:
If the parameter does not exist, is null, or an empty string, it is ignored and only specific resources defined by the resource_pattern and resource_url parameters are purged.
true or TRUE: All site resources are purged.
false or FALSE: Nothing is done.
Any other string: An error is returned." } ] }, "docs": "Use this operation to purge site resources." }, { "info": { "name": "Purge Site Cache", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/cache/purge", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on." }, { "name": "purge_pattern", "value": "", "type": "query", "description": "The pattern of the resource to be purged from the cache. For example:
" }, { "name": "purge_tag_names", "value": "", "type": "query", "description": "A comma separated list of tag names to purge." } ] }, "docs": "Use this operation to purge all cached content on our proxy servers for a specific site.
Our Proxy servers keep cached content of your sites in order to accelerate page load times for your users.
When you want this cached content to be refreshed (for example, after making adjustments in your site) you can use this API call.
In order to purge the entire cached content for this site just use the API call with no parameters.
If you want to purge a specific resource add the resource " }, { "info": { "name": "Modify Cached Response Headers", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/performance/response-headers", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on." }, { "name": "cache_headers", "value": "h1", "type": "query", "description": "Comma separated list of header names to be cached" }, { "name": "cache_all_headers", "value": "true", "type": "query", "description": "Cache all response headers. Pass \"true\" or \"false\" in the value parameter. Cannot be selected together with cache_headers. Default:false" } ] }, "docs": "Use this operation to modify cached response headers." }, { "info": { "name": "Get Cached Response Headers", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/performance/response-headers/get", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on." } ] }, "docs": "Use this operation to get a site's cached response headers." }, { "info": { "name": "Tag the Response According to the Value of a Header", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/performance/tag-response", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on." }, { "name": "header", "value": "cache", "type": "query", "description": "Specify which origin response header contains the cache tags in your resources. default: \"\"." } ] }, "docs": "Specify which origin response header contains the cache tags in your resources." }, { "info": { "name": "Get Header to Tag Responses By", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/performance/tag-response/get", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on." } ] }, "docs": "Get the origin response header containing the cache tags in your resources" }, { "info": { "name": "Modify Cache 404 Settings", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/performance/cache404/modify", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on." }, { "name": "enable", "value": "true", "type": "query", "description": "Pass 'true' to cache 404 responses, 'false' to disable the option." }, { "name": "time", "value": "10", "type": "query", "description": "A positive number representing the amount of time to cache 404 responses. Default value: 10" }, { "name": "time_unit", "value": "HOURS", "type": "query", "description": "Unit of time for caching 404 responses. One of MINUTES, HOURS, DAYS, WEEKS. Default value: HOURS" } ] }, "docs": "Use this operation to modify the caching settings of 404 responses for a site." }, { "info": { "name": "Get Cache 404 Settings", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/performance/cache404", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on." } ] }, "docs": "Use this operation to get the caching settings of 404 responses for a site." }, { "info": { "name": "Modify PoP Level Cache", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/performance/pop-level-cache/modify", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on." }, { "name": "enable", "value": "true", "type": "query", "description": "Pass 'true' to enable pop level cache, 'false' to disable the option." } ] }, "docs": "Use this operation to modify the PoP level cache status for a site." }, { "info": { "name": "Get PoP Level Cache", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/performance/pop-level-cache", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on." } ] }, "docs": "Use this operation to get the PoP level cache status for a site." }, { "info": { "name": "Set Resource Map Size", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/performance/resource-map-size/modify", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on." }, { "name": "resource_map_size", "value": "34000", "type": "query", "description": "Limit for the amount of cached resources." } ] }, "docs": "Set the site's maximum number of cached resources." }, { "info": { "name": "Get Resource Map Size", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/performance/resource-map-size", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on" } ] }, "docs": "Get the site's maximum number of cached resources." }, { "info": { "name": "Set Total Cache Size", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/performance/cache-size-limit-large-mem/modify", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on" }, { "name": "cache_size_limit_large_mem", "value": "500", "type": "query", "description": "A positive number representing limit for total size of cached resources." }, { "name": "cache_size_limit_large_mem_unit", "value": "BYTES", "type": "query", "description": "Unit of the limit for total size of cached resources. One of BYTES, KB, MB." } ] }, "docs": "Set the site's limit for the total size of cache." }, { "info": { "name": "Get Total Cache Size", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/performance/cache-size-limit-large-mem", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on" } ] }, "docs": "Get the site's limit for the total size of cache." }, { "info": { "name": "Set Response Max Size", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/performance/max-resp-size/modify", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on" }, { "name": "max_resp_size", "value": "20971520", "type": "query", "description": "A positive number representing limit for the size of cached resources." }, { "name": "max_resp_size_unit", "value": "BYTES", "type": "query", "description": "Unit of the limit for the size of cached resources. One of BYTES, KB, MB." } ] }, "docs": "Set the site's limit for the size of a single file returned from the cache." }, { "info": { "name": "Get Response Max Size", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/performance/max-resp-size", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on" } ] }, "docs": "Get the site's limit for the size of a single file returned from the cache." }, { "info": { "name": "Modify Secure Resources Mode", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/performance/secure-resources", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on" }, { "name": "secured_resources_mode", "value": "", "type": "query", "description": "do_not_cache - Do not cache HTTPS resources
defaults - Use default HTTPS caching. Do not cache HTML pages
defaults_with_html - Use default HTTPS caching. Also cache HTML pages
general - Cache HTTPS according to general caching settings" } ] }, "docs": "Use this operation to modify the Secure Resources mode for a site." }, { "info": { "name": "Get Secure Resources Mode", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/performance/secure-resources/get", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on" } ] }, "docs": "Use this operation to get the Secure Resources mode for a site." }, { "info": { "name": "Modify Stale Content Settings", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/performance/stale-content", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on" }, { "name": "serve_stale_content", "value": "true", "type": "query", "description": "Pass true to serve stale content, false to disable the option." }, { "name": "stale_content_mode", "value": "ADAPTIVE", "type": "query", "description": "Pass ADAPTIVE to use Imperva's algorithm, or CUSTOM to specify an amount of time. When using CUSTOM, you must specify the time and time_unit parameters." }, { "name": "time", "value": "10", "type": "query", "description": "A positive number representing the amount of time to serve stale content." }, { "name": "time_unit", "value": "MINUTES", "type": "query", "description": "Stale content time unit. One of SECONDS, MINUTES, HOURS." } ] }, "docs": "When Imperva can't connect to the origin server, serve stale content instead of displaying an error to end users for the specified amount of time. Expired resources are returned from cache, and refreshed asynchronously in the background." }, { "info": { "name": "Get Stale Content Settings", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/performance/stale-content/get", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on." } ] }, "docs": "When Imperva can't connect to the origin server, serve stale content instead of displaying an error to end users for the specified amount of time. Expired resources are returned from cache, and refreshed asynchronously in the background." }, { "info": { "name": "Advanced Caching Settings", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/performance/advanced", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on." }, { "name": "param", "value": "async_validation", "type": "query", "description": "Name of configuration parameter to set.
Possible values for param and value parameters:
" }, { "name": "value", "value": "true", "type": "query", "description": "According to the param value." } ] }, "docs": "Use this operation to modify advanced caching settings." }, { "info": { "name": "Get Advanced Caching Settings", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/performance/advanced/get", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on." }, { "name": "param", "value": "async_validation", "type": "query", "description": "Name of configuration parameter to set.
Possible values for param and value parameters:
" } ] }, "docs": "Use this operation to get advanced caching settings." }, { "info": { "name": "Get XRay Access Link", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/xray/get-link", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on." } ] }, "docs": "Use this operation to get a URL that enables debug headers on the specific site. " }, { "info": { "name": "Enable Cache Shield", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/performance/cache-shield/enable", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on." }, { "name": "enable", "value": "true", "type": "query", "description": "Use true to enable cache shield on the specified site, and false to disable it." } ] }, "docs": "Enable Cache Shield for a given site." }, { "info": { "name": "Is Cache Shield Enabled", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/performance/cache-shield", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on." } ] }, "docs": "Get the enablement state of the Cache Shield feature for a given site." }, { "info": { "name": "Modify Rewrite Port", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/performance/rewrite-port/modify", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on" }, { "name": "rewrite_port_enabled", "value": "true", "type": "query", "description": "Boolean value to indicate whether the default non-SSL port should be rewritten or not" }, { "name": "port", "value": "80", "type": "query", "description": "The port number. If empty, rewrite port will be removed" }, { "name": "rewrite_ssl_port_enabled", "value": "true", "type": "query", "description": "Boolean value to indicate whether the default SSL port should be rewritten or not" }, { "name": "ssl_port", "value": "443", "type": "query", "description": "The port number to rewrite default SSL port to" } ] }, "docs": "Use this operation to rewrite the port number used to access the origin server." }, { "info": { "name": "Get Rewrite Port", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/performance/rewrite-port", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on" } ] }, "docs": "Use this operation to get the rewritten port number used to access the origin server." }, { "info": { "name": "Modify Error Page", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/performance/error-page/modify", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on" }, { "name": "error_page_template", "value": "", "type": "query", "description": "The error page html template. $TITLE$ and $BODY$ placeholders are required." } ] }, "docs": "Use this operation to set a custom error page for a given site." }, { "info": { "name": "Get Error Page", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/performance/error-page", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on." } ] }, "docs": "Use this operation to get the custom error page for a given site." }, { "info": { "name": "Get Site Status", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/status", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on" }, { "name": "tests", "value": "domain_validation", "type": "query", "description": "List of tests to run on site before returning its status.
A comma separated list of one of: domain_validation, services, dns
Values for the stats parameters:
" } ] }, "docs": "Use this operation to get the status of a site." }, { "info": { "name": "List Sites", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/list", "params": [ { "name": "account_id", "value": "15", "type": "query", "description": "Numeric identifier of the account to operate on.
If not specified, operation will be performed on the account identified by the authentication parameters.
If the account has sub accounts, the operation returns results for the sites in the account and in all of its sub accounts." }, { "name": "page_size", "value": "2", "type": "query", "description": "The number of objects to return in the response. Default is 50. Maximum: 100" }, { "name": "page_num", "value": "1", "type": "query", "description": "he page to return starting from 0. Default is 0" } ] }, "docs": "List sites for an account" }, { "info": { "name": "Get Domain Approver E-mail Addresses", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/domain/emails", "params": [ { "name": "domain", "value": "www.example.com", "type": "query", "description": "The domain name of the site. For example: www.example.com, www.example.com, www.example.com" } ] }, "docs": "Use this operation to get the list of email addresses that can be used when adding an SSL site." }, { "info": { "name": "Modify Site Logs Level", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/setlog", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on" }, { "name": "log_level", "value": "full", "type": "query", "description": "Available only for customers that purchased the Logs Integration SKU. Sets the log reporting level for the site.
Possible values: full, security, none, default" }, { "name": "logs_account_id", "value": "10", "type": "query", "description": "Available only for customers that purchased the Logs Integration SKU. Numeric identifier of the account that purchased the logs integration SKU and which collects the logs.
If not specified, operation will be performed on the account identified by the authentication parameters" } ] }, "docs": "Use this operation to change the site log configuration." }, { "info": { "name": "Set support for all TLS versions", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/tls", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on." }, { "name": "support_all_tls_versions", "value": "true", "type": "query", "description": "Support all TLS versions. Default value: false" } ] }, "docs": "Use this operation to support all TLS versions for the site for connectivity between clients (visitors) and the Imperva service. To remain PCI-compliant, do not enable this option." }, { "info": { "name": "Modify Site Configuration", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/configure", "params": [ { "name": "site_id", "value": "example.imperva.com", "type": "query", "description": "Numeric identifier of the site to operate on" }, { "name": "param", "value": "active", "type": "query", "description": "Name of configuration parameter to set.
Parameter values:
" }, { "name": "value", "value": "bypass", "type": "query", "description": "According to the param value." } ] }, "docs": "Use this operation to change one of the basic configuration settings of the site." }, { "info": { "name": "Delete Site", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/delete", "params": [ { "name": "site_id", "value": "15", "type": "query", "description": "Numeric identifier of the site to operate on" } ] }, "docs": "Delete the site." }, { "info": { "name": "Add a Site", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/add", "params": [ { "name": "domain", "value": "example.imperva.com", "type": "query", "description": "The domain name of the site. For example: www.example.com, www.example.com, www.example.com" }, { "name": "account_id", "value": "10", "type": "query", "description": "Numeric identifier of the account to operate on.
If not specified, operation will be performed on the account identified by the authentication parameters." }, { "name": "ref_id", "value": "11", "type": "query", "description": "Customer specific identifier for this operation" }, { "name": "send_site_setup_emails", "value": "false", "type": "query", "description": "If this value is false, end users will not get emails about the add site process such as DNS instructions and SSL setup." }, { "name": "site_ip", "value": "1.2.3.4", "type": "query", "description": "Manually set the web server IP/CNAME" }, { "name": "force_ssl", "value": "true", "type": "query", "description": "If this value is true, manually set the site to support SSL.
This option is only available for sites with manually configured IP/CNAME and for specific accounts." }, { "name": "naked_domain_san", "value": "true", "type": "query", "description": "Use “true” to add the naked domain SAN to a www site’s SSL certificate. Default value: true" }, { "name": "wildcard_san", "value": "true", "type": "query", "description": "Use “true” to add the wildcard SAN or “false” to add the full domain SAN to the site’s SSL certificate. Default value: true" }, { "name": "log_level", "value": "full", "type": "query", "description": "Available only for customers that purchased the Logs Integration SKU.
Sets the log reporting level for the site. Options are “full”, “security”, “none” and default" }, { "name": "logs_account_id", "value": "10", "type": "query", "description": "Available only for customers that purchased the Logs Integration SKU.
Numeric identifier of the account that purchased the logs integration SKU and which collects the logs.
If not specified, operation will be performed on the account identified by the authentication parameters" } ] }, "docs": "Add a new site to an account. If the site already exists, its status is returned." }, { "info": { "name": "Modify Site Access Control List (ACL) Configuration", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/configure/acl", "params": [ { "name": "site_id", "value": "15", "type": "query", "description": "Numeric identifier of the site to operate on" }, { "name": "rule_id", "value": "548723", "type": "query", "description": "The id of the acl, e.g api.acl.blacklisted_ips.
Values for the rule_id parameter:
" }, { "name": "urls", "value": "/home", "type": "query", "description": "A comma separated list of resource paths. For example, /home and /admin/index.html are resource paths, however http://www.example.com/home is not. Each URL should be encoded separately using percent encoding as specified by RFC 3986 (http://tools.ietf.org/html/rfc3986#section-2.1). An empty URL list will remove all URLs" }, { "name": "url_patterns", "value": "contains", "type": "query", "description": "A comma separated list of url patterns, one of: contains | equals | prefix | suffix | not_equals | not_contain | not_prefix | not_suffix. The patterns should be in accordance with the matching urls sent by the urls parameter" }, { "name": "countries", "value": "US", "type": "query", "description": "A comma separated list of country codes" }, { "name": "continents", "value": "SA", "type": "query", "description": "A comma separated list of continent codes" }, { "name": "ips", "value": "192.168.1.1/24", "type": "query", "description": "A comma separated list of IPs or IP ranges, e.g: 192.168.1.1, 192.168.1.1-192.168.1.100 or 192.168.1.1/24" } ] }, "docs": "Use this operation to change the ACL configuration of a site. To modify the configuration for a specific ACL rule, its values are required, as documented below. To delete an entire ACL list, send an empty string as the list values." }, { "info": { "name": "Get Site Data Storage Region", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/data-privacy/show", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on." } ] }, "docs": "Use this operation to get the site data region." }, { "info": { "name": "Modify Allow Lists Configuration", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/configure/allowlist", "params": [ { "name": "site_id", "value": "15", "type": "query", "description": "Numeric identifier of the site to operate on." }, { "name": "rule_id", "value": "548723", "type": "query", "description": "The id of the rule (either a security or an acl rule), e.g api.threats.sql_injection, api.threats.cross_site_scripting, api.threats.illegal_resource_access" }, { "name": "allowlist_id", "value": "433245", "type": "query", "description": "The id (an integer) of the allow list to be set. This field is optional - in case no id is supplied, a new allow list will be created." }, { "name": "delete_allowlist", "value": "false", "type": "query", "description": "An optional boolean parameter. If it is set to \"true\" and a allow list id is sent, the allow list will be deleted." }, { "name": "urls", "value": "/home", "type": "query", "description": "A comma separated list of resource paths.
For example, /home and /admin/index.html are resource paths, while http://www.example.com/home is not.
Each URL should be encoded separately using percent encoding as specified by RFC 3986 (http://tools.ietf.org/html/rfc3986#section-2.1).
An empty URL list will remove all URLs." }, { "name": "countries", "value": "US", "type": "query", "description": "A comma separated list of country codes." }, { "name": "continents", "value": "SA", "type": "query", "description": "A comma separated list of continent codes." }, { "name": "ips", "value": "192.168.1.1/24", "type": "query", "description": "A comma separated list of IPs or IP ranges, e.g: 192.168.1.1, 192.168.1.1-192.168.1.100 or 192.168.1.1/24" }, { "name": "client_app_types", "value": "Browser", "type": "query", "description": "A comma separated list of client application types" }, { "name": "client_apps", "value": "3", "type": "query", "description": "A comma separated list of client application IDs." }, { "name": "parameters", "value": "", "type": "query", "description": "A comma separated list of encoded parameters." }, { "name": "user_agents", "value": "Googlebot-2.1", "type": "query", "description": "A comma separated list of encoded user agents." }, { "name": "exception_id_only", "value": "true", "type": "query", "description": "Return only the new/edited exception id." } ] }, "docs": "Use this operation to set allow lists to security rules or ACLs. To update an existing allow list, send its ID in the id parameter. If the id parameter does not exist a new allow list will be created." }, { "info": { "name": "Modify Site Security Configuration", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/configure/security", "params": [ { "name": "site_id", "value": "15", "type": "query", "description": "Numeric identifier of the site to operate on" }, { "name": "rule_id", "value": "578942", "type": "query", "description": "ID of the security rule to change.
Values for the rule_id parameter:
" }, { "name": "block_bad_bots", "value": "true", "type": "query", "description": "Whether or not to block bad bots. Possible values: true, false" }, { "name": "challenge_suspected_bots", "value": "true", "type": "query", "description": "Whether or not to send a challenge to clients that are suspected to be bad bots (CAPTCHA for example). Possible values: true, false" }, { "name": "activation_mode", "value": "off", "type": "query", "description": "Possible values: off, auto, on
The syntax is as follows:.activation_mode. For example, for 'off', use 'activation_mode=api.threats.ddos.activation_mode.off.
Note: This parameter is relevant and required for a DDoS rule only -- where rule_id=api.threats.ddos." }, { "name": "security_rule_action", "value": "api.threats.action.alert", "type": "query", "description": "The action that should be taken when a threat is detected, for example:
api.threats.action.block_ip. Different actions are allowed per different threats, e.g. backdoors may only be quarantined, ignored, or trigger an alert.
Values for the security_rule_action parameter:
" }, { "name": "quarantined_urls", "value": "www.example.com", "type": "query", "description": "Removes quarantined URLs from the backdoor protection list, as defined in the Cloud Security Console Website Settings > WAF Settings > Backdoor Protect.
To remove a URL from the backdoor protection list, use the following parameters with the specified values:
quarantined_urls:
rule_id: api.threats.backdoor
security_rule_action: api.threats.action.quarantine_url" }, { "name": "ddos_traffic_threshold", "value": "1500", "type": "query", "description": "Consider site to be under DDoS if the request rate is above this threshold.
The valid values are 10, 20, 50, 100, 200, 500, 750, 1000, 2000, 3000, 4000, 5000" } ] }, "docs": "Use this operation to change the security configuration of a site. To modify the configuration for a specific rule, additional parameters may be required, as documented below." }, { "info": { "name": "Get Site Report", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/report", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on" }, { "name": "report", "value": "pci-compliance", "type": "query", "description": "The report to get. One of: pci-compliance" }, { "name": "format", "value": "pdf", "type": "query", "description": "The format to get the report in. One of: pdf | html" }, { "name": "time_range", "value": "last_7_days", "type": "query", "description": "Time range to fetch data for.
Some operations require the user to specify a time range. This is done via the time_range parameter, which accepts the following values:
  • today Retrieve data from midnight today until the current time.
  • last_7_days Retrieve data from midnight of 7 days ago until the current time.
  • last_30_days Retrieve data from midnight of 30 days ago until the current time.
  • last_90_days Retrieve data from midnight of 90 days ago until the current time.
  • month_to_date Retrieve data from midnight of the first day of the month until the current time.
  • custom Specify a custom time range using two additional parameters: start and end.
    Results are provided for full days only, starting from midnight. A time range of less than 24 hours gives results for the full day.
    For example:
    • A time range of 14:00 - 20:00 yesterday gives results for all of yesterday (midnight to midnight) - a full day.
    • A time range of 14:00 last Tuesday to 14:00 last Wednesday gives results for all of Tuesday and Wednesday - two full days.
    • A time range of 14:00 yesterday to 14:00 today gives results for all of yesterday starting from midnight until the current time today.
" }, { "name": "start", "value": "1610356734", "type": "query", "description": "Start date in milliseconds since 1970.
Some operations require the user to specify a time range. This is done via the time_range parameter, which accepts the following values:
  • today Retrieve data from midnight today until the current time.
  • last_7_days Retrieve data from midnight of 7 days ago until the current time.
  • last_30_days Retrieve data from midnight of 30 days ago until the current time.
  • last_90_days Retrieve data from midnight of 90 days ago until the current time.
  • month_to_date Retrieve data from midnight of the first day of the month until the current time.
  • custom Specify a custom time range using two additional parameters: start and end.
    Results are provided for full days only, starting from midnight. A time range of less than 24 hours gives results for the full day.
    For example:
    • A time range of 14:00 - 20:00 yesterday gives results for all of yesterday (midnight to midnight) - a full day.
    • A time range of 14:00 last Tuesday to 14:00 last Wednesday gives results for all of Tuesday and Wednesday - two full days.
    • A time range of 14:00 yesterday to 14:00 today gives results for all of yesterday starting from midnight until the current time today.
" }, { "name": "end", "value": "1610356734", "type": "query", "description": "End date in milliseconds since 1970.
Some operations require the user to specify a time range. This is done via the time_range parameter, which accepts the following values:
  • today Retrieve data from midnight today until the current time.
  • last_7_days Retrieve data from midnight of 7 days ago until the current time.
  • last_30_days Retrieve data from midnight of 30 days ago until the current time.
  • last_90_days Retrieve data from midnight of 90 days ago until the current time.
  • month_to_date Retrieve data from midnight of the first day of the month until the current time.
  • custom Specify a custom time range using two additional parameters: start and end.
    Results are provided for full days only, starting from midnight. A time range of less than 24 hours gives results for the full day.
    For example:
    • A time range of 14:00 - 20:00 yesterday gives results for all of yesterday (midnight to midnight) - a full day.
    • A time range of 14:00 last Tuesday to 14:00 last Wednesday gives results for all of Tuesday and Wednesday - two full days.
    • A time range of 14:00 yesterday to 14:00 today gives results for all of yesterday starting from midnight until the current time today.
" } ] }, "docs": "Use this operation to get a report for a site. Reports are sent using Base64 encoding." }, { "info": { "name": "Purge Hostname from Cache", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/hostname/purge", "params": [ { "name": "host_name", "value": "example.com", "type": "query", "description": "The hostname to purge from the cache" } ] }, "docs": "Use this operation to purge the hostname from the cache. This API is for customers who use the same CNAME provided by Imperva for multiple hostnames and would like to change the CNAME for a particular hostname. Purging the hostname is required for the CNAME change to take effect." }, { "info": { "name": "Get HTML Injection Rules", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/htmlinjections", "params": [ { "name": "site_id", "value": "15", "type": "query", "description": "Numeric identifier of the site to operate on" } ] }, "docs": "Use this operation to list all the HTML Injection rules" }, { "info": { "name": "Add, Replace or Remove a HTML Injection Rule", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/configure/htmlInjections", "params": [ { "name": "site_id", "value": "15", "type": "query", "description": "Numeric identifier of the site to operate on" }, { "name": "url", "value": "/home", "type": "query", "description": "The URL where the content is injected" }, { "name": "url_pattern", "value": "contains", "type": "query", "description": "The url pattern. One of: contains | not_contains | equals | not_equals | prefix | suffix | not_prefix | not_suffix" }, { "name": "location", "value": "head", "type": "query", "description": "The location of the injection inside the URL ('head' or 'body_end')" }, { "name": "content", "value": "SGVsbG8gV29ybGQh", "type": "query", "description": "The injected HTML snippet, Base64-encoded" }, { "name": "delete_content", "value": "false", "type": "query", "description": "Whether or not to delete existing HTML content.
Possible values: true/false" } ] }, "docs": "Use this operation to add a new HTML injection rule, or to replace or remove an existing rule." }, { "info": { "name": "Upload Custom Certificate", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/customCertificate/upload", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on" }, { "name": "certificate", "value": "", "type": "query", "description": "The certificate file in base64 format" }, { "name": "private_key", "value": "", "type": "query", "description": "The private key of the certificate in base64 format. Optional in case of PFX certificate file format" }, { "name": "passphrase", "value": "", "type": "query", "description": "The passphrase used to protect your SSL certificate\t" } ] }, "docs": "Use this operation to upload custom certificate for your site. The following SSL certificate file formats are supported: PFX, PEM, CER." }, { "info": { "name": "Remove Custom Certificate", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/customCertificate/remove", "params": [ { "name": "site_id", "value": "5437773", "type": "query", "description": "Numeric identifier of the site to operate on" } ] }, "docs": "Use this operation to remove custom certificate." }, { "info": { "name": "Create New CSR", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/customCertificate/csr", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on" }, { "name": "email", "value": "joe@example.com", "type": "query", "description": "Email address. For example: joe@example.com" }, { "name": "country", "value": "IL", "type": "query", "description": "The two-letter ISO code for the country where your organization is located" }, { "name": "state", "value": "IL", "type": "query", "description": "The state/region where your organization is located. This should not be abbreviated" }, { "name": "city", "value": "JER", "type": "query", "description": "The city where your organization is located" }, { "name": "organization", "value": "imperva", "type": "query", "description": "The legal name of your organization. This should not be abbreviated or include suffixes such as Inc., Corp., or LLC" }, { "name": "organization_unit", "value": "IT Department", "type": "query", "description": "The division of your organization handling the certificate. For example, IT Department" } ] }, "docs": "Use this operation to create a certificate signing request (CSR) for your site." }, { "info": { "name": "Set Site Data Storage Region", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/data-privacy/region-change", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on." }, { "name": "data_storage_region", "value": "US", "type": "query", "description": "The data region to use." } ] }, "docs": "Use this operation to set the site data region." }, { "info": { "name": "List Available PoPs for Denylist/Allowlist", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/data-privacy/show-override-by-geo" }, "docs": "Use this operation to list all PoPs that are available to add to a site’s blacklist or allowlist." }, { "info": { "name": "Set Site Regions by Origin Geolocation", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/data-privacy/override-by-geo", "params": [ { "name": "account_id", "value": "10", "type": "query", "description": "Numeric identifier of the account to operate on.
If not specified, operation will be performed on the account identified by the authentication parameters." }, { "name": "override_site_regions_by_geo", "value": "10", "type": "query", "description": "A boolean parameter. If it is set to \"true\", the data storage region for each new site will be based on the geolocation of the origin server." } ] }, "docs": "Use this operation to set the data storage region for each new site based on the geolocation of the origin server." }, { "info": { "name": "Check CAA compliance", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/caa/check-compliance", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on." } ] }, "docs": "Check site’s associated SANs for CAA compliance. If a given SAN is compliant, its SSL domain validation status is updated accordingly.This operation returns an updated list of the site’s associated SANs that are not compliant. An empty list indicates that all SANs are compliant." }, { "info": { "name": "Move site", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/moveSite", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to move" }, { "name": "destination_account_id", "value": "15", "type": "query", "description": "The numeric identifier of the account which the site will be moved to" } ] }, "docs": "Use this operation to move a site from its account to another account." }, { "info": { "name": "Set Rule Priority", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/incapRules/priority/set", "params": [ { "name": "rule_id", "value": "534663", "type": "query", "description": "Rule ID" }, { "name": "priority", "value": "1", "type": "query", "description": "New priority for the selected rule" } ] }, "docs": "Use this operation to change delivery rule's priority." }, { "info": { "name": "Edit Rule", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/incapRules/edit", "params": [ { "name": "action", "value": "RULE_ACTION_EXCLUDE", "type": "query", "description": "Rule action.

Possible action parameter values for Delivery Rules:
  • RULE_ACTION_REDIRECT Redirect the client to a different URL, responding with a 30X response.
  • RULE_ACTION_SIMPLIFIED_REDIRECT Redirect the client to a different URL, responding with a 30X response.
  • RULE_ACTION_REWRITE_URL Modify the path to which a specific request is targeted.
  • RULE_ACTION_REWRITE_HEADER Modify or add a request header before passing traffic to the origin server.
  • RULE_ACTION_REWRITE_COOKIE Modify or add cookies that are sent by the client to the origin server. The cookie name and value should be indicated.
  • RULE_ACTION_DELETE_HEADER Remove a specific request header, which means that it won’t be sent to the origin server.
  • RULE_ACTION_DELETE_COOKIE Remove a specific cookie set on the client, which means that it won’t be sent to the origin server.
  • RULE_ACTION_FORWARD_TO_DC Define the data center to which a specific request will be sent.
  • RULE_ACTION_FORWARD_TO_PORT Define the port to which a specific request will be sent.
  • RULE_ACTION_RESPONSE_REWRITE_HEADER Modify or add a header to the response received from the origin server.
  • RULE_ACTION_RESPONSE_DELETE_HEADER Remove a specific response header, which means that it won't be returned to the client.
  • RULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODE Modify the response code received from the origin server.

Possible action parameter values for security rules:
  • RULE_ACTION_ALERT Generate a non blocking alert for this event.
  • RULE_ACTION_BLOCK Block the current request and generate an alert for this event.
  • RULE_ACTION_BLOCK_USER Block the current session and generate an alert for this event. Any subsequent request from the same Session will be blocked.
  • RULE_ACTION_BLOCK_IP Block the current session and generate an alert for this event. Any subsequent request from the same Session will be blocked.
  • RULE_ACTION_RETRY Require any client matching the rule filters to support cookies in order to complete the request.
  • RULE_ACTION_INTRUSIVE_HTML Require any client matching the rule filters to support javascript in order to complete the request. Since the Javascript test is embedded in an HTML page, this action should only be enabled for HTML resources.
  • RULE_ACTION_CAPTCHA Require any client matching the rule filters to pass a CAPTCHA test in order to complete the request. Since the CAPTCHA test is embedded in an HTML page, this action should only be enabled for HTML resources.

Possible action parameter values for counter (rate) rules:
  • RULE_ACTION_RATE Count the number of requests received that match the rule filter.
" }, { "name": "rule_id", "value": "10", "type": "query", "description": "Rule ID." }, { "name": "name", "value": "rule1", "type": "query", "description": "Rule name." }, { "name": "filter", "value": "==", "type": "query", "description": "Rule will trigger only a request that matches this filter. For more details on filter guidelines, see Syntax Guide." }, { "name": "response_code", "value": "1", "type": "query", "description": "Redirect rule's response code. Valid values are 302, 301, 303, 307, 308." }, { "name": "protocol", "value": "10", "type": "query" }, { "name": "add_missing", "value": "true", "type": "query", "description": "Add cookie or header if it doesn't exist (Rewrite cookie rule only)" }, { "name": "from", "value": "/home.php", "type": "query", "description": "The pattern to rewrite.
For RULE_ACTION_REWRITE_URL - The URL to rewrite.
For RULE_ACTION_REWRITE_HEADER - The header value to rewrite.
For RULE_ACTION_REWRITE_COOKIE - The cookie value to rewrite.
For RULE_ACTION_SIMPLIFIED_REDIRECT - Redirect the client to a different URL, responding with a 30X response." }, { "name": "to", "value": "*/home.html", "type": "query", "description": "The pattern to change to.
For RULE_ACTION_REWRITE_URL - The URL to change to.
For RULE_ACTION_REWRITE_HEADER - The header value to change to.
For RULE_ACTION_REWRITE_COOKIE - The cookie value to change to.
For RULE_ACTION_SIMPLIFIED_REDIRECT - Redirect the client to a different URL, responding with a 30X response." }, { "name": "rewrite_name", "value": "rule2", "type": "query", "description": "Name of cookie or header to rewrite. Applies only for RULE_ACTION_REWRITE_COOKIE and RULE_ACTION_REWRITE_HEADER." }, { "name": "dc_id", "value": "54313", "type": "query", "description": "Data center to forward request to. Applies only for RULE_ACTION_FORWARD_TO_DC." }, { "name": "allow_caching", "value": "true", "type": "query" }, { "name": "rate_context", "value": "IP", "type": "query", "description": "The context of the rate counter. Possible values: IP / Session. Applies only to rules using RULE_ACTION_RATE." }, { "name": "rate_interval", "value": "5", "type": "query", "description": "The interval (in seconds) of the rate counter. Possible values: A multiple of 10 from 10-300. Applies only to rules using RULE_ACTION_RATE." }, { "name": "is_test_mode", "value": "true", "type": "query", "description": "Make rule apply only for IP address the API request was sent from.
This option is not available for Simplified Redirect rules." }, { "name": "port_forwarding_context", "value": "", "type": "query", "description": "Context for port forwarding. \"Use Port Value\" or \"Use Header Name\". Applies only for RULE_ACTION_FORWARD_TO_PORT." }, { "name": "port_forwarding_value", "value": "20", "type": "query", "description": "Port number or header name for port forwarding. Applies only for RULE_ACTION_FORWARD_TO_PORT." }, { "name": "multiple_deletions", "value": "true", "type": "query", "description": "Delete multiple header occurrences. Applies only to rules using RULE_ACTION_DELETE_HEADER and RULE_ACTION_RESPONSE_DELETE_HEADER." } ] }, "docs": "Use this operation to edit an existing rule (Delivery, Security or Rate)." }, { "info": { "name": "Add Rule", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/incapRules/add", "params": [ { "name": "action", "value": "RULE_ACTION_EXCLUDE", "type": "query", "description": "Rule action. See the possible values in the table below.
Possible action parameter values for Delivery Rules:
  • RULE_ACTION_REDIRECT Redirect the client to a different URL, responding with a 30X response.
  • RULE_ACTION_SIMPLIFIED_REDIRECT Redirect the client to a different URL, responding with a 30X response.
  • RULE_ACTION_REWRITE_URL Modify the path to which a specific request is targeted.
  • RULE_ACTION_REWRITE_HEADER Modify or add a request header before passing traffic to the origin server.
  • RULE_ACTION_REWRITE_COOKIE Modify or add cookies that are sent by the client to the origin server. The cookie name and value should be indicated.
  • RULE_ACTION_DELETE_HEADER Remove a specific request header, which means that it won’t be sent to the origin server.
  • RULE_ACTION_DELETE_COOKIE Remove a specific cookie set on the client, which means that it won’t be sent to the origin server.
  • RULE_ACTION_FORWARD_TO_DC Define the data center to which a specific request will be sent.
  • RULE_ACTION_FORWARD_TO_PORT Define the port to which a specific request will be sent.
  • RULE_ACTION_RESPONSE_REWRITE_HEADER Modify or add a header to the response received from the origin server.
  • RULE_ACTION_RESPONSE_DELETE_HEADER Remove a specific response header, which means that it won't be returned to the client.
  • RULE_ACTION_RESPONSE_REWRITE_RESPONSE_CODE Modify the response code received from the origin server.

Possible action parameter values for security rules:
  • RULE_ACTION_ALERT Generate a non blocking alert for this event.
  • RULE_ACTION_BLOCK Block the current request and generate an alert for this event.
  • RULE_ACTION_BLOCK_USER Block the current session and generate an alert for this event. Any subsequent request from the same Session will be blocked.
  • RULE_ACTION_BLOCK_IP Block the current session and generate an alert for this event. Any subsequent request from the same Session will be blocked.
  • RULE_ACTION_RETRY Require any client matching the rule filters to support cookies in order to complete the request.
  • RULE_ACTION_INTRUSIVE_HTML Require any client matching the rule filters to support javascript in order to complete the request. Since the Javascript test is embedded in an HTML page, this action should only be enabled for HTML resources.
  • RULE_ACTION_CAPTCHA Require any client matching the rule filters to pass a CAPTCHA test in order to complete the request. Since the CAPTCHA test is embedded in an HTML page, this action should only be enabled for HTML resources.

Possible action parameter values for counter (rate) rules:
  • RULE_ACTION_RATE Count the number of requests received that match the rule filter.
" }, { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on." }, { "name": "name", "value": "rule1", "type": "query", "description": "Rule name." }, { "name": "filter", "value": "==", "type": "query", "description": "Rule will trigger only a request that matches this filter. For more details on filter guidelines, see Syntax Guide.
The filter may contain up to 400 characters." }, { "name": "response_code", "value": "1", "type": "query", "description": "Redirect rule's response code. Valid values are 302, 301, 303, 307, 308." }, { "name": "protocol", "value": "10", "type": "query" }, { "name": "add_missing", "value": "true", "type": "query", "description": "Add cookie or header if it doesn't exist (Rewrite cookie rule only)" }, { "name": "from", "value": "/home.php", "type": "query", "description": "The pattern to rewrite.
For RULE_ACTION_REWRITE_URL - The URL to rewrite.
For RULE_ACTION_REWRITE_HEADER - The header value to rewrite.
For RULE_ACTION_REWRITE_COOKIE - The cookie value to rewrite.
For RULE_ACTION_SIMPLIFIED_REDIRECT - Redirect the client to a different URL, responding with a 30X response." }, { "name": "to", "value": "*/home.html", "type": "query", "description": "The pattern to change to.
For RULE_ACTION_REWRITE_URL - The URL to change to.
For RULE_ACTION_REWRITE_HEADER - The header value to change to.
For RULE_ACTION_REWRITE_COOKIE - The cookie value to change to.
For RULE_ACTION_SIMPLIFIED_REDIRECT - Redirect the client to a different URL, responding with a 30X response." }, { "name": "rewrite_name", "value": "rule2", "type": "query", "description": "Name of cookie or header to rewrite. Applies only for RULE_ACTION_REWRITE_COOKIE and RULE_ACTION_REWRITE_HEADER." }, { "name": "dc_id", "value": "54313", "type": "query", "description": "Data center to forward request to. Applies only for RULE_ACTION_FORWARD_TO_DC." }, { "name": "allow_caching", "value": "true", "type": "query" }, { "name": "is_test_mode", "value": "true", "type": "query", "description": "Apply the rule only to the IP address the API request was sent from.
This option is not available for Simplified Redirect rules." }, { "name": "rate_context", "value": "Session", "type": "query", "description": "The context of the rate counter. Possible values: IP / Session. Applies only to rules using RULE_ACTION_RATE." }, { "name": "rate_interval", "value": "10", "type": "query", "description": "The interval (in seconds) of the rate counter. Possible values: A multiple of 10 from 10-300. Applies only to rules using RULE_ACTION_RATE." }, { "name": "port_forwarding_context", "value": "", "type": "query", "description": "Context for port forwarding. \"Use Port Value\" or \"Use Header Name\". Applies only for RULE_ACTION_FORWARD_TO_PORT." }, { "name": "port_forwarding_value", "value": "20", "type": "query", "description": "Port number or header name for port forwarding. Applies only for RULE_ACTION_FORWARD_TO_PORT." }, { "name": "multiple_deletions", "value": "true", "type": "query", "description": "Delete multiple header occurrences. Applies only to rules using RULE_ACTION_DELETE_HEADER and RULE_ACTION_RESPONSE_DELETE_HEADER." } ] }, "docs": "Use this operation to add a rule (Delivery, Security or Rate)." }, { "info": { "name": "Enable or Disable Rule", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/incapRules/enableDisable", "params": [ { "name": "rule_id", "value": "10", "type": "query", "description": "Rule id" }, { "name": "enable", "value": "true", "type": "query", "description": "When true, the rule will be enabled. Set to false to disable" } ] }, "docs": "Use this operation to enable or disable a rule (Delivery, Security or Rate)." }, { "info": { "name": "Delete Data Center", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/incapRules/delete", "params": [ { "name": "rule_id", "value": "4356", "type": "query", "description": "Rule id" } ] }, "docs": "Use this operation to delete site datacenter." }, { "info": { "name": "List Rules", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/incapRules/list", "params": [ { "name": "site_id", "value": "10", "type": "query", "description": "Numeric identifier of the site to operate on" }, { "name": "include_incap_rules", "value": "true", "type": "query", "description": "Whether or not security rules be included. Defaults to \"Yes\"." }, { "name": "include_ad_rules", "value": "true", "type": "query", "description": "Whether or not delivery rules should be included. Defaults to Yes" }, { "name": "pageSize", "value": "10", "type": "query", "description": "The number of objects to return in the response. Defaults to 50. Maximum is 100" }, { "name": "pageNum", "value": "1", "type": "query", "description": "The page to return starting from 0. Default to 0" } ] }, "docs": "Use this operation to list security, delivery, and rate rules for a given site." }, { "info": { "name": "List Account Rules", "type": "http" }, "http": { "method": "POST", "url": "https://my.imperva.com/api/prov/v1/sites/incapRules/account/list", "params": [ { "name": "account_id", "value": "10", "type": "query", "description": "Numeric identifier of the account to operate on" }, { "name": "include_incap_rules", "value": "true", "type": "query", "description": "Whether or not security rules be included. Defaults to \"Yes\"." }, { "name": "include_ad_rules", "value": "true", "type": "query", "description": "Whether or not delivery rules should be included. Defaults to \"Yes\"." } ] }, "docs": "Use this operation to list rules (Delivery, Security or Rate) for all sites under a given account." } ] } ], "bundled": true }