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

> 3 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/

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

## Operations

- `GET /xdsl` — List xDSL accesses
- `GET /xdsl/{serviceName}` — Get an xDSL access
- `PUT /xdsl/{serviceName}` — Update an xDSL access

## List xDSL accesses

`GET /1.0/xdsl`

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

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

Returns the names of the xDSL accesses of the account. Each name is the serviceName used by the other xDSL calls.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `iamTags` | query | object |  | Filter resources on IAM tags |

### Responses

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

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

### Example

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

# 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");

print_r($result);
?>
```

## Get an xDSL access

`GET /1.0/xdsl/{serviceName}`

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

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

Returns the access type, address, status, provider, NRA, pack name, IPv6 and mail sending status, monitoring, LNS rate limit, mean time to repair and capabilities.

### Parameters

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

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `accessName` | string | read-only |  |
| `accessType` | xdsl.DslTypeEnum | read-only | Possible copper or fiber technologies — one of `adsl`, `ftte`, `ftth`, `ftto`, `sdsl`, `vdsl` |
| `address` | xdsl.AddressDetail | read-only | All components of an address |
| `address.building` | string | read-only |  |
| `address.city` | string | read-only |  |
| `address.door` | string | read-only |  |
| `address.firstName` | string | read-only |  |
| `address.floor` | string | read-only |  |
| `address.inseeCode` | string | read-only | Identifier of the city |
| `address.lastName` | string | read-only |  |
| `address.numberStreet` | string | read-only |  |
| `address.residence` | string | read-only |  |
| `address.rivoliCode` | string | read-only | Identifier of the street |
| `address.stairs` | string | read-only |  |
| `address.street` | string | read-only |  |
| `address.zipCode` | string | read-only |  |
| `capabilities` | xdsl.AccessCapabilities | read-only | Describe the capabilities of the Access |
| `capabilities.canApplyLnsRateLimit` | boolean | read-only |  |
| `capabilities.canChangeDslamProfile` | boolean | read-only |  |
| `capabilities.canChangeLns` | boolean | read-only |  |
| `capabilities.canGetRadiusConnectionLogs` | boolean | read-only |  |
| `capabilities.canResetDslamPort` | boolean | read-only |  |
| `capabilities.hasDslamPort` | boolean | read-only |  |
| `description` | string |  |  |
| `iam` | iam.ResourceMetadata | read-only | IAM resource metadata |
| `iam.displayName` | string | read-only | Resource display name |
| `iam.id` | string (uuid) | read-only | Unique identifier of the resource |
| `iam.state` | iam.ResourceMetadata.StateEnum | read-only | Resource state — one of `EXPIRED`, `IN_CREATION`, `OK`, `SUSPENDED` |
| `iam.tags` | object | read-only | Resource tags. Tags that were internally computed are prefixed with ovh: |
| `iam.urn` | string | read-only | Unique resource name used in policies |
| `ipv6Enabled` | boolean | read-only |  |
| `lnsRateLimit` | integer |  | Rate limit on the LNS in kbps - Only available if canApplyLnsRateLimit capability is set to true - Must be a multiple of 64 - Min value 64 / Max value 100032 |
| `mailSending` | xdsl.mailSendingAccessStatusEnum | read-only | Status of mail sending on the Access — one of `blockedForSpam`, `disabled`, `enabled` |
| `modemProfile` | xdsl.modemConnectionProfileEnum | read-only | Get modem profile connection linked to the access — one of `A`, `B`, `C`, `D` |
| `monitoring` | boolean |  | Whether or not this access is monitored |
| `mttr` | xdsl.GtrEnum | read-only | Get the Mean Time To Repair (MTTR) of the access — one of `10ho`, `20m_10ho`, `20m_4ho`, `4hno`, `4ho`, `5m_10ho`, `5m_4ho`, `dplus1`, `none` |
| `nra` | string | read-only |  |
| `packName` | string | read-only | Pack name, if access is in a pack |
| `pairsNumber` | integer | read-only |  |
| `provider` | xdsl.ProviderEnum | read-only | The provider — one of `axione`, `bouygues`, `ft`, `ftBySfr`, `kosc`, `koscDeg`, `ovh`, `sfr` |
| `providerInfra` | string | read-only | The provider of the infrastructure, if applicable |
| `role` | xdsl.AccessRoleEnum | read-only | Available access roles — one of `backup`, `main` |
| `status` | xdsl.AccessStatusEnum | read-only | Status of the access — one of `active`, `cancelled`, `close`, `deleting`, `doing`, `migration`, `slamming`, `terminated`, `upgradeOffer` |

```json
{
  "accessName": "string",
  "accessType": "adsl",
  "address": {
    "building": "string",
    "city": "string",
    "door": "string",
    "firstName": "string",
    "floor": "string",
    "inseeCode": "string",
    "lastName": "string",
    "numberStreet": "string",
    "residence": "string",
    "rivoliCode": "string",
    "stairs": "string",
    "street": "string",
    "zipCode": "string"
  },
  "capabilities": {
    "canApplyLnsRateLimit": true,
    "canChangeDslamProfile": true,
    "canChangeLns": true,
    "canGetRadiusConnectionLogs": true,
    "canResetDslamPort": true,
    "hasDslamPort": true
  },
  "description": "string",
  "iam": {
    "displayName": "string",
    "id": "00000000-0000-0000-0000-000000000000",
    "state": "EXPIRED",
    "tags": {
      "key": "string"
    },
    "urn": "string"
  },
  "ipv6Enabled": true,
  "lnsRateLimit": 0,
  "mailSending": "blockedForSpam",
  "modemProfile": "A",
  "monitoring": true,
  "mttr": "10ho",
  "nra": "string",
  "packName": "string",
  "pairsNumber": 0,
  "provider": "axione",
  "providerInfra": "string",
  "role": "backup",
  "status": "active"
}
```

### Example

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

# 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}");

print_r($result);
?>
```

## Update an xDSL access

`PUT /1.0/xdsl/{serviceName}`

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

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

Changes the settings that can be modified: the customer description, the monitoring and the LNS rate limit.

### Parameters

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

### Request body (required)

Type: `xdsl.Access`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `accessName` | string | read-only |  |
| `accessType` | xdsl.DslTypeEnum | read-only | Possible copper or fiber technologies — one of `adsl`, `ftte`, `ftth`, `ftto`, `sdsl`, `vdsl` |
| `address` | xdsl.AddressDetail | read-only | All components of an address |
| `address.building` | string | read-only |  |
| `address.city` | string | read-only |  |
| `address.door` | string | read-only |  |
| `address.firstName` | string | read-only |  |
| `address.floor` | string | read-only |  |
| `address.inseeCode` | string | read-only | Identifier of the city |
| `address.lastName` | string | read-only |  |
| `address.numberStreet` | string | read-only |  |
| `address.residence` | string | read-only |  |
| `address.rivoliCode` | string | read-only | Identifier of the street |
| `address.stairs` | string | read-only |  |
| `address.street` | string | read-only |  |
| `address.zipCode` | string | read-only |  |
| `capabilities` | xdsl.AccessCapabilities | read-only | Describe the capabilities of the Access |
| `capabilities.canApplyLnsRateLimit` | boolean | read-only |  |
| `capabilities.canChangeDslamProfile` | boolean | read-only |  |
| `capabilities.canChangeLns` | boolean | read-only |  |
| `capabilities.canGetRadiusConnectionLogs` | boolean | read-only |  |
| `capabilities.canResetDslamPort` | boolean | read-only |  |
| `capabilities.hasDslamPort` | boolean | read-only |  |
| `description` | string |  |  |
| `ipv6Enabled` | boolean | read-only |  |
| `lnsRateLimit` | integer |  | Rate limit on the LNS in kbps - Only available if canApplyLnsRateLimit capability is set to true - Must be a multiple of 64 - Min value 64 / Max value 100032 |
| `mailSending` | xdsl.mailSendingAccessStatusEnum | read-only | Status of mail sending on the Access — one of `blockedForSpam`, `disabled`, `enabled` |
| `modemProfile` | xdsl.modemConnectionProfileEnum | read-only | Get modem profile connection linked to the access — one of `A`, `B`, `C`, `D` |
| `monitoring` | boolean |  | Whether or not this access is monitored |
| `mttr` | xdsl.GtrEnum | read-only | Get the Mean Time To Repair (MTTR) of the access — one of `10ho`, `20m_10ho`, `20m_4ho`, `4hno`, `4ho`, `5m_10ho`, `5m_4ho`, `dplus1`, `none` |
| `nra` | string | read-only |  |
| `packName` | string | read-only | Pack name, if access is in a pack |
| `pairsNumber` | integer | read-only |  |
| `provider` | xdsl.ProviderEnum | read-only | The provider — one of `axione`, `bouygues`, `ft`, `ftBySfr`, `kosc`, `koscDeg`, `ovh`, `sfr` |
| `providerInfra` | string | read-only | The provider of the infrastructure, if applicable |
| `role` | xdsl.AccessRoleEnum | read-only | Available access roles — one of `backup`, `main` |
| `status` | xdsl.AccessStatusEnum | read-only | Status of the access — one of `active`, `cancelled`, `close`, `deleting`, `doing`, `migration`, `slamming`, `terminated`, `upgradeOffer` |

```json
{
  "description": "string",
  "lnsRateLimit": 0,
  "monitoring": true
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/xdsl/{serviceName}" \
  -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.Access
result = client.put("/xdsl/{serviceName}",
	description = None, #  (type: string)
	lnsRateLimit = None, # Rate limit on the LNS in kbps - Only available if canApplyLnsRateLimit capability is set to true - Must be a multiple of 64 - Min value 64 / Max value 100032 (type: integer, nullable)
	monitoring = None, # Whether or not this access is monitored (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.Access
$result = $ovh->put("/xdsl/{serviceName}", array(
	description => null, //  (type: string)
	lnsRateLimit => null, // Rate limit on the LNS in kbps - Only available if canApplyLnsRateLimit capability is set to true - Must be a multiple of 64 - Min value 64 / Max value 100032 (type: integer, nullable)
	monitoring => null, // Whether or not this access is monitored (type: boolean)
));

print_r($result);
?>
```
