Help Center/ Data Security Center/ API Reference/ API Description/ Static Data Masking/ Obtaining the Mapping Between Fields and Algorithms
Updated on 2026-01-13 GMT+08:00

Obtaining the Mapping Between Fields and Algorithms

Function

This API is used to query the mapping between fields and algorithms based on the database type.

Calling Method

For details, see Calling APIs.

URI

POST /v1/{project_id}/sdg/server/mask/algorithms/field-algorithms-mappings

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Unique project ID.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

db_type

No

String

Database type, which can be MySQL, PostgreSQL, Hbase, openGauss, Oracle, SQLServer, MongoDB, DWS, Kingbase, GreenPlum, DMDBMS, Hive, TDSQL, HIVE_ONLY, DLI, Elasticsearch, MRS_HIVE, or OBS.

fields

No

Array of strings

Defines the list of fields to be masked.

rule_fields

No

Array of strings

Defines the scan rule of the field.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

field_algorithms

Array of FieldAlgorithms objects

Defines the list of masking algorithms of the field.

rule_algorithms

Array of RuleMaskAlgorithm objects

Defines the list of masking algorithms of the rule.

Table 4 FieldAlgorithms

Parameter

Type

Description

algorithm_types

Array of strings

Defines the list of supported masking algorithms, including MASK_BY_HASH, MASK_BY_ENCRYPT, MASK_BY_OVERWRITE, MASK_BY_KEYWO RDS _EXCHANGE, MASK_BY_NULL, and MASK_BY.

algorithms

Array of strings

Defines the list of supported masking algorithm identifiers, including SHA256, SHA512, PRESNM, MASKNM, PRESXY, MASKXY, SYMBOL, KEYWORD, NULL, EMPTY, DATE, NUMERIC, AES, EMBED, SM4, and DECRYPT.

field

String

Name of the field to be masked.

Table 5 RuleMaskAlgorithm

Parameter

Type

Description

algorithm_type

String

Defines the type of the masking algorithm, including MASK_BY_HASH, MASK_BY_ENCRYPT, MASK_BY_OVERWRITE, MASK_BY_KEYWO RDS _EXCHANGE, MASK_BY_NULL, and MASK_BY.

algorithm_id

String

Unique ID of the masking algorithm.

rule_id

String

Unique ID of the masking rule.

Status code: 201

Resource creation.

Example Requests

POST /v1/{project_id}/sdg/server/mask/algorithms/field-algorithms-mappings

{
  "db_type" : "string",
  "fields" : [ "string" ],
  "rule_fields" : [ "string" ]
}

Example Responses

None

Status Codes

Status Code

Description

200

Query result.

201

Resource creation.

401

Unauthorized.

403

Access denied.

404

Resource not found.

Error Codes

See Error Codes.