Get Sensitive Field Masking Rule Details¶
GET /api/v1/data_mask_rule/{data_mask_rule_uuid}/get
Overview¶
Reads a single non-deleted masking rule and its role data in the current workspace.
Before You Begin and Usage Steps¶
This read endpoint declares the basic access permission routine.defaultAccess; being able to read rule data does not mean you have permission to modify it.
Use an API Key of the target workspace. This group of configurations queries the independent sensitive rules at the return stage; it does not rewrite the original stored data, does not create fields, and is not a permanent delete/anonymize endpoint.
Read by UUID from the list, including enabled or disabled records; it returns the full saved configuration, adds roles but does not add the list's creatorInfo/updatorInfo. The role list may contain historical non-enabled states and is not used as a validity check before writing back.
Effectiveness also depends on the target query chain, data category, and actual role set; the role configuration is not the data query authorization itself. When the same account/Key has multiple roles with query permission for that category, one of those roles having no applicable sensitive rule may cause this group of rules not to be applied as a whole. Do not assume all readers are forcibly masked just because you bound a single role; verify with the actual role/Key in Query Data and on the target display surface. The current regular expression replacement only handles string values; numbers, objects, arrays, booleans, and null are not automatically converted to strings for masking. The string portion matched by the standard query is replaced with ***, and other text is retained; the saved regex check uses the regex library, while the query execution path uses the standard re, so it is recommended to use only Python standard re-compatible syntax.
Route Parameters¶
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| data_mask_rule_uuid | string | Y | UUID of a non-deleted rule in the current workspace; disabled rules can also be read/modified. Example: wdmk_exampleHow to obtain or fill in: Obtain from content.data[*].uuid in the Masking Rule List response. |
Request Headers¶
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| DF-API-KEY | string | Y | OpenAPI authentication credential of the workspace. Example: <DF-API-KEY>How to obtain or fill in: Obtain from the API Key management of the target workspace an OpenAPI Key with the permission for this operation. |
Request Example¶
curl --get 'https://openapi.guance.com/api/v1/data_mask_rule/wdmk_example/get' \
-H 'DF-API-KEY: <DF-API-KEY>'
Response¶
HTTP 200, application/json. The example below shows the main fields that can be read directly.
| Field | Type | Description |
|---|---|---|
| content.id | integer | Record number, not used for addressing. |
| content.uuid | string | wdmk_ rule UUID, used for details, modification, and batch actions. |
| content.workspaceUUID | string | The workspace it belongs to. |
| content.name | string | Rule name; this endpoint does not check for duplicate names. |
| content.type | string | Data category, which determines the applicable namespace. |
| content.field | string | Raw field configuration text, comma-separated; consumers do not automatically trim leading and trailing spaces of each item. |
| content.reExpr | string | The saved regular expression, excluding custom replacement text. |
| content.roleUUIDs | array<string> | Applicable role UUIDs; [] does not mean all roles. |
| content.roleUUIDs[*] | string | One role UUID, which may be a system role identifier or a custom role_ UUID. |
| content.status | integer | 0 enabled, 2 disabled, 3 deleted; list/details exclude 3 and retain 2. |
| content.creator | string | Creating identity, which may be a Key UUID. |
| content.updator | string | Updating identity; an empty string if not yet updated. |
| content.createAt | integer | Creation time in Unix seconds. |
| content.updateAt | integer | Update time in Unix seconds; may be -1 if not updated. |
| content.deleteAt | integer | Deletion time in Unix seconds; -1 if not deleted. |
| content.roles | array<object> | Role data supplement for lists/details; only roles that can be found within the visible scope, may include historical deleted/disabled states, and the count is not guaranteed to match roleUUIDs. |
| content.roles[*].uuid | string | Role UUID. |
| content.roles[*].name | string or null | Role display name. |
| content.roles[*].status | integer or null | Current role status, subject to the actual record. |
| content.declaration | object or null | The workspace public declaration attached to a non-empty business object; may be null or an empty object when not configured; empty objects are not added. The exact position in pagination is subject to the structure of this page. |
{
"code": 200,
"content": {
"id": 10,
"uuid": "wdmk_example",
"workspaceUUID": "wksp_example",
"name": "验证码脱敏",
"type": "logging",
"field": "message",
"reExpr": "(?<=验证码=)[0-9]{6}",
"roleUUIDs": [
"role_example"
],
"status": 0,
"creator": "wsak_example",
"updator": "",
"createAt": 1785427200,
"updateAt": -1,
"deleteAt": -1,
"roles": [
{
"uuid": "role_example",
"name": "自定义只读角色",
"status": 0
}
],
"declaration": {}
},
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-EXAMPLE"
}
Error Response¶
For authentication, rate limiting, and common request errors, see Common Error Definitions.
| HTTP Status | errorCode | Trigger Condition | Message or Response Description | Handling |
|---|---|---|---|---|
| 404 | ft.ObjectNotExists | The target UUID does not belong to the current workspace, does not exist, or has been deleted | The specified object does not exist | Obtain a valid UUID from the current workspace list; disabled rules can still be read. |
| 500 | ft.InternalServerError | Rule reading, historical role data, or response formatting failed | Internal error | Keep the traceId, verify the configuration, and read again. |