All Products
Search
Document Center

Elastic High Performance Computing:ListJobs

Last Updated:Jun 26, 2026

Queries the list of jobs in a specified cluster.

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

ehpc:ListJobs

list

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

ClusterId

string

Yes

The cluster ID.

You can call ListClusters to query the cluster ID.

ehpc-hz-csbua72***

PageNumber

string

No

The page number of the list.

  • Minimum value: 1.

  • Default value: 1.

1

PageSize

string

No

The number of entries per page when using paged query. Paging is applied to the results.

  • Maximum value: 50.

  • Default value: 10.

10

JobFilter

object

No

The job filter information.

Users

array

No

The list of users who run the jobs.

string

No

The username of the user who runs the job. Fuzzy match is supported.

You can call ListUsers to query the usernames in the cluster.

testuser1

Queues

array

No

The list of queues that run the jobs.

string

No

The name of the queue that runs the job. Fuzzy match is supported.

comp

Nodes

array

No

The list of compute nodes that run the jobs.

string

No

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

compute000

JobName

string

No

The job name. Fuzzy match is supported.

testjob

JobStatus

string

No

The job status. Valid values:

  • all: all statuses.

  • finished: completed.

  • notfinish: not completed.

Default value: all.

all

CreateTimeStart

string

No

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

1724122486

CreateTimeEnd

string

No

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

1724123085

SortBy

object

No

The sorting configuration for the job list.

ExecuteOrder

string

No

Sorts jobs by execution time. Valid values:

  • asc: ascending order.

  • desc: descending order.

Default value: desc.

asc

SubmitOrder

string

No

Sorts jobs by submission time. Valid values:

  • asc: ascending order.

  • desc: descending order.

Default value: desc.

asc

PendOrder

string

No

Sorts jobs by queue wait time. Valid values:

  • asc: ascending order.

  • desc: descending order.

Default value: desc.

desc

Diagnosis

array<object>

No

The job diagnostic analysis list.

object

No

The job diagnostic analysis details.

Option

string

No

The job diagnostic analysis metric.

run_duration

Operator

string

No

The comparison operator for the job diagnostic threshold.

Valid values:

  • greater_or_equal :

    greater than or equal to.

  • less :

    less than.

  • less_or_equal :

    less than or equal to.

  • greater :

    greater than.

greater

Threshold

string

No

The job diagnostic threshold.

24

Response elements

Element

Type

Description

Example

object

The response parameters.

TotalCount

integer

The total number of entries returned.

10

RequestId

string

The request ID.

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

PageNumber

integer

The page number. Default value: 1.

1

PageSize

integer

The number of entries per page set for the paged query. Paging settings apply. Default value: 10.

20

Success

boolean

Indicates whether the command was run and the result was obtained. Valid values:

  • true: Succeeded.

  • false: Failed.

true

Jobs

array<object>

The job list.

array<object>

The job information.

JobName

string

The job name.

testjob

JobSpec

object

The job configuration.

Id

string

The job ID.

12

RunasUser

string

The user that ran the job.

testuser1

Comment

string

The job description.

jobDescription

State

string

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

  • FINISHED/Completed

  • RUNNING/Running

  • QUEUED/Pending

  • FAILED/Failed

Running

StderrPath

string

The error output path.

./Temp

StdoutPath

string

The standard output path.

./Temp

Priority

string

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

0

ArrayRequest

string

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

LastModifyTime

string

The time when the job was last updated.

1724123085

NodeList

string

The compute nodes that were used to run the job.

compute[002,005,003]

SubmitTime

string

The time when the job was submitted.

1724122486

JobQueue

string

The queue name.

comp

Variables

string

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"}

Resources

object

The information about the resources required to run the job.

Nodes

string

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

3

Cores

string

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

6

Memory

string

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

1536MB

Gpus

string

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

0

ArrayJobId

string

The array job ID.

4

ArrayJobSubId

string

The ID of the job in the array.

1

ResourcesActualOccupied

object

Actual resource usage of the job program

Nodes

string

Number of compute nodes.

2

Cores

string

Number of CPU cores.

4

Memory

string

Number of memory.

982MB

Gpus

string

Number of CPUs

0

StartTime

string

Job start time.

1724122486

Examples

Success response

JSON format

{
  "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\", \t\"PBS_O_HOST\":\"manager\", \t\"PBS_O_SYSTEM\":\"Linux\", \t\"PBS_O_LANG\":\"en_US.UTF-8\", \t\"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 code

Error code

Error message

Description

400 InvalidParams The specified parameter %s is invalid. The specified parameter %s is invalid.
403 InvalidClusterStatus The operation failed due to invalid cluster status. The cluster status does not support the operation.
404 ClusterNotFound The specified cluster does not exist. The specified instance does not exist.
503 ServiceUnavailable The request has failed due to a temporary failure of the server The request has failed due to a temporary failure of the server.
406 DbError A database service error occurred. Database request failed.
406 EcsError An error occurred while calling the ECS API operation. ECS API call error. %s
406 AgentError The agent service request failed: %s Operation unsuccessful: %s

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.