# Network › OVHcloud Connect › Observability 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

> 18 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/observability/

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

## Operations

- `GET /ovhCloudConnect/{serviceName}/incident` — List incidents
- `GET /ovhCloudConnect/{serviceName}/log/kind` — List log kinds
- `GET /ovhCloudConnect/{serviceName}/interface` — List interfaces
- `GET /ovhCloudConnect/{serviceName}/log/subscription` — List log subscriptions
- `GET /ovhCloudConnect/{serviceName}/monitoring` — List notifications
- `GET /ovhCloudConnect/{serviceName}/incident/{id}` — Get incident
- `GET /ovhCloudConnect/{serviceName}/log/kind/{name}` — Get a log kind
- `GET /ovhCloudConnect/{serviceName}/interface/{id}` — Get interface
- `GET /ovhCloudConnect/{serviceName}/log/subscription/{subscriptionId}` — Get a log subscription
- `POST /ovhCloudConnect/{serviceName}/log/subscription` — Create a log subscription
- `GET /ovhCloudConnect/{serviceName}/config/pop/{popId}/status` — Get BGP session status
- `POST /ovhCloudConnect/{serviceName}/log/url` — Generate a temporary log URL
- `GET /ovhCloudConnect/{serviceName}/config/pop/{popId}/statistics` — Get BGP prefix statistics
- `GET /ovhCloudConnect/{serviceName}/interface/{id}/status` — Get interface status
- `GET /ovhCloudConnect/{serviceName}/interface/{id}/statistics` — Get interface statistics
- `DELETE /ovhCloudConnect/{serviceName}/log/subscription/{subscriptionId}` — Delete a log subscription
- `POST /ovhCloudConnect/{serviceName}/monitoring` — Set notifications
- `DELETE /ovhCloudConnect/{serviceName}/monitoring` — Disable all notifications

## List incidents

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

Link: https://developers.eu.ovhcloud.com/reference/network/ovhcloud-connect/observability/#get-ovhcloudconnect-servicename-incident

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

Returns the IDs of the incidents and planned maintenances affecting the service.

### 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}/incident" \
  -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}/incident")

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

print_r($result);
?>
```

## List log kinds

`GET /1.0/ovhCloudConnect/{serviceName}/log/kind`

Link: https://developers.eu.ovhcloud.com/reference/network/ovhcloud-connect/observability/#get-ovhcloudconnect-servicename-log-kind

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

Returns the names of the log kinds OVHcloud Connect emits, which can be forwarded to a stream.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string (uuid) | 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/ovhCloudConnect/{serviceName}/log/kind" \
  -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}/log/kind")

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

print_r($result);
?>
```

## List interfaces

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

Link: https://developers.eu.ovhcloud.com/reference/network/ovhcloud-connect/observability/#get-ovhcloudconnect-servicename-interface

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

Returns the IDs of the service's physical ports.

### 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}/interface" \
  -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}/interface")

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

print_r($result);
?>
```

## List log subscriptions

`GET /1.0/ovhCloudConnect/{serviceName}/log/subscription`

Link: https://developers.eu.ovhcloud.com/reference/network/ovhcloud-connect/observability/#get-ovhcloudconnect-servicename-log-subscription

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

Returns the identifiers of the OVHcloud Connect log subscriptions. Set `kind` to restrict the list to one log kind.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `kind` | query | string |  | Filter on a specific kind (e.g., audit) |
| `serviceName` | path | string (uuid) | yes | Service name |

### Responses

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

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

### Example

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

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

print_r($result);
?>
```

## List notifications

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

Link: https://developers.eu.ovhcloud.com/reference/network/ovhcloud-connect/observability/#get-ovhcloudconnect-servicename-monitoring

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

Returns each alert type available on the service and whether it is active.

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | ovhcloudconnect.Monitoring[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `activated` | boolean | read-only | Whether alert is activated |
| `description` | string | read-only | Description of the monitoring alert |
| `name` | string | read-only | Name of the monitoring alert |
| `type` | string | read-only | Type of the monitoring alert |

```json
[
  {
    "activated": true,
    "description": "string",
    "name": "string",
    "type": "string"
  }
]
```

### Example

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

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

print_r($result);
?>
```

## Get incident

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

Link: https://developers.eu.ovhcloud.com/reference/network/ovhcloud-connect/observability/#get-ovhcloudconnect-servicename-incident-id

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

Returns whether it is an incident or a maintenance, with its start and end dates.

### Parameters

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

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `endDate` | string (date-time) | read-only | Ending date of the incident |
| `id` | integer | read-only | Incident reference |
| `startDate` | string (date-time) | read-only | Starting date of the incident |
| `type` | ovhcloudconnect.incident.TypeEnum | read-only | Type of incident — one of `incident`, `maintenance` |

```json
{
  "endDate": "2024-01-01T12:00:00Z",
  "id": 0,
  "startDate": "2024-01-01T12:00:00Z",
  "type": "incident"
}
```

### Example

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

print_r($result);
?>
```

## Get a log kind

`GET /1.0/ovhCloudConnect/{serviceName}/log/kind/{name}`

Link: https://developers.eu.ovhcloud.com/reference/network/ovhcloud-connect/observability/#get-ovhcloudconnect-servicename-log-kind-name

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

Returns a log kind and the additional fields its logs carry.

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dbaas.logs.LogKind | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `additionalReturnedFields` | string[] | read-only | List of additional log fields managed in this log kind |
| `createdAt` | string (date-time) | read-only | Creation date of the log kind |
| `displayName` | string | read-only | Log kind display name |
| `kindId` | string (uuid) | read-only | Log kind ID |
| `name` | string | read-only | Log kind name |
| `updatedAt` | string (date-time) | read-only | Last update date of the log kind |

```json
{
  "additionalReturnedFields": [
    "string"
  ],
  "createdAt": "2024-01-01T12:00:00Z",
  "displayName": "string",
  "kindId": "00000000-0000-0000-0000-000000000000",
  "name": "string",
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

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

# 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}/log/kind/{name}");

print_r($result);
?>
```

## Get interface

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

Link: https://developers.eu.ovhcloud.com/reference/network/ovhcloud-connect/observability/#get-ovhcloudconnect-servicename-interface-id

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

Returns the port's location, patch panel, status, connector type and optical light levels.

### Parameters

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

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `deviceDisplayName` | string | read-only | Patch panel name |
| `deviceRackDisplayName` | string | read-only | Equipment name in the rack |
| `id` | integer | read-only | Interface reference |
| `incomingLightStatus` | ovhcloudconnect.interface.LightStatusEnum | read-only | Status of the light received on the port (checked every 5 min) — one of `down`, `unknown`, `up` |
| `incomingLightValue` | number | read-only | Value of the light received on the port (checked every 5 min) |
| `interfaceName` | string | read-only | Port location |
| `interfaceStatus` | ovhcloudconnect.interface.LightStatusEnum | read-only | Status of the interface — one of `down`, `unknown`, `up` |
| `interfaceStatusLastUpdate` | string (date-time) | read-only | Date of the last interface status change detected |
| `interfaceTerminationType` | ovhcloudconnect.interface.TerminationTypeEnum | read-only | Fiber termination type — one of `LC/PC`, `SC/PC` |
| `lightLastUpdate` | string (date-time) | read-only | Date of the last light change detected |
| `outgoingLightStatus` | ovhcloudconnect.interface.LightStatusEnum | read-only | Status of the light emitted on the port (checked every 5 min) — one of `down`, `unknown`, `up` |
| `outgoingLightValue` | number | read-only | Value of the light emitted on the port (checked every 5 min) |
| `status` | ovhcloudconnect.interface.StatusEnum | read-only | Status of the port — one of `disabled`, `enabled`, `reserved` |

```json
{
  "deviceDisplayName": "string",
  "deviceRackDisplayName": "string",
  "id": 0,
  "incomingLightStatus": "down",
  "incomingLightValue": 0,
  "interfaceName": "string",
  "interfaceStatus": "down",
  "interfaceStatusLastUpdate": "2024-01-01T12:00:00Z",
  "interfaceTerminationType": "LC/PC",
  "lightLastUpdate": "2024-01-01T12:00:00Z",
  "outgoingLightStatus": "down",
  "outgoingLightValue": 0,
  "status": "disabled"
}
```

### Example

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

print_r($result);
?>
```

## Get a log subscription

`GET /1.0/ovhCloudConnect/{serviceName}/log/subscription/{subscriptionId}`

Link: https://developers.eu.ovhcloud.com/reference/network/ovhcloud-connect/observability/#get-ovhcloudconnect-servicename-log-subscription-subscriptionid

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

Returns the log kind and the destination stream of a subscription.

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dbaas.logs.LogSubscription | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Creation date of the subscription |
| `kind` | string | read-only | Log kind name of this subscription |
| `resource` | dbaas.logs.SubscriptionResource | read-only | Subscribed resource, where the logs come from |
| `resource.name` | string | read-only | Name of subscribed resource |
| `resource.type` | string | read-only | Type of subscribed resource |
| `serviceName` | string | read-only | Name of the destination log service |
| `streamId` | string | read-only | Id of the destination log stream |
| `subscriptionId` | string (uuid) | read-only | Subscription ID |
| `updatedAt` | string (date-time) | read-only | Last update date of the subscription |

```json
{
  "createdAt": "2024-01-01T12:00:00Z",
  "kind": "string",
  "resource": {
    "name": "string",
    "type": "string"
  },
  "serviceName": "string",
  "streamId": "string",
  "subscriptionId": "00000000-0000-0000-0000-000000000000",
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

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

# 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}/log/subscription/{subscriptionId}");

print_r($result);
?>
```

## Create a log subscription

`POST /1.0/ovhCloudConnect/{serviceName}/log/subscription`

Link: https://developers.eu.ovhcloud.com/reference/network/ovhcloud-connect/observability/#post-ovhcloudconnect-servicename-log-subscription

**Status:** Stable production version  
**IAM actions:** `ovhCloudConnect:apiovh:log/subscription/create`, `ldp:apiovh:output/graylog/stream/forwardTo`

Forwards OVHcloud Connect logs of one kind to a Logs Data Platform stream. The subscription is created asynchronously and the response returns the operation identifier.

### Parameters

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

### Request body (required)

Type: `dbaas.logs.LogSubscriptionCreation`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `kind` | string | yes | Log kind name to subscribe to |
| `streamId` | string (uuid) | yes | Customer log stream ID |

```json
{
  "kind": "string",
  "streamId": "00000000-0000-0000-0000-000000000000"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dbaas.logs.LogSubscriptionResponse | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `operationId` | string (uuid) | read-only | Identifier of the operation |
| `serviceName` | string | read-only | Operation owner's service name |

```json
{
  "operationId": "00000000-0000-0000-0000-000000000000",
  "serviceName": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/ovhCloudConnect/{serviceName}/log/subscription" \
  -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: dbaas.logs.LogSubscriptionCreation
result = client.post("/ovhCloudConnect/{serviceName}/log/subscription",
	kind = None, # Log kind name to subscribe to (type: string)
	streamId = None, # Customer log stream ID (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: dbaas.logs.LogSubscriptionCreation
$result = $ovh->post("/ovhCloudConnect/{serviceName}/log/subscription", array(
	kind => null, // Log kind name to subscribe to (type: string)
	streamId => null, // Customer log stream ID (type: string)
));

print_r($result);
?>
```

## Get BGP session status

`GET /1.0/ovhCloudConnect/{serviceName}/config/pop/{popId}/status`

Link: https://developers.eu.ovhcloud.com/reference/network/ovhcloud-connect/observability/#get-ovhcloudconnect-servicename-config-pop-popid-status

**Status:** Beta version  
**IAM actions:** `ovhCloudConnect:apiovh:config/status/get`

Returns whether the L3 BGP session is up or down, with its flap count and last changes.

### Parameters

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

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `flapCount` | number | read-only | Number of flap since last UP |
| `lastChange` | string (date-time) | read-only | Last time the interface changed status |
| `lastDown` | string (date-time) | read-only | Last time the interface status went from up to down |
| `lastFlap` | string (date-time) | read-only | Last time the session flapped |
| `lastUp` | string (date-time) | read-only | Last time the interface status went from down to up |
| `lastUpdate` | string (date-time) | read-only | Last time the status was updated |
| `status` | ovhcloudconnect.status.StatusEnum | read-only | Status of the peering — one of `down`, `up` |

```json
{
  "flapCount": 0,
  "lastChange": "2024-01-01T12:00:00Z",
  "lastDown": "2024-01-01T12:00:00Z",
  "lastFlap": "2024-01-01T12:00:00Z",
  "lastUp": "2024-01-01T12:00:00Z",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "status": "down"
}
```

### Example

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

# 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}/config/pop/{popId}/status");

print_r($result);
?>
```

## Generate a temporary log URL

`POST /1.0/ovhCloudConnect/{serviceName}/log/url`

Link: https://developers.eu.ovhcloud.com/reference/network/ovhcloud-connect/observability/#post-ovhcloudconnect-servicename-log-url

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

Generates a temporary URL to read the logs of one kind. The URL expires.

### Parameters

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

### Request body (required)

Type: `dbaas.logs.LogUrlCreation`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `kind` | string | yes | Log kind name |

```json
{
  "kind": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dbaas.logs.TemporaryLogsLink | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `expirationDate` | string (date-time) | read-only | Temporary url expiration date |
| `url` | string | read-only | Temporary url |

```json
{
  "expirationDate": "2024-01-01T12:00:00Z",
  "url": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/ovhCloudConnect/{serviceName}/log/url" \
  -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: dbaas.logs.LogUrlCreation
result = client.post("/ovhCloudConnect/{serviceName}/log/url",
	kind = None, # Log kind 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: dbaas.logs.LogUrlCreation
$result = $ovh->post("/ovhCloudConnect/{serviceName}/log/url", array(
	kind => null, // Log kind name (type: string)
));

print_r($result);
?>
```

## Get BGP prefix statistics

`GET /1.0/ovhCloudConnect/{serviceName}/config/pop/{popId}/statistics`

Link: https://developers.eu.ovhcloud.com/reference/network/ovhcloud-connect/observability/#get-ovhcloudconnect-servicename-config-pop-popid-statistics

**Status:** Beta version  
**IAM actions:** `ovhCloudConnect:apiovh:config/pop/statistics/get`

Returns accepted BGP prefixes and the prefix limit over time for this PoP configuration.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `period` | query | ovhcloudconnect.interface.MetricsPeriodEnum | yes | The period the statistics are fetched for — one of `daily`, `hourly`, `weekly` |
| `popId` | path | integer | yes | Pop ID |
| `serviceName` | path | string (uuid) | yes | Service name |
| `type` | query | ovhcloudconnect.popConfig.MetricsTypeEnum | yes | The type of statistic to be fetched — one of `prefix:accepted`, `prefix:limit` |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | ovhcloudconnect.Metrics[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `timestamp` | integer | read-only | timestamp corresponding to the value |
| `value` | ovhcloudconnect.MetricsValue | read-only | OVHcloud Connect Metrics value |
| `value.unit` | ovhcloudconnect.interface.MetricsUnitEnum | read-only | Unit in which the value is expressed — one of `bits/s`, `bytes/s`, `dbm`, `error/s`, `prefix_accepted`, `prefix_limit` |
| `value.value` | number | read-only |  |

```json
[
  {
    "timestamp": 0,
    "value": {
      "unit": "bits/s",
      "value": 0
    }
  }
]
```

### Example

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

# 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}/config/pop/{popId}/statistics");

print_r($result);
?>
```

## Get interface status

`GET /1.0/ovhCloudConnect/{serviceName}/interface/{id}/status`

Link: https://developers.eu.ovhcloud.com/reference/network/ovhcloud-connect/observability/#get-ovhcloudconnect-servicename-interface-id-status

**Status:** Beta version  
**IAM actions:** `ovhCloudConnect:apiovh:interface/status/get`

Returns whether the port is up or down, with its last up, down and change times.

### Parameters

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

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `lastChange` | string (date-time) | read-only | Last time the interface changed status |
| `lastDown` | string (date-time) | read-only | Last time the interface status went from up to down |
| `lastUp` | string (date-time) | read-only | Last time the interface status went from down to up |
| `lastUpdate` | string (date-time) | read-only | Last time the status was updated |
| `status` | ovhcloudconnect.status.StatusEnum | read-only | Status of the interface — one of `down`, `up` |

```json
{
  "lastChange": "2024-01-01T12:00:00Z",
  "lastDown": "2024-01-01T12:00:00Z",
  "lastUp": "2024-01-01T12:00:00Z",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "status": "down"
}
```

### Example

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

# 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}/interface/{id}/status");

print_r($result);
?>
```

## Get interface statistics

`GET /1.0/ovhCloudConnect/{serviceName}/interface/{id}/statistics`

Link: https://developers.eu.ovhcloud.com/reference/network/ovhcloud-connect/observability/#get-ovhcloudconnect-servicename-interface-id-statistics

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

Returns a time series of traffic, errors or optical levels for the chosen period.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id |
| `period` | query | ovhcloudconnect.interface.MetricsPeriodEnum | yes | The period the statistics are fetched for — one of `daily`, `hourly`, `weekly` |
| `serviceName` | path | string (uuid) | yes | Service name |
| `type` | query | ovhcloudconnect.interface.MetricsTypeEnum | yes | The type of statistic to be fetched — one of `error:download`, `error:upload`, `light:in`, `light:out`, `traffic:download`, `traffic:downloadBps`, `traffic:upload`, `traffic:uploadBps` |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | ovhcloudconnect.Metrics[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `timestamp` | integer | read-only | timestamp corresponding to the value |
| `value` | ovhcloudconnect.MetricsValue | read-only | OVHcloud Connect Metrics value |
| `value.unit` | ovhcloudconnect.interface.MetricsUnitEnum | read-only | Unit in which the value is expressed — one of `bits/s`, `bytes/s`, `dbm`, `error/s`, `prefix_accepted`, `prefix_limit` |
| `value.value` | number | read-only |  |

```json
[
  {
    "timestamp": 0,
    "value": {
      "unit": "bits/s",
      "value": 0
    }
  }
]
```

### Example

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

# 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}/interface/{id}/statistics");

print_r($result);
?>
```

## Delete a log subscription

`DELETE /1.0/ovhCloudConnect/{serviceName}/log/subscription/{subscriptionId}`

Link: https://developers.eu.ovhcloud.com/reference/network/ovhcloud-connect/observability/#delete-ovhcloudconnect-servicename-log-subscription-subscriptionid

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

Deletes the subscription and stops forwarding OVHcloud Connect logs to the stream.

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dbaas.logs.LogSubscriptionResponse | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `operationId` | string (uuid) | read-only | Identifier of the operation |
| `serviceName` | string | read-only | Operation owner's service name |

```json
{
  "operationId": "00000000-0000-0000-0000-000000000000",
  "serviceName": "string"
}
```

### Example

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

# 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}/log/subscription/{subscriptionId}");

print_r($result);
?>
```

## Set notifications

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

Link: https://developers.eu.ovhcloud.com/reference/network/ovhcloud-connect/observability/#post-ovhcloudconnect-servicename-monitoring

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

Activates exactly the alert types listed; any type left out is turned off.

### Parameters

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

### Request body (required)

Type: `ovhcloudconnect.Subscriptions`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `subscriptions` | string[] |  | List of subscriptions alerts. |

```json
{
  "subscriptions": [
    "string"
  ]
}
```

### Responses

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

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/ovhCloudConnect/{serviceName}/monitoring" \
  -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.Subscriptions
result = client.post("/ovhCloudConnect/{serviceName}/monitoring",
	subscriptions = None, # List of subscriptions alerts. (type: array)
)

# 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.Subscriptions
$result = $ovh->post("/ovhCloudConnect/{serviceName}/monitoring", array(
	subscriptions => null, // List of subscriptions alerts. (type: array)
));

print_r($result);
?>
```

## Disable all notifications

`DELETE /1.0/ovhCloudConnect/{serviceName}/monitoring`

Link: https://developers.eu.ovhcloud.com/reference/network/ovhcloud-connect/observability/#delete-ovhcloudconnect-servicename-monitoring

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

Turns off every alert of the service.

### Parameters

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

### Responses

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

### Example

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

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

print_r($result);
?>
```
