Skip to main content

Query Task Queue

更新时间:2025-05-08 14:32:25
Query the list of tasks for the user that are in the 'queued' status.
GET
https://api.alayanew.com/api/serverless-train/v1/task/queue
Authorizations
AuthorizationsStringHeaderRequired

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

Query Parameters
nameString

Task name.

typeString

Task type is 'task', default value is 'task'.

aidcIdString

Intelligent Computing Center (AIDC) ID.

extensions.<key>String

Format: extensions.<key>: value. After the user specifies some tags, they can query the corresponding tasks through the tags.

pageInt

Page number, default is 1.

sizeInt

Number of rows to query, default is 100.

Response
状态码:application/json
codeInt

code is a common return value format, representing the execution result of the query operation.

0 is the success identifier, indicating the operation was completed successfully.
dataObject

data.countString

The number of query results.

data.rowsArray

msgStringRequired

Returns exception information when code value is -1.

curl -X GET 'https://api.alayanew.com/api/serverless-train/v1/task/queue?name=debug&type=task' 
     -H 'Authorization: plain Credential=YOUR_AK,Signature=YOUR_SK'
{
    "code": 0,
    "data": {
        "count": 1,
        "rows": [
            {
                "id": "6167a1ea-957a-4f68-b2e8-7f3f49ad5087",
                "name": "runtask2",
                "createAt": "2025-02-21T02:49:57.000+00:00",
                "updateAt": "2025-02-21T02:59:57.000+00:00",
                "type": "task",
                "aidcId": "1",
                "config": {
                    "cmd": [
                        "python3",
                        "a.py"
                    ],
                    "env": {},
                    "args": [],
                    "image": "registry.hd-01.alayanew.com/aladdin/python:3.13",
                    "vksId": "vc3jedd7crnd",
                    "labels": {},
                    "workDir": "/root",
                    "replicas": 1,
                    "resource": {
                        "cpu": 2,
                        "gpu": {
                            "count": 0,
                            "gpuType": ""
                        },
                        "mem": 8,
                        "epheneralStorage": 32
                    },
                    "namespace": "default",
                    "extensions": {
                        "source": "a.py",
                        "folders": [
                            {
                                "path": "a.py",
                                "value": ""
                            }
                        ]
                    }
                }
            }
        ]
    }
}