Retrieves a list of jobs with support for pagination, sorting, and conditional filtering.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
paidlc:ListJobs |
get |
*All Resource
|
None | None |
Request syntax
GET /api/v1/jobs HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DisplayName |
string |
No |
The job name. Supports fuzzy match and is case-insensitive. Wildcards are not supported. For example, entering test matches test-job1, job-test, job-test2, or job-Test, but does not match job-t1. Default value: empty, which indicates all job names. |
tf-mnist-test |
| JobType |
string |
No |
The job type. Default value: empty, which indicates all types. Valid values:
|
TFJob |
| Status |
string |
No |
The job status. Valid values:
|
Running |
| StartTime |
string |
No |
The start time of the query range. Jobs are filtered by creation time. Default value: the current time minus 7 days. If neither StartTime nor EndTime is specified, jobs created in the last 7 days are returned by default. |
2025-04-16T07:25:34Z |
| EndTime |
string |
No |
The end time of the query range. Jobs are filtered by creation time. Default value: the current time. |
2025-04-16T07:26:41Z |
| PageNumber |
integer |
No |
The page number to return in a paged query. Minimum value: 1. Default value: 1. |
1 |
| PageSize |
integer |
No |
The number of jobs to return per page. |
50 |
| SortBy |
string |
No |
The field by which to sort results. Valid values:
|
GmtCreateTime |
| Order |
string |
No |
The sort order. Valid values:
Valid values:
|
desc |
| ShowOwn |
boolean |
No |
Specifies whether to return only jobs submitted by the current user. |
true |
| WorkspaceId |
string |
No |
The workspace ID. |
1**** |
| ResourceId |
string |
No |
The resource group ID. For information about how to obtain the dedicated resource group ID, see Manage resource quotas. |
r***** |
| BusinessUserId |
string |
No |
The user ID associated with the job. |
16**** |
| Caller |
string |
No |
The caller. |
local |
| Tags |
object |
No |
The tags used for filtering. |
|
|
string |
No |
A single tag. |
recommandation |
|
| PipelineId |
string |
No |
Filters jobs created by the specified workflow ID. |
flow-******* |
| FromAllWorkspaces |
boolean |
No |
Specifies whether to retrieve jobs across all workspaces. This parameter must be used together with |
false |
| JobId |
string |
No |
The job ID. Fuzzy match is not supported. Case-insensitive. Wildcards are not supported. Default value: empty, which indicates all job IDs. |
dlc******** |
| UserIdForFilter |
string |
No |
The user ID of the job submitter, used to filter the job list. |
20************** |
| Username |
string |
No |
The username of the job submitter, used to filter the job list. Supports fuzzy match. Wildcards are not supported. Default value: empty, which indicates no filtering by username. |
test*** |
| ResourceQuotaName |
string |
No |
The name of the resource quota, used to filter the job list. Supports fuzzy match. Wildcards are not supported. Default value: empty, which indicates no filtering by resource quota. |
quota*** |
| Accessibility |
string |
No |
The visibility of the job. Valid values:
Valid values:
|
PRIVATE |
| OversoldInfo |
string |
No |
The idle resource information. Valid values:
|
ForbiddenQuotaOverSold |
| PaymentType |
string |
No |
The resource type. Valid values:
|
PostPaid |
| JobIds |
string |
No |
A list of job IDs separated by commas. If both JobIds and JobId are specified, JobId takes precedence. |
dlc123abc |
| DisplayNameSearchMode |
string |
No |
The search mode for DisplayName. Default value: wildcard match. Valid values:
|
wildcard |
| ReasonSearch |
string |
No |
Performs a full-text index retrieve on the node failed reason (reason) field. Supports Chinese and English tokenization. |
OOM |
| UserCommandSearch |
string |
No |
Performs a full-text index retrieve on the user command (user_command) field. Supports Chinese and English tokenization. |
python train.py |
| ImageSearch |
string |
No |
Performs a full-text index retrieve on the image (images) field. Supports Chinese and English tokenization. |
pytorch |
| TimeRangeField |
string |
No |
The time field used for StartTime/EndTime filtering. Default value: creation time. |
GmtFinishTime |
| NumericRangeField |
string |
No |
The field name for numeric range filtering. Must be used together with NumericRangeMin or NumericRangeMax. |
RequestGPU |
| NumericRangeMin |
integer |
No |
The minimum value (inclusive) for numeric range filtering. Must be used together with NumericRangeField. |
4 |
| NumericRangeMax |
integer |
No |
The maximum value (inclusive) for numeric range filtering. Must be used together with NumericRangeField. |
8 |
| EnableAssignNode |
string |
No |
Specifies whether to filter jobs that have assigned node execution enabled. Valid values:
|
true |
| TemplateId |
string |
No |
The template ID, used to filter jobs created from the specified template. |
tmlabc123 |
| Description |
string |
No |
||
| ResourceIds |
string |
No |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The job list. |
||
| Jobs |
array |
The job list. |
|
| JobItem |
A single job. |
||
| RequestId |
string |
The request ID, used for diagnostics and troubleshooting. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
| TotalCount |
integer |
The total number of jobs that match the filter conditions. |
1 |
Examples
Success response
JSON format
{
"Jobs": [
{
"JobId": "dlc-20210126170216-********",
"CredentialConfig": {
"EnableCredentialInject": false,
"AliyunEnvRoleKey": "",
"CredentialConfigItems": [
{
"Key": "",
"Type": "",
"Roles": [
{
"RoleArn": "",
"RoleType": "",
"AssumeRoleFor": "",
"Policy": "",
"AssumeUserInfo": {
"SecurityToken": "",
"AccessKeyId": "",
"Type": "",
"Id": ""
}
}
]
}
]
},
"JobType": "TFJob",
"DisplayName": "tf-mnist-test",
"UserVpc": {
"VpcId": "vpc-2zed***",
"SwitchId": "vsw-2ze6***",
"SecurityGroupId": "sg-2zeef***",
"ExtendedCidrs": [
"10.2.0.0/16"
],
"DefaultRoute": "eth0"
},
"UserId": "123456789",
"Username": "pai-dlc-role",
"Status": "Stopped",
"WorkspaceId": "268",
"WorkspaceName": "dlc-workspace",
"ResourceId": "dlc-quota",
"ResourceLevel": "L0",
"ReasonCode": "JobStoppedByUser",
"ReasonMessage": "Job is stopped by user.",
"JobSpecs": [
{
"Type": "Worker",
"Image": "registry-vpc.cn-hangzhou.aliyuncs.com/cloud-dsw/tensorflow:1.12PAI-gpu-py36-cu101-ubuntu18.04",
"ImageConfig": {
"DockerRegistry": "docker****registry.com",
"Username": " username",
"Password": "password",
"Auth": ""
},
"PodCount": 1,
"ExtraPodSpec": {
"SideCarContainers": [
{
"Name": "data-init",
"Image": "registry.cn-hangzhou.aliyuncs.com/pai-dlc/curl:v1.0.0",
"Command": [
"curl www.aliyun.com"
],
"Args": [
"-v"
],
"WorkingDir": "/root",
"Env": [
{
"Name": "ENABLE_DEBUG",
"Value": "true"
}
],
"Resources": {
"Limits": {
"key": "{'cpu': '1', 'memory': '1000Mi'}"
},
"Requests": {
"key": "{'cpu': '1', 'memory': '1000Mi'}"
}
},
"SecurityContext": {
"RunAsUser": 1000,
"RunAsGroup": 1000,
"SeccompProfile": {
"Type": "Unconfined",
"LocalhostProfile": "my-profiles/profile-allow.json"
},
"Privileged": false,
"Capabilities": {
"Add": [
""
],
"Drop": [
""
]
}
}
}
],
"InitContainers": [
{
"Name": "data-init",
"Image": "registry.cn-hangzhou.aliyuncs.com/pai-dlc/curl:v1.0.0",
"Command": [
"curl www.aliyun.com"
],
"Args": [
"-v"
],
"WorkingDir": "/root",
"Env": [
{
"Name": "ENABLE_DEBUG",
"Value": "true"
}
],
"Resources": {
"Limits": {
"key": "{'cpu': '1', 'memory': '1000Mi'}"
},
"Requests": {
"key": "{'cpu': '1', 'memory': '1000Mi'}"
}
},
"SecurityContext": {
"RunAsUser": 1000,
"RunAsGroup": 1000,
"SeccompProfile": {
"Type": "Unconfined",
"LocalhostProfile": "my-profiles/profile-allow.json"
},
"Privileged": false,
"Capabilities": {
"Add": [
""
],
"Drop": [
""
]
}
}
}
],
"PodLabels": {
"key": "example-lable"
},
"PodAnnotations": {
"key": "example-annotation"
},
"SharedVolumeMountPaths": [
"/root/share/"
],
"Lifecycle": {
"PreStop": {
"Exec": {
"Command": [
""
]
}
},
"PostStart": {
"Exec": {
"Command": [
""
]
}
}
},
"MainContainerSecurityContext": {
"RunAsUser": 1000,
"RunAsGroup": 1000,
"SeccompProfile": {
"Type": "Unconfined",
"LocalhostProfile": "my-profiles/profile-allow.json"
},
"Privileged": false,
"Capabilities": {
"Add": [
""
],
"Drop": [
""
]
}
}
},
"ResourceConfig": {
"CPU": "10",
"GPU": "3",
"Memory": "10Gi",
"SharedMemory": "5Gi",
"GPUType": "Tesla-V100-16G"
},
"UseSpotInstance": false,
"SpotSpec": {
"SpotStrategy": "SpotWithPriceLimit",
"SpotDiscountLimit": 0.8,
"SpotPriceLimit": 0.4744
},
"AssignNodeSpec": {
"EnableAssignNode": true,
"NodeNames": "lingjxxxxxxxx",
"AntiAffinityNodeNames": "lingjxxxxxxxx",
"HyperNodes": [
{
"HyperNodeName": "",
"NodeNames": ""
}
],
"AntiAffinityHyperNodes": [
{
"HyperNodeName": "",
"NodeNames": ""
}
]
},
"LocalMountSpecs": [
{
"MountMode": "",
"LocalPath": "",
"MountPath": ""
}
],
"AutoScalingSpec": {
"ScalingStrategy": "",
"MinReplicas": 0,
"MaxReplicas": 0,
"PodsToDelete": [
""
],
"AutoscalingMetricSpec": {
"MetricName": "",
"TargetValue": 0,
"StabilizationWindowSeconds": 0,
"Tolerance": ""
}
},
"ServiceSpec": {
"DefaultPort": 8080,
"ServiceMode": "PerRole",
"ExtraPorts": [
8081
]
},
"IsCheif": false,
"IsChief": false,
"RestartPolicy": "ExitCode",
"SystemDisk": {
"Size": 0,
"Category": "",
"PerformanceLevel": ""
},
"EcsSpec": "ecs.c6.large",
"QuotaId": "",
"ConsiderInSuccessPolicy": false,
"OversoldType": "",
"HyperNodeSchedulingConfig": {
"MinAvailable": 0,
"QualityPolicy": ""
},
"Driver": "",
"UserCommand": "python train.py",
"StartupDependencies": [
{
"Type": "",
"OnPhase": "",
"MinReplicas": ""
}
],
"ElasticSpotSpecs": [
{
"InstanceType": "",
"SpotPriceLimit": 0,
"SpotDiscountLimit": 0,
"SpotStrategy": ""
}
]
}
],
"UserCommand": "python /root/code/mnist.py",
"DataSources": [
{
"DataSourceId": "data-20210114104214-********",
"MountPath": "/mnt/data"
}
],
"CodeSource": {
"CodeSourceId": "code-20210111103721-********",
"Branch": "master",
"Commit": "44da109b59f8596152987eaa8f3b2487bb******",
"MountPath": "/mnt/data"
},
"ThirdpartyLibs": [
"numpy==1.16.1"
],
"NodeNames": [
"i-a"
],
"ThirdpartyLibDir": "/root/code/",
"Envs": {
"key": "ENABLE_DEBUG_MODE"
},
"SystemEnvs": {
"key": "ENABLE_DEBUG_MODE"
},
"GmtCreateTime": "2025-04-16T07:25:34Z",
"GmtSubmittedTime": "2025-04-16T07:26:14Z",
"GmtRunningTime": "2025-04-16T07:26:41Z",
"GmtSuccessedTime": "2025-04-16T07:28:20Z",
"GmtStoppedTime": "null",
"GmtFailedTime": "null",
"GmtFinishTime": "2025-04-16T07:28:20Z",
"GmtModifiedTime": "2025-04-16T07:28:22Z",
"Duration": 243,
"JobMaxRunningTimeMinutes": 0,
"Settings": {
"BusinessUserId": "16****",
"Caller": "SilkFlow",
"Tags": {
"key": "key:value"
},
"PipelineId": "pid-12****",
"EnableTideResource": true,
"EnableErrorMonitoringInAIMaster": false,
"ErrorMonitoringArgs": "--enable-log-hang-detection true",
"EnableRDMA": true,
"EnableOssAppend": true,
"OversoldType": "AcceptQuotaOverSold",
"AdvancedSettings": {
"test": "test",
"test2": 1
},
"Driver": "535.54.03",
"EnableSanityCheck": true,
"SanityCheckArgs": "--sanity-check-timing=AfterJobFaultTolerant --sanity-check-timeout-ops=MarkJobFail",
"JobReservedMinutes": 30,
"JobReservedPolicy": "Always",
"EnableCPUAffinity": true,
"DisableEcsStockCheck": false,
"AllocateAllRDMADevices": false,
"EnableDSWDev": false,
"DataJuicerConfig": {
"ExecutionMode": "standalone",
"CommandType": "config",
"EnableResourceEstimation": true,
"ResourceLimit": {
"CPU": "2",
"Memory": "10Gi",
"GPU": "20"
}
},
"ModelConfig": {
"ModelName": "",
"ModelTemplate": {
"ModelName": "",
"Provider": "",
"Collections": ""
}
},
"AllowUnschedulableNodes": false,
"Shell": "/bin/bash",
"TerminationGracePeriodSeconds": 0,
"ElasticSpotJobMaxRestartTimes": 0
},
"EnabledDebugger": false,
"IsDeleted": false,
"EnablePreemptibleJob": false,
"ResourceName": "my_resource_group",
"WorkingDir": "/mnt/data",
"UserScript": "ls ",
"RestartTimes": "1",
"RequestCPU": 1,
"RequestMemory": "1Gi",
"ResourceQuotaName": "test",
"RequestGPU": "1",
"NodeCount": "1",
"Priority": 1,
"SubStatus": "Restarting",
"UseOversoldResource": false,
"ResourceType": "ECS",
"Accessibility": "PUBLIC",
"ClusterId": "****1316721349****",
"TenantId": "****93955616****",
"StatusHistory": [
{
"Status": "",
"StartTime": "",
"EndTime": "",
"ReasonCode": "",
"ReasonMessage": ""
}
],
"ElasticSpec": {
"EnableElasticTraining": true,
"MinParallelism": 1,
"MaxParallelism": 8,
"AIMasterType": "",
"AIMasterDockerImage": "",
"EnablePsJobElasticWorker": false,
"EnableAIMaster": false,
"EnablePsResourceEstimate": true,
"EnablePsJobElasticPS": true,
"PSMinParallelism": 4,
"PSMaxParallelism": 10,
"ElasticStrategy": "",
"EnableEDP": true,
"EDPMaxParallelism": 16,
"EDPMinParallelism": 8
},
"Pods": [
{
"Type": "Worker",
"PodId": "dlc-20210126170216-mtl37ge7gkvdz-worker-0",
"PodUid": "fe846462-af2c-4521-bd6f-96787a57591d",
"Status": "Stopped",
"Ip": "10.0.1.2",
"GmtCreateTime": "2021-01-12T14:36:01Z",
"GmtStartTime": "2021-01-12T14:36:05Z",
"GmtFinishTime": "2021-01-12T15:36:05Z",
"HistoryPods": [
{
"Type": "Worker",
"PodId": "dlc-20210126170216-mtl37ge7gkvdz-worker-0",
"PodUid": "fe846462-af2c-4521-bd6f-96787a57591d",
"Status": "Stopped",
"Ip": "10.0.1.2",
"GmtCreateTime": "2021-01-12T14:36:01Z",
"GmtStartTime": "2021-01-12T14:36:05Z",
"GmtFinishTime": "2021-01-12T15:36:05Z",
"HistoryPods": [
{
"Type": "Worker",
"PodId": "dlc-20210126170216-mtl37ge7gkvdz-worker-0",
"PodUid": "fe846462-af2c-4521-bd6f-96787a57591d",
"Status": "Stopped",
"Ip": "10.0.1.2",
"GmtCreateTime": "2021-01-12T14:36:01Z",
"GmtStartTime": "2021-01-12T14:36:05Z",
"GmtFinishTime": "2021-01-12T15:36:05Z",
"HistoryPods": [],
"SubStatus": "",
"NodeName": "",
"PodIp": "",
"PodIps": [
{
"InterfaceName": "",
"Ip": ""
}
],
"supportedProfilingTypes": "sysom"
}
],
"SubStatus": "",
"NodeName": "",
"PodIp": "",
"PodIps": [
{
"InterfaceName": "",
"Ip": ""
}
],
"supportedProfilingTypes": "sysom"
}
],
"SubStatus": "",
"NodeName": "",
"PodIp": "",
"PodIps": [
{
"InterfaceName": "",
"Ip": ""
}
],
"supportedProfilingTypes": "sysom"
}
],
"TemplateId": "",
"TemplateName": "",
"JobReplicaStatuses": [
{
"Type": "",
"Active": 0,
"EstimatedPodCount": 0,
"EstimatedAutoScalingSpec": {
"ScalingStrategy": "",
"MinReplicas": 0,
"MaxReplicas": 0,
"PodsToDelete": [
""
],
"AutoscalingMetricSpec": {
"MetricName": "",
"TargetValue": 0,
"StabilizationWindowSeconds": 0,
"Tolerance": ""
}
},
"EstimatedResourceConfig": {
"CPU": "10",
"GPU": "3",
"Memory": "10Gi",
"SharedMemory": "5Gi",
"GPUType": "Tesla-V100-16G"
},
"Queuing": 0,
"Dequeued": 0,
"CurrentSpotInstanceType": ""
}
],
"SchedulingStrategy": "",
"RetryCount": 0,
"supportedProfilingTypes": "sysom"
}
],
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"TotalCount": 1
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.