• Web Application Firewall

waf
  1. Help Center
  2. Web Application Firewall
  3. API Reference
  4. APIs
  5. Data Masking Rules
  6. Updating a Data Masking Rule

Updating a Data Masking Rule

Function Description

This API is used to update a data masking rule.

URI

  • URI format

    PUT /v1/{project_id}/waf/policy/{policy_id}/privacy/{privacy_rule_id}

  • 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.

    privacy_rule_id

    Yes

    String

    Specifies the ID of a data masking rule.

Request

Request parameters
Table 2 Parameter description

Parameter

Mandatory

Type

Description

url

Yes

String

Specifies the URL to which the data masking rule applies (exact match by default).

category

Yes

String

Specifies the masked field. The options are params and header.

index

Yes

String

Specifies the masked subfield.

Response

Response parameters
Table 3 Parameter description

Parameter

Type

Description

id

String

Specifies the ID of a data masking rule.

policyid

String

Specifies the policy ID.

url

String

Specifies the URL to which the data masking rule applies (exact match by default).

category

String

Specifies the masked field. The options are params and header.

index

String

Specifies the masked subfield.

timestamp

Long

Specifies the time when a data masking rule is added.

Examples

  • Request example
    {
      "url": "/login",
      "category": "params",
      "index": "password"
    }
  • Response example
    {
      "id": "e1c0e55865544d1f8c95cf71df108c6b",
      "policyid": "yuc0e55865544d1f8c95cf71df108c6b",
      "url": "/login",
      "category": "params",
      "index": "password",
      "timestamp": 123434534543
    }

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.