# Network › OVHcloud Connect › Family : Provider API

> Part of the OVHcloud developer hub. Index of every page and section: https://developers.eu.ovhcloud.com/llms.txt
> The Network product's sections: https://developers.eu.ovhcloud.com/reference/network/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/network/ovhcloud-connect/family-provider/

OpenAPI v1: https://api.eu.ovhcloud.com/1.0/__schemas/developer-hub-navigation/network/ovhcloud-connect/family-provider.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/network/ovhcloud-connect/family-provider.json?format=openapi3

## Operations

- `GET /ovhCloudConnect/{serviceName}/circuit` — List circuits
- `GET /ovhCloudConnect/{serviceName}/serviceKey` — List service keys
- `GET /ovhCloudConnect/{serviceName}/circuit/{id}` — Get circuit
- `GET /ovhCloudConnect/{serviceName}/serviceKey/{serviceKeyId}` — Get service key
- `POST /ovhCloudConnect/{serviceName}/pairingKey` — Associate pairing key
- `POST /ovhCloudConnect/{serviceName}/serviceKey/{serviceKeyId}/send` — Send service key
- `POST /ovhCloudConnect/{serviceName}/serviceKey/{serviceKeyId}/regenerate` — Regenerate service key
- `DELETE /ovhCloudConnect/{serviceName}/circuit/{id}` — Delete circuit

## List circuits

`GET /1.0/ovhCloudConnect/{serviceName}/circuit`

Link: https://developers.eu.ovhcloud.com/reference/network/ovhcloud-connect/family-provider/#get-ovhcloudconnect-servicename-circuit

**Status:** Stable production version  
**IAM actions:** `ovhCloudConnect:apiovh:circuit/get`

Returns the IDs of the circuits created from Google pairing keys.

### Parameters

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

### Responses

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

```json
[
  0
]
```

### Example

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

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

print_r($result);
?>
```

## List service keys

`GET /1.0/ovhCloudConnect/{serviceName}/serviceKey`

Link: https://developers.eu.ovhcloud.com/reference/network/ovhcloud-connect/family-provider/#get-ovhcloudconnect-servicename-servicekey

**Status:** Stable production version  
**IAM actions:** `ovhCloudConnect:apiovh:serviceKey/get`

Returns the IDs of all service keys generated for the provider, current and past.

### Parameters

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

### Responses

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

```json
[
  0
]
```

### Example

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

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

print_r($result);
?>
```

## Get circuit

`GET /1.0/ovhCloudConnect/{serviceName}/circuit/{id}`

Link: https://developers.eu.ovhcloud.com/reference/network/ovhcloud-connect/family-provider/#get-ovhcloudconnect-servicename-circuit-id

**Status:** Stable production version  
**IAM actions:** `ovhCloudConnect:apiovh:circuit/get`

Returns the circuit's pairing key, status and operational status.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id |
| `serviceName` | path | string (uuid) | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | ovhcloudconnect.Circuit | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creationDate` | string (date-time) | read-only | Creation date of the circuit |
| `doneDate` | string (date-time) | read-only | Date when the circuit was terminated |
| `id` | integer | read-only | Circuit id |
| `key` | string | read-only | Pairing key of the circuit |
| `lastUpdate` | string (date-time) | read-only | Last update date of the circuit |
| `name` | string | read-only | Circuit name |
| `operationalStatus` | ovhcloudconnect.circuit.OperationalStatusEnum | read-only | Operational status of the circuit — one of `degraded`, `down`, `unknown`, `up` |
| `status` | ovhcloudconnect.circuit.StatusEnum | read-only | Circuit status — one of `active`, `pending`, `pending_customer`, `terminated`, `to_check` |

```json
{
  "creationDate": "2024-01-01T12:00:00Z",
  "doneDate": "2024-01-01T12:00:00Z",
  "id": 0,
  "key": "string",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "name": "string",
  "operationalStatus": "degraded",
  "status": "active"
}
```

### Example

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

# 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("/ovhCloudConnect/{serviceName}/circuit/{id}");

print_r($result);
?>
```

## Get service key

`GET /1.0/ovhCloudConnect/{serviceName}/serviceKey/{serviceKeyId}`

Link: https://developers.eu.ovhcloud.com/reference/network/ovhcloud-connect/family-provider/#get-ovhcloudconnect-servicename-servicekey-servicekeyid

**Status:** Stable production version  
**IAM actions:** `ovhCloudConnect:apiovh:serviceKey/get`

Returns the key value, its provider and its status.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceKeyId` | path | integer | yes | Service key ID |
| `serviceName` | path | string (uuid) | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | ovhcloudconnect.Key | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer | read-only | Service Key id |
| `key` | string | read-only | Reference of the service |
| `provider` | ovhcloudconnect.service.ProviderEnum | read-only | Service Key provider — one of `OVHcloud`, `RISQ`, `consoleconnect`, `dcexp`, `digitalrealty`, `edge`, `equinix`, `fibrenoire`, `google`, `intercloud`, `internal`, `interxion`, … |
| `status` | ovhcloudconnect.key.StatusEnum | read-only | Service Key status — one of `active`, `cancelled`, `doing`, `terminated`, `toCheck` |

```json
{
  "id": 0,
  "key": "string",
  "provider": "OVHcloud",
  "status": "active"
}
```

### Example

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

# 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("/ovhCloudConnect/{serviceName}/serviceKey/{serviceKeyId}");

print_r($result);
?>
```

## Associate pairing key

`POST /1.0/ovhCloudConnect/{serviceName}/pairingKey`

Link: https://developers.eu.ovhcloud.com/reference/network/ovhcloud-connect/family-provider/#post-ovhcloudconnect-servicename-pairingkey

**Status:** Stable production version  
**IAM actions:** `ovhCloudConnect:apiovh:pairingKey/create`

Consumes a Google Cloud Partner Interconnect pairing key to create a circuit; the service needs a vRack (async task).

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `pairingKey` | query | string | yes | Google pairing key |
| `serviceName` | path | string (uuid) | yes | Service name |

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `function` | ovhcloudconnect.task.FunctionEnum | read-only | Task function — one of `addDatacenterConfiguration`, `addDatacenterExtraConfiguration`, `addPopConfiguration`, `addVrack`, `consumePairingKey`, `delDatacenterConfiguration`, `delDatacenterExtraConfiguration`, `delPopConfiguration`, `deleteCircuit`, `diagAccessEdge`, `diagMacs`, `diagPeering`, … |
| `id` | integer | read-only | Task id |
| `resourceId` | integer | read-only | Reference of the created resource |
| `status` | ovhcloudconnect.task.StatusEnum | read-only | Task status — one of `denied`, `doing`, `done`, `error`, `pause`, `todo` |

```json
{
  "function": "addDatacenterConfiguration",
  "id": 0,
  "resourceId": 0,
  "status": "denied"
}
```

### Example

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

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

print_r($result);
?>
```

## Send service key

`POST /1.0/ovhCloudConnect/{serviceName}/serviceKey/{serviceKeyId}/send`

Link: https://developers.eu.ovhcloud.com/reference/network/ovhcloud-connect/family-provider/#post-ovhcloudconnect-servicename-servicekey-servicekeyid-send

**Status:** Stable production version  
**IAM actions:** `ovhCloudConnect:apiovh:serviceKey/send`

Emails the key value to the given address.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceKeyId` | path | integer | yes | Service key ID |
| `serviceName` | path | string (uuid) | yes | Service name |

### Request body (required)

Type: `ovhcloudconnect.To`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `email` | string | yes | Email address to send the key |

```json
{
  "email": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | ovhcloudconnect.SendKeyAnswer | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `messageCode` | ovhcloudconnect.messageCode.Enum | read-only | message code for UX to display appropriate text — one of `mailSent` |

```json
{
  "messageCode": "mailSent"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/ovhCloudConnect/{serviceName}/serviceKey/{serviceKeyId}/send" \
  -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: ovhcloudconnect.To
result = client.post("/ovhCloudConnect/{serviceName}/serviceKey/{serviceKeyId}/send",
	email = None, # Email address to send the key (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: ovhcloudconnect.To
$result = $ovh->post("/ovhCloudConnect/{serviceName}/serviceKey/{serviceKeyId}/send", array(
	email => null, // Email address to send the key (type: string)
));

print_r($result);
?>
```

## Regenerate service key

`POST /1.0/ovhCloudConnect/{serviceName}/serviceKey/{serviceKeyId}/regenerate`

Link: https://developers.eu.ovhcloud.com/reference/network/ovhcloud-connect/family-provider/#post-ovhcloudconnect-servicename-servicekey-servicekeyid-regenerate

**Status:** Stable production version  
**IAM actions:** `ovhCloudConnect:apiovh:serviceKey/regenerate`

Generates a new key that the provider uses to set up the connection; previous service key is no longer active.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceKeyId` | path | integer | yes | Service key ID |
| `serviceName` | path | string (uuid) | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | ovhcloudconnect.Key | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer | read-only | Service Key id |
| `key` | string | read-only | Reference of the service |
| `provider` | ovhcloudconnect.service.ProviderEnum | read-only | Service Key provider — one of `OVHcloud`, `RISQ`, `consoleconnect`, `dcexp`, `digitalrealty`, `edge`, `equinix`, `fibrenoire`, `google`, `intercloud`, `internal`, `interxion`, … |
| `status` | ovhcloudconnect.key.StatusEnum | read-only | Service Key status — one of `active`, `cancelled`, `doing`, `terminated`, `toCheck` |

```json
{
  "id": 0,
  "key": "string",
  "provider": "OVHcloud",
  "status": "active"
}
```

### Example

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

# 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("/ovhCloudConnect/{serviceName}/serviceKey/{serviceKeyId}/regenerate");

print_r($result);
?>
```

## Delete circuit

`DELETE /1.0/ovhCloudConnect/{serviceName}/circuit/{id}`

Link: https://developers.eu.ovhcloud.com/reference/network/ovhcloud-connect/family-provider/#delete-ovhcloudconnect-servicename-circuit-id

**Status:** Stable production version  
**IAM actions:** `ovhCloudConnect:apiovh:circuit/delete`

Dissociates the pairing key and removes the circuit (async task).

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id |
| `serviceName` | path | string (uuid) | yes | Service name |

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `function` | ovhcloudconnect.task.FunctionEnum | read-only | Task function — one of `addDatacenterConfiguration`, `addDatacenterExtraConfiguration`, `addPopConfiguration`, `addVrack`, `consumePairingKey`, `delDatacenterConfiguration`, `delDatacenterExtraConfiguration`, `delPopConfiguration`, `deleteCircuit`, `diagAccessEdge`, `diagMacs`, `diagPeering`, … |
| `id` | integer | read-only | Task id |
| `resourceId` | integer | read-only | Reference of the created resource |
| `status` | ovhcloudconnect.task.StatusEnum | read-only | Task status — one of `denied`, `doing`, `done`, `error`, `pause`, `todo` |

```json
{
  "function": "addDatacenterConfiguration",
  "id": 0,
  "resourceId": 0,
  "status": "denied"
}
```

### Example

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

# 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("/ovhCloudConnect/{serviceName}/circuit/{id}");

print_r($result);
?>
```
