All Products
Search
Document Center

Data Management:ListDBTaskSQLJob

Last Updated:Oct 21, 2024

Queries a list of SQL tasks.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
DBTaskGroupIdlongYes

The ID of the SQL task group. You can call the GetStructSyncJobDetail operation to obtain this parameter.

1324235
PageNumberlongNo

The number of the page to return.

1
PageSizelongNo

The number of entries to return on each page.

20
TidlongNo

The ID of the tenant.

Note : To view the ID of the tenant, log on to the Data Management (DMS) console and move the pointer over the profile picture in the upper-right corner. For more information, see Manage DMS tenants.
1

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The ID of the request.

F6C47680-8D2D-43A4-8902-F2740D71A398
Successboolean

Indicates whether the request is successful.

true
ErrorMessagestring

The error message returned if the request failed.

UnknownError
ErrorCodestring

The error code returned if the request failed.

UnknownError
DBTaskSQLJobListarray<object>

The list of the SQL tasks.

DBTaskSQLJobobject

The SQL task.

JobIdlong

The ID of the SQL task.

123435
JobTypestring

The type of the SQL task.

STRUCT_SYNC
Commentstring

The description of the SQL task.

test
DbSearchNamestring

The name that is used to search for the database.

test@xxx:3306【test】
DbIdlong

The ID of the database.

43214523
Logicboolean

Indicates whether the database is a logical database. Valid values:

  • true: The database is a logical database.
  • false: The database is a logical database.
false
CreateTimestring

The time when the SQL task was created.

2021-02-18 17:49:20
LastExecTimestring

The time when the SQL task was last executed.

2021-02-18 17:49:31
DbTaskGroupIdlong

The ID of the SQL task group.

4324132
Statusstring

The state of the SQL task. Valid values:

  • INIT: The SQL task was initialized.
  • PENDING: The SQL task waited to be run.
  • BE_SCHEDULED: The SQL task waited to be scheduled.
  • FAIL: The SQL task failed.
  • SUCCESS: The SQL task was successful.
  • PAUSE: The SQL task was paused.
  • DELETE: The SQL task was deleted.
  • RUNNING: The SQL task was being run.
SUCCESS
Transactionalboolean

Indicates whether the SQL task is executed as a transaction. Valid values:

  • true: The SQL task is executed as a transaction.
  • false: The SQL task is not executed as a transaction.
false
TotalCountlong

The total number of the SQL tasks.

1

Examples

Sample success responses

JSONformat

{
  "RequestId": "F6C47680-8D2D-43A4-8902-F2740D71A398",
  "Success": true,
  "ErrorMessage": "UnknownError",
  "ErrorCode": "UnknownError",
  "DBTaskSQLJobList": [
    {
      "JobId": 123435,
      "JobType": "STRUCT_SYNC",
      "Comment": "test",
      "DbSearchName": "test@xxx:3306【test】",
      "DbId": 43214523,
      "Logic": false,
      "CreateTime": "2021-02-18 17:49:20",
      "LastExecTime": "2021-02-18 17:49:31",
      "DbTaskGroupId": 4324132,
      "Status": "SUCCESS",
      "Transactional": false
    }
  ],
  "TotalCount": 1
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history