All Products
Search
Document Center

Elastic High Performance Computing:ListJobs

Last Updated:Jan 14, 2026
This topic is generated by a machine translation engine without any human intervention. ALIBABA CLOUD DOES NOT GUARANTEE THE ACCURACY OF MACHINE TRANSLATED CONTENT. To request a human-translated version of this topic or provide feedback on this translation, please include it in the feedback form.

Queries the jobs in a cluster.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ehpc:ListJobslist
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ClusterIdstringYes

The cluster ID.

You can call the ListClusters operation to query the cluster ID.

ehpc-hz-csbua72***
PageNumberstringNo

The page number of the page to return.

  • Pages start from page 1.
  • Default value: 1
1
PageSizestringNo

The number of entries per page.

  • Maximum value: 50.
  • Default value: 10
10
JobFilterobjectNo

The job filter information.

UsersarrayNo

The users that run the jobs.

stringNo

The user that runs the job. Fuzzy match is supported.

You can call the ListUsers to obtain the user.

testuser1
QueuesarrayNo

The queues to which the jobs belong.

stringNo

The queue name. Fuzzy match is supported.

comp
NodesarrayNo

The compute nodes that run the jobs.

stringNo

The hostname of the compute node. Fuzzy match is supported.

compute000
JobNamestringNo

The job name. Fuzzy match is supported.

testjob
JobStatusstringNo

The job status. Valid values:

  • all: returns all jobs.
  • finished: returns completed jobs.
  • notfinish: returns uncompleted jobs.

Default value: all.

all
CreateTimeStartstringNo

The time when the job started. The value is a UNIX timestamp representing the number of seconds that have elapsed since 1970-01-01T00:00:00Z.

1724122486
CreateTimeEndstringNo

The time when the job was last updated. The value is a UNIX timestamp representing the number of seconds that have elapsed since 1970-01-01T00:00:00Z.

1724123085
SortByobjectNo

The result sorting configurations.

ExecuteOrderstringNo

The order in which jobs are sorted based on their execution time. Valid values:

  • asc: in ascending order.
  • desc: in descending order.

Default value: desc.

asc
SubmitOrderstringNo

The order in which jobs are sorted based on their submitting time. Valid values:

  • asc: in ascending order.
  • desc: in descending order.

Default value: desc.

asc
PendOrderstringNo

The order in which jobs are sorted based on their queuing time. Valid values:

  • asc: in ascending order.
  • desc: in descending order.

Default value: desc.

desc
Diagnosisarray<object>No

Job diagnosis and analysis list.

objectNo

Job diagnosis and analysis details.

OptionstringNo

Job diagnosis and analysis metrics

run_duration
OperatorstringNo

Job diagnosis threshold comparator.

Enumeration Value:
  • greater_or_equal: 大于等于.
  • less: 小于.
  • less_or_equal: 小于等于.
  • greater: 大于.
greater
ThresholdstringNo

Job diagnosis threshold.

24

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

TotalCountinteger

The total number of entries returned.

10
RequestIdstring

The request ID.

EABFBD93-58BE-53F3-BBFE-8654BB2E****
PageNumberinteger

The page number. Default value: 1

1
PageSizeinteger

The number of entries per page. Default value: 10

20
Successboolean

Indicates whether the request was successful. Valid values:

  • true: The request was successful.
  • false: The request failed.
true
Jobsarray<object>

The jobs.

Jobsobject

The information about the job.

JobNamestring

The job name.

testjob
JobSpecobject

The job configurations.

Idstring

The job ID.

12
RunasUserstring

The user that ran the job.

testuser1
Commentstring

The job description.

jobDescription
Statestring

The job state. Valid values: (PBS cluster and Slurm cluster)

  • FINISHED/Completed
  • RUNNING/Running
  • QUEUED/Pending
  • FAILED/Failed
Running
StderrPathstring

The error output path.

./Temp
StdoutPathstring

The standard output path.

./Temp
Prioritystring

The job priority. Valid values: 0 to 9. A larger value indicates a higher priority.

0
ArrayRequeststring

The queue format of the job.

  • If the job is not in a queue, the output is empty.
  • The format is X-Y:Z. X indicates the first index, Y indicates the final index, and Z indicates the step size. For example, 2-7:2 indicates three sub-jobs numbered 2, 4, and 6.
1-5:2
LastModifyTimestring

The time when the job was last updated.

1724123085
NodeListstring

The compute nodes that were used to run the job.

compute[002,005,003]
SubmitTimestring

The time when the job was submitted.

1724122486
JobQueuestring

The queue name.

comp
Variablesstring

The variables of the job.

{"PBS_O_SHELL":"/bin/bash", "PBS_O_HOST":"manager", "PBS_O_SYSTEM":"Linux", "PBS_O_LANG":"en_US.UTF-8", "PBS_O_QUEUE":"workq"}
Resourcesobject

The information about the resources required to run the job.

Nodesstring

The number of compute nodes that were used to run the job.

3
Coresstring

The number of vCPUs that were used to run the job.

6
Memorystring

The size of memory that was used to run the job.

1536MB
Gpusstring

The number of GPUs that were used to run the job.

0
ArrayJobIdstring

The array job ID.

4
ArrayJobSubIdstring

The ID of the job in the array.

1
ResourcesActualOccupiedobject

Actual resource usage of the job program

Nodesstring

Number of compute nodes.

2
Coresstring

Number of CPU cores.

4
Memorystring

Number of memory.

982MB
Gpusstring

Number of CPUs

0
StartTimestring

Job start time.

1724122486

Examples

Sample success responses

JSONformat

{
  "TotalCount": 10,
  "RequestId": "EABFBD93-58BE-53F3-BBFE-8654BB2E****",
  "PageNumber": 1,
  "PageSize": 20,
  "Success": true,
  "Jobs": [
    {
      "JobName": "testjob",
      "JobSpec": {
        "Id": 12,
        "RunasUser": "testuser1",
        "Comment": "jobDescription",
        "State": "Running",
        "StderrPath": "./Temp",
        "StdoutPath": "./Temp",
        "Priority": 0,
        "ArrayRequest": "1-5:2",
        "LastModifyTime": 1724123085,
        "NodeList": "compute[002,005,003]",
        "SubmitTime": 1724122486,
        "JobQueue": "comp",
        "Variables": {
          "PBS_O_SHELL": "/bin/bash",
          "PBS_O_HOST": "manager",
          "PBS_O_SYSTEM": "Linux",
          "PBS_O_LANG": "en_US.UTF-8",
          "PBS_O_QUEUE": "workq"
        },
        "Resources": {
          "Nodes": 3,
          "Cores": 6,
          "Memory": "1536MB",
          "Gpus": 0
        },
        "ArrayJobId": 4,
        "ArrayJobSubId": 1,
        "ResourcesActualOccupied": {
          "Nodes": 2,
          "Cores": 4,
          "Memory": "982MB",
          "Gpus": 0
        },
        "StartTime": 1724122486
      }
    }
  ]
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidParamsThe specified parameter %s is invalid.The specified parameter %s is invalid.
403InvalidClusterStatusThe operation failed due to invalid cluster status.The cluster status does not support the operation.
404ClusterNotFoundThe specified cluster does not exist.The specified instance does not exist.
406DbErrorA database service error occurred.Database request failed.
406EcsErrorAn error occurred while calling the ECS API operation.ECS API call error. %s
406AgentErrorThe agent service request failed: %sOperation unsuccessful: %s
503ServiceUnavailableThe request has failed due to a temporary failure of the serverThe request has failed due to a temporary failure of the server.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-12-09The Error code has changed. The response structure of the API has changedView Change Details
2024-09-13The Error code has changedView Change Details