WAF Insights does not support automation via our REST API web service. If you are currently using WAF Insights, upgrade your WAF solution to take advantage of our REST API.
Retrieves a list of rate rules. A rate rule determines the maximum number of requests that will be allowed within a given time period.
A request to retrieve all rate rules is described below.
HTTP Method | Request URI |
---|---|
GET |
https://api.edgecast.com/v2/mcc/customers/AccountNumber/waf/v1.0/limit/Rate Rule ID |
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 |
---|---|
Required |
|
Required |
Replace this variable with the system-defined ID of the desired rate rule. Use the Get All Rate Rules endpoint to retrieve a list of rate rules and their IDs. |
This endpointIdentifies a request's connection point to our REST API service. only takes advantage of common request headers.
Request body parameters are not required by this endpoint.
The response to the above request includes an HTTP status code, response headers, and a response body.
A status code indicates whether the request was successfully performed.
The response for this endpoint only includes standard HTTP response headers.
The response body for a successful request contains the following response elements:
Name | Data Type | Description |
---|---|---|
Array Objects |
Contains the set of condition groups associated with a rule. |
|
customer_id |
String |
Identifies your account by its customer account number. |
disabled |
Boolean |
Indicates whether this rate rule will be enforced. Valid values are:
|
Integer |
Indicates the length, in seconds, of the rolling window that tracks the number of requests eligible for rate limiting. The rate limit formula is calculated through the num and duration_sec properties as indicated below. num requests per duration_sec
Valid values are: 1 | 5 | 10 | 30 | 60 | 120 | 300
|
|
id |
String |
Indicates the system-defined ID for the rate rule. |
keys |
Array String values |
Indicates the method by requests will be grouped for the purposes of this rate rule. Valid values are:
|
last_modified_by |
String |
Reserved for future use. |
last_modified_date |
String |
Indicates the timestamp at which this rate rule was last modified. Syntax: YYYY-MM-DDThh:mm:ss:ffffffZ
|
name |
String |
Indicates the name of the rate rule. |
Integer |
Indicates the rate limit value. This value identifies the number of requests that will trigger rate limiting. The rate limit formula is calculated through the num and duration_sec properties as indicated below. num requests per duration_sec
|
|
version |
Integer |
Reserved for future use. |
The condition_groups array describes each condition group using the following properties:
Name | Data Type | Description |
---|---|---|
conditions |
Array Objects |
Contains a list of match conditions. This array describes each condition within a condition group using the following properties: target Object The target object describes the type of match condition. op Object The op object contains the match condition's properties. |
id |
String |
Indicates the system-defined alphanumeric ID of a condition group. Example: abcDEFgh
|
name |
String |
Indicates the name of a condition group. |
The target object describes the type of match condition using the following properties:
Name | Data Type | Description |
---|---|---|
type |
String |
Determines how requests will be identified. Valid values are: FILE_EXT | GEOIdentifies the country from which the request originated by its 2 character country code. | REMOTE_ADDR | REMOTE_ASN | REQUEST_HEADERS | REQUEST_METHOD | REQUEST_URIRequest URL Path: Match against the request's URL path. Define a URL path that starts directly after the hostname. Exclude the protocol, hostname, and query string when defining this property.
|
value |
String |
type: REQUEST_HEADERS Only Indicates the name of the request header through which requests will be identified. Valid values are: Host | Referer | User-Agent
|
The op object describes each match condition using the following properties:
Name | Data Type | Description |
---|---|---|
is_case_insensitive |
Boolean |
Indicates whether the comparison between the requestThe attribute (e.g., hostname, URL path, IP address, etc.) of the request that will be compared is determined by the variable array. and the values property is case-sensitive. Valid values are:
|
is_negated |
Boolean |
Indicates whether this match condition will be satisfied when the requestThe attribute (e.g., hostname, URL path, IP address, etc.) of the request that will be compared is determined by the variable array. matches or does not match the value defined by the values property. Valid values are:
|
type |
String |
Indicates how the system will interpret the comparison between the requestThe attribute (e.g., hostname, URL path, IP address, etc.) of the request that will be compared is determined by the variable array. and the values property. Valid values are:
|
value |
String |
type: RX Only Identifies a regular expression used to identify requests that are eligible for rate limiting. |
values |
Array String values |
type: EM and IPMATCH Only Identifies one or more values used to identify requests that are eligible for rate limiting. If you are matching requests by IP address, make sure to use standard IPv4 and CIDR notation. |
The response body for an unsuccessful request may contain an error element that provides additional information.
A sample JSON request is shown below.
GET https://api.edgecast.com/v2/mcc/customers/0001/waf/v1.0/limit/vTma2xvK HTTP/1.1
Authorization: TOK:12345678-1234-1234-1234-1234567890ab
Accept: application/json
Content-Type: application/json
Host: api.edgecast.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: 164
{ "customer_id": "0001", "duration_sec": 5, "id": "vTma2xvK", "last_modified_date": "2020-05-30T00:50:12.868998Z", "name": "My Rate Limit", "num": 10 }