> 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.

# List jobs

GET /v1/jobs

Retrieve a list of jobs that the Advisor is aware of. Jobs are ordered by creation time ascending for synchronization purposes. Use the `page` parameter to get the next page of jobs.

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

## Request

### Query parameters

- `pageToken` (string, optional) — A decimal zero-based offset from the previous response's next_page_token field. Mutually exclusive with page_number.
- `pageNumber` (integer, optional) — A one-based page number. Page N starts at offset (N - 1) * limit. Mutually exclusive with page_token.
- `limit` (integer, optional) — The maximum number of jobs to return. Defaults to 100 and cannot exceed 250.
- `workflowIds` (list of string, optional) — The workflow IDs to filter by.
- `jobIds` (list of string, optional) — The job IDs to filter by.
- `jmState` (string, optional) — Job manager / scheduler state filter (e.g. RUNNING, COMPLETED). Passed through to job manager.
- `reconciliationEligibleJobs` (boolean, optional) — Return jobs that can seed scheduler reconciliation: all non-final jobs plus failure-like terminal jobs. COMPLETED and REQUEUED jobs are excluded because their recovery is driven by exact-attempt Advice. Passed through to job manager and mutually exclusive with jm_state.
- `completedJobs` (boolean, optional) — Filter by backend completion state: false returns non-final attempts, true returns final attempts, and omission preserves historical listing. Passed through to job manager; mutually exclusive with jm_state and reconciliation_eligible_jobs=true.
- `endTimeFrom` (datetime, optional) — Inclusive lower bound on persisted job end time, applied in job manager before count and pagination. Attempts without an end time are excluded.

## Response

### 200

A successful response.

- `jobs` (list of v1Job, optional) — The list of jobs.
- `count` (integer, optional) — The total count of jobs returned.
- `nextPageToken` (string, optional) — The decimal zero-based offset to use for the next page of results.

## 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
{
  "jobs": [
    {
      "workflowId": "string",
      "heimdallJobId": "string",
      "jobRunId": "string",
      "jobId": "string",
      "attemptIndex": 1,
      "nodes": [
        "string"
      ],
      "gpuCountPerNode": 1,
      "nodeConstraints": {
        "exclusions": [
          "string"
        ],
        "inclusions": [
          "string"
        ]
      },
      "additionalProperties": {
        "maxRequeueTimes": 1,
        "enableNvrx": true
      },
      "state": "JOB_STATUS_UNSPECIFIED",
      "createdAt": "2024-01-15T09:30:00Z",
      "lastSeen": "2024-01-15T09:30:00Z",
      "updatedAt": "2024-01-15T09:30:00Z",
      "jobName": "string",
      "schedulerMetadata": {},
      "recoveryConfig": {
        "autoResumeMode": "AUTO_RESUME_MODE_UNSPECIFIED",
        "maxRequeueTimes": 1,
        "requeueOnCompletion": true,
        "anomalyDetectionConfig": {
          "logBasedCrashEnabled": true,
          "logBasedTimeoutEnabled": true,
          "logBasedTimeoutThresholdPretraining": 1,
          "logBasedTimeoutThresholdTrainingloop": 1
        },
        "dagDependencies": [
          {
            "jobId": "string",
            "jobName": "string",
            "trigger": "TRIGGER_CONDITION_UNSPECIFIED"
          }
        ],
        "dagAction": "DAG_ACTION_UNSPECIFIED",
        "environment": "string",
        "logFilePathsSharedAcrossAttempts": true
      }
    }
  ],
  "count": 1,
  "nextPageToken": "string"
}
```

**SDK Code**

```python
import requests

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

response = requests.get(url)

print(response.json())
```

```javascript
const url = 'https://api.example.com/v1/jobs';
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"

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

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")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

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

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

```csharp
using RestSharp;

var client = new RestClient("https://api.example.com/v1/jobs");
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")! 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()
```