> 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 a recovery sequence

GET /v1/recovery/sequences

Read the canonical trace context for one exact scoped recovery operation. A missing sequence returns not found without creating state or authorizing scheduler actions.

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

## Request

### Query parameters

- `schedulerSystem` (string, required) — Scheduler system name, for example "slurm".
- `schedulerScope` (string, required) — Deployment or cluster scope that disambiguates scheduler job identifiers.
- `jobId` (string, required) — Scheduler-specific job identifier.
- `sourceAttemptIndex` (integer, required) — Zero-based attempt index on which recovery was triggered.
- `operation` (enum, required, default: RECOVERY_OPERATION_UNSPECIFIED) — Scheduler-neutral recovery operation. - RECOVERY_OPERATION_UNSPECIFIED: No recovery operation was specified. - RECOVERY_OPERATION_RESTART: Restart the failed source attempt. - RECOVERY_OPERATION_TERMINATE: Terminate the source attempt. - RECOVERY_OPERATION_DAG_RELEASE: Release a held job after its DAG dependencies are satisfied.
  - Allowed values: `RECOVERY_OPERATION_UNSPECIFIED`, `RECOVERY_OPERATION_RESTART`, `RECOVERY_OPERATION_TERMINATE`, `RECOVERY_OPERATION_DAG_RELEASE`

## Response

### 200

A successful response.

- `recoveryContext` (v1RecoveryContext, required) — RecoveryContext carries one durable recovery sequence's W3C trace context. It is correlation data and does not authorize or otherwise change scheduler actions.

## Types

### v1RecoveryContext

RecoveryContext carries one durable recovery sequence's W3C trace context. It is correlation data and does not authorize or otherwise change scheduler actions.

- `sequenceId` (string, required) — The durable recovery sequence UUID assigned by Job Manager.
- `traceparent` (string, required) — The canonical W3C traceparent for later recovery work.
- `triggeredAt` (datetime, required) — When the triggering condition was observed.
- `operation` (enum, required, default: RECOVERY_OPERATION_UNSPECIFIED) — RecoveryOperation identifies the scheduler-neutral recovery intent. - RECOVERY_OPERATION_UNSPECIFIED: No recovery operation was specified. - RECOVERY_OPERATION_RESTART: Restart the failed source attempt. - RECOVERY_OPERATION_TERMINATE: Terminate the source attempt. - RECOVERY_OPERATION_DAG_RELEASE: Release a held job after its DAG dependencies are satisfied.
  - Allowed values: `RECOVERY_OPERATION_UNSPECIFIED`, `RECOVERY_OPERATION_RESTART`, `RECOVERY_OPERATION_TERMINATE`, `RECOVERY_OPERATION_DAG_RELEASE`
- `tracestate` (string, optional) — The canonical W3C tracestate, when present.

## Examples

**Response**

```json
{
  "recoveryContext": {
    "sequenceId": "string",
    "traceparent": "string",
    "triggeredAt": "2024-01-15T09:30:00Z",
    "operation": "RECOVERY_OPERATION_UNSPECIFIED",
    "tracestate": "string"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.example.com/v1/recovery/sequences"

querystring = {"jobId":"jobId","operation":"RECOVERY_OPERATION_UNSPECIFIED","schedulerScope":"schedulerScope","schedulerSystem":"schedulerSystem","sourceAttemptIndex":"1"}

response = requests.get(url, params=querystring)

print(response.json())
```

```javascript
const url = 'https://api.example.com/v1/recovery/sequences?jobId=jobId&operation=RECOVERY_OPERATION_UNSPECIFIED&schedulerScope=schedulerScope&schedulerSystem=schedulerSystem&sourceAttemptIndex=1';
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/recovery/sequences?jobId=jobId&operation=RECOVERY_OPERATION_UNSPECIFIED&schedulerScope=schedulerScope&schedulerSystem=schedulerSystem&sourceAttemptIndex=1"

	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/recovery/sequences?jobId=jobId&operation=RECOVERY_OPERATION_UNSPECIFIED&schedulerScope=schedulerScope&schedulerSystem=schedulerSystem&sourceAttemptIndex=1")

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/recovery/sequences?jobId=jobId&operation=RECOVERY_OPERATION_UNSPECIFIED&schedulerScope=schedulerScope&schedulerSystem=schedulerSystem&sourceAttemptIndex=1")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.example.com/v1/recovery/sequences?jobId=jobId&operation=RECOVERY_OPERATION_UNSPECIFIED&schedulerScope=schedulerScope&schedulerSystem=schedulerSystem&sourceAttemptIndex=1');

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

```csharp
using RestSharp;

var client = new RestClient("https://api.example.com/v1/recovery/sequences?jobId=jobId&operation=RECOVERY_OPERATION_UNSPECIFIED&schedulerScope=schedulerScope&schedulerSystem=schedulerSystem&sourceAttemptIndex=1");
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/recovery/sequences?jobId=jobId&operation=RECOVERY_OPERATION_UNSPECIFIED&schedulerScope=schedulerScope&schedulerSystem=schedulerSystem&sourceAttemptIndex=1")! 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()
```