# Web Cloud › Internet › Access › Modem › Actions 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

> 5 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/actions/

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

## Operations

- `POST /xdsl/{serviceName}/modem/retrieveInfo` — Retrieve the modem information
- `POST /xdsl/{serviceName}/modem/refreshConnectedDevices` — Refresh the devices connected to the modem
- `POST /xdsl/{serviceName}/modem/reconfigureVoip` — Reconfigure the VoIP line of the modem
- `POST /xdsl/{serviceName}/modem/reboot` — Reboot the modem
- `POST /xdsl/{serviceName}/modem/reset` — Reset the modem

## Retrieve the modem information

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

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

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

Reads the general information of the modem of the access. Returns an asynchronous task holding the modem information.

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | xdsl.AsyncTask_xdsl.ModemInfo | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `error` | string | read-only |  |
| `result` | xdsl.ModemInfo | read-only | Describe general information of a Modem |
| `result.device` | xdsl.DeviceModemInfo | read-only | Describe device information of a Modem |
| `result.device.brand` | string | read-only | Modem brand |
| `result.device.ip` | ipv4 | read-only | IPv4 address (e.g., 192.0.2.0) |
| `result.device.lastUpdate` | string (date-time) | read-only | Time of last information refresh |
| `result.device.macAddress` | string | read-only | Modem mac address |
| `result.device.model` | string | read-only | Modem type of model |
| `result.device.oui` | string | read-only | Organizational Unique Identifier |
| `result.device.overEthernet` | string | read-only | Protocol used for connection |
| `result.device.pppLogin` | string | read-only | login used for ppp protocol |
| `result.device.serial` | string | read-only | Modem serial key |
| `result.device.softVersion` | string | read-only | Software Version |
| `result.statistics` | xdsl.StatsModemInfo | read-only | Describe statistics information of a Modem |
| `result.statistics.connectionUptime` | integer | read-only | Connection uptime |
| `result.statistics.crcError` | integer | read-only | Amount of CRC error detected |
| `result.statistics.deviceUptime` | integer | read-only | Modem uptime |
| `result.statistics.downstreamAttenuation` | number | read-only | Downstream attenuation |
| `result.statistics.downstreamMargin` | number | read-only | Downstream margin |
| `result.statistics.downstreamSync` | number | read-only | Downstream synchronization |
| `result.statistics.fecError` | integer | read-only | Amount of FEC error detected |
| `result.statistics.hecError` | integer | read-only | Amount of HEC error detected |
| `result.statistics.lastUpdate` | string (date-time) | read-only | Time of last refresh |
| `result.statistics.modulation` | string | read-only | Line modulation used |
| `result.statistics.quarterHourStart` | integer | read-only | Count from last refresh in seconds |
| `result.statistics.syncUptime` | integer | read-only | Synchronization uptime |
| `result.statistics.upstreamAttenuation` | number | read-only | Upstream attenuation |
| `result.statistics.upstreamMargin` | number | read-only | Upstream margin |
| `result.statistics.upstreamSync` | number | read-only | Upstream synchronization |
| `status` | xdsl.AsyncTaskStatusEnum | read-only | AsyncTask status — one of `error`, `ok`, `pending` |

```json
{
  "error": "string",
  "result": {
    "device": {
      "brand": "string",
      "ip": "192.0.2.0",
      "lastUpdate": "2024-01-01T12:00:00Z",
      "macAddress": "string",
      "model": "string",
      "oui": "string",
      "overEthernet": "string",
      "pppLogin": "string",
      "serial": "string",
      "softVersion": "string"
    },
    "statistics": {
      "connectionUptime": 0,
      "crcError": 0,
      "deviceUptime": 0,
      "downstreamAttenuation": 0,
      "downstreamMargin": 0,
      "downstreamSync": 0,
      "fecError": 0,
      "hecError": 0,
      "lastUpdate": "2024-01-01T12:00:00Z",
      "modulation": "string",
      "quarterHourStart": 0,
      "syncUptime": 0,
      "upstreamAttenuation": 0,
      "upstreamMargin": 0,
      "upstreamSync": 0
    }
  },
  "status": "error"
}
```

### Example

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

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

print_r($result);
?>
```

## Refresh the devices connected to the modem

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

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

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

Reads again from the modem of the access the devices connected to it. Returns the task that performs the change.

### Parameters

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

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

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

print_r($result);
?>
```

## Reconfigure the VoIP line of the modem

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

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

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

Pushes the VoIP line configuration again to the modem of the access.

### Parameters

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

### Responses

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

### Example

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

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

print_r($result);
?>
```

## Reboot the modem

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

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

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

Reboots 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.reboot.post`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `todoDate` | string (date-time) |  | Date when the reboot will start |

```json
{
  "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/reboot" \
  -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.reboot.post
result = client.post("/xdsl/{serviceName}/modem/reboot",
	todoDate = None, # Date when the reboot will start (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.reboot.post
$result = $ovh->post("/xdsl/{serviceName}/modem/reboot", array(
	todoDate => null, // Date when the reboot will start (type: string)
));

print_r($result);
?>
```

## Reset the modem

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

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

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

Resets the modem of the access to its default configuration, and optionally the configuration stored by OVHcloud. 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.reset.post`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `resetOvhConfig` | boolean |  | Reset configuration stored in OVH databases |

```json
{
  "resetOvhConfig": true
}
```

### 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/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: xdsl.modem.reset.post
result = client.post("/xdsl/{serviceName}/modem/reset",
	resetOvhConfig = None, # Reset configuration stored in OVH databases (type: boolean)
)

# 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.reset.post
$result = $ovh->post("/xdsl/{serviceName}/modem/reset", array(
	resetOvhConfig => null, // Reset configuration stored in OVH databases (type: boolean)
));

print_r($result);
?>
```
