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

# Record a recovery milestone

POST /v1/recovery/milestones
Content-Type: application/json

Idempotently persist one scheduler-action completion occurrence for recovery tracing and latency measurement.

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

## Request

### Body (application/json)

This endpoint expects a v1RecordRecoveryMilestoneRequest.

- `sequenceId` (string, required) — Durable recovery sequence UUID.
- `idempotencyKey` (string, required) — Stable key that deduplicates reports of this action occurrence.
- `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`
- `action` (enum, required, default: RECOVERY_SCHEDULER_ACTION_UNSPECIFIED) — RecoverySchedulerAction identifies one scheduler command occurrence. - RECOVERY_SCHEDULER_ACTION_UNSPECIFIED: No scheduler action was specified. - RECOVERY_SCHEDULER_ACTION_SLURM_REQUEUE_HOLD: Ask Slurm to requeue the job and hold the target attempt. - RECOVERY_SCHEDULER_ACTION_SLURM_UPDATE_CONSTRAINTS: Ask Slurm to update the target attempt's node constraints. - RECOVERY_SCHEDULER_ACTION_SLURM_RELEASE: Ask Slurm to release the target attempt from its hold. - RECOVERY_SCHEDULER_ACTION_SLURM_CANCEL: Ask Slurm to cancel the job.
  - Allowed values: `RECOVERY_SCHEDULER_ACTION_UNSPECIFIED`, `RECOVERY_SCHEDULER_ACTION_SLURM_REQUEUE_HOLD`, `RECOVERY_SCHEDULER_ACTION_SLURM_UPDATE_CONSTRAINTS`, `RECOVERY_SCHEDULER_ACTION_SLURM_RELEASE`, `RECOVERY_SCHEDULER_ACTION_SLURM_CANCEL`
- `outcome` (enum, required, default: RECOVERY_SCHEDULER_ACTION_OUTCOME_UNSPECIFIED) — RecoverySchedulerActionOutcome classifies one scheduler action occurrence. - RECOVERY_SCHEDULER_ACTION_OUTCOME_UNSPECIFIED: No scheduler action outcome was specified. - RECOVERY_SCHEDULER_ACTION_OUTCOME_PLANNED: The action was planned in observe mode and no command ran. - RECOVERY_SCHEDULER_ACTION_OUTCOME_SUCCESS: The scheduler command completed successfully. - RECOVERY_SCHEDULER_ACTION_OUTCOME_ERROR: The scheduler command returned an error. - RECOVERY_SCHEDULER_ACTION_OUTCOME_ALREADY_SATISFIED: Fresh scheduler state showed that the action was already satisfied.
  - Allowed values: `RECOVERY_SCHEDULER_ACTION_OUTCOME_UNSPECIFIED`, `RECOVERY_SCHEDULER_ACTION_OUTCOME_PLANNED`, `RECOVERY_SCHEDULER_ACTION_OUTCOME_SUCCESS`, `RECOVERY_SCHEDULER_ACTION_OUTCOME_ERROR`, `RECOVERY_SCHEDULER_ACTION_OUTCOME_ALREADY_SATISFIED`
- `completedAt` (datetime, required) — When the scheduler action returned or its logical outcome was determined.
- `completesSequence` (boolean, required) — Whether this occurrence completes the owning recovery sequence. The scheduler adapter sets this from its workflow semantics; Job Manager does not derive it from operation, action, or outcome.

## Response

### 200

A successful response.

- `duplicate` (boolean, optional) — Whether this idempotency key had already been recorded.
- `sequenceCompleted` (boolean, optional) — Whether the sequence is completed after accepting this report.
- `endToEndDurationSeconds` (double, optional) — Trigger-to-terminal-milestone duration when this report newly completed its sequence.

## Examples

**Request**

```json
{
  "sequenceId": "string",
  "idempotencyKey": "string",
  "operation": "RECOVERY_OPERATION_UNSPECIFIED",
  "action": "RECOVERY_SCHEDULER_ACTION_UNSPECIFIED",
  "outcome": "RECOVERY_SCHEDULER_ACTION_OUTCOME_UNSPECIFIED",
  "completedAt": "2024-01-15T09:30:00Z",
  "completesSequence": true
}
```

**Response**

```json
{
  "duplicate": true,
  "sequenceCompleted": true,
  "endToEndDurationSeconds": 1.1
}
```

**SDK Code**

```python
import requests

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

payload = {
    "sequenceId": "string",
    "idempotencyKey": "string",
    "operation": "RECOVERY_OPERATION_UNSPECIFIED",
    "action": "RECOVERY_SCHEDULER_ACTION_UNSPECIFIED",
    "outcome": "RECOVERY_SCHEDULER_ACTION_OUTCOME_UNSPECIFIED",
    "completedAt": "2024-01-15T09:30:00Z",
    "completesSequence": True
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.example.com/v1/recovery/milestones';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"sequenceId":"string","idempotencyKey":"string","operation":"RECOVERY_OPERATION_UNSPECIFIED","action":"RECOVERY_SCHEDULER_ACTION_UNSPECIFIED","outcome":"RECOVERY_SCHEDULER_ACTION_OUTCOME_UNSPECIFIED","completedAt":"2024-01-15T09:30:00Z","completesSequence":true}'
};

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"
	"strings"
	"net/http"
	"io"
)

func main() {

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

	payload := strings.NewReader("{\n  \"sequenceId\": \"string\",\n  \"idempotencyKey\": \"string\",\n  \"operation\": \"RECOVERY_OPERATION_UNSPECIFIED\",\n  \"action\": \"RECOVERY_SCHEDULER_ACTION_UNSPECIFIED\",\n  \"outcome\": \"RECOVERY_SCHEDULER_ACTION_OUTCOME_UNSPECIFIED\",\n  \"completedAt\": \"2024-01-15T09:30:00Z\",\n  \"completesSequence\": true\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

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

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

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"sequenceId\": \"string\",\n  \"idempotencyKey\": \"string\",\n  \"operation\": \"RECOVERY_OPERATION_UNSPECIFIED\",\n  \"action\": \"RECOVERY_SCHEDULER_ACTION_UNSPECIFIED\",\n  \"outcome\": \"RECOVERY_SCHEDULER_ACTION_OUTCOME_UNSPECIFIED\",\n  \"completedAt\": \"2024-01-15T09:30:00Z\",\n  \"completesSequence\": true\n}"

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.post("https://api.example.com/v1/recovery/milestones")
  .header("Content-Type", "application/json")
  .body("{\n  \"sequenceId\": \"string\",\n  \"idempotencyKey\": \"string\",\n  \"operation\": \"RECOVERY_OPERATION_UNSPECIFIED\",\n  \"action\": \"RECOVERY_SCHEDULER_ACTION_UNSPECIFIED\",\n  \"outcome\": \"RECOVERY_SCHEDULER_ACTION_OUTCOME_UNSPECIFIED\",\n  \"completedAt\": \"2024-01-15T09:30:00Z\",\n  \"completesSequence\": true\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.example.com/v1/recovery/milestones', [
  'body' => '{
  "sequenceId": "string",
  "idempotencyKey": "string",
  "operation": "RECOVERY_OPERATION_UNSPECIFIED",
  "action": "RECOVERY_SCHEDULER_ACTION_UNSPECIFIED",
  "outcome": "RECOVERY_SCHEDULER_ACTION_OUTCOME_UNSPECIFIED",
  "completedAt": "2024-01-15T09:30:00Z",
  "completesSequence": true
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.example.com/v1/recovery/milestones");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"sequenceId\": \"string\",\n  \"idempotencyKey\": \"string\",\n  \"operation\": \"RECOVERY_OPERATION_UNSPECIFIED\",\n  \"action\": \"RECOVERY_SCHEDULER_ACTION_UNSPECIFIED\",\n  \"outcome\": \"RECOVERY_SCHEDULER_ACTION_OUTCOME_UNSPECIFIED\",\n  \"completedAt\": \"2024-01-15T09:30:00Z\",\n  \"completesSequence\": true\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [
  "sequenceId": "string",
  "idempotencyKey": "string",
  "operation": "RECOVERY_OPERATION_UNSPECIFIED",
  "action": "RECOVERY_SCHEDULER_ACTION_UNSPECIFIED",
  "outcome": "RECOVERY_SCHEDULER_ACTION_OUTCOME_UNSPECIFIED",
  "completedAt": "2024-01-15T09:30:00Z",
  "completesSequence": true
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.example.com/v1/recovery/milestones")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```