Get Available Policies

This article explains the legacy version of WAF that underwent end-of-life on June 30, 2021. Our new version of WAF expands upon all of the capabilities offered by WAF (Legacy) and Rate Limiting (Legacy) with a simplified and centralized setup. Please upgrade to the latest version of WAF at your earliest convenience.

Retrieves a list of the available policies for the specified rule set.

Request

A request to retrieve policies is described below.

HTTP Method Request URI

GET

https://api.transactcdn.com/v2/mcc/customers/AccountNumber/waf/config/profiles/rulesets/RuleSetID/version/RuleSetVersion/policies

Define the following variables when submitting the above request:

VariableA variable represents a value that must be replaced. A variable consists of either a URL segment (e.g., "0001" in /0001/) or a query string value (e.g., "3" in mediaTypes=3). Description

AccountNumber

Required

Replace this variable with a customer account number. This account number may be found in the upper left-hand corner of the TCC.

RuleSetID

Required

Replace this variable with the system-defined ID of the rule set whose policies will be retrieved.

Use the Get Profile by ID endpoint to find out the system-defined ID of the rule setThis ID is reported by the ruleset_id response parameter. associated with the desired profile. Alternatively, a list of the available rule sets and their system-defined IDs may be retrieved through the Get Available Rule Sets endpoint.

RuleSetVersion

Required

Replace this variable with the version of the rule set whose policies will be retrieved.

Use either the Get Profile by ID endpoint to find out the version of the rule setThis version is reported by the ruleset_version response parameter. associated with the desired profile. Alternatively, a list of the available rule sets and their supported versions may be retrieved through the Get Available Rule Sets endpoint.

Request Headers

This endpointIdentifies a request's connection point to our REST API service. only takes advantage of common request headers.

Request Body

Request body parameters are not required by this endpoint.

Response

The response to the above request includes an HTTP status code, response headers, and a response body.

Status Code

A status code indicates whether the request was successfully performed.

Response Headers

The response for this endpoint only includes standard HTTP response headers.

View common response headers.

Response Body

The response body for a successful request contains the following response parameters for each policy returned by this endpoint:

Name Data Type Description

index

String

Identifies a policy by its index number.

id

String

Identifies a policy by its system-defined ID.

name

String

Identifies a policy by its name.

Errors

The response body for an unsuccessful request will contain an error response that provides additional information.

View common error messages.

Sample Request and Response

A sample JSON request is shown below.

GET https://api.transactcdn.com/v2/mcc/customers/0001/waf/config/profiles/rulesets/Trustwave-OWASPIntegration-Application/version/2017-09-18/policies HTTP/1.1

Authorization: TOK:12345678-1234-1234-1234-1234567890ab

Accept: application/json

Host:api.transactcdn.com

A sample JSON response is shown below.

HTTP/1.1 200 OK

Cache-Control: private

Content-Type: application/json; charset=utf-8

Date: Thu, 15 Apr 2021 12:00:00 GMT

Content-Length: 3134

[{
		"index": "50",
		"id": "modsecurity_slr_50_malware_detection.conf",
		"name": "Malware detection"
	}, {
		"index": "35",
		"id": "modsecurity_crs_35_bad_robots.conf",
		"name": "Bad robots"
	}, {
		"index": "46",
		"id": "modsecurity_slr_46_typo3_attacks.conf",
		"name": "Typo3 attacks"
	}, {
		"index": "25",
		"id": "modsecurity_slr_25_cc_known.conf",
		"name": "Cc known"
	}, {
		"index": "46",
		"id": "modsecurity_slr_46_oscommerce_attacks.conf",
		"name": "Oscommerce attacks"
	}, {
		"index": "21",
		"id": "modsecurity_crs_21_protocol_anomalies.conf",
		"name": "Protocol anomalies"
	}, {
		"index": "46",
		"id": "modsecurity_slr_46_sharepoint_attacks.conf",
		"name": "Sharepoint attacks"
	}, {
		"index": "41",
		"id": "modsecurity_crs_41_sql_injection_attacks.conf",
		"name": "Sql injection attacks"
	}, {
		"index": "46",
		"id": "modsecurity_slr_46_drupal_attacks.conf",
		"name": "Drupal attacks"
	}, {
		"index": "42",
		"id": "modsecurity_crs_42_tight_security.conf",
		"name": "Tight security"
	}, {
		"index": "40",
		"id": "modsecurity_slr_40_botnet_attacks.conf",
		"name": "Botnet attacks"
	}, {
		"index": "46",
		"id": "modsecurity_slr_46_joomla_attacks.conf",
		"name": "Joomla attacks"
	}, {
		"index": "45",
		"id": "modsecurity_crs_45_trojans.conf",
		"name": "Trojans"
	}, {
		"index": "46",
		"id": "modsecurity_slr_46_wordpress_attacks.conf",
		"name": "Wordpress attacks"
	}, {
		"index": "46",
		"id": "modsecurity_slr_46_cpanel_attacks.conf",
		"name": "Cpanel attacks"
	}, {
		"index": "25",
		"id": "modsecurity_slr_25_cc_track_pan.conf",
		"name": "Cc track pan"
	}, {
		"index": "40",
		"id": "modsecurity_slr_40_dos_attacks.conf",
		"name": "Dos attacks"
	}, {
		"index": "46",
		"id": "modsecurity_slr_46_vbulletin_attacks.conf",
		"name": "Vbulletin attacks"
	}, {
		"index": "46",
		"id": "modsecurity_slr_46_netcat_attacks.conf",
		"name": "Netcat attacks"
	}, {
		"index": "40",
		"id": "modsecurity_crs_40_generic_attacks.conf",
		"name": "Generic attacks"
	}, {
		"index": "46",
		"id": "modsecurity_slr_46_phpbb_attacks.conf",
		"name": "Phpbb attacks"
	}, {
		"index": "22",
		"id": "modsecurity_crs_22_custom_ec_rules.conf",
		"name": "Custom ec rules"
	}, {
		"index": "20",
		"id": "modsecurity_crs_20_protocol_violations.conf",
		"name": "Protocol violations"
	}, {
		"index": "46",
		"id": "modsecurity_slr_46_owa_attacks.conf",
		"name": "Owa attacks"
	}, {
		"index": "41",
		"id": "modsecurity_crs_41_xss_attacks.conf",
		"name": "Xss attacks"
	}, {
		"index": "46",
		"id": "modsecurity_slr_46_modx_attacks.conf",
		"name": "Modx attacks"
	}, {
		"index": "10",
		"id": "modsecurity_slr_10_ip_reputation.conf",
		"name": "Ip reputation"
	}, {
		"index": "45",
		"id": "modsecurity_slr_45_webshell_backdoors.conf",
		"name": "Webshell backdoors"
	}, {
		"index": "46",
		"id": "modsecurity_slr_46_known_vulns.conf",
		"name": "Known vulns"
	}, {
		"index": "47",
		"id": "modsecurity_crs_47_common_exceptions.conf",
		"name": "Common exceptions"
	}
]