> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/recovery/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/recovery/_mcp/server.

# Get job by ID

GET /v1/jobs/{heimdallJobId}

Retrieve a specific job by its UUID.

Reference: https://docs.nvidia.com/recovery/gateway-reference/heimdall-service/getjob

## Request

### Path parameters

- `heimdallJobId` (string, required) — The job identifier.

### Query parameters

- `useHeimdallId` (boolean, optional) — If true, interpret heimdall\_job\_id as a UUID and query by heimdall\_job\_id directly. If false or not set (default), parse as "\{job\_id}-\{attempt\_index}" format.

## Response

### 200

A successful response.

- `job` (v1Job, optional) — Job represents a job tracked by the Advisor, including both actual (observed) and desired (advisor-set) states.

## Types

### v1Job

Job represents a job tracked by the Advisor, including both actual (observed) and desired (advisor-set) states.

- `workflowId` (string, required) — The workflow ID this job belongs to.
- `heimdallJobId` (string, optional) — The UUID assigned by NVIDIA Recovery.
- `jobRunId` (string, optional) — Legacy id for job for slurm systems.
- `jobId` (string, optional) — Scheduler-specific job identifier.
- `attemptIndex` (integer, optional) — The attempt index for this job.
- `nodes` (list of string, optional) — List of nodes associated with the job.
- `gpuCountPerNode` (integer, optional)
- `nodeConstraints` (v1NodeConstraints, optional) — NodeConstraints defines node scheduling constraints for jobs.
- `additionalProperties` (v1JobAdditionalProperties, optional) — JobAdditionalProperties contains additional configuration properties for jobs.
- `state` (enum, optional, default: JOB_STATUS_UNSPECIFIED) — JobStatus represents the state of a job. - JOB_STATUS_UNSPECIFIED: The status is not specified. - JOB_STATUS_PENDING: The job has been created but is not started yet due to being queued, waiting for resources or is pulling container images etc... - JOB_STATUS_RUNNING: The job is scheduled and has started running. - JOB_STATUS_STOPPED: A stopped job is no longer running or using resources. - JOB_STATUS_COMPLETED: The job completed without reporting an error. - JOB_STATUS_FAILED: The job exited with an error status. - JOB_STATUS_CANCELLED: Job was cancelled by the user or system. - JOB_STATUS_DELETED: The job is deleted.
  - Allowed values: `JOB_STATUS_UNSPECIFIED`, `JOB_STATUS_PENDING`, `JOB_STATUS_RUNNING`, `JOB_STATUS_STOPPED`, `JOB_STATUS_COMPLETED`, `JOB_STATUS_FAILED`, `JOB_STATUS_CANCELLED`, `JOB_STATUS_DELETED`
- `createdAt` (datetime, optional) — When the job was created.
- `lastSeen` (datetime, optional) — When the job was last seen.
- `updatedAt` (datetime, optional) — When the job was last updated.
- `jobName` (string, optional)
- `schedulerMetadata` (V1JobSchedulerMetadata, optional) — Scheduler metadata that is specific to the scheduler such as kubernetes namespace or job kind.
- `recoveryConfig` (v1JobRecoveryConfig, optional) — JobRecoveryConfig contains typed recovery policy for scheduler jobs.

### v1NodeConstraints

NodeConstraints defines node scheduling constraints for jobs.

- `exclusions` (list of string, optional) — List of nodes to exclude from job scheduling.
- `inclusions` (list of string, optional) — List of nodes to explicitly include for job scheduling.

### v1JobAdditionalProperties

JobAdditionalProperties contains additional configuration properties for jobs.

- `maxRequeueTimes` (integer, optional) — Maximum number of times a job can be requeued. -1 means unlimited.
- `enableNvrx` (boolean, optional) — Whether NVRX is enabled for this job.

### V1JobSchedulerMetadata

Scheduler metadata that is specific to the scheduler such as kubernetes namespace or job kind.

### v1JobRecoveryConfig

JobRecoveryConfig contains typed recovery policy for scheduler jobs.

- `autoResumeMode` (enum, optional, default: AUTO_RESUME_MODE_UNSPECIFIED) — AutoResumeMode defines how the system should resume a recoverable job. - AUTO_RESUME_MODE_UNSPECIFIED: No job-level auto-resume mode was specified. - AUTO_RESUME_MODE_REQUEUE: Requeue the same scheduler job to resume progress. - AUTO_RESUME_MODE_SINGLETON_DEPENDENCY: Use singleton dependency jobs to resume progress.
  - Allowed values: `AUTO_RESUME_MODE_UNSPECIFIED`, `AUTO_RESUME_MODE_REQUEUE`, `AUTO_RESUME_MODE_SINGLETON_DEPENDENCY`
- `maxRequeueTimes` (integer, optional) — Maximum number of times a job can be requeued. Must be positive when present.
- `requeueOnCompletion` (boolean, optional) — Whether normal completion should trigger requeue. Presence overrides the system default.
- `anomalyDetectionConfig` (v1JobAnomalyDetectionConfig, optional) — JobAnomalyDetectionConfig contains per-job log detection controls.
- `dagDependencies` (list of v1JobDagDependency, optional) — Parent gates that must be satisfied before this job becomes eligible.
- `dagAction` (enum, optional, default: DAG_ACTION_UNSPECIFIED) — DagAction defines what Job Manager should request after all dependencies are satisfied. - DAG_ACTION_UNSPECIFIED: No DAG action was specified. - DAG_ACTION_RELEASE: Release the held child so it becomes scheduler-eligible.
  - Allowed values: `DAG_ACTION_UNSPECIFIED`, `DAG_ACTION_RELEASE`
- `environment` (string, optional) — Optional APS routing environment preserved exactly from the scheduler job.
- `logFilePathsSharedAcrossAttempts` (boolean, optional) — Whether requeued attempts intentionally write to the same log files.

### v1JobAnomalyDetectionConfig

JobAnomalyDetectionConfig contains per-job log detection controls.

- `logBasedCrashEnabled` (boolean, optional) — Whether Watcher log-based crash detection is enabled.
- `logBasedTimeoutEnabled` (boolean, optional) — Whether Watcher no-output detection is enabled.
- `logBasedTimeoutThresholdPretraining` (integer, optional) — No-output threshold during pre-training, in seconds. Must be positive when present.
- `logBasedTimeoutThresholdTrainingloop` (integer, optional) — No-output threshold during the training loop, in seconds. Must be positive when present.

### v1JobDagDependency

JobDagDependency identifies one parent gate for a DAG child.

- `jobId` (string, optional) — Scheduler job ID of the parent.
- `jobName` (string, optional) — Workflow-scoped job name of the parent.
- `trigger` (enum, optional, default: TRIGGER_CONDITION_UNSPECIFIED) — TriggerCondition defines the parent state that satisfies this dependency. - TRIGGER_CONDITION_UNSPECIFIED: No trigger condition was specified. - TRIGGER_CONDITION_COMPLETED: The parent must complete successfully.
  - Allowed values: `TRIGGER_CONDITION_UNSPECIFIED`, `TRIGGER_CONDITION_COMPLETED`

## Examples

**Response**

```json
{
  "job": {
    "workflowId": "test-workflow",
    "heimdallJobId": "test-job-0",
    "jobId": "test-job",
    "attemptIndex": 0,
    "nodes": [
      "node1",
      "node2",
      "node3"
    ],
    "state": "JOB_STATUS_COMPLETED"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.example.com/v1/jobs/heimdallJobId"

response = requests.get(url)

print(response.json())
```

```javascript
const url = 'https://api.example.com/v1/jobs/heimdallJobId';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.example.com/v1/jobs/heimdallJobId"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.example.com/v1/jobs/heimdallJobId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.example.com/v1/jobs/heimdallJobId")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.example.com/v1/jobs/heimdallJobId');

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.example.com/v1/jobs/heimdallJobId");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://api.example.com/v1/jobs/heimdallJobId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```