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. Valid values: 1 to 200. Default value: 20.

Note The value cannot be 0.
PageNumber Integer No 1

The number of the page to return. Pages start from page 1. Default value: 1. This parameter is used together with PageSize.

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, 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.
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
HttpStatusCode Integer 200

The HTTP status code.

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

The ID of the request.

ErrCode String InternalError

The error code returned if the request failed.

PageRecordCount Integer 20

The number of entries returned per page.

Success Boolean true

Indicates whether the request was successful.

TotalRecordCount Long 22

The total number of logs that meet the query conditions.

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

The error message returned if the request failed.

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.
PageNumber Integer 1

The page number of the returned page.

DynamicCode String 403

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

JobRunningLogs Array of JobRunningLog

The log information about the DTS task.

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 from 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.
LogDatetime Long 1620896327000

The duration of the DTS task. Unit: milliseconds.

ContentKey String master.schedule.inc.job.start

The content of the log.

JobId String u45q15r310u****

The ID of the DTS task.

Id Long 4509

The ID recorded in the metadatabase.

Params Array of String asioqejwdnf****

The keyword for parameter arrays.

Examples

Sample requests

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

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<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

HTTP/1.1 200 OK
Content-Type:application/json

{
  "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

HTTP status code Error code Error message Description
400 Throttling.User Request was denied due to user flow control. The error message returned because the number of requests exceeds the limit and the request is rejected. Try again later.
403 InvalidSecurityToken.Expired Specified SecurityToken is expired. The error message returned because the signature expired. Use a new signature.
500 ServiceUnavailable The request has failed due to a temporary failure of the server. The error message returned because the response of the server timed out or the server was unavailable. Try again. If the error persists, contact technical support.

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