• Web Application Firewall

waf
  1. Help Center
  2. Web Application Firewall
  3. API Reference
  4. APIs
  5. Web Tamper Protection Rules
  6. Adding a Web Tamper Protection Rule

Adding a Web Tamper Protection Rule

Function Description

This API is used to add a web tamper protection rule.

URI

  • URI format

    POST /v1/{project_id}/waf/policy/{policy_id}/antitamper

  • Parameter description
    Table 1 Path parameters

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Specifies the project ID.

    policy_id

    Yes

    String

    Specifies the policy ID.

Request

Request parameters
Table 2 Parameter description

Parameter

Mandatory

Type

Description

hostname

Yes

String

Specifies the domain name.

url

Yes

String

Specifies the URL protected by the web tamper protection rule, excluding a domain name.

Response

Response parameters
Table 3 Parameter description

Parameter

Type

Description

id

String

Specifies the ID of a web tamper protection rule.

policyid

String

Specifies the policy ID.

hostname

String

Specifies the domain name.

url

String

Specifies the URL protected by the web tamper protection rule, excluding a domain name.

timestamp

Long

Specifies the time when the cache is refreshed.

Examples

Domain name www.abc.com is used as an example.

  • Request example
    {
      "hostname": "www.abc.com",
      "url": "/a"
    }
  • Response example
    {
          "id": "3a9b5c0f96784ec8abd8ba61a98064ef",
          "policyid": "yuc0e55865544d1f8c95cf71df108c6b",
          "hostname": "www.abc.com",
          "url": "/a",
          "timestamp": 1499817600
    }

Status Code

Table 4 describes the normal status code returned by the API.
Table 4 Status code

Status Code

Description

Meaning

200

OK

The request has succeeded.

For details about error status codes, see Status Codes.