Get Download Status¶
Get the status of a file download task.
Prerequisites¶
A file download task is already created.
Request Format¶
GET https://{apigw-address}/data-federation/v2.0/channels/read/{channelId}/download/{taskId}/status
Request Parameters (URI)¶
Name |
Location (Path/Query) |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|---|
orgId |
Query |
Mandatory |
String |
The organization ID. How to get the orgId>> |
channelId |
Path |
Mandatory |
String |
Channel ID. |
taskId |
Path |
Mandatory |
String |
ID of the file download task. |
Response Parameters¶
Name |
Data Type |
Description |
---|---|---|
data |
List<JSONObject> |
Return the status information of the download task. See Status Struct |
Status Struct¶
Name |
Data Type |
Description |
---|---|---|
taskId |
String |
ID of the file download task. |
downloadUrl |
String |
URL for downloading the file. |
progressCode |
Integer |
Status code of the file download task (0: waiting; 1: running; 2: failed; 3: success; 4: cancelling; 5: cancelled; 6: deleting; 7: deleted). |
progressDesc |
String |
Description of the status code. |
dataSize |
Long |
Size of the downloaded data, in byte. |
Samples¶
Request Sample¶
url: https://{apigw-address}/data-federation/v2.0/channels/read/{channelId}/download/{taskId}/status?orgId={}
method: GET
Return Sample¶
{
"code": 0,
"msg": "OK",
"data": {
"taskId": "79449f27d3ff44b3990c547360c2851f",
"downloadUrl": "http://data-query-proxy.beta-k8s-cn4.eniot.io/channels/read/ch-dee0c5/download/79449f27d3ff44b3990c547360c2851f/data?orgId=o15504722874071",
"progressDesc": "success",
"progressCode": "3",
"dataSize": "12345"
}
}