Updated on 2025-08-28 GMT+08:00

Querying an Asynchronous Task

Function

Query details about an asynchronous task.

URI

POST /koodrive/ose/v1/share/taskDetail

Request Parameters

Table 1 Request header parameters

Parameter

Mandatory

Type

Description

Authorization

Yes

String

Access token. Token authentication is used to call KooDrive APIs. A token indicates the permission. When an API is called, the token is added to the request header to obtain the operation permission. For details about how to obtain an access token, see the corresponding developer guide. The format is Bearer+{access_token}.

X-Traceid

No

String

Service trace ID, which contains 58 bits.

X-User-Id

Yes

String

User ID, which is used for app authentication.

X-Date

Yes

String

Date, which is used for app authentication.

Host

Yes

String

Address, which is used for app authentication.

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

taskId

Yes

String

Task ID.

shareId

Yes

String

Sharing ID.

kdstoken

No

String

token

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

code

Integer

Response code.

msg

String

Response information.

jobInfo

JobInfo object

Work information.

taskInfos

TaskInfo object

Task information.

Table 4 JobInfo

Parameter

Type

Description

userId

String

User ID.

taskId

String

Task ID.

taskType

Integer

Task type.

taskStatus

Integer

Task status. 0: to be processed; 1: being processed; 2: completed; 3: canceled.

taskResultCode

Integer

Task result. 1: all succeeded; 2: partially failed; 3: all failed.

createTime

String

Task creation time. The value is a 14-digit timestamp in yyyyMMddHHmmss format.

startTime

String

Task start time. The value is a 14-digit timestamp in yyyyMMddHHmmss format.

endTime

String

Task end time. The value is a 14-digit timestamp in yyyyMMddHHmmss format.

progress

Integer

Task progress, in percentage. For example, if the progress is 70%, the returned value is 70.

downloadUrl

String

Download link of the compressed package.

Table 5 TaskInfo

Parameter

Type

Description

fileId

String

Old file ID.

status

String

Status.

newFileId

String

New file ID.

srcContainerId

String

Source space ID.

Example Requests

POST /koodrive/ose/v1/share/taskDetail

{
  "taskId" : "string",
  "shareId" : "string",
  "kdstoken" : "string"
}

Example Responses

Status code: 200

OK

{
  "jobInfo" : {
    "userId" : "0929b397a3424384b32cf8f96d9f35e4|1465814559892958208",
    "taskId" : "1521827471237047552",
    "taskType" : 1,
    "taskStatus" : 2,
    "taskResultCode" : 1,
    "createTime" : "20240930091932",
    "startTime" : "20240930091932",
    "endTime" : "20240930091933",
    "progress" : 100
  },
  "taskInfos" : [ {
    "fileId" : "FmvP8my7yGTvCmKhweL1BoY6kWjRt83A7",
    "status" : "1",
    "newFileId" : "FmylhS-VxkVrHr0vRwydKgo9-x-SmcPha",
    "srcContainerId" : "IAACk0hRXpq9DAWkA1465823622533999616"
  }, {
    "fileId" : "FulYbSXt1ovCywA4qda1Fe64BveY4dMvw",
    "status" : "1",
    "newFileId" : "FjRrf91UdJQnffuMcw-xIIJlNeVgWHEwJ",
    "srcContainerId" : "IAACk0hRXpq9DAWkA1465823622533999616"
  } ],
  "code" : 0,
  "msg" : "Success."
}

Status Codes

Status Code

Description

200

OK