All Products
Search
Document Center

Platform For AI:ListJobs

Last Updated:Jul 30, 2026

Retrieves a list of jobs with support for pagination, sorting, and conditional filtering.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

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

  • PyTorchJob

  • XGBoostJob

  • OneFlowJob

  • ElasticBatchJob

TFJob

Status

string

No

The job status. Valid values:

  • Creating

  • Queuing

  • Bidding (currently only for Lingjun Spot jobs)

  • EnvPreparing

  • SanityChecking

  • Running

  • Restarting

  • Stopping

  • SucceededReserving

  • FailedReserving

  • Succeeded

  • Failed

  • Stopped

Running

StartTime

string

No

The start time of the query range. The job creation time is used for filtering. 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. The job creation time is used for filtering. 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. Paging starts from page 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:

  • DisplayName

  • JobType

  • Status

  • GmtCreateTime

  • GmtFinishTime

GmtCreateTime

Order

string

No

The sort order. Valid values:

  • desc: Descending order. This is the default value.

  • asc: Ascending order.

Valid values:

  • asc :

    asc

  • desc :

    desc

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 pipeline ID.

flow-*******

FromAllWorkspaces

boolean

No

Specifies whether to retrieve jobs across all workspaces. This parameter must be used together with ShowOwn=true to query jobs recently submitted by the current user.

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:

  • PUBLIC: Visible to all members in the workspace.

  • PRIVATE (default): Visible only to you and administrators in the workspace.

Valid values:

  • PUBLIC :

    PUBLIC

  • PRIVATE :

    PRIVATE

PRIVATE

OversoldInfo

string

No

The off-peak resource information. Valid values:

  • ForbiddenQuotaOverSold

  • ForceQuotaOverSold

  • AcceptQuotaOverSold-true (true indicates the job actually used off-peak resources)

  • AcceptQuotaOverSold-false (false indicates the job actually used guaranteed resources)

ForbiddenQuotaOverSold

PaymentType

string

No

The resource type. Valid values:

  • PrePaid: resource quota.

  • Spot: preemptible resources.

  • PostPaid: public resources.

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:

  • prefix :

    prefix

  • fulltext :

    fulltext

  • term :

    term

  • wildcard :

    wildcard

wildcard

ReasonSearch

string

No

Uses full-text index to retrieve the node failed reason field. Supports Chinese and English tokenization.

OOM

UserCommandSearch

string

No

Uses full-text index to retrieve the user_command field. Supports Chinese and English tokenization.

python train.py

ImageSearch

string

No

Uses full-text index to retrieve the 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

Filters jobs based on whether running on specified nodes is enabled.

Valid values:

  • true :

    true

  • false :

    false

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.

TotalCount

integer

The total number of jobs that match the filter conditions.

1

RequestId

string

The request ID, used for diagnostics and troubleshooting.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

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": ""
          },
          "StartupDependencies": [
            {
              "Type": "",
              "OnPhase": "",
              "MinReplicas": ""
            }
          ],
          "ElasticSpotSpecs": [
            {
              "InstanceType": "",
              "SpotPriceLimit": 0,
              "SpotDiscountLimit": 0,
              "SpotStrategy": ""
            }
          ],
          "Driver": ""
        }
      ],
      "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"
    }
  ],
  "TotalCount": 1,
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.