# Bare Metal Cloud › Dedicated Servers › Network API

> Part of the OVHcloud developer hub. Index of every page and section: https://developers.eu.ovhcloud.com/llms.txt
> The Bare Metal Cloud product's sections: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/llms.txt
> Everything in one file: https://developers.eu.ovhcloud.com/llms-full.txt

> 37 operations of the OVHcloud API. Calls carry `authorization: Bearer $OVH_TOKEN`; the EU host is shown, Canada and the United States answer on api.ca.ovhcloud.com and api.us.ovhcloud.com.

Page: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/network/

OpenAPI v1: https://api.eu.ovhcloud.com/1.0/__schemas/developer-hub-navigation/bare-metal-cloud/dedicated-servers/network.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/bare-metal-cloud/dedicated-servers/network.json?format=openapi3

## Operations

- `GET /dedicated/server/{serviceName}/ips` — List IP blocks
- `POST /dedicated/server/{serviceName}/ipMove` — Move a failover IP to the server
- `POST /dedicated/server/{serviceName}/ipBlockMerge` — Merge a split IP block
- `GET /dedicated/server/{serviceName}/ipCanBeMovedTo` — Check if an IP can be moved
- `GET /dedicated/server/{serviceName}/ipCountryAvailable` — List available IP countries
- `GET /dedicated/server/{serviceName}/virtualMac` — List virtual MACs
- `POST /dedicated/server/{serviceName}/virtualMac` — Create a virtual MAC
- `GET /dedicated/server/{serviceName}/virtualMac/{macAddress}` — Get a virtual MAC
- `GET /dedicated/server/{serviceName}/virtualMac/{macAddress}/virtualAddress` — List IPs of a virtual MAC
- `POST /dedicated/server/{serviceName}/virtualMac/{macAddress}/virtualAddress` — Add an IP to a virtual MAC
- `GET /dedicated/server/{serviceName}/virtualMac/{macAddress}/virtualAddress/{ipAddress}` — Get an IP of a virtual MAC
- `DELETE /dedicated/server/{serviceName}/virtualMac/{macAddress}/virtualAddress/{ipAddress}` — Remove an IP from a virtual MAC
- `POST /dedicated/server/{serviceName}/ola/aggregation` — Aggregate network interfaces
- `POST /dedicated/server/{serviceName}/ola/group` — Group network interfaces
- `POST /dedicated/server/{serviceName}/ola/reset` — Reset a network interface
- `POST /dedicated/server/{serviceName}/ola/ungroup` — Ungroup a network interface
- `GET /dedicated/server/{serviceName}/networkInterfaceController` — List network interface controllers
- `GET /dedicated/server/{serviceName}/networkInterfaceController/{mac}` — Get a network interface controller
- `GET /dedicated/server/{serviceName}/networkInterfaceController/{mac}/mrtg` — Get interface traffic statistics
- `GET /dedicated/server/virtualNetworkInterface/{uuid}` — Get a virtual network interface
- `GET /dedicated/server/{serviceName}/virtualNetworkInterface` — List virtual network interfaces
- `GET /dedicated/server/{serviceName}/virtualNetworkInterface/{uuid}` — Get a virtual network interface
- `PUT /dedicated/server/{serviceName}/virtualNetworkInterface/{uuid}` — Update a virtual network interface
- `POST /dedicated/server/{serviceName}/virtualNetworkInterface/{uuid}/disable` — Disable a virtual network interface
- `POST /dedicated/server/{serviceName}/virtualNetworkInterface/{uuid}/enable` — Enable a virtual network interface
- `GET /dedicated/server/{serviceName}/burst` — Get the bandwidth burst
- `PUT /dedicated/server/{serviceName}/burst` — Update the bandwidth burst
- `GET /dedicated/server/{serviceName}/secondaryDnsDomains` — List secondary DNS domains
- `POST /dedicated/server/{serviceName}/secondaryDnsDomains` — Create a secondary DNS domain
- `GET /dedicated/server/{serviceName}/secondaryDnsDomains/{domain}` — Get a secondary DNS domain
- `DELETE /dedicated/server/{serviceName}/secondaryDnsDomains/{domain}` — Delete a secondary DNS domain
- `PUT /dedicated/server/{serviceName}/secondaryDnsDomains/{domain}` — Update a secondary DNS domain
- `GET /dedicated/server/{serviceName}/secondaryDnsDomains/{domain}/dnsServer` — Get the domain DNS server
- `GET /dedicated/server/{serviceName}/secondaryDnsNameDomainToken` — Get the domain verification record
- `GET /dedicated/server/{serviceName}/secondaryDnsNameServerAvailable` — Get the available secondary name server
- `GET /dedicated/server/{serviceName}/networking` — Get the network configuration
- `GET /dedicated/server/{serviceName}/mrtg` — Get server traffic statistics

## List IP blocks

`GET /1.0/dedicated/server/{serviceName}/ips`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/network/#get-dedicated-server-servicename-ips

**Status:** Stable production version  
**IAM actions:** `dedicatedServer:apiovh:ips/get`

List IP blocks. Returns all the IPs of the server, each as an IP block. To move a failover IP to the server, use the ipMove operation.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | ipBlock[] | successful operation |

```json
[
  "192.0.2.0/24"
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/ips" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/dedicated/server/{serviceName}/ips")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/dedicated/server/{serviceName}/ips");

print_r($result);
?>
```

## Move a failover IP to the server

`POST /1.0/dedicated/server/{serviceName}/ipMove`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/network/#post-dedicated-server-servicename-ipmove

**Status:** Stable production version  
**IAM actions:** `dedicatedServer:apiovh:ipMove`

Move a failover IP to the server. Moves the given failover IP block to the server. Returns the task that performs the move.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `ip` | ipBlock | yes | The ip to move to this server |

```json
{
  "ip": "192.0.2.0/24"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicated.server.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `changeUuid` | string | read-only | UUID of the change linked to this task |
| `comment` | string | read-only | Details of this task |
| `doneDate` | string (date-time) | read-only | Completion date |
| `function` | dedicated.TaskFunctionEnum | read-only | Function name — one of `INFRA_002_VirtualNetworkInterface`, `INFRA_002_VirtualNetworkInterface_group`, `INFRA_002_VirtualNetworkInterface_ungroup`, `INFRA_ONE_NETWORK_ONEAPI_VirtualNetworkInterface_group`, `INFRA_ONE_NETWORK_ONEAPI_VirtualNetworkInterface_ungroup`, `INFRA_ONE_NETWORK_VirtualNetworkInterface_group`, `INFRA_ONE_NETWORK_VirtualNetworkInterface_ungroup`, `addVirtualMac`, `addWindowSplaFromExistingSerial`, `applyBackupFtpAcls`, `applyBackupFtpQuota`, `bypassAntiDDosGame`, … |
| `lastUpdate` | string (date-time) | read-only | last update |
| `needSchedule` | boolean | read-only | Whether this task need to be scheduled or not |
| `note` | string | read-only | Extra information about this task |
| `plannedInterventionId` | integer | read-only | ID of the planned intervention for this task |
| `startDate` | string (date-time) | read-only | Task Creation date |
| `status` | dedicated.TaskStatusEnum | read-only | Task status — one of `cancelled`, `customerError`, `doing`, `done`, `init`, `ovhError`, `todo` |
| `tags` | complexType.SafeKeyValueCanBeNull_string[] | read-only | Task result tags output |
| `tags[].key` | string |  |  |
| `tags[].value` | string |  |  |
| `taskId` | integer | read-only | the id of the task |
| `ticketReference` | string | read-only | Reference of the thread on the support tool |

```json
{
  "changeUuid": "string",
  "comment": "string",
  "doneDate": "2024-01-01T12:00:00Z",
  "function": "INFRA_002_VirtualNetworkInterface",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "needSchedule": true,
  "note": "string",
  "plannedInterventionId": 0,
  "startDate": "2024-01-01T12:00:00Z",
  "status": "cancelled",
  "tags": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "taskId": 0,
  "ticketReference": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/ipMove" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: ipBlock
result = client.post("/dedicated/server/{serviceName}/ipMove",
	ip = None, # The ip to move to this server (type: ipBlock)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: ipBlock
$result = $ovh->post("/dedicated/server/{serviceName}/ipMove", array(
	ip => null, // The ip to move to this server (type: ipBlock)
));

print_r($result);
?>
```

## Merge a split IP block

`POST /1.0/dedicated/server/{serviceName}/ipBlockMerge`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/network/#post-dedicated-server-servicename-ipblockmerge

**Status:** Stable production version  
**IAM actions:** `dedicatedServer:apiovh:ipBlockMerge`

Merge a split IP block. Merges a split IP block and routes it to the server. This operation cannot be undone. Returns the task that performs the merge.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `block` | ipBlock | yes | The splitted block you want to merge |

```json
{
  "block": "192.0.2.0/24"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicated.server.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `changeUuid` | string | read-only | UUID of the change linked to this task |
| `comment` | string | read-only | Details of this task |
| `doneDate` | string (date-time) | read-only | Completion date |
| `function` | dedicated.TaskFunctionEnum | read-only | Function name — one of `INFRA_002_VirtualNetworkInterface`, `INFRA_002_VirtualNetworkInterface_group`, `INFRA_002_VirtualNetworkInterface_ungroup`, `INFRA_ONE_NETWORK_ONEAPI_VirtualNetworkInterface_group`, `INFRA_ONE_NETWORK_ONEAPI_VirtualNetworkInterface_ungroup`, `INFRA_ONE_NETWORK_VirtualNetworkInterface_group`, `INFRA_ONE_NETWORK_VirtualNetworkInterface_ungroup`, `addVirtualMac`, `addWindowSplaFromExistingSerial`, `applyBackupFtpAcls`, `applyBackupFtpQuota`, `bypassAntiDDosGame`, … |
| `lastUpdate` | string (date-time) | read-only | last update |
| `needSchedule` | boolean | read-only | Whether this task need to be scheduled or not |
| `note` | string | read-only | Extra information about this task |
| `plannedInterventionId` | integer | read-only | ID of the planned intervention for this task |
| `startDate` | string (date-time) | read-only | Task Creation date |
| `status` | dedicated.TaskStatusEnum | read-only | Task status — one of `cancelled`, `customerError`, `doing`, `done`, `init`, `ovhError`, `todo` |
| `tags` | complexType.SafeKeyValueCanBeNull_string[] | read-only | Task result tags output |
| `tags[].key` | string |  |  |
| `tags[].value` | string |  |  |
| `taskId` | integer | read-only | the id of the task |
| `ticketReference` | string | read-only | Reference of the thread on the support tool |

```json
{
  "changeUuid": "string",
  "comment": "string",
  "doneDate": "2024-01-01T12:00:00Z",
  "function": "INFRA_002_VirtualNetworkInterface",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "needSchedule": true,
  "note": "string",
  "plannedInterventionId": 0,
  "startDate": "2024-01-01T12:00:00Z",
  "status": "cancelled",
  "tags": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "taskId": 0,
  "ticketReference": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/ipBlockMerge" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: ipBlock
result = client.post("/dedicated/server/{serviceName}/ipBlockMerge",
	block = None, # The splitted block you want to merge (type: ipBlock)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: ipBlock
$result = $ovh->post("/dedicated/server/{serviceName}/ipBlockMerge", array(
	block => null, // The splitted block you want to merge (type: ipBlock)
));

print_r($result);
?>
```

## Check if an IP can be moved

`GET /1.0/dedicated/server/{serviceName}/ipCanBeMovedTo`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/network/#get-dedicated-server-servicename-ipcanbemovedto

**Status:** Stable production version  
**IAM actions:** `dedicatedServer:apiovh:ipCanBeMovedTo/get`

Check if an IP can be moved. Checks whether the given IP block can be moved to the server. The response has no content when the move is possible, and an error otherwise.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `ip` | query | ipBlock | yes | The ip to move to this server |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/ipCanBeMovedTo" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/dedicated/server/{serviceName}/ipCanBeMovedTo")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/dedicated/server/{serviceName}/ipCanBeMovedTo");

print_r($result);
?>
```

## List available IP countries

`GET /1.0/dedicated/server/{serviceName}/ipCountryAvailable`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/network/#get-dedicated-server-servicename-ipcountryavailable

**Status:** Stable production version  
**IAM actions:** `dedicatedServer:apiovh:ipCountryAvailable/get`

List available IP countries. Returns the countries in which an IP can be ordered for the server. Each value is a country code, for example fr, de or us.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicated.server.IpCountryEnum[] | successful operation |

```json
[
  "au"
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/ipCountryAvailable" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/dedicated/server/{serviceName}/ipCountryAvailable")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/dedicated/server/{serviceName}/ipCountryAvailable");

print_r($result);
?>
```

## List virtual MACs

`GET /1.0/dedicated/server/{serviceName}/virtualMac`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/network/#get-dedicated-server-servicename-virtualmac

**Status:** Stable production version  
**IAM actions:** `dedicatedServer:apiovh:virtualMac/get`

List virtual MACs. Returns the virtual MAC addresses of the server. Each virtual MAC is associated with one or more IP addresses.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | string[] | successful operation |

```json
[
  "string"
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/virtualMac" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/dedicated/server/{serviceName}/virtualMac")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/dedicated/server/{serviceName}/virtualMac");

print_r($result);
?>
```

## Create a virtual MAC

`POST /1.0/dedicated/server/{serviceName}/virtualMac`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/network/#post-dedicated-server-servicename-virtualmac

**Status:** Stable production version  
**IAM actions:** `dedicatedServer:apiovh:virtualMac/create`

Create a virtual MAC. Creates a virtual MAC address of type ovh or vmware and links it to an IP address. The virtualMachineName parameter is a friendly name for the virtual machine behind this IP. Returns a task.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `ipAddress` | ipv4 | yes | Ip address to link with this virtualMac |
| `type` | dedicated.server.VmacTypeEnum | yes | vmac address type — one of `ovh`, `vmware` |
| `virtualMachineName` | string | yes | Friendly name of your Virtual Machine behind this IP/MAC |

```json
{
  "ipAddress": "192.0.2.0",
  "type": "ovh",
  "virtualMachineName": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicated.server.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `changeUuid` | string | read-only | UUID of the change linked to this task |
| `comment` | string | read-only | Details of this task |
| `doneDate` | string (date-time) | read-only | Completion date |
| `function` | dedicated.TaskFunctionEnum | read-only | Function name — one of `INFRA_002_VirtualNetworkInterface`, `INFRA_002_VirtualNetworkInterface_group`, `INFRA_002_VirtualNetworkInterface_ungroup`, `INFRA_ONE_NETWORK_ONEAPI_VirtualNetworkInterface_group`, `INFRA_ONE_NETWORK_ONEAPI_VirtualNetworkInterface_ungroup`, `INFRA_ONE_NETWORK_VirtualNetworkInterface_group`, `INFRA_ONE_NETWORK_VirtualNetworkInterface_ungroup`, `addVirtualMac`, `addWindowSplaFromExistingSerial`, `applyBackupFtpAcls`, `applyBackupFtpQuota`, `bypassAntiDDosGame`, … |
| `lastUpdate` | string (date-time) | read-only | last update |
| `needSchedule` | boolean | read-only | Whether this task need to be scheduled or not |
| `note` | string | read-only | Extra information about this task |
| `plannedInterventionId` | integer | read-only | ID of the planned intervention for this task |
| `startDate` | string (date-time) | read-only | Task Creation date |
| `status` | dedicated.TaskStatusEnum | read-only | Task status — one of `cancelled`, `customerError`, `doing`, `done`, `init`, `ovhError`, `todo` |
| `tags` | complexType.SafeKeyValueCanBeNull_string[] | read-only | Task result tags output |
| `tags[].key` | string |  |  |
| `tags[].value` | string |  |  |
| `taskId` | integer | read-only | the id of the task |
| `ticketReference` | string | read-only | Reference of the thread on the support tool |

```json
{
  "changeUuid": "string",
  "comment": "string",
  "doneDate": "2024-01-01T12:00:00Z",
  "function": "INFRA_002_VirtualNetworkInterface",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "needSchedule": true,
  "note": "string",
  "plannedInterventionId": 0,
  "startDate": "2024-01-01T12:00:00Z",
  "status": "cancelled",
  "tags": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "taskId": 0,
  "ticketReference": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/virtualMac" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: string
result = client.post("/dedicated/server/{serviceName}/virtualMac",
	ipAddress = None, # Ip address to link with this virtualMac (type: ipv4)
	type = None, # vmac address type (type: dedicated.server.VmacTypeEnum)
	virtualMachineName = None, # Friendly name of your Virtual Machine behind this IP/MAC (type: string)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: string
$result = $ovh->post("/dedicated/server/{serviceName}/virtualMac", array(
	ipAddress => null, // Ip address to link with this virtualMac (type: ipv4)
	type => null, // vmac address type (type: dedicated.server.VmacTypeEnum)
	virtualMachineName => null, // Friendly name of your Virtual Machine behind this IP/MAC (type: string)
));

print_r($result);
?>
```

## Get a virtual MAC

`GET /1.0/dedicated/server/{serviceName}/virtualMac/{macAddress}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/network/#get-dedicated-server-servicename-virtualmac-macaddress

**Status:** Stable production version  
**IAM actions:** `dedicatedServer:apiovh:virtualMac/get`

Get a virtual MAC. Returns the virtual MAC address, in 00:00:00:00:00:00 format, and its type: ovh or vmware.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `macAddress` | path | string | yes | Virtual MAC address in 00:00:00:00:00:00 format |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicated.server.VirtualMac | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `macAddress` | string | read-only | Virtual MAC address in 00:00:00:00:00:00 format |
| `type` | dedicated.server.VmacTypeEnum | read-only | Virtual MAC address type — one of `ovh`, `vmware` |

```json
{
  "macAddress": "string",
  "type": "ovh"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/virtualMac/{macAddress}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/dedicated/server/{serviceName}/virtualMac/{macAddress}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/dedicated/server/{serviceName}/virtualMac/{macAddress}");

print_r($result);
?>
```

## List IPs of a virtual MAC

`GET /1.0/dedicated/server/{serviceName}/virtualMac/{macAddress}/virtualAddress`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/network/#get-dedicated-server-servicename-virtualmac-macaddress-virtualaddress

**Status:** Stable production version  
**IAM actions:** `dedicatedServer:apiovh:virtualMac/virtualAddress/get`

List IPs of a virtual MAC. Returns the IPv4 addresses associated with the virtual MAC. A virtual MAC can be associated with one or more IPs.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `macAddress` | path | string | yes | Virtual MAC address in 00:00:00:00:00:00 format |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | ipv4[] | successful operation |

```json
[
  "192.0.2.0"
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/virtualMac/{macAddress}/virtualAddress" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/dedicated/server/{serviceName}/virtualMac/{macAddress}/virtualAddress")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/dedicated/server/{serviceName}/virtualMac/{macAddress}/virtualAddress");

print_r($result);
?>
```

## Add an IP to a virtual MAC

`POST /1.0/dedicated/server/{serviceName}/virtualMac/{macAddress}/virtualAddress`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/network/#post-dedicated-server-servicename-virtualmac-macaddress-virtualaddress

**Status:** Stable production version  
**IAM actions:** `dedicatedServer:apiovh:virtualMac/virtualAddress/create`

Add an IP to a virtual MAC. Associates an IPv4 address with the virtual MAC, with a friendly name for the virtual machine behind it. Returns a task.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `macAddress` | path | string | yes | Virtual MAC address in 00:00:00:00:00:00 format |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `ipAddress` | ipv4 | yes | IP address to link to this virtual MAC |
| `virtualMachineName` | string | yes | Friendly name of your Virtual Machine behind this IP/MAC |

```json
{
  "ipAddress": "192.0.2.0",
  "virtualMachineName": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicated.server.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `changeUuid` | string | read-only | UUID of the change linked to this task |
| `comment` | string | read-only | Details of this task |
| `doneDate` | string (date-time) | read-only | Completion date |
| `function` | dedicated.TaskFunctionEnum | read-only | Function name — one of `INFRA_002_VirtualNetworkInterface`, `INFRA_002_VirtualNetworkInterface_group`, `INFRA_002_VirtualNetworkInterface_ungroup`, `INFRA_ONE_NETWORK_ONEAPI_VirtualNetworkInterface_group`, `INFRA_ONE_NETWORK_ONEAPI_VirtualNetworkInterface_ungroup`, `INFRA_ONE_NETWORK_VirtualNetworkInterface_group`, `INFRA_ONE_NETWORK_VirtualNetworkInterface_ungroup`, `addVirtualMac`, `addWindowSplaFromExistingSerial`, `applyBackupFtpAcls`, `applyBackupFtpQuota`, `bypassAntiDDosGame`, … |
| `lastUpdate` | string (date-time) | read-only | last update |
| `needSchedule` | boolean | read-only | Whether this task need to be scheduled or not |
| `note` | string | read-only | Extra information about this task |
| `plannedInterventionId` | integer | read-only | ID of the planned intervention for this task |
| `startDate` | string (date-time) | read-only | Task Creation date |
| `status` | dedicated.TaskStatusEnum | read-only | Task status — one of `cancelled`, `customerError`, `doing`, `done`, `init`, `ovhError`, `todo` |
| `tags` | complexType.SafeKeyValueCanBeNull_string[] | read-only | Task result tags output |
| `tags[].key` | string |  |  |
| `tags[].value` | string |  |  |
| `taskId` | integer | read-only | the id of the task |
| `ticketReference` | string | read-only | Reference of the thread on the support tool |

```json
{
  "changeUuid": "string",
  "comment": "string",
  "doneDate": "2024-01-01T12:00:00Z",
  "function": "INFRA_002_VirtualNetworkInterface",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "needSchedule": true,
  "note": "string",
  "plannedInterventionId": 0,
  "startDate": "2024-01-01T12:00:00Z",
  "status": "cancelled",
  "tags": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "taskId": 0,
  "ticketReference": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/virtualMac/{macAddress}/virtualAddress" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/dedicated/server/{serviceName}/virtualMac/{macAddress}/virtualAddress",
	ipAddress = None, # IP address to link to this virtual MAC (type: ipv4)
	virtualMachineName = None, # Friendly name of your Virtual Machine behind this IP/MAC (type: string)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/dedicated/server/{serviceName}/virtualMac/{macAddress}/virtualAddress", array(
	ipAddress => null, // IP address to link to this virtual MAC (type: ipv4)
	virtualMachineName => null, // Friendly name of your Virtual Machine behind this IP/MAC (type: string)
));

print_r($result);
?>
```

## Get an IP of a virtual MAC

`GET /1.0/dedicated/server/{serviceName}/virtualMac/{macAddress}/virtualAddress/{ipAddress}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/network/#get-dedicated-server-servicename-virtualmac-macaddress-virtualaddress-ipaddress

**Status:** Stable production version  
**IAM actions:** `dedicatedServer:apiovh:virtualMac/virtualAddress/get`

Get an IP of a virtual MAC. Returns an IPv4 address associated with the virtual MAC and the friendly name of the virtual machine behind it.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `ipAddress` | path | ipv4 | yes | IP address |
| `macAddress` | path | string | yes | Virtual MAC address in 00:00:00:00:00:00 format |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicated.server.VirtualMacManagement | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `ipAddress` | ipv4 | read-only | IP address |
| `virtualMachineName` | string | read-only | Friendly name of your Virtual Machine behind this IP/MAC |

```json
{
  "ipAddress": "192.0.2.0",
  "virtualMachineName": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/virtualMac/{macAddress}/virtualAddress/{ipAddress}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/dedicated/server/{serviceName}/virtualMac/{macAddress}/virtualAddress/{ipAddress}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/dedicated/server/{serviceName}/virtualMac/{macAddress}/virtualAddress/{ipAddress}");

print_r($result);
?>
```

## Remove an IP from a virtual MAC

`DELETE /1.0/dedicated/server/{serviceName}/virtualMac/{macAddress}/virtualAddress/{ipAddress}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/network/#delete-dedicated-server-servicename-virtualmac-macaddress-virtualaddress-ipaddress

**Status:** Stable production version  
**IAM actions:** `dedicatedServer:apiovh:virtualMac/virtualAddress/delete`

Remove an IP from a virtual MAC. Removes the IPv4 address from the virtual MAC and returns a task. Removing the last linked IP also deletes the virtual MAC.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `ipAddress` | path | ipv4 | yes | IP address |
| `macAddress` | path | string | yes | Virtual MAC address in 00:00:00:00:00:00 format |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicated.server.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `changeUuid` | string | read-only | UUID of the change linked to this task |
| `comment` | string | read-only | Details of this task |
| `doneDate` | string (date-time) | read-only | Completion date |
| `function` | dedicated.TaskFunctionEnum | read-only | Function name — one of `INFRA_002_VirtualNetworkInterface`, `INFRA_002_VirtualNetworkInterface_group`, `INFRA_002_VirtualNetworkInterface_ungroup`, `INFRA_ONE_NETWORK_ONEAPI_VirtualNetworkInterface_group`, `INFRA_ONE_NETWORK_ONEAPI_VirtualNetworkInterface_ungroup`, `INFRA_ONE_NETWORK_VirtualNetworkInterface_group`, `INFRA_ONE_NETWORK_VirtualNetworkInterface_ungroup`, `addVirtualMac`, `addWindowSplaFromExistingSerial`, `applyBackupFtpAcls`, `applyBackupFtpQuota`, `bypassAntiDDosGame`, … |
| `lastUpdate` | string (date-time) | read-only | last update |
| `needSchedule` | boolean | read-only | Whether this task need to be scheduled or not |
| `note` | string | read-only | Extra information about this task |
| `plannedInterventionId` | integer | read-only | ID of the planned intervention for this task |
| `startDate` | string (date-time) | read-only | Task Creation date |
| `status` | dedicated.TaskStatusEnum | read-only | Task status — one of `cancelled`, `customerError`, `doing`, `done`, `init`, `ovhError`, `todo` |
| `tags` | complexType.SafeKeyValueCanBeNull_string[] | read-only | Task result tags output |
| `tags[].key` | string |  |  |
| `tags[].value` | string |  |  |
| `taskId` | integer | read-only | the id of the task |
| `ticketReference` | string | read-only | Reference of the thread on the support tool |

```json
{
  "changeUuid": "string",
  "comment": "string",
  "doneDate": "2024-01-01T12:00:00Z",
  "function": "INFRA_002_VirtualNetworkInterface",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "needSchedule": true,
  "note": "string",
  "plannedInterventionId": 0,
  "startDate": "2024-01-01T12:00:00Z",
  "status": "cancelled",
  "tags": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "taskId": 0,
  "ticketReference": "string"
}
```

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/virtualMac/{macAddress}/virtualAddress/{ipAddress}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/dedicated/server/{serviceName}/virtualMac/{macAddress}/virtualAddress/{ipAddress}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/dedicated/server/{serviceName}/virtualMac/{macAddress}/virtualAddress/{ipAddress}");

print_r($result);
?>
```

## Aggregate network interfaces

`POST /1.0/dedicated/server/{serviceName}/ola/aggregation`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/network/#post-dedicated-server-servicename-ola-aggregation

**Status:** Beta version  
**IAM actions:** `dedicatedServer:apiovh:ola/aggregation/create`

Aggregate network interfaces. Groups virtual network interfaces into one link aggregation, under the given name. Returns a task.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | yes | Resulting VirtualNetworkInterface name |
| `virtualNetworkInterfaces` | string (uuid)[] | yes | Interfaces to aggregate |

```json
{
  "name": "string",
  "virtualNetworkInterfaces": [
    "00000000-0000-0000-0000-000000000000"
  ]
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicated.server.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `changeUuid` | string | read-only | UUID of the change linked to this task |
| `comment` | string | read-only | Details of this task |
| `doneDate` | string (date-time) | read-only | Completion date |
| `function` | dedicated.TaskFunctionEnum | read-only | Function name — one of `INFRA_002_VirtualNetworkInterface`, `INFRA_002_VirtualNetworkInterface_group`, `INFRA_002_VirtualNetworkInterface_ungroup`, `INFRA_ONE_NETWORK_ONEAPI_VirtualNetworkInterface_group`, `INFRA_ONE_NETWORK_ONEAPI_VirtualNetworkInterface_ungroup`, `INFRA_ONE_NETWORK_VirtualNetworkInterface_group`, `INFRA_ONE_NETWORK_VirtualNetworkInterface_ungroup`, `addVirtualMac`, `addWindowSplaFromExistingSerial`, `applyBackupFtpAcls`, `applyBackupFtpQuota`, `bypassAntiDDosGame`, … |
| `lastUpdate` | string (date-time) | read-only | last update |
| `needSchedule` | boolean | read-only | Whether this task need to be scheduled or not |
| `note` | string | read-only | Extra information about this task |
| `plannedInterventionId` | integer | read-only | ID of the planned intervention for this task |
| `startDate` | string (date-time) | read-only | Task Creation date |
| `status` | dedicated.TaskStatusEnum | read-only | Task status — one of `cancelled`, `customerError`, `doing`, `done`, `init`, `ovhError`, `todo` |
| `tags` | complexType.SafeKeyValueCanBeNull_string[] | read-only | Task result tags output |
| `tags[].key` | string |  |  |
| `tags[].value` | string |  |  |
| `taskId` | integer | read-only | the id of the task |
| `ticketReference` | string | read-only | Reference of the thread on the support tool |

```json
{
  "changeUuid": "string",
  "comment": "string",
  "doneDate": "2024-01-01T12:00:00Z",
  "function": "INFRA_002_VirtualNetworkInterface",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "needSchedule": true,
  "note": "string",
  "plannedInterventionId": 0,
  "startDate": "2024-01-01T12:00:00Z",
  "status": "cancelled",
  "tags": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "taskId": 0,
  "ticketReference": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/ola/aggregation" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/dedicated/server/{serviceName}/ola/aggregation",
	name = None, # Resulting VirtualNetworkInterface name (type: string)
	virtualNetworkInterfaces = None, # Interfaces to aggregate (type: uuid[])
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/dedicated/server/{serviceName}/ola/aggregation", array(
	name => null, // Resulting VirtualNetworkInterface name (type: string)
	virtualNetworkInterfaces => null, // Interfaces to aggregate (type: uuid[])
));

print_r($result);
?>
```

## Group network interfaces

`POST /1.0/dedicated/server/{serviceName}/ola/group`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/network/#post-dedicated-server-servicename-ola-group

**Status:** Deprecated, will be removed  
**Deprecated** since 2021-01-08, removed on 2021-04-08; use `/dedicated/server/{serviceName}/ola/aggregation` instead.  
**IAM actions:** `dedicatedServer:apiovh:ola/group/create`

Group network interfaces. Groups virtual network interfaces into one link aggregation, under the given name. Deprecated: use /dedicated/server/{serviceName}/ola/aggregation instead.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | yes | Resulting VirtualNetworkInterface name |
| `virtualNetworkInterfaces` | string (uuid)[] | yes | Interfaces to aggregate |

```json
{
  "name": "string",
  "virtualNetworkInterfaces": [
    "00000000-0000-0000-0000-000000000000"
  ]
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicated.server.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `changeUuid` | string | read-only | UUID of the change linked to this task |
| `comment` | string | read-only | Details of this task |
| `doneDate` | string (date-time) | read-only | Completion date |
| `function` | dedicated.TaskFunctionEnum | read-only | Function name — one of `INFRA_002_VirtualNetworkInterface`, `INFRA_002_VirtualNetworkInterface_group`, `INFRA_002_VirtualNetworkInterface_ungroup`, `INFRA_ONE_NETWORK_ONEAPI_VirtualNetworkInterface_group`, `INFRA_ONE_NETWORK_ONEAPI_VirtualNetworkInterface_ungroup`, `INFRA_ONE_NETWORK_VirtualNetworkInterface_group`, `INFRA_ONE_NETWORK_VirtualNetworkInterface_ungroup`, `addVirtualMac`, `addWindowSplaFromExistingSerial`, `applyBackupFtpAcls`, `applyBackupFtpQuota`, `bypassAntiDDosGame`, … |
| `lastUpdate` | string (date-time) | read-only | last update |
| `needSchedule` | boolean | read-only | Whether this task need to be scheduled or not |
| `note` | string | read-only | Extra information about this task |
| `plannedInterventionId` | integer | read-only | ID of the planned intervention for this task |
| `startDate` | string (date-time) | read-only | Task Creation date |
| `status` | dedicated.TaskStatusEnum | read-only | Task status — one of `cancelled`, `customerError`, `doing`, `done`, `init`, `ovhError`, `todo` |
| `tags` | complexType.SafeKeyValueCanBeNull_string[] | read-only | Task result tags output |
| `tags[].key` | string |  |  |
| `tags[].value` | string |  |  |
| `taskId` | integer | read-only | the id of the task |
| `ticketReference` | string | read-only | Reference of the thread on the support tool |

```json
{
  "changeUuid": "string",
  "comment": "string",
  "doneDate": "2024-01-01T12:00:00Z",
  "function": "INFRA_002_VirtualNetworkInterface",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "needSchedule": true,
  "note": "string",
  "plannedInterventionId": 0,
  "startDate": "2024-01-01T12:00:00Z",
  "status": "cancelled",
  "tags": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "taskId": 0,
  "ticketReference": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/ola/group" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/dedicated/server/{serviceName}/ola/group",
	name = None, # Resulting VirtualNetworkInterface name (type: string)
	virtualNetworkInterfaces = None, # Interfaces to aggregate (type: uuid[])
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/dedicated/server/{serviceName}/ola/group", array(
	name => null, // Resulting VirtualNetworkInterface name (type: string)
	virtualNetworkInterfaces => null, // Interfaces to aggregate (type: uuid[])
));

print_r($result);
?>
```

## Reset a network interface

`POST /1.0/dedicated/server/{serviceName}/ola/reset`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/network/#post-dedicated-server-servicename-ola-reset

**Status:** Beta version  
**IAM actions:** `dedicatedServer:apiovh:ola/reset`

Reset a network interface. Resets a virtual network interface to its default configuration. Returns a task.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `virtualNetworkInterface` | string (uuid) | yes | Interface to reset |

```json
{
  "virtualNetworkInterface": "00000000-0000-0000-0000-000000000000"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicated.server.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `changeUuid` | string | read-only | UUID of the change linked to this task |
| `comment` | string | read-only | Details of this task |
| `doneDate` | string (date-time) | read-only | Completion date |
| `function` | dedicated.TaskFunctionEnum | read-only | Function name — one of `INFRA_002_VirtualNetworkInterface`, `INFRA_002_VirtualNetworkInterface_group`, `INFRA_002_VirtualNetworkInterface_ungroup`, `INFRA_ONE_NETWORK_ONEAPI_VirtualNetworkInterface_group`, `INFRA_ONE_NETWORK_ONEAPI_VirtualNetworkInterface_ungroup`, `INFRA_ONE_NETWORK_VirtualNetworkInterface_group`, `INFRA_ONE_NETWORK_VirtualNetworkInterface_ungroup`, `addVirtualMac`, `addWindowSplaFromExistingSerial`, `applyBackupFtpAcls`, `applyBackupFtpQuota`, `bypassAntiDDosGame`, … |
| `lastUpdate` | string (date-time) | read-only | last update |
| `needSchedule` | boolean | read-only | Whether this task need to be scheduled or not |
| `note` | string | read-only | Extra information about this task |
| `plannedInterventionId` | integer | read-only | ID of the planned intervention for this task |
| `startDate` | string (date-time) | read-only | Task Creation date |
| `status` | dedicated.TaskStatusEnum | read-only | Task status — one of `cancelled`, `customerError`, `doing`, `done`, `init`, `ovhError`, `todo` |
| `tags` | complexType.SafeKeyValueCanBeNull_string[] | read-only | Task result tags output |
| `tags[].key` | string |  |  |
| `tags[].value` | string |  |  |
| `taskId` | integer | read-only | the id of the task |
| `ticketReference` | string | read-only | Reference of the thread on the support tool |

```json
{
  "changeUuid": "string",
  "comment": "string",
  "doneDate": "2024-01-01T12:00:00Z",
  "function": "INFRA_002_VirtualNetworkInterface",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "needSchedule": true,
  "note": "string",
  "plannedInterventionId": 0,
  "startDate": "2024-01-01T12:00:00Z",
  "status": "cancelled",
  "tags": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "taskId": 0,
  "ticketReference": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/ola/reset" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: uuid
result = client.post("/dedicated/server/{serviceName}/ola/reset",
	virtualNetworkInterface = None, # Interface to reset (type: uuid)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: uuid
$result = $ovh->post("/dedicated/server/{serviceName}/ola/reset", array(
	virtualNetworkInterface => null, // Interface to reset (type: uuid)
));

print_r($result);
?>
```

## Ungroup a network interface

`POST /1.0/dedicated/server/{serviceName}/ola/ungroup`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/network/#post-dedicated-server-servicename-ola-ungroup

**Status:** Deprecated, will be removed  
**Deprecated** since 2021-01-08, removed on 2021-04-08; use `/dedicated/server/{serviceName}/ola/reset` instead.  
**IAM actions:** `dedicatedServer:apiovh:ola/ungroup`

Ungroup a network interface. Ungroups a virtual network interface and returns a list of tasks. Deprecated: use /dedicated/server/{serviceName}/ola/reset instead.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `virtualNetworkInterface` | string (uuid) | yes | Interface to ungroup |

```json
{
  "virtualNetworkInterface": "00000000-0000-0000-0000-000000000000"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicated.server.Task[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `changeUuid` | string | read-only | UUID of the change linked to this task |
| `comment` | string | read-only | Details of this task |
| `doneDate` | string (date-time) | read-only | Completion date |
| `function` | dedicated.TaskFunctionEnum | read-only | Function name — one of `INFRA_002_VirtualNetworkInterface`, `INFRA_002_VirtualNetworkInterface_group`, `INFRA_002_VirtualNetworkInterface_ungroup`, `INFRA_ONE_NETWORK_ONEAPI_VirtualNetworkInterface_group`, `INFRA_ONE_NETWORK_ONEAPI_VirtualNetworkInterface_ungroup`, `INFRA_ONE_NETWORK_VirtualNetworkInterface_group`, `INFRA_ONE_NETWORK_VirtualNetworkInterface_ungroup`, `addVirtualMac`, `addWindowSplaFromExistingSerial`, `applyBackupFtpAcls`, `applyBackupFtpQuota`, `bypassAntiDDosGame`, … |
| `lastUpdate` | string (date-time) | read-only | last update |
| `needSchedule` | boolean | read-only | Whether this task need to be scheduled or not |
| `note` | string | read-only | Extra information about this task |
| `plannedInterventionId` | integer | read-only | ID of the planned intervention for this task |
| `startDate` | string (date-time) | read-only | Task Creation date |
| `status` | dedicated.TaskStatusEnum | read-only | Task status — one of `cancelled`, `customerError`, `doing`, `done`, `init`, `ovhError`, `todo` |
| `tags` | complexType.SafeKeyValueCanBeNull_string[] | read-only | Task result tags output |
| `tags[].key` | string |  |  |
| `tags[].value` | string |  |  |
| `taskId` | integer | read-only | the id of the task |
| `ticketReference` | string | read-only | Reference of the thread on the support tool |

```json
[
  {
    "changeUuid": "string",
    "comment": "string",
    "doneDate": "2024-01-01T12:00:00Z",
    "function": "INFRA_002_VirtualNetworkInterface",
    "lastUpdate": "2024-01-01T12:00:00Z",
    "needSchedule": true,
    "note": "string",
    "plannedInterventionId": 0,
    "startDate": "2024-01-01T12:00:00Z",
    "status": "cancelled",
    "tags": [
      {
        "key": "string",
        "value": "string"
      }
    ],
    "taskId": 0,
    "ticketReference": "string"
  }
]
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/ola/ungroup" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: uuid
result = client.post("/dedicated/server/{serviceName}/ola/ungroup",
	virtualNetworkInterface = None, # Interface to ungroup (type: uuid)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: uuid
$result = $ovh->post("/dedicated/server/{serviceName}/ola/ungroup", array(
	virtualNetworkInterface => null, // Interface to ungroup (type: uuid)
));

print_r($result);
?>
```

## List network interface controllers

`GET /1.0/dedicated/server/{serviceName}/networkInterfaceController`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/network/#get-dedicated-server-servicename-networkinterfacecontroller

**Status:** Beta version  
**IAM actions:** `dedicatedServer:apiovh:networkInterfaceController/get`

List network interface controllers. Returns the MAC addresses of the network interface controllers of the server. Filter them by link type with the linkType parameter.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `linkType` | query | dedicated.networkInterfaceController.NetworkInterfaceControllerLinkTypeEnum |  | Filter the value of linkType property (=) — one of `isolated`, `private`, `private_lag`, `provisioning`, `provisioning_lag`, `public`, `public_lag` |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | macAddress[] | successful operation |

```json
[
  "00:00:5e:00:53:01"
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/networkInterfaceController" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/dedicated/server/{serviceName}/networkInterfaceController")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/dedicated/server/{serviceName}/networkInterfaceController");

print_r($result);
?>
```

## Get a network interface controller

`GET /1.0/dedicated/server/{serviceName}/networkInterfaceController/{mac}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/network/#get-dedicated-server-servicename-networkinterfacecontroller-mac

**Status:** Beta version  
**IAM actions:** `dedicatedServer:apiovh:networkInterfaceController/get`

Get a network interface controller. Returns the MAC address of a network interface controller, its link type, such as public, private or isolated, and the virtual network interface bound to it.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `mac` | path | macAddress | yes | NetworkInterfaceController mac |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicated.networkInterfaceController.NetworkInterfaceController | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `linkType` | dedicated.networkInterfaceController.NetworkInterfaceControllerLinkTypeEnum | read-only | NetworkInterfaceController linkType — one of `isolated`, `private`, `private_lag`, `provisioning`, `provisioning_lag`, `public`, `public_lag` |
| `mac` | macAddress | read-only | NetworkInterfaceController mac |
| `virtualNetworkInterface` | string (uuid) | read-only | VirtualNetworkInterface bound to this NetworkInterfaceController |

```json
{
  "linkType": "isolated",
  "mac": "00:00:5e:00:53:01",
  "virtualNetworkInterface": "00000000-0000-0000-0000-000000000000"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/networkInterfaceController/{mac}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/dedicated/server/{serviceName}/networkInterfaceController/{mac}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/dedicated/server/{serviceName}/networkInterfaceController/{mac}");

print_r($result);
?>
```

## Get interface traffic statistics

`GET /1.0/dedicated/server/{serviceName}/networkInterfaceController/{mac}/mrtg`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/network/#get-dedicated-server-servicename-networkinterfacecontroller-mac-mrtg

**Status:** Beta version  
**IAM actions:** `dedicatedServer:apiovh:networkInterfaceController/mrtg/get`

Get interface traffic statistics. Returns timestamped values for one network interface controller, for the requested type and period. Types cover traffic, packets and errors, for download and upload.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `mac` | path | macAddress | yes | NetworkInterfaceController mac |
| `period` | query | dedicated.server.MrtgPeriodEnum | yes | mrtg period — one of `daily`, `hourly`, `monthly`, `weekly`, `yearly` |
| `serviceName` | path | string | yes | The internal name of your dedicated server |
| `type` | query | dedicated.server.MrtgTypeEnum | yes | mrtg type — one of `errors:download`, `errors:upload`, `packets:download`, `packets:upload`, `traffic:download`, `traffic:upload` |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicated.server.MrtgTimestampValue[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `timestamp` | integer |  |  |
| `value` | complexType.UnitAndValue_double |  | A numeric value tagged with its unit |
| `value.unit` | string |  |  |
| `value.value` | number |  |  |

```json
[
  {
    "timestamp": 0,
    "value": {
      "unit": "string",
      "value": 0
    }
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/networkInterfaceController/{mac}/mrtg" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/dedicated/server/{serviceName}/networkInterfaceController/{mac}/mrtg")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/dedicated/server/{serviceName}/networkInterfaceController/{mac}/mrtg");

print_r($result);
?>
```

## Get a virtual network interface

`GET /1.0/dedicated/server/virtualNetworkInterface/{uuid}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/network/#get-dedicated-server-virtualnetworkinterface-uuid

**Status:** Stable production version

Returns a virtual network interface from its UUID alone, without the server name in the path. The response includes the server it is bound to, its mode, its vRack and its network interface controllers.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `uuid` | path | string (uuid) | yes | Uuid |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicated.server.VirtualNetworkInterface | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `enabled` | boolean | read-only | VirtualNetworkInterface activation state |
| `mode` | dedicated.virtualNetworkInterface.VirtualNetworkInterfaceModeEnum | read-only | Available VirtualNetworkInterface modes — one of `public`, `public_aggregation`, `vrack`, `vrack_aggregation` |
| `name` | string | read-only | User defined VirtualNetworkInterface name |
| `networkInterfaceController` | string[] | read-only | NetworkInterfaceControllers bound to this VirtualNetworkInterface |
| `serverName` | string | read-only | Server bound to this VirtualNetworkInterface |
| `uuid` | string (uuid) | read-only | VirtualNetworkInterface unique id |
| `vrack` | string | read-only | vRack name |

```json
{
  "enabled": true,
  "mode": "public",
  "name": "string",
  "networkInterfaceController": [
    "string"
  ],
  "serverName": "string",
  "uuid": "00000000-0000-0000-0000-000000000000",
  "vrack": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/virtualNetworkInterface/{uuid}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/dedicated/server/virtualNetworkInterface/{uuid}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/dedicated/server/virtualNetworkInterface/{uuid}");

print_r($result);
?>
```

## List virtual network interfaces

`GET /1.0/dedicated/server/{serviceName}/virtualNetworkInterface`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/network/#get-dedicated-server-servicename-virtualnetworkinterface

**Status:** Beta version  
**IAM actions:** `dedicatedServer:apiovh:virtualNetworkInterface/get`

List virtual network interfaces. Returns the UUIDs of the virtual network interfaces of the server. Filter them by enabled, mode, vrack or name.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `enabled` | query | boolean |  | Filter the value of enabled property (=) |
| `mode` | query | dedicated.virtualNetworkInterface.VirtualNetworkInterfaceModeEnum |  | Filter the value of mode property (=) — one of `public`, `public_aggregation`, `vrack`, `vrack_aggregation` |
| `name` | query | string |  | Filter the value of name property (=) |
| `serviceName` | path | string | yes | The internal name of your dedicated server |
| `vrack` | query | string |  | Filter the value of vrack property (=) |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | string (uuid)[] | successful operation |

```json
[
  "00000000-0000-0000-0000-000000000000"
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/virtualNetworkInterface" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/dedicated/server/{serviceName}/virtualNetworkInterface")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/dedicated/server/{serviceName}/virtualNetworkInterface");

print_r($result);
?>
```

## Get a virtual network interface

`GET /1.0/dedicated/server/{serviceName}/virtualNetworkInterface/{uuid}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/network/#get-dedicated-server-servicename-virtualnetworkinterface-uuid

**Status:** Beta version  
**IAM actions:** `dedicatedServer:apiovh:virtualNetworkInterface/get`

Get a virtual network interface. Returns the name, mode, activation state and vRack of a virtual network interface, and the network interface controllers bound to it.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your dedicated server |
| `uuid` | path | string (uuid) | yes | VirtualNetworkInterface unique id |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicated.virtualNetworkInterface.VirtualNetworkInterface | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `enabled` | boolean | read-only | VirtualNetworkInterface activation state |
| `mode` | dedicated.virtualNetworkInterface.VirtualNetworkInterfaceModeEnum |  | VirtualNetworkInterface mode — one of `public`, `public_aggregation`, `vrack`, `vrack_aggregation` |
| `name` | string |  | User defined VirtualNetworkInterface name |
| `networkInterfaceController` | macAddress[] | read-only | NetworkInterfaceControllers bound to this VirtualNetworkInterface |
| `serverName` | string | read-only | Server bound to this VirtualNetworkInterface |
| `uuid` | string (uuid) | read-only | VirtualNetworkInterface unique id |
| `vrack` | string | read-only | vRack name |

```json
{
  "enabled": true,
  "mode": "public",
  "name": "string",
  "networkInterfaceController": [
    "00:00:5e:00:53:01"
  ],
  "serverName": "string",
  "uuid": "00000000-0000-0000-0000-000000000000",
  "vrack": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/virtualNetworkInterface/{uuid}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/dedicated/server/{serviceName}/virtualNetworkInterface/{uuid}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/dedicated/server/{serviceName}/virtualNetworkInterface/{uuid}");

print_r($result);
?>
```

## Update a virtual network interface

`PUT /1.0/dedicated/server/{serviceName}/virtualNetworkInterface/{uuid}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/network/#put-dedicated-server-servicename-virtualnetworkinterface-uuid

**Status:** Deprecated, will be removed  
**Deprecated** since 2021-01-08, removed on 2021-04-08; use `/dedicated/server/{serviceName}/ola/aggregation` instead.  
**IAM actions:** `dedicatedServer:apiovh:virtualNetworkInterface/edit`

Update a virtual network interface. Updates the name or the mode of a virtual network interface. Deprecated: use /dedicated/server/{serviceName}/ola/aggregation instead.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your dedicated server |
| `uuid` | path | string (uuid) | yes | VirtualNetworkInterface unique id |

### Request body (required)

Type: `dedicated.virtualNetworkInterface.VirtualNetworkInterface`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `enabled` | boolean | read-only | VirtualNetworkInterface activation state |
| `mode` | dedicated.virtualNetworkInterface.VirtualNetworkInterfaceModeEnum |  | VirtualNetworkInterface mode — one of `public`, `public_aggregation`, `vrack`, `vrack_aggregation` |
| `name` | string |  | User defined VirtualNetworkInterface name |
| `networkInterfaceController` | macAddress[] | read-only | NetworkInterfaceControllers bound to this VirtualNetworkInterface |
| `serverName` | string | read-only | Server bound to this VirtualNetworkInterface |
| `uuid` | string (uuid) | read-only | VirtualNetworkInterface unique id |
| `vrack` | string | read-only | vRack name |

```json
{
  "mode": "public",
  "name": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/virtualNetworkInterface/{uuid}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: dedicated.virtualNetworkInterface.VirtualNetworkInterface
result = client.put("/dedicated/server/{serviceName}/virtualNetworkInterface/{uuid}",
	mode = None, # VirtualNetworkInterface mode (type: dedicated.virtualNetworkInterface.VirtualNetworkInterfaceModeEnum)
	name = None, # User defined VirtualNetworkInterface name (type: string)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: dedicated.virtualNetworkInterface.VirtualNetworkInterface
$result = $ovh->put("/dedicated/server/{serviceName}/virtualNetworkInterface/{uuid}", array(
	mode => null, // VirtualNetworkInterface mode (type: dedicated.virtualNetworkInterface.VirtualNetworkInterfaceModeEnum)
	name => null, // User defined VirtualNetworkInterface name (type: string)
));

print_r($result);
?>
```

## Disable a virtual network interface

`POST /1.0/dedicated/server/{serviceName}/virtualNetworkInterface/{uuid}/disable`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/network/#post-dedicated-server-servicename-virtualnetworkinterface-uuid-disable

**Status:** Deprecated, will be removed  
**Deprecated** since 2021-01-08, removed on 2021-04-08; use `/dedicated/server/{serviceName}/ola/aggregation` instead.  
**IAM actions:** `dedicatedServer:apiovh:virtualNetworkInterface/disable`

Disable a virtual network interface. Disables the virtual network interface and returns a task. Deprecated: use /dedicated/server/{serviceName}/ola/aggregation instead.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your dedicated server |
| `uuid` | path | string (uuid) | yes | VirtualNetworkInterface unique id |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicated.server.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `changeUuid` | string | read-only | UUID of the change linked to this task |
| `comment` | string | read-only | Details of this task |
| `doneDate` | string (date-time) | read-only | Completion date |
| `function` | dedicated.TaskFunctionEnum | read-only | Function name — one of `INFRA_002_VirtualNetworkInterface`, `INFRA_002_VirtualNetworkInterface_group`, `INFRA_002_VirtualNetworkInterface_ungroup`, `INFRA_ONE_NETWORK_ONEAPI_VirtualNetworkInterface_group`, `INFRA_ONE_NETWORK_ONEAPI_VirtualNetworkInterface_ungroup`, `INFRA_ONE_NETWORK_VirtualNetworkInterface_group`, `INFRA_ONE_NETWORK_VirtualNetworkInterface_ungroup`, `addVirtualMac`, `addWindowSplaFromExistingSerial`, `applyBackupFtpAcls`, `applyBackupFtpQuota`, `bypassAntiDDosGame`, … |
| `lastUpdate` | string (date-time) | read-only | last update |
| `needSchedule` | boolean | read-only | Whether this task need to be scheduled or not |
| `note` | string | read-only | Extra information about this task |
| `plannedInterventionId` | integer | read-only | ID of the planned intervention for this task |
| `startDate` | string (date-time) | read-only | Task Creation date |
| `status` | dedicated.TaskStatusEnum | read-only | Task status — one of `cancelled`, `customerError`, `doing`, `done`, `init`, `ovhError`, `todo` |
| `tags` | complexType.SafeKeyValueCanBeNull_string[] | read-only | Task result tags output |
| `tags[].key` | string |  |  |
| `tags[].value` | string |  |  |
| `taskId` | integer | read-only | the id of the task |
| `ticketReference` | string | read-only | Reference of the thread on the support tool |

```json
{
  "changeUuid": "string",
  "comment": "string",
  "doneDate": "2024-01-01T12:00:00Z",
  "function": "INFRA_002_VirtualNetworkInterface",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "needSchedule": true,
  "note": "string",
  "plannedInterventionId": 0,
  "startDate": "2024-01-01T12:00:00Z",
  "status": "cancelled",
  "tags": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "taskId": 0,
  "ticketReference": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/virtualNetworkInterface/{uuid}/disable" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/dedicated/server/{serviceName}/virtualNetworkInterface/{uuid}/disable")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/dedicated/server/{serviceName}/virtualNetworkInterface/{uuid}/disable");

print_r($result);
?>
```

## Enable a virtual network interface

`POST /1.0/dedicated/server/{serviceName}/virtualNetworkInterface/{uuid}/enable`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/network/#post-dedicated-server-servicename-virtualnetworkinterface-uuid-enable

**Status:** Deprecated, will be removed  
**Deprecated** since 2021-01-08, removed on 2021-04-08; use `/dedicated/server/{serviceName}/ola/aggregation` instead.  
**IAM actions:** `dedicatedServer:apiovh:virtualNetworkInterface/enable`

Enable a virtual network interface. Enables the virtual network interface and returns a task. Deprecated: use /dedicated/server/{serviceName}/ola/aggregation instead.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your dedicated server |
| `uuid` | path | string (uuid) | yes | VirtualNetworkInterface unique id |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicated.server.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `changeUuid` | string | read-only | UUID of the change linked to this task |
| `comment` | string | read-only | Details of this task |
| `doneDate` | string (date-time) | read-only | Completion date |
| `function` | dedicated.TaskFunctionEnum | read-only | Function name — one of `INFRA_002_VirtualNetworkInterface`, `INFRA_002_VirtualNetworkInterface_group`, `INFRA_002_VirtualNetworkInterface_ungroup`, `INFRA_ONE_NETWORK_ONEAPI_VirtualNetworkInterface_group`, `INFRA_ONE_NETWORK_ONEAPI_VirtualNetworkInterface_ungroup`, `INFRA_ONE_NETWORK_VirtualNetworkInterface_group`, `INFRA_ONE_NETWORK_VirtualNetworkInterface_ungroup`, `addVirtualMac`, `addWindowSplaFromExistingSerial`, `applyBackupFtpAcls`, `applyBackupFtpQuota`, `bypassAntiDDosGame`, … |
| `lastUpdate` | string (date-time) | read-only | last update |
| `needSchedule` | boolean | read-only | Whether this task need to be scheduled or not |
| `note` | string | read-only | Extra information about this task |
| `plannedInterventionId` | integer | read-only | ID of the planned intervention for this task |
| `startDate` | string (date-time) | read-only | Task Creation date |
| `status` | dedicated.TaskStatusEnum | read-only | Task status — one of `cancelled`, `customerError`, `doing`, `done`, `init`, `ovhError`, `todo` |
| `tags` | complexType.SafeKeyValueCanBeNull_string[] | read-only | Task result tags output |
| `tags[].key` | string |  |  |
| `tags[].value` | string |  |  |
| `taskId` | integer | read-only | the id of the task |
| `ticketReference` | string | read-only | Reference of the thread on the support tool |

```json
{
  "changeUuid": "string",
  "comment": "string",
  "doneDate": "2024-01-01T12:00:00Z",
  "function": "INFRA_002_VirtualNetworkInterface",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "needSchedule": true,
  "note": "string",
  "plannedInterventionId": 0,
  "startDate": "2024-01-01T12:00:00Z",
  "status": "cancelled",
  "tags": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "taskId": 0,
  "ticketReference": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/virtualNetworkInterface/{uuid}/enable" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/dedicated/server/{serviceName}/virtualNetworkInterface/{uuid}/enable")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/dedicated/server/{serviceName}/virtualNetworkInterface/{uuid}/enable");

print_r($result);
?>
```

## Get the bandwidth burst

`GET /1.0/dedicated/server/{serviceName}/burst`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/network/#get-dedicated-server-servicename-burst

**Status:** Stable production version  
**IAM actions:** `dedicatedServer:apiovh:burst/get`

Get the bandwidth burst. Returns the burst status of the server bandwidth and its burst capacity. The status is active, inactive, or inactiveLocked when burst is temporarily disabled due to overuse.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicated.server.ServerBurst | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `capacity` | complexType.UnitAndValue_long | read-only | Bandwidth busrt capacity |
| `capacity.unit` | string |  |  |
| `capacity.value` | integer |  |  |
| `status` | dedicated.server.BurstStatusEnum |  | indicates whether burstable bandwidth is currently active, allowing it to temporarily exceed the normally included bandwidth.OvhToInternet amount, within the limits indicated by the burst.capacity item. It can also be inactiveLocked when temporarily disabled due to overuse, capping it to the included non-burstable bandwidth capacity of bandwidth.OvhToInternet — one of `active`, `inactive`, `inactiveLocked` |

```json
{
  "capacity": {
    "unit": "string",
    "value": 0
  },
  "status": "active"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/burst" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/dedicated/server/{serviceName}/burst")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/dedicated/server/{serviceName}/burst");

print_r($result);
?>
```

## Update the bandwidth burst

`PUT /1.0/dedicated/server/{serviceName}/burst`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/network/#put-dedicated-server-servicename-burst

**Status:** Stable production version  
**IAM actions:** `dedicatedServer:apiovh:burst/edit`

Update the bandwidth burst. Updates the burst status of the server bandwidth. When active, the bandwidth can temporarily exceed the included OvhToInternet amount, within the burst capacity.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Request body (required)

Type: `dedicated.server.ServerBurst`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `capacity` | complexType.UnitAndValue_long | read-only | Bandwidth busrt capacity |
| `capacity.unit` | string |  |  |
| `capacity.value` | integer |  |  |
| `status` | dedicated.server.BurstStatusEnum |  | indicates whether burstable bandwidth is currently active, allowing it to temporarily exceed the normally included bandwidth.OvhToInternet amount, within the limits indicated by the burst.capacity item. It can also be inactiveLocked when temporarily disabled due to overuse, capping it to the included non-burstable bandwidth capacity of bandwidth.OvhToInternet — one of `active`, `inactive`, `inactiveLocked` |

```json
{
  "status": "active"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/burst" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: dedicated.server.ServerBurst
result = client.put("/dedicated/server/{serviceName}/burst",
	status = None, # indicates whether burstable bandwidth is currently active, allowing it to temporarily exceed the normally included bandwidth.OvhToInternet amount, within the limits indicated by the burst.capacity item. It can also be inactiveLocked when temporarily disabled due to overuse, capping it to the included non-burstable bandwidth capacity of bandwidth.OvhToInternet (type: dedicated.server.BurstStatusEnum)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: dedicated.server.ServerBurst
$result = $ovh->put("/dedicated/server/{serviceName}/burst", array(
	status => null, // indicates whether burstable bandwidth is currently active, allowing it to temporarily exceed the normally included bandwidth.OvhToInternet amount, within the limits indicated by the burst.capacity item. It can also be inactiveLocked when temporarily disabled due to overuse, capping it to the included non-burstable bandwidth capacity of bandwidth.OvhToInternet (type: dedicated.server.BurstStatusEnum)
));

print_r($result);
?>
```

## List secondary DNS domains

`GET /1.0/dedicated/server/{serviceName}/secondaryDnsDomains`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/network/#get-dedicated-server-servicename-secondarydnsdomains

**Status:** Stable production version  
**IAM actions:** `dedicatedServer:apiovh:secondaryDnsDomains/get`

List secondary DNS domains. Returns the names of the domains declared on the secondary DNS of the server.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | string[] | successful operation |

```json
[
  "string"
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/secondaryDnsDomains" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/dedicated/server/{serviceName}/secondaryDnsDomains")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/dedicated/server/{serviceName}/secondaryDnsDomains");

print_r($result);
?>
```

## Create a secondary DNS domain

`POST /1.0/dedicated/server/{serviceName}/secondaryDnsDomains`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/network/#post-dedicated-server-servicename-secondarydnsdomains

**Status:** Stable production version  
**IAM actions:** `dedicatedServer:apiovh:secondaryDnsDomains/create`

Create a secondary DNS domain. Adds a domain to the secondary DNS of the server, with its ip, which is required. The domain must first be verified with the TXT record given by secondaryDnsNameDomainToken.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `domain` | string | yes | The domain to add |
| `ip` | ipv4 |  | IPv4 address (e.g., 192.0.2.0) |

```json
{
  "domain": "string",
  "ip": "192.0.2.0"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/secondaryDnsDomains" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/dedicated/server/{serviceName}/secondaryDnsDomains",
	domain = None, # The domain to add (type: string)
	ip = None, #  (type: ipv4, nullable)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/dedicated/server/{serviceName}/secondaryDnsDomains", array(
	domain => null, // The domain to add (type: string)
	ip => null, //  (type: ipv4, nullable)
));

print_r($result);
?>
```

## Get a secondary DNS domain

`GET /1.0/dedicated/server/{serviceName}/secondaryDnsDomains/{domain}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/network/#get-dedicated-server-servicename-secondarydnsdomains-domain

**Status:** Stable production version  
**IAM actions:** `dedicatedServer:apiovh:secondaryDnsDomains/get`

Get a secondary DNS domain. Returns the domain, the secondary DNS server that hosts it, its master IPv4 address and its creation date.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domain` | path | string | yes | Domain on slave server |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicated.secondaryDnsDomain.SecondaryDNS | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creationDate` | string (date-time) | read-only |  |
| `dns` | string | read-only | Secondary DNS server |
| `domain` | string | read-only | Domain on slave server |
| `ipMaster` | ipv4 |  | Master IPv4 address |

```json
{
  "creationDate": "2024-01-01T12:00:00Z",
  "dns": "string",
  "domain": "string",
  "ipMaster": "192.0.2.0"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/secondaryDnsDomains/{domain}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/dedicated/server/{serviceName}/secondaryDnsDomains/{domain}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/dedicated/server/{serviceName}/secondaryDnsDomains/{domain}");

print_r($result);
?>
```

## Delete a secondary DNS domain

`DELETE /1.0/dedicated/server/{serviceName}/secondaryDnsDomains/{domain}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/network/#delete-dedicated-server-servicename-secondarydnsdomains-domain

**Status:** Stable production version  
**IAM actions:** `dedicatedServer:apiovh:secondaryDnsDomains/delete`

Delete a secondary DNS domain. Removes the domain from the secondary DNS of the server. The call returns no content.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domain` | path | string | yes | Domain on slave server |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/secondaryDnsDomains/{domain}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/dedicated/server/{serviceName}/secondaryDnsDomains/{domain}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/dedicated/server/{serviceName}/secondaryDnsDomains/{domain}");

print_r($result);
?>
```

## Update a secondary DNS domain

`PUT /1.0/dedicated/server/{serviceName}/secondaryDnsDomains/{domain}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/network/#put-dedicated-server-servicename-secondarydnsdomains-domain

**Status:** Stable production version  
**IAM actions:** `dedicatedServer:apiovh:secondaryDnsDomains/edit`

Update a secondary DNS domain. Updates the master IPv4 address targeted by the domain on the secondary DNS. It is the only field that can be changed.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domain` | path | string | yes | Domain on slave server |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Request body (required)

Type: `dedicated.secondaryDnsDomain.SecondaryDNS`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creationDate` | string (date-time) | read-only |  |
| `dns` | string | read-only | Secondary DNS server |
| `domain` | string | read-only | Domain on slave server |
| `ipMaster` | ipv4 |  | Master IPv4 address |

```json
{
  "ipMaster": "192.0.2.0"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/secondaryDnsDomains/{domain}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: dedicated.secondaryDnsDomain.SecondaryDNS
result = client.put("/dedicated/server/{serviceName}/secondaryDnsDomains/{domain}",
	ipMaster = None, # Master IPv4 address (type: ipv4)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: dedicated.secondaryDnsDomain.SecondaryDNS
$result = $ovh->put("/dedicated/server/{serviceName}/secondaryDnsDomains/{domain}", array(
	ipMaster => null, // Master IPv4 address (type: ipv4)
));

print_r($result);
?>
```

## Get the domain DNS server

`GET /1.0/dedicated/server/{serviceName}/secondaryDnsDomains/{domain}/dnsServer`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/network/#get-dedicated-server-servicename-secondarydnsdomains-domain-dnsserver

**Status:** Stable production version  
**IAM actions:** `dedicatedServer:apiovh:secondaryDnsDomains/dnsServer/get`

Get the domain DNS server. Returns the secondary DNS server of the domain: its hostname and its IPv4 and IPv6 addresses.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domain` | path | string | yes | Domain on slave server |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | secondaryDns.SecondaryDNSNameServer | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `hostname` | string |  | the name server |
| `ip` | ipv4 |  | IPv4 address (e.g., 192.0.2.0) |
| `ipv6` | ipv6 |  | IPv6 address (e.g., 2001:41d0:1:1994::1) |

```json
{
  "hostname": "string",
  "ip": "192.0.2.0",
  "ipv6": "2001:41d0:1:1994::1"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/secondaryDnsDomains/{domain}/dnsServer" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/dedicated/server/{serviceName}/secondaryDnsDomains/{domain}/dnsServer")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/dedicated/server/{serviceName}/secondaryDnsDomains/{domain}/dnsServer");

print_r($result);
?>
```

## Get the domain verification record

`GET /1.0/dedicated/server/{serviceName}/secondaryDnsNameDomainToken`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/network/#get-dedicated-server-servicename-secondarydnsnamedomaintoken

**Status:** Stable production version  
**IAM actions:** `dedicatedServer:apiovh:secondaryDnsNameDomainToken/get`

Get the domain verification record. Returns the DNS record to add temporarily to the zone of a domain, so that ownership of the domain can be verified. The record is given as a subdomain, a field type and a field value.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domain` | query | string | yes | The domain to check |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | secondaryDns.SecondaryDNSCheckField | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `fieldType` | zone.NamedResolutionFieldTypeEnum |  | The field type to add on your DNS zone for this subDomain — one of `A`, `AAAA`, `CAA`, `CNAME`, `DKIM`, `DMARC`, `DNAME`, `LOC`, `MX`, `NAPTR`, `NS`, `PTR`, … |
| `fieldValue` | string |  | The field value to add on your DNS zone for this subDomain |
| `subDomain` | string |  | The subdomain to add on your DNS zone for the domain |

```json
{
  "fieldType": "A",
  "fieldValue": "string",
  "subDomain": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/secondaryDnsNameDomainToken" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/dedicated/server/{serviceName}/secondaryDnsNameDomainToken")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/dedicated/server/{serviceName}/secondaryDnsNameDomainToken");

print_r($result);
?>
```

## Get the available secondary name server

`GET /1.0/dedicated/server/{serviceName}/secondaryDnsNameServerAvailable`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/network/#get-dedicated-server-servicename-secondarydnsnameserveravailable

**Status:** Stable production version  
**IAM actions:** `dedicatedServer:apiovh:secondaryDnsNameServerAvailable/get`

Get the available secondary name server. Returns the secondary name server available for the server: its hostname and its IPv4 and IPv6 addresses.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | secondaryDns.SecondaryDNSNameServer | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `hostname` | string |  | the name server |
| `ip` | ipv4 |  | IPv4 address (e.g., 192.0.2.0) |
| `ipv6` | ipv6 |  | IPv6 address (e.g., 2001:41d0:1:1994::1) |

```json
{
  "hostname": "string",
  "ip": "192.0.2.0",
  "ipv6": "2001:41d0:1:1994::1"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/secondaryDnsNameServerAvailable" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/dedicated/server/{serviceName}/secondaryDnsNameServerAvailable")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/dedicated/server/{serviceName}/secondaryDnsNameServerAvailable");

print_r($result);
?>
```

## Get the network configuration

`GET /1.0/dedicated/server/{serviceName}/networking`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/network/#get-dedicated-server-servicename-networking

**Status:** Beta version  
**IAM actions:** `dedicatedServer:apiovh:networking/get`

Get the network configuration. Returns the network configuration of the server: its interfaces or interface aggregations, and the status of the current operation, deploying or active.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicated.server.Networking | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `description` | string | read-only | Operation description |
| `interfaces` | dedicated.server.Interfaces[] | read-only | Interface or interfaces aggregation |
| `interfaces[].aggregationFallback` | macAddress |  | Mac address of the LACP fallback interface |
| `interfaces[].macs` | macAddress[] |  | Mac address or list of mac addresses |
| `interfaces[].type` | dedicated.server.NetworkingTypeEnum |  | Network type — one of `public`, `vrack` |
| `status` | dedicated.server.NetworkingOperationEnum | read-only | Operation status — one of `active`, `deploying` |

```json
{
  "description": "string",
  "interfaces": [
    {
      "aggregationFallback": "00:00:5e:00:53:01",
      "macs": [
        "00:00:5e:00:53:01"
      ],
      "type": "public"
    }
  ],
  "status": "active"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/networking" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/dedicated/server/{serviceName}/networking")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/dedicated/server/{serviceName}/networking");

print_r($result);
?>
```

## Get server traffic statistics

`GET /1.0/dedicated/server/{serviceName}/mrtg`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/network/#get-dedicated-server-servicename-mrtg

**Status:** Deprecated, will be removed  
**Deprecated** since 2017-10-23, removed on 2018-04-23; use `/dedicated/server/{serviceName}/networkInterfaceController` instead.  
**IAM actions:** `dedicatedServer:apiovh:mrtg/get`

Get server traffic statistics. Returns timestamped values of the server traffic, packets or errors, for the requested type and period. Deprecated: use /dedicated/server/{serviceName}/networkInterfaceController instead.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `period` | query | dedicated.server.MrtgPeriodEnum | yes | mrtg period — one of `daily`, `hourly`, `monthly`, `weekly`, `yearly` |
| `serviceName` | path | string | yes | The internal name of your dedicated server |
| `type` | query | dedicated.server.MrtgTypeEnum | yes | mrtg type — one of `errors:download`, `errors:upload`, `packets:download`, `packets:upload`, `traffic:download`, `traffic:upload` |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicated.server.MrtgTimestampValue[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `timestamp` | integer |  |  |
| `value` | complexType.UnitAndValue_double |  | A numeric value tagged with its unit |
| `value.unit` | string |  |  |
| `value.value` | number |  |  |

```json
[
  {
    "timestamp": 0,
    "value": {
      "unit": "string",
      "value": 0
    }
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/mrtg" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/dedicated/server/{serviceName}/mrtg")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/dedicated/server/{serviceName}/mrtg");

print_r($result);
?>
```
