Querying a Privacy Data Masking Rule
Function
This API is used to query a privacy data masking rule.
Calling Method
For details, see Calling APIs.
URI
GET /v1/{project_id}/{instance_id}/dbss/audit/sensitive/masks
|
Parameter |
Mandatory |
Parameter Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. |
|
instance_id |
Yes |
String |
Instance ID. You can obtain the value from the ID field in the API for querying the instance list. |
|
Parameter |
Mandatory |
Parameter Type |
Description |
|---|---|---|---|
|
offset |
No |
String |
Offset |
|
limit |
No |
String |
Number of query records. |
Request Parameter
|
Parameter |
Mandatory |
Parameter Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
User token. The token can be queried by calling the IAM API. (The token is the value of X-Subject-Token in the response header.) |
Response Parameters
Status code: 200
|
Parameter |
Parameter Type |
Description |
|---|---|---|
|
rules |
Array of rules objects |
Rules |
|
total |
Integer |
Total number |
|
Parameter |
Parameter Type |
Description |
|---|---|---|
|
id |
String |
Rule ID |
|
name |
String |
Rule name. |
|
type |
String |
Rule types. The value can be:
|
|
regex |
String |
Regular expression |
|
mask_value |
String |
Substitution value |
|
status |
String |
Rule status |
|
operate_time |
String |
Operation time |
Status code: 400
|
Parameter |
Parameter Type |
Description |
|---|---|---|
|
error |
Object |
Error message. |
|
Parameter |
Parameter Type |
Description |
|---|---|---|
|
error_code |
String |
Error code |
|
error_msg |
String |
Error message |
Status code: 403
|
Parameter |
Parameter Type |
Description |
|---|---|---|
|
error |
Object |
Error message. |
|
Parameter |
Parameter Type |
Description |
|---|---|---|
|
error_code |
String |
Error code |
|
error_msg |
String |
Error message |
Status code: 500
|
Parameter |
Parameter Type |
Description |
|---|---|---|
|
error |
Object |
Error message. |
|
Parameter |
Parameter Type |
Description |
|---|---|---|
|
error_code |
String |
Error code |
|
error_msg |
String |
Error message |
Example Request
/v1/{project_id}/{instance_id}/dbss/audit/sensitive/masks
Example Response
Status code: 200
Execution succeeded.
{
"rules" : [ {
"id" : "n34W2ngBo47GiyUSKOVl",
"name" : "Passport NO.",
"type" : "BUILD_IN",
"regex" : "-",
"mask_value" : "###",
"status" : "ON",
"operate_time" : "2030-01-01 00:00:06"
}, {
"id" : "nn4W2ngBo47GiyUSKOVP",
"name" : "Military officer card NO.",
"type" : "BUILD_IN",
"regex" : "-",
"mask_value" : "###",
"status" : "ON",
"operate_time" : "2030-01-01 00:00:05"
}, {
"id" : "nX4W2ngBo47GiyUSKOU9",
"name" : "Ethnicity",
"type" : "BUILD_IN",
"regex" : "-",
"mask_value" : "###",
"status" : "ON",
"operate_time" : "2030-01-01 00:00:04"
}, {
"id" : "mn4W2ngBo47GiyUSKOUO",
"name" : "GPS Information",
"type" : "BUILD_IN",
"regex" : "-",
"mask_value" : "###",
"status" : "ON",
"operate_time" : "2030-01-01 00:00:01"
} ],
"total" : 6
}
Status code: 400
Incorrect request parameter.
{
"error" : {
"error_code" : "DBSS.XXXX",
"error_msg" : "XXX"
}
}
Status code: 500
Internal server error.
{
"error" : {
"error_code" : "DBSS.XXXX",
"error_msg" : "XXX"
}
}
Status Code
|
Status Code |
Description |
|---|---|
|
200 |
Request succeeded. |
|
400 |
Incorrect request parameter. |
|
403 |
Authentication failed. |
|
500 |
Internal Server Error |
Error Code
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.