All Products
Search
Document Center

E-MapReduce:GetJobRun

Last Updated:Mar 10, 2025

Obtain the job details.

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
emr-serverless-spark:GetJobRunget
*All Resources
*
    none
none

Request syntax

GET /api/v1/workspaces/{workspaceId}/jobRuns/{jobRunId} HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
workspaceIdstringYes

The workspace ID.

w-1234abcd
jobRunIdstringYes

The job ID.

jr-231231
regionIdstringNo

The region ID.

cn-hangzhou

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

jobRunobject

The details of the job.

workspaceIdstring

The workspace ID.

w-1234abcd
jobRunIdstring

The job ID.

jr-231231
namestring

The job name.

jobName
statestring

The job state.

Running
stateChangeReasonobject

The reason of the job status change.

codestring

The error code.

ERR-100000
messagestring

The error message.

connection refused
submitTimelong

The time when the job was submitted.

1684119314000
endTimelong

The end time of the job.

1684119314000
codeTypestring

The code type of the job. Valid values:

  • SQL
  • JAR
  • PYTHON
SQL
webUIstring

The web UI of the job.

http://spark-ui
executionTimeoutSecondsinteger

The timeout period of the job.

3600
resourceOwnerIdstring

The ID of the user who created the job.

1509789347011222
tagsarray

The tags.

TagTag

The tag.

logRunLog

The path where the operational logs are stored.

releaseVersionstring

The version of the Spark engine on which the job runs.

esr-3.3.1
resourceQueueIdstring

The name of the queue on which the job runs.

root_queue
jobDriverJobDriver

The information about Spark Driver.

configurationOverridesobject

The job configurations of Spark.

configurationsarray

The configurations.

ConfigurationConfiguration

The configuration.

requestIdstring

The request ID.

DD6B1B2A-5837-5237-ABE4-FF0C8944****

Examples

Sample success responses

JSONformat

{
  "jobRun": {
    "workspaceId": "w-1234abcd",
    "jobRunId": "jr-231231",
    "name": "jobName",
    "state": "Running",
    "stateChangeReason": {
      "code": "ERR-100000",
      "message": "connection refused"
    },
    "submitTime": 1684119314000,
    "endTime": 1684119314000,
    "codeType": "SQL",
    "webUI": "http://spark-ui",
    "executionTimeoutSeconds": 3600,
    "resourceOwnerId": "1509789347011222",
    "tags": [
      {
        "key": "workflowId",
        "value": "wf-123test"
      }
    ],
    "log": {
      "driverStdOut": "",
      "driverStdError": "",
      "driverSyslog": "",
      "driverStartup": ""
    },
    "releaseVersion": "esr-3.3.1",
    "resourceQueueId": "root_queue",
    "jobDriver": {
      "sparkSubmit": {
        "entryPoint": "",
        "entryPointArguments": [
          ""
        ],
        "sparkSubmitParameters": ""
      }
    },
    "configurationOverrides": {
      "configurations": [
        {
          "configFileName": "",
          "configItemKey": "",
          "configItemValue": ""
        }
      ]
    },
    "displayReleaseVersion": "",
    "fusion": true,
    "environmentId": ""
  },
  "requestId": "DD6B1B2A-5837-5237-ABE4-FF0C8944****"
}

Error codes

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

Change history

Change timeSummary of changesOperation
2024-08-22The response structure of the API has changedView Change Details
2024-05-17The internal configuration of the API is changed, but the call is not affectedView Change Details