> This page is for Self-Hosted, version v3.0 (default).
> For other versions, use one of these documentation indexes:
> - v3.0 (default): https://docs.nvidia.com/run-ai/self-hosted/v3.0/llms.txt
> - v2.26: https://docs.nvidia.com/run-ai/self-hosted/v2.26/llms.txt
> - v2.25: https://docs.nvidia.com/run-ai/self-hosted/v2.25/llms.txt
> - v2.24: https://docs.nvidia.com/run-ai/self-hosted/v2.24/llms.txt

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

# Get revision data.

GET http://localhost:8080/api/v1/workloads/inferences/revisions/{revisionId}

Retrieve revision details using a revision id. Supported for clusters v2.21+.

Reference: https://docs.nvidia.com/run-ai/self-hosted/reference/rest-api/endpoints/workloads/revisions/get-revision

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication

## Request

### Path parameters

- `revisionId` (string, required) — The Universally Unique Identifier (UUID) of the revision.

## Response

### 200

Executed successfully.

- `type` (string, required)
- `name` (string, required)
- `id` (string, required)
- `workloadId` (string, required)
- `tenantId` (integer, required) — The id of the tenant.
- `clusterId` (string, required) — The id of the cluster.
- `projectId` (string, required) — The id of the project.
- `departmentId` (string, required) — The id of the department.
- `createdAt` (datetime, required)
- `phase` (enum, required)
  - Allowed values: `Creating`, `Initializing`, `Resuming`, `Pending`, `Deleting`, `Running`, `Updating`, `Stopped`, `Stopping`, `Degraded`, `Failed`, `Completed`, `Terminating`, `Unknown`
- `deletedAt` (datetime, optional, nullable)
- `revisionRequestedResources` (WorkloadRequestResources, optional)
- `podsRequestedResources` (WorkloadRequestResources, optional)
- `requestedPods` (RequestedPods, optional)
- `requestedNodePools` (list of string, optional)
- `allocatedResources` (WorkloadAllocatedResources, optional)
- `currentNodePools` (list of string, optional)
- `runningPods` (integer, optional)
- `images` (list of string, optional)
- `environmentVariables` (map from string to string, optional)
- `command` (string, optional)
- `arguments` (string, optional)
- `childrenIds` (list of RevisionChildrenIdsItems, optional)
- `conditions` (list of Condition1, optional)
- `phaseMessage` (string, optional)
- `phaseUpdatedAt` (datetime, optional)
- `additionalFields` (map from string to any, optional)

## Errors

### 401 Unauthorized Error

Unauthorized

- `code` (integer, required)
- `message` (string, required)
- `details` (string, optional)

### 403 Forbidden Error

Forbidden

- `code` (integer, required)
- `message` (string, required)
- `details` (string, optional)

### 404 Not Found Error

The specified resource was not found

- `code` (integer, required)
- `message` (string, required)
- `details` (string, optional)

### 500 Internal Server Error

unexpected error

- `code` (integer, required)
- `message` (string, required)
- `details` (string, optional)

### 503 Service Unavailable Error

unexpected error

- `code` (integer, required)
- `message` (string, required)
- `details` (string, optional)

## Types

### WorkloadRequestResources

- `gpuRequestType` (enum, optional) — Sets the unit type for GPU resources requests. Stated in terms of portion or memory. Sets the unit type for other GPU request fields. If `gpuDevicesRequest > 1`, only `portion` is supported. If `gpuDeviceRequest = 1`, the request type can be stated as `portion` or `memory`.
  - Allowed values: `portion`, `memory`
- `gpu` (RequestResourceCores, optional)
- `gpuMemory` (RequestResourceQuantity, optional)
- `cpu` (RequestResourceCores, optional)
- `cpuMemory` (RequestResourceQuantity, optional)
- `extendedResources` (list of WorkloadsExtendedResource, optional) — Set of extended resources with their quantity

### RequestedPods

- `number` (integer, optional, nullable)
- `min` (integer, optional, nullable)
- `max` (integer, optional, nullable)
- `parallelism` (integer, optional, nullable) — specifies how many Pods can run in parallel
- `completions` (integer, optional, nullable) — specifies how many Pods should terminate successfully before the Workload is completed

### WorkloadAllocatedResources

- `gpu` (double, optional, nullable) — Required if and only if gpuRequestType is portion. States the number of GPUs allocated for the created workload. The default is no allocated GPUs.
- `gpuMemory` (string, optional, nullable)
- `cpu` (double, optional, nullable) — States the amount of CPU cores used by the workload running.
- `cpuMemory` (string, optional, nullable)
- `extendedResources` (list of WorkloadsExtendedResource, optional) — Set of extended resources with their quantity

### RevisionChildrenIdsItems

- `id` (string, required)
- `type` (string, optional)

### Condition1

- `type` (string, required) — The type of the condition, such as Failed or Available. See Types of domain status conditions.
- `status` (string, required) — The status of the condition, such as True, False or Unknown.
- `message` (string, optional) — An optional, human-readable message providing more details about the condition.
- `reason` (string, optional) — The reason for the Failed condition. Not applicable to other types of condition.
- `lastTransitionTime` (datetime, optional, nullable) — A timestamp of when the condition was created or the last time the condition transitioned from one status to another.

### RequestResourceCores

- `limit` (double, optional, nullable)
- `request` (double, optional, nullable)

### RequestResourceQuantity

- `limit` (string, optional, nullable)
- `request` (string, optional, nullable)

### WorkloadsExtendedResource

Quantity of an extended resource.

- `resource` (string, optional, nullable) — The name of the extended resource (mandatory)
- `quantity` (string, optional, nullable) — The requested quantity for the given resource.
- `exclude` (boolean, optional, nullable) — Whether to exclude this extended resource from the workload. This is necessary in case the extended resource is inherited from the policy defaults and it is desired not to include it in this workload.

## Examples

**Response**

```json
{
  "type": "runai-revision",
  "name": "very-important-job",
  "id": "string",
  "workloadId": "string",
  "tenantId": 1001,
  "clusterId": "71f69d83-ba66-4822-adf5-55ce55efd210",
  "projectId": "1",
  "departmentId": "2",
  "createdAt": "2022-01-01T03:49:52.531Z",
  "phase": "Creating",
  "deletedAt": "2022-08-12T19:28:24.131Z",
  "revisionRequestedResources": {
    "gpuRequestType": "portion",
    "gpu": {
      "limit": 1.5,
      "request": 1
    },
    "gpuMemory": {
      "limit": "2G",
      "request": "200M"
    },
    "cpu": {
      "limit": 1.5,
      "request": 1
    },
    "cpuMemory": {
      "limit": "2G",
      "request": "200M"
    },
    "extendedResources": [
      {
        "resource": "hardware-vendor.example/foo",
        "quantity": "2",
        "exclude": false
      }
    ]
  },
  "podsRequestedResources": {
    "gpuRequestType": "portion",
    "gpu": {
      "limit": 1.5,
      "request": 1
    },
    "gpuMemory": {
      "limit": "2G",
      "request": "200M"
    },
    "cpu": {
      "limit": 1.5,
      "request": 1
    },
    "cpuMemory": {
      "limit": "2G",
      "request": "200M"
    },
    "extendedResources": [
      {
        "resource": "hardware-vendor.example/foo",
        "quantity": "2",
        "exclude": false
      }
    ]
  },
  "requestedPods": {
    "number": 1,
    "min": 2,
    "max": 5,
    "parallelism": 3,
    "completions": 5
  },
  "requestedNodePools": [
    "default"
  ],
  "allocatedResources": {
    "gpu": 1.5,
    "gpuMemory": "200Mi",
    "cpu": 0.5,
    "cpuMemory": "0B",
    "extendedResources": [
      {
        "resource": "hardware-vendor.example/foo",
        "quantity": "2",
        "exclude": false
      }
    ]
  },
  "currentNodePools": [
    "default"
  ],
  "runningPods": 1,
  "images": [
    "alpine:latest"
  ],
  "environmentVariables": {},
  "command": "sleep",
  "arguments": "1000",
  "conditions": [
    {
      "type": "Ready",
      "status": "False",
      "message": "Resource validation failed: ...",
      "reason": "ErrorConfig",
      "lastTransitionTime": "2022-01-01T03:49:52.531Z"
    }
  ],
  "phaseMessage": "Not enough resources in the requested nodepool",
  "phaseUpdatedAt": "2022-06-08T11:28:24.131Z",
  "additionalFields": {}
}
```

**SDK Code**

```python
import requests

url = "http://localhost:8080/api/v1/workloads/inferences/revisions/revisionId"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'http://localhost:8080/api/v1/workloads/inferences/revisions/revisionId';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

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 := "http://localhost:8080/api/v1/workloads/inferences/revisions/revisionId"

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

	req.Header.Add("Authorization", "Bearer <token>")

	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("http://localhost:8080/api/v1/workloads/inferences/revisions/revisionId")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

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("http://localhost:8080/api/v1/workloads/inferences/revisions/revisionId")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'http://localhost:8080/api/v1/workloads/inferences/revisions/revisionId', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("http://localhost:8080/api/v1/workloads/inferences/revisions/revisionId");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "http://localhost:8080/api/v1/workloads/inferences/revisions/revisionId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

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