查询指定实例的任务列表。

通过指定的实例ID查看实例的所有异步任务。

只返回当前正在进行中的任务,已完成的历史任务无法查询。

调试

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

请求头

该接口使用公共请求头,无特殊请求头。请参见公共请求参数文档。

请求语法

GET /v2/openapi/instances/[instanceId]/tasks HTTP/1.1

请求参数

名称 类型 位置 是否必选 示例值 描述
instanceId String Path airec-cn-o400whm78004

实例ID。

返回数据

名称 类型 示例值 描述
code String InternalServerError

错误码

message String An internal server error occurred

错误详情

result Array of result

实例任务进度

name String DATA_IMPORT

数据导入中

subProgressInfos Array of subProgressInfos

子任务具体进度信息列表

detail String data import progress info

子任务具体描述

finishedNum Integer 11

已经完成的子任务数量

progress Integer 100

子任务完成进度

totalNum Integer 11

子任务一共的任务数量

type String DATA_PROCESS

子任务类型

totalProgress Integer 100

当前任务整体进度比例

requestId String 8F81A922-6C81-46D6-B78C-CC35E16B1691

请求id

示例

请求示例

GET /openapi/instances/airec-cn-xxxxxx/tasks

正常返回示例

XML格式

<RequestId>B352FBD9-4643-441E-80ED-699D47D7B6A3</RequestId>
<Result>
    <Name>DATA_IMPORT</Name>
    <TotalProgress>100</TotalProgress>
    <CurProgress>DATA_IMPORT</CurProgress>
    <SubProgressInfos>
        <Type>DATA_IMPORT</Type>
        <Progress>100</Progress>
        <Detail> data import progress info</Detail>
        <TotalNum>11</TotalNum>
        <FinishedNum>11</FinishedNum>
    </SubProgressInfos>
</Result>
<Result>
    <Name>AUTO_CREATE</Name>
    <TotalProgress>100</TotalProgress>
    <CurProgress>ASSIST_SERVICE</CurProgress>
    <SubProgressInfos>
        <Type>DATA_PROCESS</Type>
        <Progress>100</Progress>
        <Detail> data processing progress info</Detail>
        <TotalNum>3</TotalNum>
        <FinishedNum>3</FinishedNum>
    </SubProgressInfos>
    <SubProgressInfos>
        <Type>OFFLINE_SERVICE</Type>
        <Progress>100</Progress>
        <Detail>offline service building progress info</Detail>
        <TotalNum>19</TotalNum>
        <FinishedNum>19</FinishedNum>
    </SubProgressInfos>
    <SubProgressInfos>
        <Type>SEARCH_ENGINE</Type>
        <Progress>100</Progress>
        <Detail>search engine building progress info</Detail>
    </SubProgressInfos>
    <SubProgressInfos>
        <Type>ONLINE_SERVICE</Type>
        <Progress>100</Progress>
        <Detail>online service building progress info</Detail>
    </SubProgressInfos>
    <SubProgressInfos>
        <Type>ASSIST_SERVICE</Type>
        <Progress>100</Progress>
        <Detail>assist service building progress info</Detail>
        <TotalNum>2</TotalNum>
        <FinishedNum>2</FinishedNum>
    </SubProgressInfos>
</Result>

JSON格式

{
    "RequestId": "B352FBD9-4643-441E-80ED-699D47D7B6A3",
    "Result": [
        {
            "Name": "DATA_IMPORT",
            "TotalProgress": 100,
            "CurProgress": "DATA_IMPORT",
            "SubProgressInfos": {
                "Type": "DATA_IMPORT",
                "Progress": 100,
                "Detail": "data import progress info",
                "TotalNum": 11,
                "FinishedNum": 11
            }
        },
        {
            "Name": "AUTO_CREATE",
            "TotalProgress": 100,
            "CurProgress": "ASSIST_SERVICE",
            "SubProgressInfos": [
                {
                    "Type": "DATA_PROCESS",
                    "Progress": 100,
                    "Detail": "data processing progress info",
                    "TotalNum": 3,
                    "FinishedNum": 3
                },
                {
                    "Type": "OFFLINE_SERVICE",
                    "Progress": 100,
                    "Detail": "offline service building progress info",
                    "TotalNum": 19,
                    "FinishedNum": 19
                },
                {
                    "Type": "SEARCH_ENGINE",
                    "Progress": 100,
                    "Detail": "search engine building progress info"
                },
                {
                    "Type": "ONLINE_SERVICE",
                    "Progress": 100,
                    "Detail": "online service building progress info"
                },
                {
                    "Type": "ASSIST_SERVICE",
                    "Progress": 100,
                    "Detail": "assist service building progress info",
                    "TotalNum": 2,
                    "FinishedNum": 2
                }
            ]
        }
    ]
}

错误码

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