Skip to main content

Start Task

更新时间:2025-05-09 17:32:25
Start a task with the specified ID and add it to the queue. Both successful and failed tasks can be restarted.
POST
https://api.alayanew.com/api/serverless-train/v1/task/{id}/run
Authorizations
AuthorizationsStringHeaderRequired

用户可通过已获取Open API Key做验证,例如:plain Credential=[YOUR_AK],Signature=[YOUR_SK]。

Path Parameters
idStringRequired

Task ID.

Response
状态码:application/json
codeInt

code is a common return value format indicating the execution result of the query operation

0 is the success flag, indicating the operation completed successfully.
msgStringRequired

Returns error information when the code value is -1.

curl -X POST 'https://api.alayanew.com/api/serverless-train/v1/task/6ef0ef3c-252a-44c8-aba3-a87e23615c76/run' 
     -H 'Authorization: plain Credential=YOUR_AK,Signature=YOUR_SK'

{
    "code": 0
}