> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/dsx-air/llms.txt.

# Break out ports on a node

POST https://api.dsx-air.nvidia.com/api/v3/simulations/nodes/interfaces/bulk-breakout/
Content-Type: application/json

Changes the split of several of a node's physical ports in one request. Each entry in `interfaces` names a port by the `id` of any interface it carries, with the `split` to apply; read the choices from `GET /api/v3/simulations/nodes/{id}/breakout-options/`.

Each port's interfaces are replaced by the ones the platform defines for the new split, so their names and `id`s change, and links and services on them are removed. The request applies in full or not at all, and the response lists the interfaces created.

**Requires:** the simulation `INACTIVE`, and a node that has breakout options.

**Required scope:** Simulation Edit (roles: Air Org Administrator, Air User)

Reference: https://docs.nvidia.com/dsx-air/api-reference/interfaces/api-v-3-simulations-nodes-interfaces-bulk-breakout-create

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Body (application/json)

This endpoint expects an InterfaceBulkBreakoutRequest.

- `node` (string, required) — The node the interfaces are stored on; this is required. A switch, or a host node -- a host carries the lanes of its network PCI children (e.g. a DPU), and each interface is broken out against the port map of the entity that owns it.
- `interfaces` (list of InterfaceBreakoutEntryRequest, required) — The ports to break out, one entry per physical port. Every interface must be a data plane interface of `node`.

## Response

### 200

- `list of InterfaceReadUpdate`

## Errors

### 400 Bad Request Error

- `detail` (string, required) — Description of an error.
- `request_id` (string, required, nullable) — ID assigned to the request which encountered the error. Should be provided when opening a support case.
- `type` (enum, required) — Specific type of a 400 error. * `PROTECTED` - Instance may not be deleted as it is being referenced by other instances. * `VALIDATION` - Validation errors encountered during payload processing.
  - Allowed values: `PROTECTED`, `VALIDATION`
- `protected_instances` (list of ProtectedErrorInstance, optional) — Instances which bar the current instance from being deleted. Only defined when `type` is set to `PROTECTED`.
- `validation_errors` (BadRequestValidationErrors, optional) — Validation errors encountered during payload processing. Only defined when `type` is set to `VALIDATION`.

### 403 Forbidden Error

- `detail` (string, required) — Description of an error.
- `request_id` (string, required, nullable) — ID assigned to the request which encountered the error. Should be provided when opening a support case.

### 500 Internal Server Error

- `request_id` (string, required, nullable) — ID assigned to the request which encountered the error. Should be provided when opening a support case.
- `code` (string, required) — Error code which identifies the error. Should be provided when opening a support case.
- `detail` (string, optional, default: An unexpected error has occurred. Please contact NVIDIA Air support for further assistance.) — Description of an error.

## Types

### InterfaceBreakoutEntryRequest

A physical port to break out, and the factor to break it out at. The port is named by any one of the interfaces it carries -- the platform's own name for the port is never part of this API.

- `id` (string, required) — The `id` of any interface on the physical port to break out. Every interface the port carries changes together, so any of them names it.
- `split` (string, required) — The breakout factor to apply, e.g. `4x`. Must be one of the port’s `split_options` from the breakout options endpoint.

### InterfaceReadUpdate

Serializer for reading and updating interfaces.

- `id` (string, required)
- `created` (datetime, required)
- `modified` (datetime, required)
- `node` (string, required)
- `name` (string, required) — The interface name, such as `eth1`; unique on the node, at most 15 characters.
- `connection` (string, required, nullable) — A "link" between two interfaces.
- `split` (string, required, nullable) — Breakout factor of the interface: the split bucket of the platform port map the interface belongs to (e.g. `1x` for un-split). The valid values are the split options its platform declares, so this mirrors that platform rather than a fixed vocabulary. `None` means the interface is not governed by a platform port map.
- `device` (string, required, nullable) — UUID of the device (e.g. a NIC or a DPU) this interface belongs to. The device is plugged into the node this interface is on. Can be omitted if attached to a Node directly.
- `interface_type` (enum, optional) — * `DATA_PLANE_INTF` - Data Plane Interface * `PCIE_INTF` - PCIe Interface between emulated nodes * `OOB_INTF` - Out of Band Management Interface
  - Allowed values: `DATA_PLANE_INTF`, `PCIE_INTF`, `OOB_INTF`
- `mac_address` (string, optional) — The MAC address of the interface. If excluded, one will be provided
- `outbound` (boolean, optional) — Whether the interface is outbound.
- `labels` (TopologyFormatInterfaceAttributes, optional) — Labels which can be specified on the interface. Fields not specified in the payload schema will be completely ignored. If updating, the data provided will completely replace existing labels: attempting to PATCH specific labels will delete the other labels.

### ProtectedErrorInstance

Identifier of a protected instance.

- `id` (string, required) — ID of the instance.
- `type` (string, required) — Type of the instance.

### BadRequestValidationErrors

Validation errors encountered during payload processing. Only defined when `type` is set to `VALIDATION`.

- map from string to BadRequestValidationErrorsOneOf0
- list of BadRequestValidationErrorsOneOf1Items

### TopologyFormatInterfaceAttributes

Interface labels exposed in the API, stored internally as `attributes`.

- `interface_role` (string, optional) — The role of the interface.
- `scalable_unit` (integer, optional) — The scalable unit number that the node belongs to.

### BadRequestValidationErrorsOneOf0

- list of BadRequestValidationErrorsOneOf0OneOf0Items
- BadRequestValidationErrorsOneOf01
- map from string to any

### BadRequestValidationErrorsOneOf1Items

A single validation error.

- `message` (string, required) — Human-readable description of the error.
- `code` (string, required) — Machine-readable identifier for the error, for branching in client code. DRF supplies the default (e.g. `invalid`, `required`, `unique`); Air sets its own where a generic code would hide the cause, such as `protected` when a delete is refused because another instance still references this one.

### BadRequestValidationErrorsOneOf0OneOf0Items

A single validation error.

- `message` (string, required) — Human-readable description of the error.
- `code` (string, required) — Machine-readable identifier for the error, for branching in client code. DRF supplies the default (e.g. `invalid`, `required`, `unique`); Air sets its own where a generic code would hide the cause, such as `protected` when a delete is refused because another instance still references this one.

### BadRequestValidationErrorsOneOf01

A single validation error.

- `message` (string, required) — Human-readable description of the error.
- `code` (string, required) — Machine-readable identifier for the error, for branching in client code. DRF supplies the default (e.g. `invalid`, `required`, `unique`); Air sets its own where a generic code would hide the cause, such as `protected` when a delete is refused because another instance still references this one.

## Examples

**Request**

```json
{
  "node": "string",
  "interfaces": [
    {
      "id": "string",
      "split": "string"
    }
  ]
}
```

**Response**

```json
[
  {
    "id": "string",
    "created": "2024-01-15T09:30:00Z",
    "modified": "2024-01-15T09:30:00Z",
    "node": "string",
    "name": "string",
    "connection": "string",
    "split": "string",
    "device": "string",
    "interface_type": "DATA_PLANE_INTF",
    "mac_address": "string",
    "outbound": true,
    "labels": {
      "interface_role": "string",
      "scalable_unit": 1
    }
  }
]
```

**SDK Code**

```python
import requests

url = "https://api.dsx-air.nvidia.com/api/v3/simulations/nodes/interfaces/bulk-breakout/"

payload = {
    "node": "string",
    "interfaces": [
        {
            "id": "string",
            "split": "string"
        }
    ]
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://api.dsx-air.nvidia.com/api/v3/simulations/nodes/interfaces/bulk-breakout/';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"node":"string","interfaces":[{"id":"string","split":"string"}]}'
};

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.dsx-air.nvidia.com/api/v3/simulations/nodes/interfaces/bulk-breakout/"

	payload := strings.NewReader("{\n  \"node\": \"string\",\n  \"interfaces\": [\n    {\n      \"id\": \"string\",\n      \"split\": \"string\"\n    }\n  ]\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://api.dsx-air.nvidia.com/api/v3/simulations/nodes/interfaces/bulk-breakout/")

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  \"node\": \"string\",\n  \"interfaces\": [\n    {\n      \"id\": \"string\",\n      \"split\": \"string\"\n    }\n  ]\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.dsx-air.nvidia.com/api/v3/simulations/nodes/interfaces/bulk-breakout/")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"node\": \"string\",\n  \"interfaces\": [\n    {\n      \"id\": \"string\",\n      \"split\": \"string\"\n    }\n  ]\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.dsx-air.nvidia.com/api/v3/simulations/nodes/interfaces/bulk-breakout/', [
  'body' => '{
  "node": "string",
  "interfaces": [
    {
      "id": "string",
      "split": "string"
    }
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.dsx-air.nvidia.com/api/v3/simulations/nodes/interfaces/bulk-breakout/");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"node\": \"string\",\n  \"interfaces\": [\n    {\n      \"id\": \"string\",\n      \"split\": \"string\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "node": "string",
  "interfaces": [
    [
      "id": "string",
      "split": "string"
    ]
  ]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.dsx-air.nvidia.com/api/v3/simulations/nodes/interfaces/bulk-breakout/")! 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()
```