文档

ListJobHistory - 列举任务运行历史

更新时间:
一键部署

列举迁移任务运行历史。

接口说明

  • 列举任务运行历史,您必须有 mgw:ListImportJobHistory 权限。
  • 迁移任务可以运行多轮,每轮运行有一个唯一的执行 ID。
  • 迁移任务运行历史记录了任务的状态变更历史。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

当前API暂无授权信息透出。

请求语法

GET /jobhistory/{jobName} HTTP/1.1 Host: userid.cn-hangzhou.mgw.aliyuncs.com

请求参数

名称类型必填描述示例值
jobNamestring

任务名称。

test_job_name
runtimeIdinteger

任务执行 ID。指定执行 ID,只会 list 该执行 ID 的运行历史。

1
markerstring

设定从该 marker 之后列举任务运行历史。
默认值:无

test_marker
countinteger

指定返回迁移任务历史的数量。
取值:大于 0 小于等于 1000
默认值:1000

100

返回参数

名称类型描述示例值
object

列举任务历史响应体。

JobHistoryListListJobHistoryResp

列举任务历史列表。

示例

正常返回示例

JSON格式

{
  "JobHistoryList": {
    "Truncated": "true",
    "NextMarker": "test_next_marker",
    "JobHistory": [
      {
        "Name": "test_name",
        "JobVersion": "test_id",
        "RuntimeId": "1",
        "CommitId": "2",
        "StartTime": "2024-05-01T12:00:00.000Z",
        "EndTime": "2024-05-01T12:00:00.000Z",
        "Status": "IMPORT_JOB_DOING",
        "TotalCount": 1000,
        "CopiedCount": 900,
        "FailedCount": 100,
        "TotalSize": 1000,
        "CopiedSize": 1000,
        "RuntimeState": "Normal",
        "Message": "test error msg.",
        "Operator": "user",
        "ListStatus": "Listing"
      }
    ]
  }
}

XML格式

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<JobHistoryList>
  <Truncated>true</Truncated>
  <NextMarker>test_next_marker</NextMarker>
  <JobHistory>
    <Name>test_name</Name>
    <JobVersion>test_id</JobVersion>
    <RuntimeId>1</RuntimeId>
    <CommitId>2</CommitId>
    <StartTime>2024-05-01T12:00:00.000Z</StartTime>
    <EndTime>2024-05-01T12:00:00.000Z</EndTime>
    <Status>IMPORT_JOB_DOING</Status>
    <TotalCount>1000</TotalCount>
    <CopiedCount>900</CopiedCount>
    <FailedCount>100</FailedCount>
    <TotalSize>1000</TotalSize>
    <CopiedSize>1000</CopiedSize>
    <RuntimeState>Normal</RuntimeState>
    <Message>test error msg.</Message>
    <Operator>user</Operator>
    <ListStatus>Listing</ListStatus>
  </JobHistory>
</JobHistoryList>

错误码

访问错误中心查看更多错误码。