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

# Query audit events

GET /v1/audit/events

Read persisted audit events by internal job ID or scheduler job ID with an optional attempt. A job without an attempt includes all attempts. Event filters and inclusive producer-time bounds narrow results; page size defaults to and cannot exceed 100. Cursors are opaque and must be reused with the same query.

Reference: https://docs.nvidia.com/recovery/gateway-reference/audit-service/getauditevents

## Request

### Query parameters

- `heimdallJobId` (string, optional) — Exact internal job identifier; exclusive with scheduler job selectors.
- `jobId` (string, optional) — Scheduler job identifier; omitting attempt_index includes all attempts.
- `attemptIndex` (integer, optional) — Exact non-negative attempt; requires job_id. Zero is a valid attempt.
- `eventType` (string, optional) — Stable event type to match exactly.
- `eventLevel` (string, optional) — Event level to match exactly.
- `eventProducer` (string, optional) — Producer component to match exactly.
- `minEventProducedAt` (string, optional) — Inclusive minimum producer timestamp in Unix microseconds.
- `maxEventProducedAt` (string, optional) — Inclusive maximum producer timestamp in Unix microseconds.
- `sortBy` (string, optional) — Timestamp ordering: event_produced_at:asc or event_produced_at:desc.
- `cursor` (string, optional) — Opaque cursor returned for an adjacent page of the same query.
- `limit` (integer, optional) — Page size from 1 through 100; defaults to 100 when omitted.

## Response

### 200

A successful response.

- `cursor` (v1AuditEventPageCursor, optional) — AuditEventPageCursor identifies adjacent pages without exposing storage keys.
- `items` (list of v1AuditEvent, optional) — Events matching the requested filters and ordering.

## Types

### v1AuditEventPageCursor

AuditEventPageCursor identifies adjacent pages without exposing storage keys.

- `prevCursor` (string, optional) — Previous page cursor; empty when no previous page exists.
- `nextCursor` (string, optional) — Next page cursor; empty when no next page exists.

### v1AuditEvent

AuditEvent is the public projection of a persisted event.

- `heimdallJobId` (string, optional) — Internal job identifier; distinct from the private storage row identifier.
- `eventProducer` (string, optional) — Component that produced the event.
- `eventType` (string, optional) — Stable event-type identifier.
- `eventLevel` (string, optional) — Stable audit event-level identifier.
- `payload` (V1AuditEventPayload, optional) — Event-specific structured data.
- `eventProducedAt` (string, optional) — Producer emission time as Unix microseconds.
- `summary` (v1AuditEventHumanSummary, optional) — AuditEventHumanSummary describes a persisted event for human readers.

### V1AuditEventPayload

Event-specific structured data.

### v1AuditEventHumanSummary

AuditEventHumanSummary describes a persisted event for human readers.

- `title` (string, optional) — Event title.
- `description` (string, optional) — Concise event description.
- `granularity` (integer, optional) — Granularity used to group events in human-facing views.

## Examples

**Response**

```json
{
  "cursor": {
    "prevCursor": "string",
    "nextCursor": "string"
  },
  "items": [
    {
      "heimdallJobId": "string",
      "eventProducer": "string",
      "eventType": "string",
      "eventLevel": "string",
      "payload": {},
      "eventProducedAt": "string",
      "summary": {
        "title": "string",
        "description": "string",
        "granularity": 1
      }
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.example.com/v1/audit/events"

response = requests.get(url)

print(response.json())
```

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

	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/audit/events")

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

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

$client = new \GuzzleHttp\Client();

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

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

```csharp
using RestSharp;

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