# Web Cloud › Internet › Access › Modem API

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

> 8 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/web-cloud/internet/access/modem/

OpenAPI v1: https://api.eu.ovhcloud.com/1.0/__schemas/developer-hub-navigation/web-cloud/internet/access/modem.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/web-cloud/internet/access/modem.json?format=openapi3

## Operations

- `POST /xdsl/{serviceName}/applyTemplateToModem` — Apply a modem template
- `GET /xdsl/{serviceName}/modem` — Get the modem of an xDSL access
- `PUT /xdsl/{serviceName}/modem` — Update the modem of an xDSL access
- `GET /xdsl/{serviceName}/modem/availableACSBackend` — List the ACS backends of the modem
- `GET /xdsl/{serviceName}/modem/firmware` — Get the firmware of the modem
- `POST /xdsl/{serviceName}/modem/firmware` — Upgrade the firmware of the modem
- `GET /xdsl/{serviceName}/modem/firmwareAvailable` — List the firmware versions of the modem
- `GET /xdsl/{serviceName}/ont` — Get the ONT of an xDSL access

## Apply a modem template

`POST /1.0/xdsl/{serviceName}/applyTemplateToModem`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/access/modem/#applyTemplateModem

**Status:** Stable production version  
**IAM actions:** `xdsl:apiovh:applyTemplateToModem`

Applies a modem template to the modem of the access, except the parameters the template ignores. Returns the task that performs the change.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |

### Request body (required)

Type: `xdsl.applyTemplateToModem.post`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `templateName` | string | yes | Modem Template Name |

```json
{
  "templateName": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | xdsl.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `doneDate` | string (date-time) | read-only | Date when the action was completed |
| `function` | string | read-only |  |
| `id` | integer | read-only |  |
| `isArchived` | boolean | read-only |  |
| `status` | xdsl.TaskStatusEnum | read-only | Status of a task. — one of `cancelled`, `doing`, `done`, `error`, `problem`, `todo` |
| `todoDate` | string (date-time) | read-only | Date when the action will start |
| `updateDate` | string (date-time) | read-only |  |

```json
{
  "doneDate": "2024-01-01T12:00:00Z",
  "function": "string",
  "id": 0,
  "isArchived": true,
  "status": "cancelled",
  "todoDate": "2024-01-01T12:00:00Z",
  "updateDate": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/xdsl/{serviceName}/applyTemplateToModem" \
  -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: xdsl.applyTemplateToModem.post
result = client.post("/xdsl/{serviceName}/applyTemplateToModem",
	templateName = None, # Modem Template 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: xdsl.applyTemplateToModem.post
$result = $ovh->post("/xdsl/{serviceName}/applyTemplateToModem", array(
	templateName => null, // Modem Template Name (type: string)
));

print_r($result);
?>
```

## Get the modem of an xDSL access

`GET /1.0/xdsl/{serviceName}/modem`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/access/modem/#get-xdsl-servicename-modem

**Status:** Stable production version  
**IAM actions:** `xdsl:apiovh:modem/get`

Returns the modem brand, model, serial and MAC address, its bridge and DMZ settings, MTU, firewall level, IPv6 support, ACS backend and capabilities.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | xdsl.Modem | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `acsBackend` | xdsl.xdslModemConfig.ACSBackendEnum |  | ACS backend used by the modem — one of `beta`, `dev`, `stable` |
| `acsVersion` | string | read-only | Version of ACS API used |
| `brandName` | string | read-only |  |
| `capabilities` | xdsl.ModemCapabilities | read-only | Describe the capabilities of the Modem |
| `capabilities.canBeManagedByOvh` | boolean | read-only |  |
| `capabilities.canChangeACS` | boolean | read-only |  |
| `capabilities.canChangeBridgeMode` | boolean | read-only |  |
| `capabilities.canChangeDHCP` | boolean | read-only |  |
| `capabilities.canChangeDMZ` | boolean | read-only |  |
| `capabilities.canChangeEasyFirewallLevel` | boolean | read-only |  |
| `capabilities.canChangeFirmware` | boolean | read-only |  |
| `capabilities.canChangeLAN` | boolean | read-only |  |
| `capabilities.canChangeManagement` | boolean | read-only |  |
| `capabilities.canChangeMtu` | boolean | read-only |  |
| `capabilities.canChangePortMapping` | boolean | read-only |  |
| `capabilities.canChangeWLAN` | boolean | read-only |  |
| `capabilities.canChangeWifiRadio` | boolean | read-only |  |
| `capabilities.canChangeWifiSSID` | boolean | read-only |  |
| `capabilities.canReboot` | boolean | read-only |  |
| `capabilities.canReconfigureVoip` | boolean | read-only |  |
| `capabilities.canRefreshConnectedDevices` | boolean | read-only |  |
| `capabilities.canReset` | boolean | read-only |  |
| `capabilities.canUseWifiRadio` | boolean | read-only |  |
| `dmzIP` | ip |  | IP Address of the DMZ (To modify or delete the DMZ IP on the modem, a re-configuration of your modem has to be made, your configuration will be maintained, but you will lose your connection a few minutes) |
| `easyFirewallLevel` | xdsl.xdslModemConfig.EasyFirewallLevelEnum | read-only | Level of the FireWall on the modem — one of `BlockAll`, `Disabled`, `Normal` |
| `ipv6Support` | boolean | read-only | Whether or not the modem supports IPv6 |
| `isBridged` | boolean |  | Whether or not the modem is in bridge mode. To pass from bridge mode to routed mode, a reset is necessary. If the modem is managedByOvh, the bridge state will be kept after a reset |
| `lastCwmpRequestDate` | string (date-time) | read-only | Last time the modem made a CWMP request to the Auto Configuration Server |
| `macAddress` | string | read-only |  |
| `managedByOvh` | boolean |  | Whether or not the user can configure his modem via OVH Interface (will lock telnet and local HTTP configuration page) |
| `model` | string | read-only |  |
| `mtuSize` | xdsl.xdslModemConfig.MTUSizeEnum |  | Size of the Maximum Transmission Unit on the modem's interfaces — one of `1432`, `1456`, `1492` |
| `serialNumber` | string | read-only |  |

```json
{
  "acsBackend": "beta",
  "acsVersion": "string",
  "brandName": "string",
  "capabilities": {
    "canBeManagedByOvh": true,
    "canChangeACS": true,
    "canChangeBridgeMode": true,
    "canChangeDHCP": true,
    "canChangeDMZ": true,
    "canChangeEasyFirewallLevel": true,
    "canChangeFirmware": true,
    "canChangeLAN": true,
    "canChangeManagement": true,
    "canChangeMtu": true,
    "canChangePortMapping": true,
    "canChangeWLAN": true,
    "canChangeWifiRadio": true,
    "canChangeWifiSSID": true,
    "canReboot": true,
    "canReconfigureVoip": true,
    "canRefreshConnectedDevices": true,
    "canReset": true,
    "canUseWifiRadio": true
  },
  "dmzIP": "192.0.2.0",
  "easyFirewallLevel": "BlockAll",
  "ipv6Support": true,
  "isBridged": true,
  "lastCwmpRequestDate": "2024-01-01T12:00:00Z",
  "macAddress": "string",
  "managedByOvh": true,
  "model": "string",
  "mtuSize": 1432,
  "serialNumber": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/xdsl/{serviceName}/modem" \
  -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("/xdsl/{serviceName}/modem")

# 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("/xdsl/{serviceName}/modem");

print_r($result);
?>
```

## Update the modem of an xDSL access

`PUT /1.0/xdsl/{serviceName}/modem`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/access/modem/#put-xdsl-servicename-modem

**Status:** Stable production version  
**IAM actions:** `xdsl:apiovh:modem/edit`

Changes the settings that can be modified: management by OVHcloud, bridge mode, DMZ IP, MTU size and ACS backend.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |

### Request body (required)

Type: `xdsl.Modem`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `acsBackend` | xdsl.xdslModemConfig.ACSBackendEnum |  | ACS backend used by the modem — one of `beta`, `dev`, `stable` |
| `acsVersion` | string | read-only | Version of ACS API used |
| `brandName` | string | read-only |  |
| `capabilities` | xdsl.ModemCapabilities | read-only | Describe the capabilities of the Modem |
| `capabilities.canBeManagedByOvh` | boolean | read-only |  |
| `capabilities.canChangeACS` | boolean | read-only |  |
| `capabilities.canChangeBridgeMode` | boolean | read-only |  |
| `capabilities.canChangeDHCP` | boolean | read-only |  |
| `capabilities.canChangeDMZ` | boolean | read-only |  |
| `capabilities.canChangeEasyFirewallLevel` | boolean | read-only |  |
| `capabilities.canChangeFirmware` | boolean | read-only |  |
| `capabilities.canChangeLAN` | boolean | read-only |  |
| `capabilities.canChangeManagement` | boolean | read-only |  |
| `capabilities.canChangeMtu` | boolean | read-only |  |
| `capabilities.canChangePortMapping` | boolean | read-only |  |
| `capabilities.canChangeWLAN` | boolean | read-only |  |
| `capabilities.canChangeWifiRadio` | boolean | read-only |  |
| `capabilities.canChangeWifiSSID` | boolean | read-only |  |
| `capabilities.canReboot` | boolean | read-only |  |
| `capabilities.canReconfigureVoip` | boolean | read-only |  |
| `capabilities.canRefreshConnectedDevices` | boolean | read-only |  |
| `capabilities.canReset` | boolean | read-only |  |
| `capabilities.canUseWifiRadio` | boolean | read-only |  |
| `dmzIP` | ip |  | IP Address of the DMZ (To modify or delete the DMZ IP on the modem, a re-configuration of your modem has to be made, your configuration will be maintained, but you will lose your connection a few minutes) |
| `easyFirewallLevel` | xdsl.xdslModemConfig.EasyFirewallLevelEnum | read-only | Level of the FireWall on the modem — one of `BlockAll`, `Disabled`, `Normal` |
| `ipv6Support` | boolean | read-only | Whether or not the modem supports IPv6 |
| `isBridged` | boolean |  | Whether or not the modem is in bridge mode. To pass from bridge mode to routed mode, a reset is necessary. If the modem is managedByOvh, the bridge state will be kept after a reset |
| `lastCwmpRequestDate` | string (date-time) | read-only | Last time the modem made a CWMP request to the Auto Configuration Server |
| `macAddress` | string | read-only |  |
| `managedByOvh` | boolean |  | Whether or not the user can configure his modem via OVH Interface (will lock telnet and local HTTP configuration page) |
| `model` | string | read-only |  |
| `mtuSize` | xdsl.xdslModemConfig.MTUSizeEnum |  | Size of the Maximum Transmission Unit on the modem's interfaces — one of `1432`, `1456`, `1492` |
| `serialNumber` | string | read-only |  |

```json
{
  "acsBackend": "beta",
  "dmzIP": "192.0.2.0",
  "isBridged": true,
  "managedByOvh": true,
  "mtuSize": 1432
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/xdsl/{serviceName}/modem" \
  -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: xdsl.Modem
result = client.put("/xdsl/{serviceName}/modem",
	acsBackend = None, # ACS backend used by the modem (type: xdsl.xdslModemConfig.ACSBackendEnum)
	dmzIP = None, # IP Address of the DMZ (To modify or delete the DMZ IP on the modem, a re-configuration of your modem has to be made, your configuration will be maintained, but you will lose your connection a few minutes) (type: ip, nullable)
	isBridged = None, # Whether or not the modem is in bridge mode. To pass from bridge mode to routed mode, a reset is necessary. If the modem is managedByOvh, the bridge state will be kept after a reset (type: boolean)
	managedByOvh = None, # Whether or not the user can configure his modem via OVH Interface (will lock telnet and local HTTP configuration page) (type: boolean)
	mtuSize = None, # Size of the Maximum Transmission Unit on the modem's interfaces (type: xdsl.xdslModemConfig.MTUSizeEnum, 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

// Request body type: xdsl.Modem
$result = $ovh->put("/xdsl/{serviceName}/modem", array(
	acsBackend => null, // ACS backend used by the modem (type: xdsl.xdslModemConfig.ACSBackendEnum)
	dmzIP => null, // IP Address of the DMZ (To modify or delete the DMZ IP on the modem, a re-configuration of your modem has to be made, your configuration will be maintained, but you will lose your connection a few minutes) (type: ip, nullable)
	isBridged => null, // Whether or not the modem is in bridge mode. To pass from bridge mode to routed mode, a reset is necessary. If the modem is managedByOvh, the bridge state will be kept after a reset (type: boolean)
	managedByOvh => null, // Whether or not the user can configure his modem via OVH Interface (will lock telnet and local HTTP configuration page) (type: boolean)
	mtuSize => null, // Size of the Maximum Transmission Unit on the modem's interfaces (type: xdsl.xdslModemConfig.MTUSizeEnum, nullable)
));

print_r($result);
?>
```

## List the ACS backends of the modem

`GET /1.0/xdsl/{serviceName}/modem/availableACSBackend`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/access/modem/#get-xdsl-servicename-modem-availableacsbackend

**Status:** Stable production version  
**IAM actions:** `xdsl:apiovh:modem/availableACSBackend/get`

Returns the ACS backends the modem of the access can use.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |

### Responses

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

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

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/xdsl/{serviceName}/modem/availableACSBackend" \
  -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("/xdsl/{serviceName}/modem/availableACSBackend")

# 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("/xdsl/{serviceName}/modem/availableACSBackend");

print_r($result);
?>
```

## Get the firmware of the modem

`GET /1.0/xdsl/{serviceName}/modem/firmware`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/access/modem/#getFirmwareVersion

**Status:** Stable production version  
**IAM actions:** `xdsl:apiovh:modem/firmware/get`

Returns the firmware version installed on the modem of the access.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |

### Responses

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

```json
"string"
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/xdsl/{serviceName}/modem/firmware" \
  -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("/xdsl/{serviceName}/modem/firmware")

# 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("/xdsl/{serviceName}/modem/firmware");

print_r($result);
?>
```

## Upgrade the firmware of the modem

`POST /1.0/xdsl/{serviceName}/modem/firmware`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/access/modem/#installFrimware

**Status:** Stable production version  
**IAM actions:** `xdsl:apiovh:modem/firmware/create`

Installs a firmware version on the modem of the access, now or at the given date. Returns the task that performs the change.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |

### Request body (required)

Type: `xdsl.modem.firmware.post`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `firmware` | string | yes | The firmware version to upgrade to |
| `todoDate` | string (date-time) |  | Date of execution, default is now |

```json
{
  "firmware": "string",
  "todoDate": "2024-01-01T12:00:00Z"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | xdsl.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `doneDate` | string (date-time) | read-only | Date when the action was completed |
| `function` | string | read-only |  |
| `id` | integer | read-only |  |
| `isArchived` | boolean | read-only |  |
| `status` | xdsl.TaskStatusEnum | read-only | Status of a task. — one of `cancelled`, `doing`, `done`, `error`, `problem`, `todo` |
| `todoDate` | string (date-time) | read-only | Date when the action will start |
| `updateDate` | string (date-time) | read-only |  |

```json
{
  "doneDate": "2024-01-01T12:00:00Z",
  "function": "string",
  "id": 0,
  "isArchived": true,
  "status": "cancelled",
  "todoDate": "2024-01-01T12:00:00Z",
  "updateDate": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/xdsl/{serviceName}/modem/firmware" \
  -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: xdsl.modem.firmware.post
result = client.post("/xdsl/{serviceName}/modem/firmware",
	firmware = None, # The firmware version to upgrade to (type: string)
	todoDate = None, # Date of execution, default is now (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: xdsl.modem.firmware.post
$result = $ovh->post("/xdsl/{serviceName}/modem/firmware", array(
	firmware => null, // The firmware version to upgrade to (type: string)
	todoDate => null, // Date of execution, default is now (type: string)
));

print_r($result);
?>
```

## List the firmware versions of the modem

`GET /1.0/xdsl/{serviceName}/modem/firmwareAvailable`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/access/modem/#get-xdsl-servicename-modem-firmwareavailable

**Status:** Stable production version  
**IAM actions:** `xdsl:apiovh:modem/firmwareAvailable/get`

Returns the firmware versions that can be installed on the modem of the access.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |

### Responses

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

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

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/xdsl/{serviceName}/modem/firmwareAvailable" \
  -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("/xdsl/{serviceName}/modem/firmwareAvailable")

# 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("/xdsl/{serviceName}/modem/firmwareAvailable");

print_r($result);
?>
```

## Get the ONT of an xDSL access

`GET /1.0/xdsl/{serviceName}/ont`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/internet/access/modem/#get-xdsl-servicename-ont

**Status:** Stable production version  
**IAM actions:** `xdsl:apiovh:ont/get`

Returns the serial and MAC address of the optical network terminal of the access.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | xdsl.Ont | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `mac` | string | read-only | MAC address of the device |
| `serial` | string | read-only | Serial of the device |

```json
{
  "mac": "string",
  "serial": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/xdsl/{serviceName}/ont" \
  -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("/xdsl/{serviceName}/ont")

# 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("/xdsl/{serviceName}/ont");

print_r($result);
?>
```
