Search Task Template list
Query the list of task templates.
GET
https://api.alayanew.com/api/serverless-train/v1/template/list
Authorizations
Authorizations:StringHeaderRequired
用户可通过已获取Open API Key做验证,例如:plain Credential=[YOUR_AK],Signature=[YOUR_SK]。
Query Parameters
name:String
Template name.
aidcId:String
AIDC ID.
page:Int
Page number, default is 1.
size:Int
Page size, default is 10, maximum is 100.
Response
状态码:application/json
200
code:Int
code is a common return value form, representing the execution result of the query operation.
0
-1
0 is a success identifier, indicating the operation completed successfully.
data:object
data.count:String
Number of query results.
data.rows:Array
msg:StringRequired
Returns error information when code is -1.
cURL
Python
JavaScript
Go
Java
curl -X GET 'https://api.alayanew.com/api/serverless-train/v1/template/list?name=my-debug&page=2&size=20'
-H 'Authorization: plain Credential=YOUR_AK,Signature=YOUR_SK'
200
400
401
403
404
500
{
"code": 0,
"data": {
"count": 1,
"rows": [
{
"id": "5df0ef3c-252a-44c8-aba3-a87e23615c76",
"createAt": "2025-02-24T10:35:43.000+00:00",
"updateAt": "2025-02-28T06:45:27.000+00:00",
"aidcId": "1",
"settings": {
"cmd": [
"bash",
"-c",
"python3 main.py"
],
"args": [],
"env": {
"POD_NAME": "localhost"
},
"name": "my-debug",
"image": "registry.hd-01.alayanew.com/aladdin/python:3.13",
"vksId": "vc3jedd7crnd",
"labels": {},
"workDir": "/root/",
"replicas": 1,
"resource": {
"cpu": 2,
"gpu": {
"count": 1,
"gpuType": "nvidia.com/gpu-tesla-p4"
},
"mem": 8,
"epheneralStorage": 32
},
"namespace": "default",
"pvcMounts": [
{
"pvcName": "pvc-capacity-userdata",
"subPath": "a",
"readOnly": false,
"containerPath": "/opt/data"
}
],
"extensions": {
"tag": "3",
"orgId": "dc8e48eb-4c05-4466-8ee2-2c3f969352bf"
}
}
}
]
}
}