# Web Cloud › Web Hosting › CDN 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

> 16 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/web-hosting/cdn/

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

## Operations

- `GET /hosting/web/cdn/log/kind` — List available log kinds
- `GET /hosting/web/cdn/log/kind/{name}` — Get a log kind
- `GET /hosting/web/{serviceName}/cdn/availableOptions` — List available options for a Shared CDN service
- `GET /hosting/web/{serviceName}/cdn/domain` — List all domains for a Shared CDN service
- `GET /hosting/web/{serviceName}/cdn/domain/{domainName}` — Get details for a domain on a Shared CDN service
- `GET /hosting/web/{serviceName}/cdn/domain/{domainName}/logs` — Generate URL to logs archive
- `GET /hosting/web/{serviceName}/cdn/domain/{domainName}/option` — List all options for a domain
- `POST /hosting/web/{serviceName}/cdn/domain/{domainName}/option` — Add an option on a domain
- `GET /hosting/web/{serviceName}/cdn/domain/{domainName}/option/{optionName}` — Get details for an option on a domain
- `PUT /hosting/web/{serviceName}/cdn/domain/{domainName}/option/{optionName}` — Update an option on a domain
- `DELETE /hosting/web/{serviceName}/cdn/domain/{domainName}/option/{optionName}` — Remove or Reset an option to his default value
- `POST /hosting/web/{serviceName}/cdn/domain/{domainName}/purge` — Flush cache content on CDN for a domain
- `POST /hosting/web/{serviceName}/cdn/domain/{domainName}/refresh` — Trigger a refresh for a domain
- `GET /hosting/web/{serviceName}/cdn/domain/{domainName}/statistics` — Get CDN statistics for a domain
- `GET /hosting/web/{serviceName}/cdn/operation` — List all operations for a Shared CDN service
- `GET /hosting/web/{serviceName}/cdn/operation/{id}` — Get details for a Shared CDN operation

## List available log kinds

`GET /1.0/hosting/web/cdn/log/kind`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/cdn/#get-hosting-web-cdn-log-kind

**Status:** Stable production version

### Responses

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

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

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/cdn/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("/hosting/web/cdn/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("/hosting/web/cdn/log/kind");

print_r($result);
?>
```

## Get a log kind

`GET /1.0/hosting/web/cdn/log/kind/{name}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/cdn/#get-hosting-web-cdn-log-kind-name

**Status:** Stable production version

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `name` | path | string | yes | 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/hosting/web/cdn/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("/hosting/web/cdn/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("/hosting/web/cdn/log/kind/{name}");

print_r($result);
?>
```

## List available options for a Shared CDN service

`GET /1.0/hosting/web/{serviceName}/cdn/availableOptions`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/cdn/#get-hosting-web-servicename-cdn-availableoptions

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:cdn/availableOptions/get`

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | cdn.availableOptions[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `category` | cdn.OptionCategoryEnum | read-only | Option category — one of `cache`, `performance`, `security` |
| `config` | cdn.availableOptions.config | read-only | Option configuration |
| `config.destination` | cdn.availableOptions.config.constraints | read-only | URL used for Mobile Redirect |
| `config.destination.length` | integer | read-only | Maximum number of items in value |
| `config.destination.maximum` | integer | read-only | Maximum value |
| `config.destination.message` | string | read-only | Description of value |
| `config.destination.minimum` | integer | read-only | Minimum value |
| `config.destination.type` | cdn.OptionConfigParamTypeEnum | read-only | Type of value — one of `bool`, `int`, `list`, `str` |
| `config.followUri` | cdn.availableOptions.config.constraints | read-only | Follow Uri on Mobile Redirect |
| `config.followUri.length` | integer | read-only | Maximum number of items in value |
| `config.followUri.maximum` | integer | read-only | Maximum value |
| `config.followUri.message` | string | read-only | Description of value |
| `config.followUri.minimum` | integer | read-only | Minimum value |
| `config.followUri.type` | cdn.OptionConfigParamTypeEnum | read-only | Type of value — one of `bool`, `int`, `list`, `str` |
| `config.origins` | cdn.availableOptions.config.constraints | read-only | Authorized Origins separated by a comma |
| `config.origins.length` | integer | read-only | Maximum number of items in value |
| `config.origins.maximum` | integer | read-only | Maximum value |
| `config.origins.message` | string | read-only | Description of value |
| `config.origins.minimum` | integer | read-only | Minimum value |
| `config.origins.type` | cdn.OptionConfigParamTypeEnum | read-only | Type of value — one of `bool`, `int`, `list`, `str` |
| `config.patternType` | cdn.availableOptions.config.constraints | read-only | Option pattern type |
| `config.patternType.length` | integer | read-only | Maximum number of items in value |
| `config.patternType.maximum` | integer | read-only | Maximum value |
| `config.patternType.message` | string | read-only | Description of value |
| `config.patternType.minimum` | integer | read-only | Minimum value |
| `config.patternType.type` | cdn.OptionConfigParamTypeEnum | read-only | Type of value — one of `bool`, `int`, `list`, `str` |
| `config.priority` | cdn.availableOptions.config.constraints | read-only | Cache Rule priority (lower is the strongest priority) |
| `config.priority.length` | integer | read-only | Maximum number of items in value |
| `config.priority.maximum` | integer | read-only | Maximum value |
| `config.priority.message` | string | read-only | Description of value |
| `config.priority.minimum` | integer | read-only | Minimum value |
| `config.priority.type` | cdn.OptionConfigParamTypeEnum | read-only | Type of value — one of `bool`, `int`, `list`, `str` |
| `config.queryParameters` | cdn.availableOptions.config.constraints | read-only | Action to apply on query parameters |
| `config.queryParameters.length` | integer | read-only | Maximum number of items in value |
| `config.queryParameters.maximum` | integer | read-only | Maximum value |
| `config.queryParameters.message` | string | read-only | Description of value |
| `config.queryParameters.minimum` | integer | read-only | Minimum value |
| `config.queryParameters.type` | cdn.OptionConfigParamTypeEnum | read-only | Type of value — one of `bool`, `int`, `list`, `str` |
| `config.resources` | cdn.availableOptions.config.constraints | read-only | List of URI |
| `config.resources.length` | integer | read-only | Maximum number of items in value |
| `config.resources.maximum` | integer | read-only | Maximum value |
| `config.resources.message` | string | read-only | Description of value |
| `config.resources.minimum` | integer | read-only | Minimum value |
| `config.resources.type` | cdn.OptionConfigParamTypeEnum | read-only | Type of value — one of `bool`, `int`, `list`, `str` |
| `config.statusCode` | cdn.availableOptions.config.constraints | read-only | Redirection HTTP Code |
| `config.statusCode.length` | integer | read-only | Maximum number of items in value |
| `config.statusCode.maximum` | integer | read-only | Maximum value |
| `config.statusCode.message` | string | read-only | Description of value |
| `config.statusCode.minimum` | integer | read-only | Minimum value |
| `config.statusCode.type` | cdn.OptionConfigParamTypeEnum | read-only | Type of value — one of `bool`, `int`, `list`, `str` |
| `config.ttl` | cdn.availableOptions.config.constraints | read-only | Cache time in seconds |
| `config.ttl.length` | integer | read-only | Maximum number of items in value |
| `config.ttl.maximum` | integer | read-only | Maximum value |
| `config.ttl.message` | string | read-only | Description of value |
| `config.ttl.minimum` | integer | read-only | Minimum value |
| `config.ttl.type` | cdn.OptionConfigParamTypeEnum | read-only | Type of value — one of `bool`, `int`, `list`, `str` |
| `maxItems` | integer | read-only | Max option items |
| `type` | string | read-only | Option type |

```json
[
  {
    "category": "cache",
    "config": {
      "destination": {
        "length": 0,
        "maximum": 0,
        "message": "string",
        "minimum": 0,
        "type": "bool"
      },
      "followUri": {
        "length": 0,
        "maximum": 0,
        "message": "string",
        "minimum": 0,
        "type": "bool"
      },
      "origins": {
        "length": 0,
        "maximum": 0,
        "message": "string",
        "minimum": 0,
        "type": "bool"
      },
      "patternType": {
        "length": 0,
        "maximum": 0,
        "message": "string",
        "minimum": 0,
        "type": "bool"
      },
      "priority": {
        "length": 0,
        "maximum": 0,
        "message": "string",
        "minimum": 0,
        "type": "bool"
      },
      "queryParameters": {
        "length": 0,
        "maximum": 0,
        "message": "string",
        "minimum": 0,
        "type": "bool"
      },
      "resources": {
        "length": 0,
        "maximum": 0,
        "message": "string",
        "minimum": 0,
        "type": "bool"
      },
      "statusCode": {
        "length": 0,
        "maximum": 0,
        "message": "string",
        "minimum": 0,
        "type": "bool"
      },
      "ttl": {
        "length": 0,
        "maximum": 0,
        "message": "string",
        "minimum": 0,
        "type": "bool"
      }
    },
    "maxItems": 0,
    "type": "string"
  }
]
```

### Example

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

# 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("/hosting/web/{serviceName}/cdn/availableOptions");

print_r($result);
?>
```

## List all domains for a Shared CDN service

`GET /1.0/hosting/web/{serviceName}/cdn/domain`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/cdn/#get-hosting-web-servicename-cdn-domain

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:cdn/domain/get`

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | cdn.domain[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creationDate` | string (date-time) | read-only | Creation date |
| `name` | string | read-only | Domain name |
| `needRefresh` | boolean | read-only | The domain configuration has been updated, it needs a refresh |
| `status` | cdn.DomainStatusEnum | read-only | Domain status — one of `deleting`, `disabled`, `disabling`, `ok`, `refreshing`, `to_delete`, `to_disable`, `to_refresh` |
| `updatedDate` | string (date-time) | read-only | Last update date |

```json
[
  {
    "creationDate": "2024-01-01T12:00:00Z",
    "name": "string",
    "needRefresh": true,
    "status": "deleting",
    "updatedDate": "2024-01-01T12:00:00Z"
  }
]
```

### Example

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

# 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("/hosting/web/{serviceName}/cdn/domain");

print_r($result);
?>
```

## Get details for a domain on a Shared CDN service

`GET /1.0/hosting/web/{serviceName}/cdn/domain/{domainName}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/cdn/#get-hosting-web-servicename-cdn-domain-domainname

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:cdn/domain/get`

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | cdn.domain | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creationDate` | string (date-time) | read-only | Creation date |
| `name` | string | read-only | Domain name |
| `needRefresh` | boolean | read-only | The domain configuration has been updated, it needs a refresh |
| `status` | cdn.DomainStatusEnum | read-only | Domain status — one of `deleting`, `disabled`, `disabling`, `ok`, `refreshing`, `to_delete`, `to_disable`, `to_refresh` |
| `updatedDate` | string (date-time) | read-only | Last update date |

```json
{
  "creationDate": "2024-01-01T12:00:00Z",
  "name": "string",
  "needRefresh": true,
  "status": "deleting",
  "updatedDate": "2024-01-01T12:00:00Z"
}
```

### Example

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

# 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("/hosting/web/{serviceName}/cdn/domain/{domainName}");

print_r($result);
?>
```

## Generate URL to logs archive

`GET /1.0/hosting/web/{serviceName}/cdn/domain/{domainName}/logs`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/cdn/#get-hosting-web-servicename-cdn-domain-domainname-logs

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:cdn/domain/logs/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `date` | query | string (date) |  | Logs date (default is yesterday) |
| `domainName` | path | string | yes | Domain name |
| `serviceName` | path | string | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | cdn.logs | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | string | read-only | URL to logs archive |
| `validity` | string (date-time) | read-only | URL validity |

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

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/cdn/domain/{domainName}/logs" \
  -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("/hosting/web/{serviceName}/cdn/domain/{domainName}/logs")

# 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("/hosting/web/{serviceName}/cdn/domain/{domainName}/logs");

print_r($result);
?>
```

## List all options for a domain

`GET /1.0/hosting/web/{serviceName}/cdn/domain/{domainName}/option`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/cdn/#get-hosting-web-servicename-cdn-domain-domainname-option

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:cdn/domain/option/get`

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | cdn.domain.option[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `config` | cdn.domain.option.config |  | Option configuration |
| `config.destination` | string |  | URL used for Mobile Redirect |
| `config.followUri` | boolean |  | Follow Uri on Mobile Redirect |
| `config.origins` | string |  | Authorized Origins separated by a comma |
| `config.patternType` | cdn.OptionPatternTypeEnum |  | Option pattern type — one of `extension`, `folder`, `regex`, `uri` |
| `config.priority` | integer |  | Cache Rule priority (lower is the strongest priority) |
| `config.queryParameters` | cdn.OptionQueryParametersEnum |  | Action to apply on query parameters — one of `ignored`, `sorted` |
| `config.resources` | string[] |  | List of URI |
| `config.statusCode` | integer |  | Redirection HTTP Code |
| `config.ttl` | integer |  | Cache time in seconds |
| `enabled` | boolean | yes | Enable / Disable the option |
| `extra` | cdn.domain.option.extra |  | Additional information about option |
| `extra.quota` | integer |  | Maximum usage of the option |
| `extra.usage` | integer |  | Current usage of the option |
| `name` | string | read-only | Option name |
| `pattern` | string |  | Url pattern |
| `type` | cdn.OptionTypeEnum | yes | Option type — one of `brotli`, `cache_rule`, `cors`, `devmode`, `geo_headers`, `hsts`, `https_redirect`, `mixed_content`, `mobile_redirect`, `prefetch`, `prewarm`, `querystring`, … |

```json
[
  {
    "config": {
      "destination": "string",
      "followUri": true,
      "origins": "string",
      "patternType": "extension",
      "priority": 0,
      "queryParameters": "ignored",
      "resources": [
        "string"
      ],
      "statusCode": 0,
      "ttl": 0
    },
    "enabled": true,
    "extra": {
      "quota": 0,
      "usage": 0
    },
    "name": "string",
    "pattern": "string",
    "type": "brotli"
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/cdn/domain/{domainName}/option" \
  -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("/hosting/web/{serviceName}/cdn/domain/{domainName}/option")

# 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("/hosting/web/{serviceName}/cdn/domain/{domainName}/option");

print_r($result);
?>
```

## Add an option on a domain

`POST /1.0/hosting/web/{serviceName}/cdn/domain/{domainName}/option`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/cdn/#post-hosting-web-servicename-cdn-domain-domainname-option

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:cdn/domain/option/create`

### Parameters

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

### Request body (required)

Type: `cdn.domain.add.option`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `config` | cdn.domain.option.config |  | Option configuration |
| `config.destination` | string |  | URL used for Mobile Redirect |
| `config.followUri` | boolean |  | Follow Uri on Mobile Redirect |
| `config.origins` | string |  | Authorized Origins separated by a comma |
| `config.patternType` | cdn.OptionPatternTypeEnum |  | Option pattern type — one of `extension`, `folder`, `regex`, `uri` |
| `config.priority` | integer |  | Cache Rule priority (lower is the strongest priority) |
| `config.queryParameters` | cdn.OptionQueryParametersEnum |  | Action to apply on query parameters — one of `ignored`, `sorted` |
| `config.resources` | string[] |  | List of URI |
| `config.statusCode` | integer |  | Redirection HTTP Code |
| `config.ttl` | integer |  | Cache time in seconds |
| `enabled` | boolean | yes | Enable / Disable the option |
| `name` | string | yes | Option name |
| `pattern` | string |  | Url pattern |
| `type` | cdn.OptionTypePostEnum | yes | Option type — one of `cache_rule` |

```json
{
  "config": {
    "destination": "string",
    "followUri": true,
    "origins": "string",
    "patternType": "extension",
    "priority": 0,
    "queryParameters": "ignored",
    "resources": [
      "string"
    ],
    "statusCode": 0,
    "ttl": 0
  },
  "enabled": true,
  "name": "string",
  "pattern": "string",
  "type": "cache_rule"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | cdn.domain.option | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `config` | cdn.domain.option.config |  | Option configuration |
| `config.destination` | string |  | URL used for Mobile Redirect |
| `config.followUri` | boolean |  | Follow Uri on Mobile Redirect |
| `config.origins` | string |  | Authorized Origins separated by a comma |
| `config.patternType` | cdn.OptionPatternTypeEnum |  | Option pattern type — one of `extension`, `folder`, `regex`, `uri` |
| `config.priority` | integer |  | Cache Rule priority (lower is the strongest priority) |
| `config.queryParameters` | cdn.OptionQueryParametersEnum |  | Action to apply on query parameters — one of `ignored`, `sorted` |
| `config.resources` | string[] |  | List of URI |
| `config.statusCode` | integer |  | Redirection HTTP Code |
| `config.ttl` | integer |  | Cache time in seconds |
| `enabled` | boolean | yes | Enable / Disable the option |
| `extra` | cdn.domain.option.extra |  | Additional information about option |
| `extra.quota` | integer |  | Maximum usage of the option |
| `extra.usage` | integer |  | Current usage of the option |
| `name` | string | read-only | Option name |
| `pattern` | string |  | Url pattern |
| `type` | cdn.OptionTypeEnum | yes | Option type — one of `brotli`, `cache_rule`, `cors`, `devmode`, `geo_headers`, `hsts`, `https_redirect`, `mixed_content`, `mobile_redirect`, `prefetch`, `prewarm`, `querystring`, … |

```json
{
  "config": {
    "destination": "string",
    "followUri": true,
    "origins": "string",
    "patternType": "extension",
    "priority": 0,
    "queryParameters": "ignored",
    "resources": [
      "string"
    ],
    "statusCode": 0,
    "ttl": 0
  },
  "enabled": true,
  "extra": {
    "quota": 0,
    "usage": 0
  },
  "name": "string",
  "pattern": "string",
  "type": "brotli"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/cdn/domain/{domainName}/option" \
  -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: cdn.domain.add.option
result = client.post("/hosting/web/{serviceName}/cdn/domain/{domainName}/option",
	config = None, # Option configuration (type: cdn.domain.option.config, nullable)
	enabled = None, # Enable / Disable the option (type: boolean)
	name = None, # Option name (type: string)
	pattern = None, # Url pattern (type: string, nullable)
	type = None, # Option type (type: cdn.OptionTypePostEnum)
)

# 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: cdn.domain.add.option
$result = $ovh->post("/hosting/web/{serviceName}/cdn/domain/{domainName}/option", array(
	config => null, // Option configuration (type: cdn.domain.option.config, nullable)
	enabled => null, // Enable / Disable the option (type: boolean)
	name => null, // Option name (type: string)
	pattern => null, // Url pattern (type: string, nullable)
	type => null, // Option type (type: cdn.OptionTypePostEnum)
));

print_r($result);
?>
```

## Get details for an option on a domain

`GET /1.0/hosting/web/{serviceName}/cdn/domain/{domainName}/option/{optionName}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/cdn/#get-hosting-web-servicename-cdn-domain-domainname-option-optionname

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:cdn/domain/option/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domainName` | path | string | yes | Domain name |
| `optionName` | path | string | yes | Option name |
| `serviceName` | path | string | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | cdn.domain.option | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `config` | cdn.domain.option.config |  | Option configuration |
| `config.destination` | string |  | URL used for Mobile Redirect |
| `config.followUri` | boolean |  | Follow Uri on Mobile Redirect |
| `config.origins` | string |  | Authorized Origins separated by a comma |
| `config.patternType` | cdn.OptionPatternTypeEnum |  | Option pattern type — one of `extension`, `folder`, `regex`, `uri` |
| `config.priority` | integer |  | Cache Rule priority (lower is the strongest priority) |
| `config.queryParameters` | cdn.OptionQueryParametersEnum |  | Action to apply on query parameters — one of `ignored`, `sorted` |
| `config.resources` | string[] |  | List of URI |
| `config.statusCode` | integer |  | Redirection HTTP Code |
| `config.ttl` | integer |  | Cache time in seconds |
| `enabled` | boolean | yes | Enable / Disable the option |
| `extra` | cdn.domain.option.extra |  | Additional information about option |
| `extra.quota` | integer |  | Maximum usage of the option |
| `extra.usage` | integer |  | Current usage of the option |
| `name` | string | read-only | Option name |
| `pattern` | string |  | Url pattern |
| `type` | cdn.OptionTypeEnum | yes | Option type — one of `brotli`, `cache_rule`, `cors`, `devmode`, `geo_headers`, `hsts`, `https_redirect`, `mixed_content`, `mobile_redirect`, `prefetch`, `prewarm`, `querystring`, … |

```json
{
  "config": {
    "destination": "string",
    "followUri": true,
    "origins": "string",
    "patternType": "extension",
    "priority": 0,
    "queryParameters": "ignored",
    "resources": [
      "string"
    ],
    "statusCode": 0,
    "ttl": 0
  },
  "enabled": true,
  "extra": {
    "quota": 0,
    "usage": 0
  },
  "name": "string",
  "pattern": "string",
  "type": "brotli"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/cdn/domain/{domainName}/option/{optionName}" \
  -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("/hosting/web/{serviceName}/cdn/domain/{domainName}/option/{optionName}")

# 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("/hosting/web/{serviceName}/cdn/domain/{domainName}/option/{optionName}");

print_r($result);
?>
```

## Update an option on a domain

`PUT /1.0/hosting/web/{serviceName}/cdn/domain/{domainName}/option/{optionName}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/cdn/#put-hosting-web-servicename-cdn-domain-domainname-option-optionname

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:cdn/domain/option/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domainName` | path | string | yes | Domain name |
| `optionName` | path | string | yes | Option name |
| `serviceName` | path | string | yes | Service name |

### Request body (required)

Type: `cdn.domain.option`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `config` | cdn.domain.option.config |  | Option configuration |
| `config.destination` | string |  | URL used for Mobile Redirect |
| `config.followUri` | boolean |  | Follow Uri on Mobile Redirect |
| `config.origins` | string |  | Authorized Origins separated by a comma |
| `config.patternType` | cdn.OptionPatternTypeEnum |  | Option pattern type — one of `extension`, `folder`, `regex`, `uri` |
| `config.priority` | integer |  | Cache Rule priority (lower is the strongest priority) |
| `config.queryParameters` | cdn.OptionQueryParametersEnum |  | Action to apply on query parameters — one of `ignored`, `sorted` |
| `config.resources` | string[] |  | List of URI |
| `config.statusCode` | integer |  | Redirection HTTP Code |
| `config.ttl` | integer |  | Cache time in seconds |
| `enabled` | boolean | yes | Enable / Disable the option |
| `extra` | cdn.domain.option.extra |  | Additional information about option |
| `extra.quota` | integer |  | Maximum usage of the option |
| `extra.usage` | integer |  | Current usage of the option |
| `name` | string | read-only | Option name |
| `pattern` | string |  | Url pattern |
| `type` | cdn.OptionTypeEnum | yes | Option type — one of `brotli`, `cache_rule`, `cors`, `devmode`, `geo_headers`, `hsts`, `https_redirect`, `mixed_content`, `mobile_redirect`, `prefetch`, `prewarm`, `querystring`, … |

```json
{
  "config": {
    "destination": "string",
    "followUri": true,
    "origins": "string",
    "patternType": "extension",
    "priority": 0,
    "queryParameters": "ignored",
    "resources": [
      "string"
    ],
    "statusCode": 0,
    "ttl": 0
  },
  "enabled": true,
  "extra": {
    "quota": 0,
    "usage": 0
  },
  "pattern": "string",
  "type": "brotli"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | cdn.domain.option | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `config` | cdn.domain.option.config |  | Option configuration |
| `config.destination` | string |  | URL used for Mobile Redirect |
| `config.followUri` | boolean |  | Follow Uri on Mobile Redirect |
| `config.origins` | string |  | Authorized Origins separated by a comma |
| `config.patternType` | cdn.OptionPatternTypeEnum |  | Option pattern type — one of `extension`, `folder`, `regex`, `uri` |
| `config.priority` | integer |  | Cache Rule priority (lower is the strongest priority) |
| `config.queryParameters` | cdn.OptionQueryParametersEnum |  | Action to apply on query parameters — one of `ignored`, `sorted` |
| `config.resources` | string[] |  | List of URI |
| `config.statusCode` | integer |  | Redirection HTTP Code |
| `config.ttl` | integer |  | Cache time in seconds |
| `enabled` | boolean | yes | Enable / Disable the option |
| `extra` | cdn.domain.option.extra |  | Additional information about option |
| `extra.quota` | integer |  | Maximum usage of the option |
| `extra.usage` | integer |  | Current usage of the option |
| `name` | string | read-only | Option name |
| `pattern` | string |  | Url pattern |
| `type` | cdn.OptionTypeEnum | yes | Option type — one of `brotli`, `cache_rule`, `cors`, `devmode`, `geo_headers`, `hsts`, `https_redirect`, `mixed_content`, `mobile_redirect`, `prefetch`, `prewarm`, `querystring`, … |

```json
{
  "config": {
    "destination": "string",
    "followUri": true,
    "origins": "string",
    "patternType": "extension",
    "priority": 0,
    "queryParameters": "ignored",
    "resources": [
      "string"
    ],
    "statusCode": 0,
    "ttl": 0
  },
  "enabled": true,
  "extra": {
    "quota": 0,
    "usage": 0
  },
  "name": "string",
  "pattern": "string",
  "type": "brotli"
}
```

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/cdn/domain/{domainName}/option/{optionName}" \
  -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: cdn.domain.option
result = client.put("/hosting/web/{serviceName}/cdn/domain/{domainName}/option/{optionName}",
	config = None, # Option configuration (type: cdn.domain.option.config, nullable)
	enabled = None, # Enable / Disable the option (type: boolean)
	extra = None, # Additional information about option (type: cdn.domain.option.extra, nullable)
	pattern = None, # Url pattern (type: string, nullable)
	type = None, # Option type (type: cdn.OptionTypeEnum)
)

# 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: cdn.domain.option
$result = $ovh->put("/hosting/web/{serviceName}/cdn/domain/{domainName}/option/{optionName}", array(
	config => null, // Option configuration (type: cdn.domain.option.config, nullable)
	enabled => null, // Enable / Disable the option (type: boolean)
	extra => null, // Additional information about option (type: cdn.domain.option.extra, nullable)
	pattern => null, // Url pattern (type: string, nullable)
	type => null, // Option type (type: cdn.OptionTypeEnum)
));

print_r($result);
?>
```

## Remove or Reset an option to his default value

`DELETE /1.0/hosting/web/{serviceName}/cdn/domain/{domainName}/option/{optionName}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/cdn/#delete-hosting-web-servicename-cdn-domain-domainname-option-optionname

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:cdn/domain/option/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domainName` | path | string | yes | Domain name |
| `optionName` | path | string | yes | Option name |
| `serviceName` | path | string | yes | Service name |

### Responses

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

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/cdn/domain/{domainName}/option/{optionName}" \
  -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("/hosting/web/{serviceName}/cdn/domain/{domainName}/option/{optionName}")

# 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("/hosting/web/{serviceName}/cdn/domain/{domainName}/option/{optionName}");

print_r($result);
?>
```

## Flush cache content on CDN for a domain

`POST /1.0/hosting/web/{serviceName}/cdn/domain/{domainName}/purge`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/cdn/#post-hosting-web-servicename-cdn-domain-domainname-purge

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:cdn/domain/purge`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domainName` | path | string | yes | Domain name |
| `pattern` | query | string |  | Purge pattern |
| `patternType` | query | cdn.PurgeTypeEnum |  | Purge Pattern Type (default is regex) — one of `extension`, `folder`, `regex`, `uri` |
| `serviceName` | path | string | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | cdn.operation | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `comment` | string | read-only | Comment |
| `creationDate` | string (date-time) | read-only | Creation date |
| `function` | cdn.OperationFunctionEnum | read-only | Operation function — one of `analytics_delete`, `analytics_recompute`, `domain_delete`, `domain_disable`, `domain_purge`, `domain_refresh`, `service_install`, `ssl_delete`, `ssl_install` |
| `id` | integer | read-only | Operation id |
| `parameter` | cdn.operation.parameter | read-only | Operation parameter |
| `parameter.anycastIp` | ipv4 | read-only | CDN anycast IP |
| `parameter.cluster` | string | read-only | Cluster name |
| `parameter.date` | string (date) | read-only | Date |
| `parameter.domainName` | string | read-only | Domain name |
| `parameter.fingerprint` | string | read-only | CDN certificate fingerprint |
| `parameter.offer` | cdn.OperationOfferEnum | read-only | Shared CDN offer — one of `advanced`, `basic`, `security` |
| `parameter.pattern` | string | read-only | Pattern to purge on CDN |
| `parameter.service` | string | read-only | Service name |
| `parameter.sslId` | integer | read-only | CDN ssl id |
| `service` | string | read-only | Shared CDN service |
| `status` | cdn.OperationStatusEnum | read-only | Operation status — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `todoDate` | string (date-time) | read-only | Next execution date |
| `updatedDate` | string (date-time) | read-only | Last execution date |

```json
{
  "comment": "string",
  "creationDate": "2024-01-01T12:00:00Z",
  "function": "analytics_delete",
  "id": 0,
  "parameter": {
    "anycastIp": "192.0.2.0",
    "cluster": "string",
    "date": "2024-01-01",
    "domainName": "string",
    "fingerprint": "string",
    "offer": "advanced",
    "pattern": "string",
    "service": "string",
    "sslId": 0
  },
  "service": "string",
  "status": "cancelled",
  "todoDate": "2024-01-01T12:00:00Z",
  "updatedDate": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/cdn/domain/{domainName}/purge" \
  -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("/hosting/web/{serviceName}/cdn/domain/{domainName}/purge")

# 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("/hosting/web/{serviceName}/cdn/domain/{domainName}/purge");

print_r($result);
?>
```

## Trigger a refresh for a domain

`POST /1.0/hosting/web/{serviceName}/cdn/domain/{domainName}/refresh`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/cdn/#post-hosting-web-servicename-cdn-domain-domainname-refresh

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:cdn/domain/refresh`

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | cdn.operation | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `comment` | string | read-only | Comment |
| `creationDate` | string (date-time) | read-only | Creation date |
| `function` | cdn.OperationFunctionEnum | read-only | Operation function — one of `analytics_delete`, `analytics_recompute`, `domain_delete`, `domain_disable`, `domain_purge`, `domain_refresh`, `service_install`, `ssl_delete`, `ssl_install` |
| `id` | integer | read-only | Operation id |
| `parameter` | cdn.operation.parameter | read-only | Operation parameter |
| `parameter.anycastIp` | ipv4 | read-only | CDN anycast IP |
| `parameter.cluster` | string | read-only | Cluster name |
| `parameter.date` | string (date) | read-only | Date |
| `parameter.domainName` | string | read-only | Domain name |
| `parameter.fingerprint` | string | read-only | CDN certificate fingerprint |
| `parameter.offer` | cdn.OperationOfferEnum | read-only | Shared CDN offer — one of `advanced`, `basic`, `security` |
| `parameter.pattern` | string | read-only | Pattern to purge on CDN |
| `parameter.service` | string | read-only | Service name |
| `parameter.sslId` | integer | read-only | CDN ssl id |
| `service` | string | read-only | Shared CDN service |
| `status` | cdn.OperationStatusEnum | read-only | Operation status — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `todoDate` | string (date-time) | read-only | Next execution date |
| `updatedDate` | string (date-time) | read-only | Last execution date |

```json
{
  "comment": "string",
  "creationDate": "2024-01-01T12:00:00Z",
  "function": "analytics_delete",
  "id": 0,
  "parameter": {
    "anycastIp": "192.0.2.0",
    "cluster": "string",
    "date": "2024-01-01",
    "domainName": "string",
    "fingerprint": "string",
    "offer": "advanced",
    "pattern": "string",
    "service": "string",
    "sslId": 0
  },
  "service": "string",
  "status": "cancelled",
  "todoDate": "2024-01-01T12:00:00Z",
  "updatedDate": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/cdn/domain/{domainName}/refresh" \
  -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("/hosting/web/{serviceName}/cdn/domain/{domainName}/refresh")

# 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("/hosting/web/{serviceName}/cdn/domain/{domainName}/refresh");

print_r($result);
?>
```

## Get CDN statistics for a domain

`GET /1.0/hosting/web/{serviceName}/cdn/domain/{domainName}/statistics`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/cdn/#get-hosting-web-servicename-cdn-domain-domainname-statistics

**Status:** Deprecated, will be removed  
**Deprecated** since 2023-11-03, removed on 2024-01-01.  
**IAM actions:** `webHosting:apiovh:cdn/domain/statistics/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domainName` | path | string | yes | Domain name |
| `period` | query | cdn.DomainStatisticsPeriodEnum |  | Period (default is day) — one of `day`, `month`, `week`, `year` |
| `serviceName` | path | string | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | cdn.domain.statistics[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | cdn.DomainStatisticsNameEnum | read-only | name of the serie — one of `hit`, `miss` |
| `points` | cdn.domain.statistics.point[] | read-only | List of DataPoints |
| `points[].timestamp` | integer | read-only | Timestamp |
| `points[].value` | number | read-only | Datapoint value |
| `unit` | cdn.DomainStatisticsUnitEnum | read-only | Unit of the serie — one of `req/min` |

```json
[
  {
    "name": "hit",
    "points": [
      {
        "timestamp": 0,
        "value": 0
      }
    ],
    "unit": "req/min"
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/cdn/domain/{domainName}/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("/hosting/web/{serviceName}/cdn/domain/{domainName}/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("/hosting/web/{serviceName}/cdn/domain/{domainName}/statistics");

print_r($result);
?>
```

## List all operations for a Shared CDN service

`GET /1.0/hosting/web/{serviceName}/cdn/operation`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/cdn/#get-hosting-web-servicename-cdn-operation

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:cdn/operation/get`

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | cdn.operation[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `comment` | string | read-only | Comment |
| `creationDate` | string (date-time) | read-only | Creation date |
| `function` | cdn.OperationFunctionEnum | read-only | Operation function — one of `analytics_delete`, `analytics_recompute`, `domain_delete`, `domain_disable`, `domain_purge`, `domain_refresh`, `service_install`, `ssl_delete`, `ssl_install` |
| `id` | integer | read-only | Operation id |
| `parameter` | cdn.operation.parameter | read-only | Operation parameter |
| `parameter.anycastIp` | ipv4 | read-only | CDN anycast IP |
| `parameter.cluster` | string | read-only | Cluster name |
| `parameter.date` | string (date) | read-only | Date |
| `parameter.domainName` | string | read-only | Domain name |
| `parameter.fingerprint` | string | read-only | CDN certificate fingerprint |
| `parameter.offer` | cdn.OperationOfferEnum | read-only | Shared CDN offer — one of `advanced`, `basic`, `security` |
| `parameter.pattern` | string | read-only | Pattern to purge on CDN |
| `parameter.service` | string | read-only | Service name |
| `parameter.sslId` | integer | read-only | CDN ssl id |
| `service` | string | read-only | Shared CDN service |
| `status` | cdn.OperationStatusEnum | read-only | Operation status — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `todoDate` | string (date-time) | read-only | Next execution date |
| `updatedDate` | string (date-time) | read-only | Last execution date |

```json
[
  {
    "comment": "string",
    "creationDate": "2024-01-01T12:00:00Z",
    "function": "analytics_delete",
    "id": 0,
    "parameter": {
      "anycastIp": "192.0.2.0",
      "cluster": "string",
      "date": "2024-01-01",
      "domainName": "string",
      "fingerprint": "string",
      "offer": "advanced",
      "pattern": "string",
      "service": "string",
      "sslId": 0
    },
    "service": "string",
    "status": "cancelled",
    "todoDate": "2024-01-01T12:00:00Z",
    "updatedDate": "2024-01-01T12:00:00Z"
  }
]
```

### Example

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

# 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("/hosting/web/{serviceName}/cdn/operation");

print_r($result);
?>
```

## Get details for a Shared CDN operation

`GET /1.0/hosting/web/{serviceName}/cdn/operation/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/cdn/#get-hosting-web-servicename-cdn-operation-id

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:cdn/operation/get`

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | cdn.operation | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `comment` | string | read-only | Comment |
| `creationDate` | string (date-time) | read-only | Creation date |
| `function` | cdn.OperationFunctionEnum | read-only | Operation function — one of `analytics_delete`, `analytics_recompute`, `domain_delete`, `domain_disable`, `domain_purge`, `domain_refresh`, `service_install`, `ssl_delete`, `ssl_install` |
| `id` | integer | read-only | Operation id |
| `parameter` | cdn.operation.parameter | read-only | Operation parameter |
| `parameter.anycastIp` | ipv4 | read-only | CDN anycast IP |
| `parameter.cluster` | string | read-only | Cluster name |
| `parameter.date` | string (date) | read-only | Date |
| `parameter.domainName` | string | read-only | Domain name |
| `parameter.fingerprint` | string | read-only | CDN certificate fingerprint |
| `parameter.offer` | cdn.OperationOfferEnum | read-only | Shared CDN offer — one of `advanced`, `basic`, `security` |
| `parameter.pattern` | string | read-only | Pattern to purge on CDN |
| `parameter.service` | string | read-only | Service name |
| `parameter.sslId` | integer | read-only | CDN ssl id |
| `service` | string | read-only | Shared CDN service |
| `status` | cdn.OperationStatusEnum | read-only | Operation status — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `todoDate` | string (date-time) | read-only | Next execution date |
| `updatedDate` | string (date-time) | read-only | Last execution date |

```json
{
  "comment": "string",
  "creationDate": "2024-01-01T12:00:00Z",
  "function": "analytics_delete",
  "id": 0,
  "parameter": {
    "anycastIp": "192.0.2.0",
    "cluster": "string",
    "date": "2024-01-01",
    "domainName": "string",
    "fingerprint": "string",
    "offer": "advanced",
    "pattern": "string",
    "service": "string",
    "sslId": 0
  },
  "service": "string",
  "status": "cancelled",
  "todoDate": "2024-01-01T12:00:00Z",
  "updatedDate": "2024-01-01T12:00:00Z"
}
```

### Example

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

print_r($result);
?>
```
