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

# Release inactive VPC VNI

POST https://nico-rest-api.nico.svc.cluster.local/v2/org/{org}/nico/vpc/{vpcId}/routing-profile/release-inactive-vni
Content-Type: application/json

Release the allocation retained after a routing-profile change, leaving the active VNI and routing profile unchanged. Requires the same Provider ownership, registered Site, and `PROVIDER_ADMIN` authorization as [routing-state inspection](#tag/VPC/operation/get-vpc-routing-profile).

Before release, independently verify that all attached and directly peered DPUs and fabric routes no longer use the inactive VNI. Keep the attachment, peering, deletion, and profile-definition hold described in [profile changes](#tag/VPC/operation/update-vpc-routing-profile) through release. Retain the allocation for unreachable consumers unless they have been isolated. REST and Core validate ownership, not dataplane convergence.

Supply the exact `ifVersionMatch` and `expectedInactiveVni` from the authoritative state used for that decision. REST does not substitute a fresh version. The release advances the Core VPC version and makes the inactive VNI available for allocation to another VPC. It is never part of an automatic profile change or cleanup loop.

A timeout, lost response, or invalid acknowledgement may follow a committed release. Inspect authoritative routing state before deciding what to do next; do not automatically retry or replace the original version. A stale-version error does not prove that a previous release failed. The ordinary VPC GET may lag the authoritative response.

Reference: https://docs.nvidia.com/infra-controller/rest-api-reference/api-reference/vpc/release-vpc-inactive-vni

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

### Body (application/json)

This endpoint expects an object.

- `ifVersionMatch` (string, required) — Exact Core VPC version from routing-state inspection used for the release decision, in `V<counter>-T<microseconds>` format. Missing or malformed versions are rejected. A stale version returns 412; after an ambiguous release, that error does not prove whether the previous release committed.
- `expectedInactiveVni` (integer, required) — Exact retained VNI observed with `ifVersionMatch`. It must match the VPC's inactive allocation and differ from its active VNI.

## Response

### 200

Authoritative acknowledgement of the released allocation and advanced VPC version

- `vpcId` (string, required) — REST ID of the VPC selected in the release request.
- `version` (string, required) — Advanced Core VPC version after release committed.
- `routingProfile` (string, required, nullable) — Unchanged persisted profile name, or null when none is stored. Known Core names use the REST aliases `external`, `internal`, and `privileged-internal`; custom names are unchanged.
- `activeVni` (uint, required) — Unchanged active VNI.
- `releasedInactiveVni` (uint, required) — Exact inactive VNI released by this request and now available for allocation to another VPC.

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

**Request**

```json
{
  "ifVersionMatch": "V2-T1789147200000000",
  "expectedInactiveVni": 12001
}
```

**Response**

```json
{
  "vpcId": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "version": "V3-T1789147260000000",
  "routingProfile": "external",
  "activeVni": 51000,
  "releasedInactiveVni": 12001
}
```

**SDK Code**

```python
import requests

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

payload = {
    "ifVersionMatch": "V2-T1789147200000000",
    "expectedInactiveVni": 12001
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://nico-rest-api.nico.svc.cluster.local/v2/org/org/nico/vpc/vpcId/routing-profile/release-inactive-vni';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"ifVersionMatch":"V2-T1789147200000000","expectedInactiveVni":12001}'
};

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

	payload := strings.NewReader("{\n  \"ifVersionMatch\": \"V2-T1789147200000000\",\n  \"expectedInactiveVni\": 12001\n}")

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

	req.Header.Add("Authorization", "Bearer <token>")
	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://nico-rest-api.nico.svc.cluster.local/v2/org/org/nico/vpc/vpcId/routing-profile/release-inactive-vni")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"ifVersionMatch\": \"V2-T1789147200000000\",\n  \"expectedInactiveVni\": 12001\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://nico-rest-api.nico.svc.cluster.local/v2/org/org/nico/vpc/vpcId/routing-profile/release-inactive-vni")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"ifVersionMatch\": \"V2-T1789147200000000\",\n  \"expectedInactiveVni\": 12001\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://nico-rest-api.nico.svc.cluster.local/v2/org/org/nico/vpc/vpcId/routing-profile/release-inactive-vni', [
  'body' => '{
  "ifVersionMatch": "V2-T1789147200000000",
  "expectedInactiveVni": 12001
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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/release-inactive-vni");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"ifVersionMatch\": \"V2-T1789147200000000\",\n  \"expectedInactiveVni\": 12001\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "ifVersionMatch": "V2-T1789147200000000",
  "expectedInactiveVni": 12001
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://nico-rest-api.nico.svc.cluster.local/v2/org/org/nico/vpc/vpcId/routing-profile/release-inactive-vni")! 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()
```