获取同步任务详情 | 大装置帮助中心
跳到主要内容

获取同步任务详情

GET /storage/ads/data/v1/subscriptions/{subscription_name}/resourceGroups/{resource_group_name}/zones/{zone}/dataSync/{data_sync_name}/task/{task_id}

请求头(Request Header)

参考认证(authentication)

请求参数(Request Parameters

名称类型必须位置默认值取值范围描述
subscription_namestringpath--订阅名称.
resource_group_namestringpath--资源组.
zonestringpath--可用区.
data_sync_namestringpath--数据同步工具资源名称,需符合正则:^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$.
task_idstringpath--数据同步任务id.

请求示例(Request Example)

curl 'https://ads.cn-sh-01.sensecoreapi.dev/storage/ads/data/v1/subscriptions/e995c396-83f6-4a1b-a055-2acb8bc7cf1f/resourceGroups/default/zones/cn-sh-01z/dataSync/ads/task/dea4db7f-3130-4498-9cad-cf75fc6575c0' \
-H 'authority: ads.cn-sh-01.sensecoreapi.dev' \
-H 'accept: */*' \
-H 'accept-language: zh-CN' \
-H 'authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6InB1YmxpYzpoeWRyYS5qd3QuYWNjZXNzLXRva2VuIiwidHlwIjoiSldUIn0.eyJhdWQiOltdLCJjbGllbnRfaWQiOiI0ZTQxNDg1NC03MjAwLTUwOWYtYjk2MC1mOGIwZGJiYmYzMzEiLCJleHAiOjE2OTU4MDYxMjUsImV4dCI6eyJpc19kZWRpY2F0ZWRfdGVuYW50IjpmYWxzZSwicHJwX2xpc3QiOlsiY24tc2gtMDFhLXBycDAxIiwiY24tc2gtMDFiLXBycDAxIl0sInRlbmFudF9jZXJ0aWZ5X3N0YXR1cyI6dHJ1ZSwidGVuYW50X2NlcnRpZnlfdHlwZSI6ImVudGVycHJpc2UiLCJ0ZW5hbnRfY29kZSI6ImFvc3MwOTI4IiwidGVuYW50X2lkIjoiZTk5NWMzOTYtODNmNi00YTFiLWEwNTUtMmFjYjhiYzdjZjFmIiwidXNlcl9pZCI6IjU3NDYzY2Q4LTNlZTktNGJmNC1iMTM5LTg4OTBmZD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IGv-iPalZNTgaZHI' \
-H 'dnt: 1' \
-H 'origin: https://console.sensecore.dev' \
-H 'referer: https://console.sensecore.dev/' \
-H 'sec-ch-ua: "Chromium";v="116", "Not)A;Brand";v="24", "Google Chrome";v="116"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "macOS"' \
-H 'sec-fetch-dest: empty' \
-H 'sec-fetch-mode: cors' \
-H 'sec-fetch-site: cross-site' \
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36' \
--compressed

响应(Response)

名称类型描述
task_idstring数据同步任务id.
task_namestring数据同步任务名称.
uidstring数据同步工具资源uuid.
user_idstring创建数据同步任务的用户id.
tenant_idstring租户id.
typestring当前数据同步任务类型.
statestring当前数据同步任务状态.
src_infoarray[object]数据同步任务源路径信息.
dst_infoobject数据同步任务目的路径信息.
size_unitstring数据同步任务大小单位.
sizeinteger数据同步任务大小.
startinteger数据同步任务开始时间.
endinteger数据同步任务结束时间.
percentinteger数据同步任务进度百分比.
ratestring数据同步任务速率.
time_coststring数据同步任务耗时.
src_third_infoobject第三方云信息.
err_msgstring任务失败原因.
total_numinteger文件总数.
complete_numinteger成功传输个数.
exist_numinteger已存在文件个数.

其中,type有如下情况

类型含义
AOSSTOFS对象到文件
FSTOAOSS文件到对象
THIRDTOAOSS第三方云到对象
THIRDTOFS第三方云到文件
AOSSTOAOSS对象到对象
FSTOFS文件到文件

其中,state有如下情况

状态含义
SCANNING扫描中
DOING进行中
PAUSED已暂停
COMPLETED已完成
FAILED已失败
CANCELLED已取消

其中,src_info的参数如下

|名称|类型|描述| |---|---||---| |id|string|卷id或桶名.| |region|string|地域.| |prefix|string|前缀.| |name|string|卷名或桶名.| |endpoint|string|桶in_endpoint.| |zone|string|可用区.|

其中,dst_info的参数如下

名称类型描述
idstring卷id或桶名.
regionstring地域.
prefixstring前缀.
namestring卷名或桶名.
endpointstring桶in_endpoint.
zonestring可用区.

其中,size_unit有如下情况

状态含义
B-
KB-
MB-
GB-
TB-
PB-
EB-

其中,src_third_info的参数如下

名称类型描述
typestring第三方云类型.
hoststring域名.
akstring第三方云用户公钥.
skstring第三方云用户私钥.
pathstring第三方云数据存储路径.

其中,src_third_info.type有如下情况

类型含义
OSS阿里云
COS腾讯云
OBS华为云
BOS百度云
S3AWS
KS3金山云
QINIU七牛云
WASBAzure Blob
UFILEUCloud

其中,page的参数如下

名称类型描述
pageinteger页码.
page_sizeinteger页大小.
totalinteger总记录数.

响应示例(Response Example)

{
"task_id": "dea4db7f-3130-4498-9cad-cf75fc6575c0",
"task_name": "test0927_test3",
"uid": "78ca6095-ad15-11ed-8800-26b9868a206f",
"user_id": "57463cd8-3ee9-4bf4-b139-8890fd26c914",
"tenant_id": "e995c396-83f6-4a1b-a055-2acb8bc7cf1f",
"type": "AOSSTOFS",
"state": "COMPLETED",
"src_info": [
{
"id": "cmlcml",
"region": "cn-sh-01",
"prefix": "/",
"name": "cmlcml",
"endpoint": "",
"zone": "cn-sh-01a"
}
],
"dst_info": {
"id": "25c24d77-b0cb-11ed-8184-5edcaa2b1438",
"region": "cn-sh-01",
"prefix": "/0927/",
"name": "adstest",
"endpoint": "",
"zone": "cn-sh-01a"
},
"size_unit": "MB",
"size": 655.14,
"start": 1695795693,
"end": 1695796750,
"percent": 100,
"rate": "1.25 MiB/s",
"time_cost": "17分37秒",
"create": 1695795693,
"src_third_info": {
"type": "OSS",
"host": "",
"ak": "",
"sk": "",
"path": ""
},
"err_msg": "",
"total_num": 124,
"complete_num": 124,
"exist_num": 0
}