Updated on 2024-01-15 GMT+08:00

Querying a Privacy Data Masking Rule

Function

This API is used to query a privacy data masking rule.

URI

GET /v1/{project_id}/{instance_id}/dbss/audit/sensitive/masks

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

instance_id

Yes

String

Instance ID

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

offset

No

String

Offset

limit

No

String

Number of query records

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

rules

Array of rules objects

Rule list

total

Integer

Total

Table 5 rules

Parameter

Type

Description

id

String

Rule ID

name

String

Rule name [default:GPS Information]

type

String

Rule type[default,User-defined]

regex

String

Rule regular expression

mask_value

String

Substitution value

status

String

Rule status[ON,OFF]

operate_time

String

Operation time

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error

Object

Error message.

Table 7 ErrorDetail

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error information.

Status code: 403

Table 8 Response body parameters

Parameter

Type

Description

error

Object

Error message.

Table 9 ErrorDetail

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error information.

Status code: 500

Table 10 Response body parameters

Parameter

Type

Description

error

Object

Error message.

Table 11 ErrorDetail

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error information.

Example Requests

/v1/{project_id}/{instance_id}/dbss/audit/sensitive/masks

Example Responses

Status code: 200

Success

{
  "rules" : [ {
    "id" : "n34W2ngBo47GiyUSKOVl",
    "name" : "GPS Information",
    "type" : "BUILD_IN",
    "regex" : "-",
    "mask_value" : "###",
    "status" : "ON",
    "operate_time" : "2030-01-01 00:00:06"
  } ]
}

Status code: 400

Invalid parameter.

{
  "error" : {
    "error_code" : "DBSS.XXXX",
    "error_msg" : "XXX"
  }
}

Status code: 500

Internal server error.

{
  "error" : {
    "error_code" : "DBSS.XXXX",
    "error_msg" : "XXX"
  }
}

Status Codes

Status Code

Description

200

Success

400

Invalid parameter.

403

Authentication failed.

500

Internal server error.

Error Codes

See Error Codes.