删除训练任务
删除单个训练任务并结束其订阅。同步完成;任意状态均可删除,删除后不可恢复。任务 ID 可从任务列表获取。
DELETE
https://api.alayanew.com/api/osm/v1/training/instance/{id}/delete鉴权(Authorizations)
bearerAuthAuthorizationString必填用户获取Authorization请求头后,通过该请求头完成身份认证。例如:Authorization: [your-auth-header]。
Path Parameters
idString必填训练任务 ID(来自任务列表的 id)。例如:a3c8f6d1-7b42-4e95-9d20-8f1a4c6b3e58。
Response
application/json · 200statusInteger业务状态码,200 表示删除成功;失败时为错误码。
messageString响应信息,成功为 "OK";失败时为错误描述。
curl -X 'DELETE' \
'https://api.alayanew.com/api/osm/v1/training/instance/a3c8f6d1-7b42-4e95-9d20-8f1a4c6b3e58/delete' \
-H 'accept: application/json' \
-H 'Authorization: [your-auth-header]'import requests
task_id = "a3c8f6d1-7b42-4e95-9d20-8f1a4c6b3e58"
url = f"https://api.alayanew.com/api/osm/v1/training/instance/{task_id}/delete"
headers = {
"accept": "application/json",
"Authorization": "[your-auth-header]"
}
response = requests.delete(url, headers=headers)
print(response.json())const taskId = 'a3c8f6d1-7b42-4e95-9d20-8f1a4c6b3e58';
fetch(`https://api.alayanew.com/api/osm/v1/training/instance/${taskId}/delete`, {
method: 'DELETE',
headers: {
'accept': 'application/json',
'Authorization': '[your-auth-header]'
}
})
.then(res => res.json())
.then(console.log)
.catch(console.error);{
"status": 200,
"message": "OK"
}最后更新于
