Help Center> Data Security Center> API Reference> API Description> Static Data Masking> Querying the Data Masking Task Execution List
Updated on 2024-05-27 GMT+08:00

Querying the Data Masking Task Execution List

Function

This API is used to query the data masking task execution list.

URI

GET /v1/{project_id}/sdg/server/mask/dbs/templates/{template_id}/tasks

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

template_id

Yes

String

Template ID

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

workspace_id

No

String

Workspace ID

offset

No

Integer

Page number

limit

No

Integer

Page limit

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

tasks

Array of DBMaskTaskInfo objects

Masking task list

total

Integer

Total number of masking tasks

Table 4 DBMaskTaskInfo

Parameter

Type

Description

db_type

String

Database type

end_time

Long

Task end time

execute_line

Integer

Number of executed rows

id

String

Task ID

progress

Integer

Progress

run_status

String

Task status

start_time

Long

Task start time

task_template_id

String

Task template ID

type

String

Task type

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error Code

error_msg

String

Error Message

Example Requests

Query the list of executed data masking tasks.

GET /v1/{project_id}/sdg/server/mask/dbs/templates/{template_id}/tasks

Example Responses

Status code: 200

OK

{
  "tasks" : [ {
    "db_type" : "MySQL",
    "end_time" : 1658717568622,
    "execute_line" : 100000,
    "id" : "xxxxxxxxxxxx",
    "progress" : 100,
    "run_status" : "FINISHED",
    "start_time" : 1658717544469,
    "task_template_id" : "xxxxxxxxxxxx",
    "type" : "MANUAL"
  } ],
  "total" : 1
}

Status code: 400

Invalid request

{
  "error_code" : "dsc.40000011",
  "error_msg" : "Invalid parameter"
}

Status Codes

Status Code

Description

200

OK

400

Invalid request

Error Codes

See Error Codes.