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

# Retrieve VPC routing profile

GET https://nico-rest-api.nico.svc.cluster.local/v2/org/{org}/nico/vpc/{vpcId}/routing-profile

Read the VPC's persisted routing profile, active VNI, version, and any retained allocation directly from Core. This is not the effective routing profile or evidence of DPU or fabric convergence. The ordinary VPC GET uses inventory and may lag this response.

Org must have an Infrastructure Provider entity that owns both the VPC and its Site. The VPC must belong to that Site, and the Site must be registered. User must have authorization role with `PROVIDER_ADMIN` suffix. Tenant administrator authorization alone is insufficient.

Inspection supports VPCs with valid pool ownership even when no named profile is stored or their virtualization type cannot support profile changes. Missing or inconsistent allocation ownership returns 412. A Site-global VNI override is not reflected in this response.

Reference: https://docs.nvidia.com/infra-controller/rest-api-reference/api-reference/vpc/get-vpc-routing-profile

## Authentication

- `Authorization` header (bearer token, required) — ``` export JWT_BEARER_TOKEN="<jwt-bearer-token>" # Example org name: "acme-inc export ORG_NAME=<org-name> # Use the JWT bearer token in your API request auth header: curl -v -X GET -H "Content-Type: application/json" -H "Authorization: Bearer $JWT_BEARER_TOKEN" https://nico-rest-api.nico.svc.cluster.local/v2/org/$ORG_NAME/nico/user/current ```

## Request

### Path parameters

- `org` (string, required) — Name of the Infrastructure Provider Org
- `vpcId` (string, required) — REST ID of the VPC

## Response

### 200

Authoritative persisted routing state and VNI allocations

- `vpcId` (string, required) — REST ID of the VPC selected in the request, which may differ from its Site-local Core ID.
- `version` (string, required) — Core VPC version observed with these allocations. Use this exact value when approving release of the observed inactive VNI; it is not a DPU-applied version.
- `routingProfile` (string, required, nullable) — Persisted profile name, or null when no named profile is stored. Known Core names are returned as the REST aliases `external`, `internal`, and `privileged-internal`; other names are unchanged. The name can be returned even when its Site definition is unavailable.
- `activeVni` (uint, required) — Persisted active VNI verified against pool ownership. Inspection accepts nonnegative values, including zero and values outside the profile-change range; successful inspection does not imply a profile change is supported.
- `retainedAllocation` (object, required, nullable) — Allocation owned by this VPC in the other pool, or null when the valid active allocation is its only allocation. Inconsistent ownership is an error, not a null result.
  - `poolName` (enum, required) — Resource pool containing the retained allocation.
    - Allowed values: `vpc-vni`, `external-vpc-vni`
  - `vni` (uint, required) — Persisted nonnegative VNI, distinct from the active VNI. Inspection does not establish whether it is valid for a profile change or release.

## Errors

### 400 Bad Request Error

Error response when request data cannot be validated

- `source` (enum, optional) — Source of the error.
  - Allowed values: `nico`
- `message` (string, optional) — Message describing the error
- `data` (object, optional, nullable) — Additional data about the error

### 403 Forbidden Error

Error response when user is not authorized to call an endpoint or retrieve/modify objects

- `source` (enum, optional) — Source of the error.
  - Allowed values: `nico`
- `message` (string, optional) — Message describing the error
- `data` (object, optional, nullable) — Additional data about the error

### 404 Not Found Error

Error response when requested object is not found

- `source` (enum, optional) — Source of the error.
  - Allowed values: `nico`
- `message` (string, optional) — Message describing the error
- `data` (object, optional, nullable) — Additional data about the error

### 412 Precondition Failed Error

Response when the API handler encounters an unexpected error

- `source` (enum, optional) — Source of the error.
  - Allowed values: `nico`
- `message` (string, optional) — Message describing the error
- `data` (object, optional, nullable) — Additional data about the error

### 500 Internal Server Error

Response when the API handler encounters an unexpected error

- `source` (enum, optional) — Source of the error.
  - Allowed values: `nico`
- `message` (string, optional) — Message describing the error
- `data` (object, optional, nullable) — Additional data about the error

### 501 Not Implemented Error

Response when the API handler encounters an unexpected error

- `source` (enum, optional) — Source of the error.
  - Allowed values: `nico`
- `message` (string, optional) — Message describing the error
- `data` (object, optional, nullable) — Additional data about the error

### 503 Service Unavailable Error

Response when the API handler encounters an unexpected error

- `source` (enum, optional) — Source of the error.
  - Allowed values: `nico`
- `message` (string, optional) — Message describing the error
- `data` (object, optional, nullable) — Additional data about the error

### 504 Gateway Timeout Error

Response when the API handler encounters an unexpected error

- `source` (enum, optional) — Source of the error.
  - Allowed values: `nico`
- `message` (string, optional) — Message describing the error
- `data` (object, optional, nullable) — Additional data about the error

## Examples

**Response**

```json
{
  "vpcId": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "version": "V2-T1789147200000000",
  "routingProfile": "external",
  "activeVni": 51000,
  "retainedAllocation": {
    "poolName": "vpc-vni",
    "vni": 12001
  }
}
```

**SDK Code**

```python
import requests

url = "https://nico-rest-api.nico.svc.cluster.local/v2/org/org/nico/vpc/vpcId/routing-profile"

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

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

print(response.json())
```

```javascript
const url = 'https://nico-rest-api.nico.svc.cluster.local/v2/org/org/nico/vpc/vpcId/routing-profile';
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 := "https://nico-rest-api.nico.svc.cluster.local/v2/org/org/nico/vpc/vpcId/routing-profile"

	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("https://nico-rest-api.nico.svc.cluster.local/v2/org/org/nico/vpc/vpcId/routing-profile")

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

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("https://nico-rest-api.nico.svc.cluster.local/v2/org/org/nico/vpc/vpcId/routing-profile")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://nico-rest-api.nico.svc.cluster.local/v2/org/org/nico/vpc/vpcId/routing-profile', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://nico-rest-api.nico.svc.cluster.local/v2/org/org/nico/vpc/vpcId/routing-profile");
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: "https://nico-rest-api.nico.svc.cluster.local/v2/org/org/nico/vpc/vpcId/routing-profile")! 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()
```