Updated on 2026-02-12 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

Definition:

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}.

Constraints:

N/A

Range:

N/A

Default Value:

N/A

X-Traceid

No

String

Definition:

Service trace ID, which contains 58 bits.

Constraints:

N/A

Range:

The value contains 58 bits.

Default Value:

N/A

X-User-Id

Yes

String

Definition:

User ID on KooDrive, which is used for app authentication.

Constraints:

N/A

Range:

N/A

Default Value:

N/A

X-Date

Yes

String

Definition:

Date, which is used for app authentication. The format is yyyyMMdd'T'HHmmss'Z'.

Constraints:

The value must be within 15 minutes from the current time and cannot be later than the current time.

Range:

N/A

Default Value:

N/A

X-Hw-Agentname

Yes

String

Definition:

Carrier name.

Constraints:

N/A

Range:

N/A

Default Value:

N/A

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

taskId

Yes

String

Definition:

Task ID returned when an asynchronous sharing task is created.

Constraints:

N/A

Range:

N/A

Default Value:

N/A

shareId

Yes

String

Definition:

Sharing ID.

Constraints:

N/A

Range:

N/A

Default Value:

N/A

kdstoken

No

String

Definition:

Temporary token for sharing.

Constraints:

N/A

Range:

N/A

Default Value:

N/A

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" : "1689768877770401664",
  "shareId" : "1689765568237837824",
  "kdstoken" : "aea2968ec8cfac338cd4647f071c44644c491d0a2039cd6c"
}

Example Responses

Status code: 200

OK

{
  "jobInfo" : {
    "userId" : "1684711050387378049",
    "taskId" : "1689768877770401664",
    "taskType" : 1,
    "taskStatus" : 2,
    "taskResultCode" : 1,
    "createTime" : "20250520022907",
    "startTime" : "20250520022907",
    "endTime" : "20250520022907",
    "progress" : 100
  },
  "taskInfos" : [ {
    "fileId" : "Fk63FCWhcDAga2puvYKRG1oTMjs-m30sI",
    "status" : "1",
    "newFileId" : "FpUqGxkEf54_NeuRnzRdGmrIrzQCPnKCP",
    "srcContainerId" : "IAABh_RdhS8bOg0cA1684711052660690818"
  } ],
  "code" : 0,
  "msg" : "Success."
}

Status Codes

Status Code

Description

200

OK