更新同步任务 | 大装置帮助中心
跳到主要内容

更新同步任务

PATCH /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 Body)

名称类型必须默认值取值范围描述
actioninteger--数据同步任务操作.

其中,action有如下情况

类型含义
0暂停
1恢复
2取消
3重试

请求示例(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/c8784b06-29c6-4ada-89db-7ac52473b0eb' \
-X 'PATCH' \
-H 'authority: ads.cn-sh-01.sensecoreapi.dev' \
-H 'accept: application/json' \
-H 'accept-language: zh-CN' \
-H 'authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6InB1YmxpYzpoeWRyYS5qd3QuYWNjZXNzLXRva2VuIiwidHlwIjoiSldUIn0.eyJhdWQiOltdLCJjbGllbnRfaWQiOiI0ZTQxNDg1NC03MjAwLTUwOWYtYjk2MC1mOGIwZGJiYmYzMzEiLCJleHAiOjE2OTU4MDYxMjUsImV4dCI6eyJpc19kZWRpY2F0ZWRfdGVuYW50IjpmYWxzZSwicHJwX2xpc3QiOlsiY24tc2gtMDFhLXBycDAxIiwiY24tc2gtMDFiLXBycDAxIl0sInRlbmFudF9jZXJ0aWZ5X3N0YXR1cyI6dHJ1ZSwidGVuYW50X2NlcnRpZnlfdHlwZSI6ImVudGVycHJpc2UiLCJ0ZW5hbnRfY29kZSI6ImFvc3MwOTI4IiwidGVuYW50X2lkIjoiZTk5NWMzOTYtODNmNi00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35bykrOJDPSSRV0GWuWvr33zV8mRF2ZPFVzUWyNew2_k8PUbyxt-weKHowI9Udr0odYJZO-ImQW6RF1Njb4S0NitzHLQIGv-iPalZNTgaZHI' \
-H 'content-type: application/json;charset=UTF-8' \
-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' \
--data-raw '{"action":3}' \
--compressed

响应(Response)

名称类型描述
task_idstring数据同步任务id.
statestring当前数据同步任务状态.

其中,state有如下情况

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

响应示例(Response Example)

{
"task_id": "c8784b06-29c6-4ada-89db-7ac52473b0eb",
"state": "SCANNING",
}