Queries the logs of a Data Transmission Service (DTS) data migration or synchronization task.

Debugging

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.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeDtsJobLogs

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

DtsJobId String Yes c1yr56py103****

The ID of the data migration or data synchronization task.

PageSize Integer No 20

The number of entries to return on each page. Default value: 20

PageNumber Integer No 1

The number of the page to return. Valid values range from 0 to the maximum value of the Integer data type. This parameter is used together with PageSize. Default value: 1

StartTime Long No 1620896327000

The beginning of the time range to query.

Note
  • To obtain the execution time range of a DTS subtask, you can call DescribePreCheckStatus to query the log information of the subtask.
  • Specify the time in the 13-digit UNIX timestamp format. Unit: milliseconds. You can use a search engine to obtain a UNIX timestamp converter.
EndTime Long No 1620897227000

The end of the time range to query.

Note
  • To obtain the execution time range of a DTS subtask, call DescribePreCheckStatus to query the log information of the subtask.
  • Specify the time in the 13-digit UNIX timestamp format. Unit: milliseconds. You can use a search engine to obtain a UNIX timestamp converter.
Status String No INFO

The log level. Valid values:

  • TRACE: displays all the logs about the behavior of the DTS task.
  • DEBUG: displays the logs needed to diagnose, troubleshoot, or test the DTS task.
  • INFO: displays the logs about the general-purpose behaviors of the DTS task.
  • WARN: displays the logs about unexpected issues that stop specific processes form running.
  • ERROR: displays the logs about severe issues that stop the DTS task from running.
  • FATAL: displays the logs about exceptions.
  • OFF: does not display logs.
Type String No ALL

The type of logs to query. Valid values:

  • ALL: logs of all the log levels.
  • SUMMARY: summary logs.
RegionId String No cn-hangzhou

The region ID of the DTS instance. For more information, see List of supported regions.

Response parameters

Parameter Type Example Description
DynamicCode String 403

The dynamic error code. This parameter will be removed in the future.

DynamicMessage String can not find env: pre

The dynamic part in the error message. This parameter is used to replace the %s variable in the ErrMessage parameter.

Note If the return value of the ErrMessage parameter is The Value of Input Parameter %s is not valid and the return value of the DynamicMessage parameter is Type, the specified Type parameter is invalid.
ErrCode String InternalError

The error code returned if the call failed.

ErrMessage String The request processing has failed due to some unknown error.

The error message returned if the call failed.

HttpStatusCode Integer 200

The HTTP status code.

JobRunningLogs Array of JobRunningLog

The log information about the DTS task.

ContentKey String master.schedule.inc.job.start

The content of the log.

Id Long 4509

The ID recorded in the metadatabase.

JobId String u45q15r310u****

The ID of the DTS task.

LogDatetime Long 1620896327000

The duration of the DTS task. Unit: milliseconds.

Params List asioqejwdnf****

The keyword for parameter arrays.

Status String INFO

The log level. Valid values:

  • TRACE: displays all the logs about the behavior of the DTS task.
  • DEBUG: displays the logs needed to diagnose, troubleshoot, or test the DTS task.
  • INFO: displays the logs about the general-purpose behaviors of the DTS task.
  • WARN: displays the logs about unexpected issues that stop specific processes form running.
  • ERROR: displays the logs about severe issues that stop the DTS task from running.
  • FATAL: displays the logs about exceptions.
  • OFF: does not display logs.
PageNumber Integer 1

The page number of the returned page.

PageRecordCount Integer 20

The maximum number of entries that can be displayed on the current page.

RequestId String 300E71E3-F632-5784-B3A5-E10F82DD****

The ID of the request.

Success Boolean true

Indicates whether the request is successful.

TotalRecordCount Long 22

The total number of logs that meet the query conditions.

Examples

Sample requests

http(s)://dts.aliyuncs.com/?Action=DescribeDtsJobLogs
&DtsJobId=c1yr56py103****
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

<DescribeDtsJobLogsResponse>
      <pageNumber>1</pageNumber>
      <jobRunningLogs>
            <contentKey>master.schedule.inc.job.start</contentKey>
            <id>9650139</id>
            <jobId>plpt2*****o933w</jobId>
            <logDatetime>1645428763000</logDatetime>
            <status>INFO</status>
      </jobRunningLogs>
      <jobRunningLogs>
            <contentKey>master.schedule.struct.job.start</contentKey>
            <id>9650132</id>
            <jobId>plpt2*****o933w</jobId>
            <logDatetime>1645428734000</logDatetime>
            <status>INFO</status>
      </jobRunningLogs>
      <jobRunningLogs>
            <contentKey>master.schedule.full.job.start</contentKey>
            <id>9650057</id>
            <jobId>plpt2*****o933w</jobId>
            <logDatetime>1645428500000</logDatetime>
            <status>INFO</status>
      </jobRunningLogs>
      <jobRunningLogs>
            <contentKey>master.schedule.struct.job.start</contentKey>
            <id>9650054</id>
            <jobId>plpt2*****o933w</jobId>
            <logDatetime>1645428471000</logDatetime>
            <status>INFO</status>
      </jobRunningLogs>
      <jobRunningLogs>
            <contentKey>portal.user.purchase.instance.success</contentKey>
            <id>9650036</id>
            <jobId>plpt2*****o933w</jobId>
            <logDatetime>1645428412000</logDatetime>
            <status>INFO</status>
      </jobRunningLogs>
      <jobRunningLogs>
            <contentKey>master.schedule.check.job.start</contentKey>
            <id>9650021</id>
            <jobId>plpt2*****o933w</jobId>
            <logDatetime>1645428362000</logDatetime>
            <status>INFO</status>
      </jobRunningLogs>
      <jobRunningLogs>
            <contentKey>portal.user.start.job.success</contentKey>
            <id>9650020</id>
            <jobId>plpt2*****o933w</jobId>
            <logDatetime>1645428353000</logDatetime>
            <status>INFO</status>
      </jobRunningLogs>
      <jobRunningLogs>
            <contentKey>portal.user.create.job.success</contentKey>
            <id>9650018</id>
            <jobId>plpt2*****o933w</jobId>
            <logDatetime>1645428353000</logDatetime>
            <status>INFO</status>
      </jobRunningLogs>
      <pageRecordCount>20</pageRecordCount>
      <requestId>300E71E3-F632-5784-B3A5-E10F82DD****</requestId>
      <success>true</success>
      <class>com.aliyun.dts.portal.main.openapi.response.DescribeDtsJobLogsResponse</class>
      <httpStatusCode>200</httpStatusCode>
      <totalRecordCount>8</totalRecordCount>
</DescribeDtsJobLogsResponse>

JSON format

{
    "pageNumber": 1,
    "jobRunningLogs": [
        {
            "contentKey": "master.schedule.inc.job.start",
            "id": 9650139,
            "jobId": "plpt2*****o933w",
            "logDatetime": 1645428763000,
            "status": "INFO"
        },
        {
            "contentKey": "master.schedule.struct.job.start",
            "id": 9650132,
            "jobId": "plpt2*****o933w",
            "logDatetime": 1645428734000,
            "status": "INFO"
        },
        {
            "contentKey": "master.schedule.full.job.start",
            "id": 9650057,
            "jobId": "plpt2*****o933w",
            "logDatetime": 1645428500000,
            "status": "INFO"
        },
        {
            "contentKey": "master.schedule.struct.job.start",
            "id": 9650054,
            "jobId": "plpt2*****o933w",
            "logDatetime": 1645428471000,
            "status": "INFO"
        },
        {
            "contentKey": "portal.user.purchase.instance.success",
            "id": 9650036,
            "jobId": "plpt2*****o933w",
            "logDatetime": 1645428412000,
            "status": "INFO"
        },
        {
            "contentKey": "master.schedule.check.job.start",
            "id": 9650021,
            "jobId": "plpt2*****o933w",
            "logDatetime": 1645428362000,
            "status": "INFO"
        },
        {
            "contentKey": "portal.user.start.job.success",
            "id": 9650020,
            "jobId": "plpt2*****o933w",
            "logDatetime": 1645428353000,
            "status": "INFO"
        },
        {
            "contentKey": "portal.user.create.job.success",
            "id": 9650018,
            "jobId": "plpt2*****o933w",
            "logDatetime": 1645428353000,
            "status": "INFO"
        }
    ],
    "pageRecordCount": 20,
    "requestId": "300E71E3-F632-5784-B3A5-E10F82DD****",
    "success": true,
    "class": "com.aliyun.dts.portal.main.openapi.response.DescribeDtsJobLogsResponse",
    "httpStatusCode": 200,
    "totalRecordCount": 8
}

Error codes

For a list of error codes, visit the API Error Center.