All Products
Search
Document Center

Elastic High Performance Computing:GetJob

Last Updated:Jan 14, 2026

Obtains the details of a job.

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:GetJobget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ClusterIdstringYes

The cluster ID.

ehpc-hz-FYUr32****
JobIdstringYes

The job ID. You can call the ListJobs operation to query the job ID.

1.manager

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

04F0****-1335-****-A1D7-6C044FE7****
JobInfoobject

The job details.

JobIdstring

The job ID.

1.manager
JobNamestring

The job name.

testJob
RunasUserstring

The user to which the job belongs or that is used to submit the job. This user is a cluster-side user.

testuser
Statestring

The job state.

Running
JobQueuestring

The queue to which the job belongs.

workq
CreateTimestring

The time when the job was submitted.

2024-08-16T10:52:48
LastModifyTimestring

The time when the job was last modified.

2024-08-16T10:52:48
ErrorLogstring

The error log file of the job.

/home/xxx/STDIN.e1
StartTimestring

The time when the job was started.

2024-08-16T10:52:48
Prioritystring

The priority of the job.

0
CommandLinestring

The command that is used to run the job.

/home/huangsf/ehpc/job_meta.pbs
OutputLogstring

The standard output log file of the job.

/home/xxx/STDIN.o1
NodeListstring

The compute nodes that are used to run the job.

compute000
ArrayRequeststring

The job queue. 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
Resourcesobject

The resources that were requested when the job was submitted.

Nodesstring

The number of nodes that are used to run the job.

1
Coresstring

The number of vCPUs used by the job on each node.

2
Memorystring

The memory size used by the job on each node.

1gb
Gpusstring

The number of GPUs used by the job on each node.

1
Variablesarray<object>

The variables of the job.

Variablesobject

The environment variables.

Namestring

The name of the environment variable.

ProxyIP
Valuestring

The value of the environment variable.

10.x.x.x
ExtraInfostring

Additional information.

{}
ResourcesUsedobject

The resources that are actually used by the job.

Nodesstring

The number of nodes that are used to run the job.

2
Coresstring

The number of vCPUs used by the job on each node.

2
Memorystring

The memory size used by the job on each node.

512mb
ArrayJobIdstring

The parent job ID. If the return value is a non-empty string, the job is an array job.

1
ArrayJobSubIdstring

The sub-job ID. This parameter is valid when the ArrayJobId parameter is a non-empty string.

3
Successstring

The request result. Valid values:

  • true
  • false
true

Examples

Sample success responses

JSONformat

{
  "RequestId": "04F0****-1335-****-A1D7-6C044FE7****",
  "JobInfo": {
    "JobId": "1.manager",
    "JobName": "testJob\n",
    "RunasUser": "testuser",
    "State": "Running",
    "JobQueue": "workq",
    "CreateTime": "2024-08-16T10:52:48",
    "LastModifyTime": "2024-08-16T10:52:48",
    "ErrorLog": "/home/xxx/STDIN.e1",
    "StartTime": "2024-08-16T10:52:48",
    "Priority": 0,
    "CommandLine": "/home/huangsf/ehpc/job_meta.pbs",
    "OutputLog": "/home/xxx/STDIN.o1",
    "NodeList": "compute000",
    "ArrayRequest": "1-5:2",
    "Resources": {
      "Nodes": 1,
      "Cores": 2,
      "Memory": "1gb",
      "Gpus": 1
    },
    "Variables": [
      {
        "Name": "ProxyIP",
        "Value": "10.x.x.x"
      }
    ],
    "ExtraInfo": {},
    "ResourcesUsed": {
      "Nodes": 2,
      "Cores": 2,
      "Memory": "512mb"
    },
    "ArrayJobId": 1,
    "ArrayJobSubId": 3
  },
  "Success": true
}

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
No change history