Call the ListDBTaskSQLJob to obtain the list of SQL tasks.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.


Parameter Type Required Example Description
Action String Yes ListDBTaskSQLJob

The operation that you want to perform. Set the value to ListDBTaskSQLJob.

DBTaskGroupId Long Yes 1324235

SQL task grouping ID, you can call GetStructSyncJobDetail The interface obtains the parameter.

PageNumber Long No 1

Which pages.

PageSize Long No 20

The amount of data per page.

Tid Long No 1

The tenant ID.

Note Take the tenant ID information displayed in the upper right corner of the system. For details, see View tenant information .
RegionId String No cn-hangzhou

Select the service region of DMS to call the interface. For the value, see RegionID parameter description .

Note Please select nearby according to the application location.

Return data

Parameter Type Example Description
RequestId String F6C47680-8D2D-43A4-8902-F2740D71A398

The request ID.

Success Boolean true

Whether the request is successful.

ErrorMessage String UnknownError

Error message.

ErrorCode String UnknownError

Error code.

DBTaskSQLJobList Array of DBTaskSQLJob

The list of SQL tasks.

JobId Long 123435

The SQL task ID.

JobType String STRUCT_SYNC

The SQL task type.

Comment String test

The SQL task remark information.

DbSearchName String test@xxx:3306

The library search name.

DbId Long 43214523

The Library ID.

Logic Boolean false

Whether it is a logical Library. Value:

  • true : Yes
  • false : No
CreateTime String 2021-02-18 17:49:20

The creation time.

LastExecTime String 2021-02-18 17:49:31

The last execution time.

DbTaskGroupId Long 4324132

The SQL task grouping ID.

Status String SUCCESS

SQL details status. Valid values:

  • INIT : Initialization status
  • PENDING : Waiting for task crawl
  • BE_SCHEDULED : to be scheduled
  • FAIL : execution failed
  • SUCCESS : execution succeeded
  • PAUSE : Pause
  • DELETE : delete
  • RUNNING : Executing
Transactional Boolean false

Whether to execute as a transaction, value:

  • true : Yes
  • false : No
TotalCount Long 1

The total number of SQL task lists.


Sample requests

     http(s):// DBTaskGroupId=1324235 &PageNumber=1 &PageSize=20 &Tid=1&Public request parameters 

Sample success responses

XML Format

     HTTP/1.1 200 OK Content-Type:application/xml <ListDBTaskSQLJobResponse> <DBTaskSQLJobList> <Status>SUCCESS</Status> <Comment> The first task of structure synchronization [2100000], the task number is: 200000</Comment> <LastExecTime>2021-03-04 16:58:56</LastExecTime> <DbSearchName></DbSearchName> <JobType>STRUCT_SYNC</JobType> <CreateTime>2021-03-04 16:58:55</CreateTime> <DbTaskGroupId>3000000</DbTaskGroupId> <DbId>7000003</DbId> <Logic>false</Logic> <JobId>3000000</JobId> <Transactional>false</Transactional> </DBTaskSQLJobList> <TotalCount>1</TotalCount> <RequestId> </RequestId> </RequestId> <<<Success>true</Success> </ListDBTaskSQLJobResponse> 

JSON Format

     HTTP/1.1 200 OK Content-Type:application/json { "DBTaskSQLJobList" : [ { "Status" : "SUCCESS", "Comment" : "The first task of structure synchronization [2100000], the task number is: 200000", "LastExecTime" : "2021-03-04 16:58:56", "DbSearchName" : "", "JobType" : "STRUCT_SYNC", "CreateTime" : "2021-03-04 16:58:55", "DbTaskGroupId" : 300000, "DbId": 700003, "Logic" : false, "JobId" : 300000, "Transactional" : false } ], "TotalCount" : 1, "RequestId" : "String", "Success" : true} 

Error code

Access Error Center See more error codes.