Updated on 2026-01-13 GMT+08:00

Creating a Watermark Embedding Task

Function

This API is used to create a watermark embedding task.

Calling Method

For details, see Calling APIs.

URI

POST /v1/{project_id}/data-watermark-embed-tasks

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

db_water_param

No

DbWatermarkParam object

Database watermarking parameters.

schedule_switch

No

Boolean

Scheduling switch.

schedule_type

No

String

Scheduling type.

selected_fields

No

Array of ColumnInfo objects

List of selected fields.

source_db_info

No

DbInfo object

Source database information.

start_now

No

Boolean

Whether to start immediately.

start_time

No

Long

Start time.

target_db_info

No

DbInfo object

Information about the target database.

task_name

No

String

Task name.

water_mark

No

String

Watermark content.

watermark_describe

No

String

Watermark description.

watermark_version

No

String

Watermark version.

Table 3 DbWatermarkParam

Parameter

Mandatory

Type

Description

embed_mode

No

String

Embedding mode.

params

No

Array of EmbedParam objects

Embedding parameter list.

row_spacing

No

String

Line spacing.

watermark_key

No

String

Watermark key.

Table 4 EmbedParam

Parameter

Mandatory

Type

Description

fake_param

No

FakeParam object

Simulation parameter configuration.

fake_strategy

No

String

Simulation data generation policy.

new_column_name

No

String

New field name.

new_column_type

No

String

New field type.

Table 5 FakeParam

Parameter

Mandatory

Type

Description

address_accuracy

No

String

Address precision.

date_begin

No

String

Start date range.

date_end

No

String

End date range.

random_accuracy

No

Integer

Random precision.

random_begin

No

String

Start of the random range.

random_distribute

No

String

Random distribution mode.

random_end

No

String

End of the random range.

string_distribute

No

String

String distribution mode.

Table 6 ColumnInfo

Parameter

Mandatory

Type

Description

column_name

No

String

Field name.

column_type

No

String

Field type.

Table 7 DbInfo

Parameter

Mandatory

Type

Description

db_id

No

String

Database ID.

db_name

No

String

Database name.

db_type

No

String

Database type.

ins_id

No

String

Instance ID.

ins_name

No

String

Instance name.

schema_name

No

String

Database schema name.

table_name

No

String

Table name.

Response Parameters

Status code: 200

Table 8 Response body parameters

Parameter

Type

Description

id

String

Task ID.

msg

String

Message description.

status

String

Status.

Status code: 201

Task created.

Example Requests

POST /v1/{project_id}/data-watermark-embed-tasks

{
  "db_water_param" : {
    "params" : [ {
      "new_column_name" : "test",
      "new_column_type" : "varchar",
      "fake_strategy" : "cid",
      "fake_param" : { }
    } ],
    "embed_mode" : "EMBED_FAKE_COLUMN",
    "watermark_key" : "0c3039178b80d36e2fd0c009a6bd4f05"
  },
  "schedule_switch" : true,
  "schedule_type" : "ONCE",
  "source_db_info" : {
    "db_type" : "MySQL",
    "ins_id" : "99a4a5c2904e4028bf4619f3a1e4a2dbin01",
    "ins_name" : "rds-test",
    "db_name" : "test_db",
    "db_id" : "6fd23d4b28c247588641f3304bfa8f8a",
    "table_name" : "person_info"
  },
  "start_now" : true,
  "start_time" : 0,
  "target_db_info" : {
    "db_type" : "MySQL",
    "ins_id" : "99a4a5c2904e4028bf4619f3a1e4a2dbin01",
    "ins_name" : "test_db",
    "db_id" : "6fd23d4b28c247588641f3304bfa8f8a",
    "db_name" : "test_db",
    "table_name" : "fake_info"
  },
  "task_name" : "test",
  "water_mark" : "HWTest",
  "watermark_version" : "V2"
}

Example Responses

None

Status Codes

Status Code

Description

200

Created.

201

Task created.

401

Unauthorized.

403

Access denied.

404

Project not found.

Error Codes

See Error Codes.