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

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

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

## Operations

- `GET /hosting/web` — List web hostings
- `GET /hosting/web/{serviceName}/boostHistory` — List boost history
- `GET /webhosting/resource` — List web hostings
- `GET /hosting/web/{serviceName}` — Get a web hosting
- `GET /hosting/web/availableOffer` — List available offers
- `GET /hosting/web/incident` — List current incidents
- `GET /hosting/web/offerCapabilities` — Get offer capabilities
- `GET /hosting/web/{serviceName}/abuseState` — Get the abuse state
- `GET /hosting/web/{serviceName}/availableConfigurations` — List available configurations
- `GET /hosting/web/{serviceName}/boostHistory/{date}` — Get a boost history entry
- `GET /hosting/web/{serviceName}/cdn` — Get the CDN
- `GET /hosting/web/{serviceName}/cdn/serviceInfos` — Get CDN service information
- `GET /hosting/web/{serviceName}/configuration` — Get the configuration
- `GET /hosting/web/{serviceName}/email` — Get the email state
- `GET /hosting/web/{serviceName}/email/bounces` — List email bounces
- `GET /hosting/web/{serviceName}/email/volumes` — Get email volume history
- `GET /hosting/web/{serviceName}/emailOption` — List email options
- `GET /hosting/web/{serviceName}/emailOption/{id}` — Get an email option
- `GET /hosting/web/{serviceName}/emailOption/{id}/serviceInfos` — Get email option service information
- `GET /hosting/web/{serviceName}/freedom` — List free domains
- `GET /hosting/web/{serviceName}/metricsToken` — Get a metrics token
- `GET /hosting/web/{serviceName}/ovhConfig` — List .ovhconfig files
- `GET /hosting/web/{serviceName}/ovhConfig/{id}` — Get a .ovhconfig file
- `GET /hosting/web/{serviceName}/ovhConfigCapabilities` — List .ovhconfig capabilities
- `GET /hosting/web/{serviceName}/ovhConfigRecommendedValues` — Get recommended .ovhconfig values
- `GET /hosting/web/{serviceName}/runtime` — List runtime configurations
- `GET /hosting/web/{serviceName}/runtime/{id}` — Get a runtime configuration
- `GET /hosting/web/{serviceName}/runtime/{id}/attachedDomains` — List runtime configuration domains
- `GET /hosting/web/{serviceName}/runtimeAvailableTypes` — List runtime backend types
- `GET /hosting/web/{serviceName}/serviceInfos` — Get service information
- `GET /webhosting/resource/{name}` — Get a web hosting
- `POST /hosting/web/{serviceName}/cdn/serviceInfosUpdate` — Update CDN renewal
- `POST /hosting/web/{serviceName}/cdn/terminate` — Terminate the CDN option
- `POST /hosting/web/{serviceName}/changeContact` — Change contacts
- `POST /hosting/web/{serviceName}/confirmTermination` — Confirm termination
- `POST /hosting/web/{serviceName}/email/request` — Run an email action
- `POST /hosting/web/{serviceName}/emailOption/{id}/terminate` — Terminate an email option
- `POST /hosting/web/{serviceName}/ovhConfig/{id}/changeConfiguration` — Change a .ovhconfig file
- `POST /hosting/web/{serviceName}/ovhConfig/{id}/rollback` — Roll back a .ovhconfig file
- `POST /hosting/web/{serviceName}/ovhConfigRefresh` — Refresh .ovhconfig files
- `POST /hosting/web/{serviceName}/request` — Run an action
- `POST /hosting/web/{serviceName}/requestBoost` — Request a boost
- `POST /hosting/web/{serviceName}/restoreSnapshot` — Restore a backup
- `POST /hosting/web/{serviceName}/runtime` — Create a runtime configuration
- `POST /hosting/web/{serviceName}/terminate` — Request termination
- `POST /hosting/web/{serviceName}/unblockTCPOut` — Unblock outgoing TCP
- `DELETE /hosting/web/{serviceName}/runtime/{id}` — Delete a runtime configuration
- `PUT /hosting/web/{serviceName}` — Update a web hosting
- `PUT /hosting/web/{serviceName}/configuration` — Update the configuration
- `PUT /hosting/web/{serviceName}/email` — Update the email settings
- `PUT /hosting/web/{serviceName}/runtime/{id}` — Update a runtime configuration
- `PUT /hosting/web/{serviceName}/serviceInfos` — Update service information

## List web hostings

`GET /1.0/hosting/web`

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

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

Returns the service names of the web hostings of the account.

### Parameters

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

### Responses

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

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

### Example

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

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

print_r($result);
?>
```

## List boost history

`GET /1.0/hosting/web/{serviceName}/boostHistory`

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

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

Returns the dates of the boost changes of the hosting. Filter them by date.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `date` | query | string (date-time) |  | Filter the value of date property (=) |
| `serviceName` | path | string | yes | Service name |

### Responses

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

```json
[
  "2024-01-01T12:00:00Z"
]
```

### Example

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

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

print_r($result);
?>
```

## List web hostings

`GET /v2/webhosting/resource`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/#get-webhosting-resource

**Status:** Beta version  
**IAM actions:** `webHosting:apiovh:get`

Returns the web hostings of the account.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Pagination-Cursor` | header | string |  | Pagination cursor |
| `X-Pagination-Size` | header | integer |  | Pagination size |
| `iamTags` | query | object |  | Filter resources on IAM tags |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | webhosting.WebWithIAM[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Computed hash used to control concurrent modification requests. Here, it represents the current target specification value. |
| `currentState` | webhosting.WebCurrentState | read-only | Current state of the hosting plan |
| `currentState.name` | string | read-only | Name of the hosting |
| `currentTasks` | common.CurrentTask[] | read-only | Ongoing asynchronous tasks related to the hosting plan |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `iam` | iam.ResourceMetadata | read-only | IAM resource metadata |
| `iam.displayName` | string | read-only | Resource display name |
| `iam.id` | string (uuid) | read-only | Unique identifier of the resource |
| `iam.state` | iam.ResourceMetadata.StateEnum | read-only | Resource state — one of `EXPIRED`, `IN_CREATION`, `OK`, `SUSPENDED` |
| `iam.tags` | object | read-only | Resource tags. Tags that were internally computed are prefixed with ovh: |
| `iam.urn` | string | read-only | Unique resource name used in policies |
| `id` | string | read-only | Unique identifier of the resource. Here, the service name is used as an identifier. |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Webhosting resource readiness in the system — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |

```json
[
  {
    "checksum": "string",
    "currentState": {
      "name": "string"
    },
    "currentTasks": [
      {
        "errors": [
          {
            "message": "string"
          }
        ],
        "id": "00000000-0000-0000-0000-000000000000",
        "link": "string",
        "status": "ERROR",
        "type": "string"
      }
    ],
    "iam": {
      "displayName": "string",
      "id": "00000000-0000-0000-0000-000000000000",
      "state": "EXPIRED",
      "tags": {
        "key": "string"
      },
      "urn": "string"
    },
    "id": "string",
    "resourceStatus": "CREATING"
  }
]
```

### Example

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

# 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("/v2/webhosting/resource");

print_r($result);
?>
```

## Get a web hosting

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

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

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

Returns the offer, state, cluster, recommended IPs, disk and traffic quotas, and PHP versions of the web hosting.

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.web.ServiceWithIAM | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `availableBoostOffer` | hosting.web.AvailableOfferStruct[] | read-only | Available offers for boost option |
| `availableBoostOffer[].offer` | hosting.web.OfferEnum |  | Available boost offer — one of `CLOUDWEB_1`, `CLOUDWEB_2`, `CLOUDWEB_3`, `KS`, `PERFORMANCE_1`, `PERFORMANCE_2`, `PERFORMANCE_3`, `PERFORMANCE_4`, `PERSO`, `POWER_BETA_1`, `PRO`, `START`, … |
| `availableBoostOffer[].price` | order.Price |  | The price in month for this boost offer |
| `availableBoostOffer[].price.currencyCode` | order.CurrencyCodeEnum | read-only | Currency code — one of `AUD`, `CAD`, `CZK`, `EUR`, `GBP`, `INR`, `LTL`, `MAD`, `N/A`, `PLN`, `SGD`, `TND`, … |
| `availableBoostOffer[].price.priceInUcents` | integer | read-only | Price in microcents |
| `availableBoostOffer[].price.text` | string | read-only | Textual representation |
| `availableBoostOffer[].price.value` | number | read-only | The effective price |
| `boostOffer` | hosting.web.OfferEnum | read-only | Current boost offer — one of `CLOUDWEB_1`, `CLOUDWEB_2`, `CLOUDWEB_3`, `KS`, `PERFORMANCE_1`, `PERFORMANCE_2`, `PERFORMANCE_3`, `PERFORMANCE_4`, `PERSO`, `POWER_BETA_1`, `PRO`, `START`, … |
| `cluster` | string | read-only | Cluster name |
| `clusterIp` | ipv4 | read-only | This direct ip to your cluster ( usefull for application like api ) |
| `clusterIpv6` | ipv6 | read-only | This direct ipv6 to your cluster ( usefull for application like api ) |
| `countriesIp` | hosting.web.CountriesIp[] | read-only | Available clusterIp by countries |
| `countriesIp[].country` | hosting.web.CountryEnum | read-only | The whois country of the ip — one of `BE`, `CA`, `CZ`, `DE`, `ES`, `FI`, `FR`, `IE`, `IT`, `LT`, `NL`, `PL`, … |
| `countriesIp[].ip` | ipv4 | read-only | The cluster ip |
| `countriesIp[].ipv6` | ipv6 | read-only | The cluster ipv6 |
| `datacenter` | string | read-only | Datacenter where this account is located |
| `defaultAttachedDomain` | string | read-only | The default attached domain created along with your hosting |
| `displayName` | string |  | Set the name displayed in ManagerV6 for your hosting (max 50 chars) |
| `filer` | string | read-only | Filer name |
| `hasCdn` | boolean | read-only | Has a CDN service linked on the hosting |
| `hasHostedSsl` | boolean | read-only | Has a HostedSSL service linked on the hosting |
| `home` | string | read-only | Path of your home |
| `hostingIp` | ipv4 | read-only | The recommended ip for your hosting ( depends on hosting's linked services, e.g CDN or hostedSSL ) |
| `hostingIpv6` | ipv6 | read-only | The recommended ipv6 for your hosting ( depends on hosting's linked services, e.g CDN or hostedSSL ) |
| `iam` | iam.ResourceMetadata | read-only | IAM resource metadata |
| `iam.displayName` | string | read-only | Resource display name |
| `iam.id` | string (uuid) | read-only | Unique identifier of the resource |
| `iam.state` | iam.ResourceMetadata.StateEnum | read-only | Resource state — one of `EXPIRED`, `IN_CREATION`, `OK`, `SUSPENDED` |
| `iam.tags` | object | read-only | Resource tags. Tags that were internally computed are prefixed with ovh: |
| `iam.urn` | string | read-only | Unique resource name used in policies |
| `lastOvhConfigScan` | string (date-time) | read-only | /hosting/web/{serviceName}/ovhConfig is stored in cache. This date is the last refresh of this data |
| `multipleSSL` | boolean | read-only | If set to true, service can manage more than only one certificate |
| `objectQuota` | number | read-only | objects allowed |
| `objectUsed` | number | read-only | objects used |
| `offer` | hosting.web.OfferEnum | read-only | Hosting offer — one of `CLOUDWEB_1`, `CLOUDWEB_2`, `CLOUDWEB_3`, `KS`, `PERFORMANCE_1`, `PERFORMANCE_2`, `PERFORMANCE_3`, `PERFORMANCE_4`, `PERSO`, `POWER_BETA_1`, `PRO`, `START`, … |
| `operatingSystem` | hosting.web.OperatingSystemEnum | read-only | Hosting's OS — one of `linux` |
| `phpVersions` | hosting.web.PhpVersion[] | read-only | State of available php versions for this account |
| `phpVersions[].support` | hosting.web.PhpVersionStateEnum |  | Current support of this php version — one of `BETA`, `END_OF_LIFE`, `SECURITY_FIXES`, `SUPPORTED` |
| `phpVersions[].version` | string |  | PHP version |
| `primaryLogin` | string | read-only | Hosting's main login |
| `quotaSize` | complexType.UnitAndValue_double | read-only | Space allowed |
| `quotaSize.unit` | string |  |  |
| `quotaSize.value` | number |  |  |
| `quotaUsed` | complexType.UnitAndValue_double | read-only | Space used |
| `quotaUsed.unit` | string |  |  |
| `quotaUsed.value` | number |  |  |
| `recommendedOffer` | hosting.web.OfferEnum | read-only | If your offer is old, return a recommended offer to migrate on — one of `CLOUDWEB_1`, `CLOUDWEB_2`, `CLOUDWEB_3`, `KS`, `PERFORMANCE_1`, `PERFORMANCE_2`, `PERFORMANCE_3`, `PERFORMANCE_4`, `PERSO`, `POWER_BETA_1`, `PRO`, `START`, … |
| `resourceType` | hosting.web.ResourceEnum | read-only | Hosting resource type — one of `bestEffort`, `cloud`, `dedicated`, `shared` |
| `serviceManagementAccess` | hosting.web.ServiceAccess | read-only | URLs to use to manage your webhosting |
| `serviceManagementAccess.ftp` | hosting.web.Address |  | Address with url and port to manage files by ftp |
| `serviceManagementAccess.ftp.port` | integer |  | Port to use to access to the service |
| `serviceManagementAccess.ftp.url` | string |  | Url to contact the service |
| `serviceManagementAccess.http` | hosting.web.Address |  | Address to see your webhosting without domain |
| `serviceManagementAccess.http.port` | integer |  | Port to use to access to the service |
| `serviceManagementAccess.http.url` | string |  | Url to contact the service |
| `serviceManagementAccess.ssh` | hosting.web.Address |  | Address with url and port to manage webhosting by ssh |
| `serviceManagementAccess.ssh.port` | integer |  | Port to use to access to the service |
| `serviceManagementAccess.ssh.url` | string |  | Url to contact the service |
| `serviceName` | string | read-only | Service name |
| `state` | hosting.web.StateEnum | read-only | State of your hosting — one of `active`, `blocked`, `bloqued`, `hardBlocked`, `hardBloqued`, `maintenance` |
| `token` | string | read-only | Use to link an external domain. ( This token has to be insert into a TXT field on your dns zone with ovhcontrol subdomain ) |
| `trafficQuotaSize` | complexType.UnitAndValue_double | read-only | Traffic quota allowed ( null = unlimited ) |
| `trafficQuotaSize.unit` | string |  |  |
| `trafficQuotaSize.value` | number |  |  |
| `trafficQuotaUsed` | complexType.UnitAndValue_double | read-only | Traffic quota used |
| `trafficQuotaUsed.unit` | string |  |  |
| `trafficQuotaUsed.value` | number |  |  |
| `updates` | string[] | read-only | List of updates on your hosting |

```json
{
  "availableBoostOffer": [
    {
      "offer": "CLOUDWEB_1",
      "price": {
        "currencyCode": "AUD",
        "priceInUcents": 0,
        "text": "string",
        "value": 0
      }
    }
  ],
  "boostOffer": "CLOUDWEB_1",
  "cluster": "string",
  "clusterIp": "192.0.2.0",
  "clusterIpv6": "2001:41d0:1:1994::1",
  "countriesIp": [
    {
      "country": "BE",
      "ip": "192.0.2.0",
      "ipv6": "2001:41d0:1:1994::1"
    }
  ],
  "datacenter": "string",
  "defaultAttachedDomain": "string",
  "displayName": "string",
  "filer": "string",
  "hasCdn": true,
  "hasHostedSsl": true,
  "home": "string",
  "hostingIp": "192.0.2.0",
  "hostingIpv6": "2001:41d0:1:1994::1",
  "iam": {
    "displayName": "string",
    "id": "00000000-0000-0000-0000-000000000000",
    "state": "EXPIRED",
    "tags": {
      "key": "string"
    },
    "urn": "string"
  },
  "lastOvhConfigScan": "2024-01-01T12:00:00Z",
  "multipleSSL": true,
  "objectQuota": 0,
  "objectUsed": 0,
  "offer": "CLOUDWEB_1",
  "operatingSystem": "linux",
  "phpVersions": [
    {
      "support": "BETA",
      "version": "string"
    }
  ],
  "primaryLogin": "string",
  "quotaSize": {
    "unit": "string",
    "value": 0
  },
  "quotaUsed": {
    "unit": "string",
    "value": 0
  },
  "recommendedOffer": "CLOUDWEB_1",
  "resourceType": "bestEffort",
  "serviceManagementAccess": {
    "ftp": {
      "port": 0,
      "url": "string"
    },
    "http": {
      "port": 0,
      "url": "string"
    },
    "ssh": {
      "port": 0,
      "url": "string"
    }
  },
  "serviceName": "string",
  "state": "active",
  …
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/hosting/web/{serviceName}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/hosting/web/{serviceName}");

print_r($result);
?>
```

## List available offers

`GET /1.0/hosting/web/availableOffer`

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

**Status:** Stable production version  
**IAM actions:** `account:apiovh:webHosting/availableOffer/get`

List available offers. Returns the offers that can be ordered for the given domain, to create a new hosting or upgrade an existing one.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domain` | query | string | yes | Domain you want to add or upgrade a hosting |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.web.OfferEnum[] | successful operation |

```json
[
  "CLOUDWEB_1"
]
```

### Example

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

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

print_r($result);
?>
```

## List current incidents

`GET /1.0/hosting/web/incident`

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

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

List current incidents. Returns the incidents in progress on the web hosting platform that can affect the hosting services.

### Responses

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

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

### Example

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

print_r($result);
?>
```

## Get offer capabilities

`GET /1.0/hosting/web/offerCapabilities`

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

**Status:** Stable production version  
**Authentication:** none (public operation)

Get offer capabilities. Returns what an offer includes: attached domains, databases, disk, traffic, SSH, cron, modules and runtimes.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `offer` | query | hosting.web.OfferCapabilitiesEnum | yes | Describe offer capabilities — one of `1000gp`, `20gp`, `240gp`, `240pack`, `240plan`, `300gp`, `60gp`, `720pack`, `720plan`, `90pack`, `90plan`, `CLOUDWEB_1`, … |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.web.Capabilities | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `attachedDomains` | integer |  | Number of domains you can attach to your hosting |
| `crontab` | boolean |  | Does the offer allow crontab |
| `databaseEngines` | integer |  | Number of database engines allowed for your hosting |
| `databases` | hosting.web.database.CreationDatabaseCapabilities[] |  | Describe all databases type you can have |
| `databases[].available` | integer |  | Number of database left for creation |
| `databases[].engines` | hosting.web.database.DatabaseTypeEnum[] |  | Database software available on this platform |
| `databases[].isolation` | hosting.web.database.DatabaseIsolationEnum |  | Technology use to isolate differents webhosting accounts — one of `dedicated`, `local`, `shared` |
| `databases[].quota` | complexType.UnitAndValue_long |  | Size of data can be used |
| `databases[].quota.unit` | string |  |  |
| `databases[].quota.value` | integer |  |  |
| `databases[].type` | hosting.web.database.DatabaseCapabilitiesTypeEnum |  | Database offer name — one of `extraSqlPerso`, `local`, `privateDatabase`, `sqlLocal`, `sqlPerso`, `sqlPro` |
| `disk` | hosting.web.DiskType |  | Disk capacity and type available for your hosting ( null for unlimited ) |
| `disk.type` | hosting.web.DiskTypeEnum |  | Type of the disk — one of `HDD`, `SSD` |
| `disk.unit` | string |  | Unit for disk size |
| `disk.value` | number |  | Size of the disk |
| `emails` | hosting.web.CreationEmailCapabilities |  | Describe all email offer you can have |
| `emails.available` | integer |  | Number of email available for creation |
| `emails.quota` | complexType.UnitAndValue_long |  | Email account capacity |
| `emails.quota.unit` | string |  |  |
| `emails.quota.value` | integer |  |  |
| `envVars` | integer |  | Number of environment variables allowed for your hosting |
| `extraUsers` | integer |  | Number of ftp user you can create |
| `filesBrowser` | boolean |  | Does the offer allow access to web files browser? |
| `highlight` | hosting.web.HighLightEnum |  | Marketing information about the current offer — one of `best-seller`, `new` |
| `languages` | hosting.web.CronLanguageAvailable |  | Language available for cron script |
| `languages.nodejs` | hosting.web.NodejsVersionAvailableEnum[] |  | NodeJS versions |
| `languages.php` | hosting.web.PhpVersionAvailableEnum[] |  | Php versions |
| `languages.python` | hosting.web.PythonVersionAvailableEnum[] |  | Python versions |
| `languages.ruby` | hosting.web.RubyVersionAvailableEnum[] |  | Ruby versions |
| `moduleOneClick` | boolean |  | Does the offer allow 1-click modules? |
| `privateDatabases` | hosting.web.database.CreationDatabaseCapabilities[] |  | Describe all privateDatabases type you can have |
| `privateDatabases[].available` | integer |  | Number of database left for creation |
| `privateDatabases[].engines` | hosting.web.database.DatabaseTypeEnum[] |  | Database software available on this platform |
| `privateDatabases[].isolation` | hosting.web.database.DatabaseIsolationEnum |  | Technology use to isolate differents webhosting accounts — one of `dedicated`, `local`, `shared` |
| `privateDatabases[].quota` | complexType.UnitAndValue_long |  | Size of data can be used |
| `privateDatabases[].quota.unit` | string |  |  |
| `privateDatabases[].quota.value` | integer |  |  |
| `privateDatabases[].type` | hosting.web.database.DatabaseCapabilitiesTypeEnum |  | Database offer name — one of `extraSqlPerso`, `local`, `privateDatabase`, `sqlLocal`, `sqlPerso`, `sqlPro` |
| `runtimes` | integer |  | Number of runtimes allowed for your hosting |
| `sitesRecommended` | integer |  | Number of sites recommended for your hosting ( -1 for unlimited ) |
| `ssh` | boolean |  | Does the offer allow SSH access |
| `traffic` | complexType.UnitAndValue_double |  | Traffic quota size for your hosting ( null for unlimited ) |
| `traffic.unit` | string |  |  |
| `traffic.value` | number |  |  |

```json
{
  "attachedDomains": 0,
  "crontab": true,
  "databaseEngines": 0,
  "databases": [
    {
      "available": 0,
      "engines": [
        "mariadb"
      ],
      "isolation": "dedicated",
      "quota": {
        "unit": "string",
        "value": 0
      },
      "type": "extraSqlPerso"
    }
  ],
  "disk": {
    "type": "HDD",
    "unit": "string",
    "value": 0
  },
  "emails": {
    "available": 0,
    "quota": {
      "unit": "string",
      "value": 0
    }
  },
  "envVars": 0,
  "extraUsers": 0,
  "filesBrowser": true,
  "highlight": "best-seller",
  "languages": {
    "nodejs": [
      "nodejs-10"
    ],
    "php": [
      "phpfpm-5.6"
    ],
    "python": [
      "python-2"
    ],
    "ruby": [
      "ruby-2.6"
    ]
  },
  "moduleOneClick": true,
  "privateDatabases": [
    {
      "available": 0,
      "engines": [
        "mariadb"
      ],
      "isolation": "dedicated",
      "quota": {
        "unit": "string",
        "value": 0
      },
      "type": "extraSqlPerso"
    }
  ],
  "runtimes": 0,
  "sitesRecommended": 0,
  "ssh": true,
  "traffic": {
    "unit": "string",
    "value": 0
  }
}
```

### Example

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

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

print_r($result);
?>
```

## Get the abuse state

`GET /1.0/hosting/web/{serviceName}/abuseState`

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

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

Returns the access, web, outgoing email and outgoing TCP states of the hosting.

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.web.AbuseState | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `accessState` | hosting.web.AccessStateEnum | read-only | access state — one of `active`, `blocked`, `hardBlocked`, `hardMaintenance`, `maintenance` |
| `mailsoutState` | hosting.web.MailsoutStateEnum | read-only | mailsout state — one of `bounce`, `ko`, `ok`, `spam`, `spamLegalBlocked` |
| `outState` | hosting.web.OutStateEnum | read-only | TCP out state — one of `active`, `blocked`, `hardBlocked` |
| `webState` | hosting.web.StateEnum | read-only | web state — one of `active`, `blocked`, `bloqued`, `hardBlocked`, `hardBloqued`, `maintenance` |

```json
{
  "accessState": "active",
  "mailsoutState": "bounce",
  "outState": "active",
  "webState": "active"
}
```

### Example

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

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

print_r($result);
?>
```

## List available configurations

`GET /1.0/hosting/web/{serviceName}/availableConfigurations`

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

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

List available configurations. Returns the language versions available for the application configuration. Filter them by language.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `language` | query | hosting.web.configuration.LanguageEnum |  | Filter on language name — one of `nodejs`, `python`, `ruby` |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.web.configuration.VersionEnum[] | successful operation |

```json
[
  "nodejs-12"
]
```

### Example

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

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

print_r($result);
?>
```

## Get a boost history entry

`GET /1.0/hosting/web/{serviceName}/boostHistory/{date}`

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

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

Returns the boost offer, the hosting offer at that time, the requesting account and the request date.

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.web.BoostHistory | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `accountId` | string | read-only | Account who requested the change |
| `boostOffer` | hosting.web.OfferEnum | read-only | Boost offer used — one of `CLOUDWEB_1`, `CLOUDWEB_2`, `CLOUDWEB_3`, `KS`, `PERFORMANCE_1`, `PERFORMANCE_2`, `PERFORMANCE_3`, `PERFORMANCE_4`, `PERSO`, `POWER_BETA_1`, `PRO`, `START`, … |
| `date` | string (date-time) | read-only | The date when the change has been requested |
| `offer` | hosting.web.OfferEnum | read-only | Offer when the change was made — one of `CLOUDWEB_1`, `CLOUDWEB_2`, `CLOUDWEB_3`, `KS`, `PERFORMANCE_1`, `PERFORMANCE_2`, `PERFORMANCE_3`, `PERFORMANCE_4`, `PERSO`, `POWER_BETA_1`, `PRO`, `START`, … |

```json
{
  "accountId": "string",
  "boostOffer": "CLOUDWEB_1",
  "date": "2024-01-01T12:00:00Z",
  "offer": "CLOUDWEB_1"
}
```

### Example

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

# 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}/boostHistory/{date}");

print_r($result);
?>
```

## Get the CDN

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

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

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

Returns the domain, type, version and status of the CDN option, and whether it is free with the hosting.

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.web.CDN | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `domain` | string | read-only | Domain of this CDN |
| `free` | boolean | read-only | Whether CDN is free with the hosting |
| `status` | hosting.web.cdn.StatusEnum | read-only | Status of the CDN option — one of `created`, `creating`, `deleting`, `flushing`, `reopening`, `suspended`, `suspending` |
| `taskId` | integer | read-only | The task ID working on this CDN |
| `type` | string | read-only | Type of the CDN |
| `version` | string | read-only | Version of the CDN |

```json
{
  "domain": "string",
  "free": true,
  "status": "created",
  "taskId": 0,
  "type": "string",
  "version": "string"
}
```

### Example

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

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

print_r($result);
?>
```

## Get CDN service information

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

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

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

Get CDN service information. Returns the billing information of the CDN option: creation and expiration dates, renewal settings and contacts.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | services.Service | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `canDeleteAtExpiration` | boolean | read-only | Indicates that the service can be set up to be deleted at expiration |
| `contactAdmin` | string | read-only |  |
| `contactBilling` | string | read-only |  |
| `contactTech` | string | read-only |  |
| `creation` | string (date) | read-only |  |
| `domain` | string | read-only |  |
| `engagedUpTo` | string (date) | read-only |  |
| `expiration` | string (date) | read-only |  |
| `possibleRenewPeriod` | integer[] | read-only | All the possible renew period of your service in month |
| `renew` | service.RenewType |  | Way of handling the renew |
| `renew.automatic` | boolean |  | The service is automatically renewed |
| `renew.deleteAtExpiration` | boolean |  | The service will be deleted at expiration |
| `renew.forced` | boolean |  | The service forced to be renewed |
| `renew.manualPayment` | boolean |  | The service needs to be manually renewed and paid |
| `renew.period` | integer |  | period of renew in month |
| `renewalType` | service.RenewalTypeEnum | read-only | Detailed renewal type of a service — one of `automaticForcedProduct`, `automaticV2012`, `automaticV2014`, `automaticV2016`, `automaticV2024`, `manual`, `oneShot`, `option` |
| `serviceId` | integer | read-only |  |
| `status` | service.StateEnum | read-only | one of `autorenewInProgress`, `expired`, `inCreation`, `ok`, `pendingDebt`, `unPaid` |

```json
{
  "canDeleteAtExpiration": true,
  "contactAdmin": "string",
  "contactBilling": "string",
  "contactTech": "string",
  "creation": "2024-01-01",
  "domain": "string",
  "engagedUpTo": "2024-01-01",
  "expiration": "2024-01-01",
  "possibleRenewPeriod": [
    0
  ],
  "renew": {
    "automatic": true,
    "deleteAtExpiration": true,
    "forced": true,
    "manualPayment": true,
    "period": 0
  },
  "renewalType": "automaticForcedProduct",
  "serviceId": 0,
  "status": "autorenewInProgress"
}
```

### Example

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

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

print_r($result);
?>
```

## Get the configuration

`GET /1.0/hosting/web/{serviceName}/configuration`

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

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

Get the configuration. Returns the language, version, environment, launch script and public directory of the application.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.web.configuration | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `appEnv` | hosting.web.configuration.EnvEnum |  | Application environment — one of `development`, `production` |
| `entryPoint` | string |  | Application launch script |
| `id` | integer | read-only | Id of the current configuration |
| `language` | hosting.web.configuration.LanguageEnum |  | language chosen for the current hosting — one of `nodejs`, `python`, `ruby` |
| `publicDir` | string |  | Directory of the application |
| `status` | hosting.web.configuration.StateEnum | read-only | Status of current configuration — one of `created`, `creating`, `deleting`, `updating` |
| `version` | string |  | version of the language chosen for the current hosting |

```json
{
  "appEnv": "development",
  "entryPoint": "string",
  "id": 0,
  "language": "nodejs",
  "publicDir": "string",
  "status": "created",
  "version": "string"
}
```

### Example

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

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

print_r($result);
?>
```

## Get the email state

`GET /1.0/hosting/web/{serviceName}/email`

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

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

Get the email state. Returns the state of the emails sent by the hosting scripts, with the volumes sent, the bounces and the daily limit.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.web.email | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `bounce` | integer | read-only | Bounce |
| `email` | string |  | Email used to receive errors |
| `maxPerDay` | integer | read-only | Max email to sent per day |
| `sent` | integer | read-only | Email sent since hosting creation |
| `sentToday` | integer | read-only | Email sent today |
| `spoofing` | integer | read-only | Spoofing Bounce |
| `state` | hosting.web.mail.StateEnum | read-only | Email state — one of `bounce`, `force`, `ko`, `ok`, `purging`, `spam` |

```json
{
  "bounce": 0,
  "email": "string",
  "maxPerDay": 0,
  "sent": 0,
  "sentToday": 0,
  "spoofing": 0,
  "state": "bounce"
}
```

### Example

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

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

print_r($result);
?>
```

## List email bounces

`GET /1.0/hosting/web/{serviceName}/email/bounces`

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

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:email/bounces/get`

List email bounces. Returns the last bounces of the emails sent by the hosting: 20 by default, 100 at most with limit.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `limit` | query | integer | yes | Maximum bounces limit ( default : 20 / max : 100 ) |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.web.mail.Bounce[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `date` | string (date-time) |  | The datetime of this bounce |
| `isSpoofing` | boolean |  | Whether this bounce is spoofing or not |
| `message` | string |  | The return message for this bounce |
| `to` | string |  | The email where you have the bounce |

```json
[
  {
    "date": "2024-01-01T12:00:00Z",
    "isSpoofing": true,
    "message": "string",
    "to": "string"
  }
]
```

### Example

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

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

print_r($result);
?>
```

## Get email volume history

`GET /1.0/hosting/web/{serviceName}/email/volumes`

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

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:email/volumes/get`

Get email volume history. Returns the number of emails sent by the hosting scripts over time, as a list of dated volume points.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.web.mail.VolumeHistory[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `date` | string (date-time) |  | The datetime of this volume history point |
| `volume` | integer |  | The volume history size |

```json
[
  {
    "date": "2024-01-01T12:00:00Z",
    "volume": 0
  }
]
```

### Example

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

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

print_r($result);
?>
```

## List email options

`GET /1.0/hosting/web/{serviceName}/emailOption`

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

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

List email options. Returns the IDs of the email options of the hosting. Each option is a mail service linked to the hosting.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Responses

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

```json
[
  0
]
```

### Example

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

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

print_r($result);
?>
```

## Get an email option

`GET /1.0/hosting/web/{serviceName}/emailOption/{id}`

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

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

Get an email option. Returns the domain and creation date of the email option. Its billing information is returned by serviceInfos.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id of the object |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.web.emailoption | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creationDate` | string (date-time) | read-only | Creation date |
| `domain` | string | read-only | Email service domain |
| `id` | integer | read-only | Account id |

```json
{
  "creationDate": "2024-01-01T12:00:00Z",
  "domain": "string",
  "id": 0
}
```

### Example

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

print_r($result);
?>
```

## Get email option service information

`GET /1.0/hosting/web/{serviceName}/emailOption/{id}/serviceInfos`

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

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:emailOption/serviceInfos/get`

Get email option service information. Returns the billing information of the email option: creation and expiration dates, renewal settings and contacts.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id of the object |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | services.Service | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `canDeleteAtExpiration` | boolean | read-only | Indicates that the service can be set up to be deleted at expiration |
| `contactAdmin` | string | read-only |  |
| `contactBilling` | string | read-only |  |
| `contactTech` | string | read-only |  |
| `creation` | string (date) | read-only |  |
| `domain` | string | read-only |  |
| `engagedUpTo` | string (date) | read-only |  |
| `expiration` | string (date) | read-only |  |
| `possibleRenewPeriod` | integer[] | read-only | All the possible renew period of your service in month |
| `renew` | service.RenewType |  | Way of handling the renew |
| `renew.automatic` | boolean |  | The service is automatically renewed |
| `renew.deleteAtExpiration` | boolean |  | The service will be deleted at expiration |
| `renew.forced` | boolean |  | The service forced to be renewed |
| `renew.manualPayment` | boolean |  | The service needs to be manually renewed and paid |
| `renew.period` | integer |  | period of renew in month |
| `renewalType` | service.RenewalTypeEnum | read-only | Detailed renewal type of a service — one of `automaticForcedProduct`, `automaticV2012`, `automaticV2014`, `automaticV2016`, `automaticV2024`, `manual`, `oneShot`, `option` |
| `serviceId` | integer | read-only |  |
| `status` | service.StateEnum | read-only | one of `autorenewInProgress`, `expired`, `inCreation`, `ok`, `pendingDebt`, `unPaid` |

```json
{
  "canDeleteAtExpiration": true,
  "contactAdmin": "string",
  "contactBilling": "string",
  "contactTech": "string",
  "creation": "2024-01-01",
  "domain": "string",
  "engagedUpTo": "2024-01-01",
  "expiration": "2024-01-01",
  "possibleRenewPeriod": [
    0
  ],
  "renew": {
    "automatic": true,
    "deleteAtExpiration": true,
    "forced": true,
    "manualPayment": true,
    "period": 0
  },
  "renewalType": "automaticForcedProduct",
  "serviceId": 0,
  "status": "autorenewInProgress"
}
```

### Example

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

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

print_r($result);
?>
```

## List free domains

`GET /1.0/hosting/web/{serviceName}/freedom`

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

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

Returns the free domain names included with the hosting offer. Filter them by status.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |
| `status` | query | hosting.web.freedom.StatusEnum |  | Filter the freedom status (=) — one of `blockedByCustomer`, `blockedBySystem`, `ok`, `preset` |

### Responses

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

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

### Example

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

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

print_r($result);
?>
```

## Get a metrics token

`GET /1.0/hosting/web/{serviceName}/metricsToken`

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

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

Returns a token to read the hosting metrics, the endpoint to query and the token expiration date.

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.web.MetricsToken | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `endpoint` | string | read-only | Backend url |
| `expiry` | string (date-time) | read-only | Token expiration date |
| `token` | string (password) | read-only | Generated token |

```json
{
  "endpoint": "string",
  "expiry": "2024-01-01T12:00:00Z",
  "token": "string"
}
```

### Example

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

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

print_r($result);
?>
```

## List .ovhconfig files

`GET /1.0/hosting/web/{serviceName}/ovhConfig`

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

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

List .ovhconfig files. Returns the IDs of the .ovhconfig configurations of the hosting. Filter them by path, or by historical to include old ones.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `historical` | query | boolean |  | Filter the value of historical property (=) |
| `path` | query | string |  | Filter the value of path property (like) |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Responses

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

```json
[
  0
]
```

### Example

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

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

print_r($result);
?>
```

## Get a .ovhconfig file

`GET /1.0/hosting/web/{serviceName}/ovhConfig/{id}`

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

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

Get a .ovhconfig file. Returns the engine, version, container, environment, HTTP firewall and status of the configuration of a folder.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Configuration's id |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.web.ovhConfig | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `container` | string | read-only | Container to run this website |
| `creationDate` | string (date-time) | read-only | When ovhconfig was created, or found for the first time, on the hosting servers |
| `engineName` | hosting.web.ovhConfig.EngineNameEnum | read-only | Version of engine you want — one of `php`, `phpcgi` |
| `engineVersion` | hosting.web.ovhConfig.EngineVersionEnum | read-only | Name of engine you want — one of `4.4`, `5.0`, `5.1`, `5.2`, `5.3`, `5.4`, `5.5`, `5.6`, `7.0`, `7.1`, `7.2`, `7.3`, … |
| `environment` | hosting.web.ovhConfig.EnvironmentEnum | read-only | Environment configuration you want — one of `development`, `production` |
| `fileExist` | boolean | read-only | If .ovhConfig exists |
| `historical` | boolean | read-only | If this configuration is an old configuration |
| `httpFirewall` | hosting.web.ovhConfig.HttpFirewallEnum | read-only | Configuration you want for http firewall — one of `none`, `security` |
| `id` | integer | read-only | Configuration's id |
| `path` | string | read-only | Config path, relative to your home directory |
| `status` | hosting.web.ovhConfig.StatusEnum | read-only | The configuration status — one of `created`, `rollbacking`, `updating` |
| `taskId` | integer | read-only | The task ID working on this configuration |

```json
{
  "container": "string",
  "creationDate": "2024-01-01T12:00:00Z",
  "engineName": "php",
  "engineVersion": "4.4",
  "environment": "development",
  "fileExist": true,
  "historical": true,
  "httpFirewall": "none",
  "id": 0,
  "path": "string",
  "status": "created",
  "taskId": 0
}
```

### Example

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

print_r($result);
?>
```

## List .ovhconfig capabilities

`GET /1.0/hosting/web/{serviceName}/ovhConfigCapabilities`

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

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

List .ovhconfig capabilities. Returns the PHP versions and container images available on the hosting.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.web.OvhConfigCapabilities[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `containerImage` | string[] |  | Container image available |
| `version` | hosting.web.ovhConfig.AvailableEngineVersionEnum |  | PHP version — one of `5.4`, `5.5`, `5.6`, `7.0`, `7.1`, `7.2`, `7.3`, `7.4`, `8.0`, `8.1`, `8.2`, `8.3`, … |

```json
[
  {
    "containerImage": [
      "string"
    ],
    "version": "5.4"
  }
]
```

### Example

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

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

print_r($result);
?>
```

## Get recommended .ovhconfig values

`GET /1.0/hosting/web/{serviceName}/ovhConfigRecommendedValues`

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

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

Get recommended .ovhconfig values. Returns the recommended engine, version, container, environment and HTTP firewall for the .ovhconfig file.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.web.OvhConfigRecommendedValues | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `container` | hosting.web.ovhconfig.ContainerEnum |  | Container to run this website — one of `jessie.i386`, `legacy`, `stable`, `stable64`, `testing` |
| `engineName` | hosting.web.ovhConfig.EngineNameEnum |  | Engine name — one of `php`, `phpcgi` |
| `engineVersion` | hosting.web.ovhConfig.AvailableEngineVersionEnum |  | PHP version — one of `5.4`, `5.5`, `5.6`, `7.0`, `7.1`, `7.2`, `7.3`, `7.4`, `8.0`, `8.1`, `8.2`, `8.3`, … |
| `environment` | hosting.web.ovhConfig.EnvironmentEnum |  | Environment configuration — one of `development`, `production` |
| `httpFirewall` | hosting.web.ovhConfig.HttpFirewallEnum |  | Configuration for http firewall — one of `none`, `security` |

```json
{
  "container": "jessie.i386",
  "engineName": "php",
  "engineVersion": "5.4",
  "environment": "development",
  "httpFirewall": "none"
}
```

### Example

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

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

print_r($result);
?>
```

## List runtime configurations

`GET /1.0/hosting/web/{serviceName}/runtime`

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

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

List runtime configurations. Returns the IDs of the runtime configurations of the hosting. Filter them by name or type.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `name` | query | string |  | Filter the value of name property (like) |
| `serviceName` | path | string | yes | The internal name of your hosting |
| `type` | query | hosting.web.runtime.TypeEnum |  | Filter the value of type property (=) — one of `nodejs-10`, `nodejs-11`, `nodejs-12`, `nodejs-14`, `nodejs-8`, `nodejs-9`, `phpfpm-5.6`, `phpfpm-7.0`, `phpfpm-7.1`, `phpfpm-7.2`, `phpfpm-7.3`, `phpfpm-7.4`, … |

### Responses

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

```json
[
  0
]
```

### Example

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

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

print_r($result);
?>
```

## Get a runtime configuration

`GET /1.0/hosting/web/{serviceName}/runtime/{id}`

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

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

Get a runtime configuration. Returns the backend type, environment, bootstrap script, public directory and status of the runtime configuration.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | The runtime configuration ID |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.web.runtime | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `appBootstrap` | string |  | The client application bootstrap script |
| `appEnv` | hosting.web.runtime.EnvEnum |  | The client application environment — one of `development`, `production` |
| `creationDate` | string (date-time) | read-only | The creation date of the runtime configuration |
| `id` | integer | read-only | The runtime configuration ID |
| `isDefault` | boolean |  | Is the runtime configuration is the one by default for the hosting |
| `isDeletable` | boolean | read-only | Return if the runtime configuration can be deleted |
| `lastUpdate` | string (date-time) | read-only | The last update date of the runtime configuration |
| `name` | string |  | The custom display name of the runtime configuration |
| `publicDir` | string |  | The client application public directory |
| `status` | hosting.web.runtime.StateEnum | read-only | The status of the runtime — one of `created`, `creating`, `deleting`, `updating` |
| `taskId` | integer | read-only | The link current task for the runtime configuration |
| `type` | hosting.web.runtime.TypeEnum |  | The backend type of the runtime — one of `nodejs-10`, `nodejs-11`, `nodejs-12`, `nodejs-14`, `nodejs-8`, `nodejs-9`, `phpfpm-5.6`, `phpfpm-7.0`, `phpfpm-7.1`, `phpfpm-7.2`, `phpfpm-7.3`, `phpfpm-7.4`, … |

```json
{
  "appBootstrap": "string",
  "appEnv": "development",
  "creationDate": "2024-01-01T12:00:00Z",
  "id": 0,
  "isDefault": true,
  "isDeletable": true,
  "lastUpdate": "2024-01-01T12:00:00Z",
  "name": "string",
  "publicDir": "string",
  "status": "created",
  "taskId": 0,
  "type": "nodejs-10"
}
```

### Example

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

print_r($result);
?>
```

## List runtime configuration domains

`GET /1.0/hosting/web/{serviceName}/runtime/{id}/attachedDomains`

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

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:runtime/attachedDomains/get`

List runtime configuration domains. Returns the attached domains that use the runtime configuration. Link a domain to it with its runtimeId.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | The runtime configuration ID |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Responses

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

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

### Example

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

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

print_r($result);
?>
```

## List runtime backend types

`GET /1.0/hosting/web/{serviceName}/runtimeAvailableTypes`

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

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

List runtime backend types. Returns the backend types available for runtime configurations. Filter them by programming language.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `language` | query | string |  | Specific programming language to filter |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.web.runtime.TypeEnum[] | successful operation |

```json
[
  "nodejs-10"
]
```

### Example

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

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

print_r($result);
?>
```

## Get service information

`GET /1.0/hosting/web/{serviceName}/serviceInfos`

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

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

Returns the billing information of the service: creation and expiration dates, renewal settings and contacts.

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | services.Service | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `canDeleteAtExpiration` | boolean | read-only | Indicates that the service can be set up to be deleted at expiration |
| `contactAdmin` | string | read-only |  |
| `contactBilling` | string | read-only |  |
| `contactTech` | string | read-only |  |
| `creation` | string (date) | read-only |  |
| `domain` | string | read-only |  |
| `engagedUpTo` | string (date) | read-only |  |
| `expiration` | string (date) | read-only |  |
| `possibleRenewPeriod` | integer[] | read-only | All the possible renew period of your service in month |
| `renew` | service.RenewType |  | Way of handling the renew |
| `renew.automatic` | boolean |  | The service is automatically renewed |
| `renew.deleteAtExpiration` | boolean |  | The service will be deleted at expiration |
| `renew.forced` | boolean |  | The service forced to be renewed |
| `renew.manualPayment` | boolean |  | The service needs to be manually renewed and paid |
| `renew.period` | integer |  | period of renew in month |
| `renewalType` | service.RenewalTypeEnum | read-only | Detailed renewal type of a service — one of `automaticForcedProduct`, `automaticV2012`, `automaticV2014`, `automaticV2016`, `automaticV2024`, `manual`, `oneShot`, `option` |
| `serviceId` | integer | read-only |  |
| `status` | service.StateEnum | read-only | one of `autorenewInProgress`, `expired`, `inCreation`, `ok`, `pendingDebt`, `unPaid` |

```json
{
  "canDeleteAtExpiration": true,
  "contactAdmin": "string",
  "contactBilling": "string",
  "contactTech": "string",
  "creation": "2024-01-01",
  "domain": "string",
  "engagedUpTo": "2024-01-01",
  "expiration": "2024-01-01",
  "possibleRenewPeriod": [
    0
  ],
  "renew": {
    "automatic": true,
    "deleteAtExpiration": true,
    "forced": true,
    "manualPayment": true,
    "period": 0
  },
  "renewalType": "automaticForcedProduct",
  "serviceId": 0,
  "status": "autorenewInProgress"
}
```

### Example

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

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

print_r($result);
?>
```

## Get a web hosting

`GET /v2/webhosting/resource/{name}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/#get-webhosting-resource-name

**Status:** Beta version  
**IAM actions:** `webHosting:apiovh:get`

Returns the web hosting, identified by its service name, with its current state and running tasks.

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | webhosting.WebWithIAM | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Computed hash used to control concurrent modification requests. Here, it represents the current target specification value. |
| `currentState` | webhosting.WebCurrentState | read-only | Current state of the hosting plan |
| `currentState.name` | string | read-only | Name of the hosting |
| `currentTasks` | common.CurrentTask[] | read-only | Ongoing asynchronous tasks related to the hosting plan |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `iam` | iam.ResourceMetadata | read-only | IAM resource metadata |
| `iam.displayName` | string | read-only | Resource display name |
| `iam.id` | string (uuid) | read-only | Unique identifier of the resource |
| `iam.state` | iam.ResourceMetadata.StateEnum | read-only | Resource state — one of `EXPIRED`, `IN_CREATION`, `OK`, `SUSPENDED` |
| `iam.tags` | object | read-only | Resource tags. Tags that were internally computed are prefixed with ovh: |
| `iam.urn` | string | read-only | Unique resource name used in policies |
| `id` | string | read-only | Unique identifier of the resource. Here, the service name is used as an identifier. |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Webhosting resource readiness in the system — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |

```json
{
  "checksum": "string",
  "currentState": {
    "name": "string"
  },
  "currentTasks": [
    {
      "errors": [
        {
          "message": "string"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "link": "string",
      "status": "ERROR",
      "type": "string"
    }
  ],
  "iam": {
    "displayName": "string",
    "id": "00000000-0000-0000-0000-000000000000",
    "state": "EXPIRED",
    "tags": {
      "key": "string"
    },
    "urn": "string"
  },
  "id": "string",
  "resourceStatus": "CREATING"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/webhosting/resource/{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("/v2/webhosting/resource/{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("/v2/webhosting/resource/{name}");

print_r($result);
?>
```

## Update CDN renewal

`POST /1.0/hosting/web/{serviceName}/cdn/serviceInfosUpdate`

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

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

Update CDN renewal. Updates the renewal settings of the CDN option: automatic renewal, renewal period and deletion at expiration.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `renew` | service.RenewType | yes | Renew type |
| `renew.automatic` | boolean |  | The service is automatically renewed |
| `renew.deleteAtExpiration` | boolean |  | The service will be deleted at expiration |
| `renew.forced` | boolean |  | The service forced to be renewed |
| `renew.manualPayment` | boolean |  | The service needs to be manually renewed and paid |
| `renew.period` | integer |  | period of renew in month |

```json
{
  "renew": {
    "automatic": true,
    "deleteAtExpiration": true,
    "forced": true,
    "manualPayment": true,
    "period": 0
  }
}
```

### Responses

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

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/cdn/serviceInfosUpdate" \
  -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: service.RenewType
result = client.post("/hosting/web/{serviceName}/cdn/serviceInfosUpdate",
	renew = None, # Renew type (type: service.RenewType)
)

# 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: service.RenewType
$result = $ovh->post("/hosting/web/{serviceName}/cdn/serviceInfosUpdate", array(
	renew => null, // Renew type (type: service.RenewType)
));

print_r($result);
?>
```

## Terminate the CDN option

`POST /1.0/hosting/web/{serviceName}/cdn/terminate`

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

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

Terminate the CDN option. Requests the termination of the CDN option. A link to confirm it is sent by email to the administrator contact.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Responses

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

```json
"string"
```

### Example

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

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

print_r($result);
?>
```

## Change contacts

`POST /1.0/hosting/web/{serviceName}/changeContact`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/#post-hosting-web-servicename-changecontact

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:changeContact`

Starts the contact change procedure of the service. Returns the identifiers of the created tasks.

### Parameters

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

### Request body (required)

Type: `services.changeContact`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `contactAdmin` | string |  | The contact to set as admin contact |
| `contactBilling` | string |  | The contact to set as billing contact |
| `contactTech` | string |  | The contact to set as tech contact |

```json
{
  "contactAdmin": "string",
  "contactBilling": "string",
  "contactTech": "string"
}
```

### Responses

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

```json
[
  0
]
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/changeContact" \
  -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: services.changeContact
result = client.post("/hosting/web/{serviceName}/changeContact",
	contactAdmin = None, # The contact to set as admin contact (type: string)
	contactBilling = None, # The contact to set as billing contact (type: string)
	contactTech = None, # The contact to set as tech contact (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: services.changeContact
$result = $ovh->post("/hosting/web/{serviceName}/changeContact", array(
	contactAdmin => null, // The contact to set as admin contact (type: string)
	contactBilling => null, // The contact to set as billing contact (type: string)
	contactTech => null, // The contact to set as tech contact (type: string)
));

print_r($result);
?>
```

## Confirm termination

`POST /1.0/hosting/web/{serviceName}/confirmTermination`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/#post-hosting-web-servicename-confirmtermination

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:confirmTermination`

Confirms the termination of the service with the token sent by email.

### Parameters

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

### Request body (required)

Type: `services.confirmTermination`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `commentary` | string |  | Commentary about your termination request |
| `commentaryFutureUse` | string |  | Commentary about your future use |
| `commentaryReason` | string |  | Commentary about your reason for termination request |
| `futureUse` | service.TerminationFutureUseEnum |  | All future uses you can provide for a service termination — one of `NOT_REPLACING_SERVICE`, `OTHER`, `SUBSCRIBE_AN_OTHER_SERVICE`, `SUBSCRIBE_OTHER_KIND_OF_SERVICE_WITH_COMPETITOR`, `SUBSCRIBE_SIMILAR_SERVICE_WITH_COMPETITOR` |
| `reason` | service.TerminationReasonEnum |  | All reasons you can provide for a service termination — one of `FEATURES_DONT_SUIT_ME`, `LACK_OF_PERFORMANCES`, `MIGRATED_TO_ANOTHER_OVH_PRODUCT`, `MIGRATED_TO_COMPETITOR`, `NOT_ENOUGH_RECOGNITION`, `NOT_NEEDED_ANYMORE`, `NOT_RELIABLE`, `NO_ANSWER`, `OTHER`, `PRODUCT_DIMENSION_DONT_SUIT_ME`, `PRODUCT_TOOLS_DONT_SUIT_ME`, `TOO_EXPENSIVE`, … |
| `token` | string | yes | The termination token sent by email to the admin contact |

```json
{
  "commentary": "string",
  "commentaryFutureUse": "string",
  "commentaryReason": "string",
  "futureUse": "NOT_REPLACING_SERVICE",
  "reason": "FEATURES_DONT_SUIT_ME",
  "token": "string"
}
```

### Responses

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

```json
"string"
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/confirmTermination" \
  -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: services.confirmTermination
result = client.post("/hosting/web/{serviceName}/confirmTermination",
	commentary = None, # Commentary about your termination request (type: string)
	commentaryFutureUse = None, # Commentary about your future use (type: string)
	commentaryReason = None, # Commentary about your reason for termination request (type: string)
	futureUse = None, # All future uses you can provide for a service termination (type: service.TerminationFutureUseEnum)
	reason = None, # All reasons you can provide for a service termination (type: service.TerminationReasonEnum)
	token = None, # The termination token sent by email to the admin contact (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: services.confirmTermination
$result = $ovh->post("/hosting/web/{serviceName}/confirmTermination", array(
	commentary => null, // Commentary about your termination request (type: string)
	commentaryFutureUse => null, // Commentary about your future use (type: string)
	commentaryReason => null, // Commentary about your reason for termination request (type: string)
	futureUse => null, // All future uses you can provide for a service termination (type: service.TerminationFutureUseEnum)
	reason => null, // All reasons you can provide for a service termination (type: service.TerminationReasonEnum)
	token => null, // The termination token sent by email to the admin contact (type: string)
));

print_r($result);
?>
```

## Run an email action

`POST /1.0/hosting/web/{serviceName}/email/request`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/#post-hosting-web-servicename-email-request

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:email/request/create`

Run an email action. Blocks or unblocks the emails sent by the hosting scripts, or purges the queue of emails waiting to be sent.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | hosting.web.mail.ActionEnum | yes | Action you want to request — one of `BLOCK`, `PURGE`, `UNBLOCK` |

```json
{
  "action": "BLOCK"
}
```

### Responses

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

```json
"string"
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/email/request" \
  -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: hosting.web.mail.ActionEnum
result = client.post("/hosting/web/{serviceName}/email/request",
	action = None, # Action you want to request (type: hosting.web.mail.ActionEnum)
)

# 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: hosting.web.mail.ActionEnum
$result = $ovh->post("/hosting/web/{serviceName}/email/request", array(
	action => null, // Action you want to request (type: hosting.web.mail.ActionEnum)
));

print_r($result);
?>
```

## Terminate an email option

`POST /1.0/hosting/web/{serviceName}/emailOption/{id}/terminate`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/#post-hosting-web-servicename-emailoption-id-terminate

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:emailOption/terminate`

Terminate an email option. Requests the termination of the email option. A link to confirm it is sent by email to the administrator contact.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id of the object |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Responses

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

```json
"string"
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/emailOption/{id}/terminate" \
  -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}/emailOption/{id}/terminate")

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

print_r($result);
?>
```

## Change a .ovhconfig file

`POST /1.0/hosting/web/{serviceName}/ovhConfig/{id}/changeConfiguration`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/#post-hosting-web-servicename-ovhconfig-id-changeconfiguration

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:ovhConfig/changeConfiguration`

Change a .ovhconfig file. Applies a new engine, version, container, environment or HTTP firewall setting to the folder, and returns the task.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Configuration's id |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `container` | hosting.web.ovhconfig.ContainerEnum |  | Container to run this website — one of `jessie.i386`, `legacy`, `stable`, `stable64`, `testing` |
| `engineName` | hosting.web.ovhConfig.EngineNameEnum |  | Version of engine you want — one of `php`, `phpcgi` |
| `engineVersion` | hosting.web.ovhConfig.AvailableEngineVersionEnum |  | Name of engine you want — one of `5.4`, `5.5`, `5.6`, `7.0`, `7.1`, `7.2`, `7.3`, `7.4`, `8.0`, `8.1`, `8.2`, `8.3`, … |
| `environment` | hosting.web.ovhConfig.EnvironmentEnum |  | Environment configuration you want — one of `development`, `production` |
| `httpFirewall` | hosting.web.ovhConfig.HttpFirewallEnum |  | Configuration you want for http firewall — one of `none`, `security` |

```json
{
  "container": "jessie.i386",
  "engineName": "php",
  "engineVersion": "5.4",
  "environment": "development",
  "httpFirewall": "none"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.web.task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `doneDate` | string (date-time) | read-only | Completion date |
| `function` | string | read-only | Function name |
| `id` | integer | read-only | the id of the task |
| `lastUpdate` | string (date-time) | read-only | last update |
| `objectId` | string | read-only | Task related object ID |
| `objectType` | hosting.web.task.ObjectTypeEnum | read-only | Task object type — one of `Abuse`, `AttachedDomain`, `BlockedIp`, `Cdn`, `Cron`, `Database`, `Dump`, `EnvVar`, `Filerz`, `Hostedssl`, `Hosting`, `Indy`, … |
| `startDate` | string (date-time) | read-only | Task Creation date |
| `status` | hosting.web.task.StatusEnum | read-only | Task status — one of `cancelled`, `doing`, `done`, `error`, `init`, `todo` |

```json
{
  "doneDate": "2024-01-01T12:00:00Z",
  "function": "string",
  "id": 0,
  "lastUpdate": "2024-01-01T12:00:00Z",
  "objectId": "string",
  "objectType": "Abuse",
  "startDate": "2024-01-01T12:00:00Z",
  "status": "cancelled"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/ovhConfig/{id}/changeConfiguration" \
  -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: hosting.web.ovhConfig.HttpFirewallEnum
result = client.post("/hosting/web/{serviceName}/ovhConfig/{id}/changeConfiguration",
	container = None, # Container to run this website (type: hosting.web.ovhconfig.ContainerEnum, nullable)
	engineName = None, # Version of engine you want (type: hosting.web.ovhConfig.EngineNameEnum, nullable)
	engineVersion = None, # Name of engine you want (type: hosting.web.ovhConfig.AvailableEngineVersionEnum, nullable)
	environment = None, # Environment configuration you want (type: hosting.web.ovhConfig.EnvironmentEnum, nullable)
	httpFirewall = None, # Configuration you want for http firewall (type: hosting.web.ovhConfig.HttpFirewallEnum, nullable)
)

# 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: hosting.web.ovhConfig.HttpFirewallEnum
$result = $ovh->post("/hosting/web/{serviceName}/ovhConfig/{id}/changeConfiguration", array(
	container => null, // Container to run this website (type: hosting.web.ovhconfig.ContainerEnum, nullable)
	engineName => null, // Version of engine you want (type: hosting.web.ovhConfig.EngineNameEnum, nullable)
	engineVersion => null, // Name of engine you want (type: hosting.web.ovhConfig.AvailableEngineVersionEnum, nullable)
	environment => null, // Environment configuration you want (type: hosting.web.ovhConfig.EnvironmentEnum, nullable)
	httpFirewall => null, // Configuration you want for http firewall (type: hosting.web.ovhConfig.HttpFirewallEnum, nullable)
));

print_r($result);
?>
```

## Roll back a .ovhconfig file

`POST /1.0/hosting/web/{serviceName}/ovhConfig/{id}/rollback`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/#post-hosting-web-servicename-ovhconfig-id-rollback

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:ovhConfig/rollback`

Roll back a .ovhconfig file. Restores the old configuration given by rollbackId and returns the task.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Configuration's id |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `rollbackId` | integer | yes | The configuration's id you want to rollback |

```json
{
  "rollbackId": 0
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.web.task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `doneDate` | string (date-time) | read-only | Completion date |
| `function` | string | read-only | Function name |
| `id` | integer | read-only | the id of the task |
| `lastUpdate` | string (date-time) | read-only | last update |
| `objectId` | string | read-only | Task related object ID |
| `objectType` | hosting.web.task.ObjectTypeEnum | read-only | Task object type — one of `Abuse`, `AttachedDomain`, `BlockedIp`, `Cdn`, `Cron`, `Database`, `Dump`, `EnvVar`, `Filerz`, `Hostedssl`, `Hosting`, `Indy`, … |
| `startDate` | string (date-time) | read-only | Task Creation date |
| `status` | hosting.web.task.StatusEnum | read-only | Task status — one of `cancelled`, `doing`, `done`, `error`, `init`, `todo` |

```json
{
  "doneDate": "2024-01-01T12:00:00Z",
  "function": "string",
  "id": 0,
  "lastUpdate": "2024-01-01T12:00:00Z",
  "objectId": "string",
  "objectType": "Abuse",
  "startDate": "2024-01-01T12:00:00Z",
  "status": "cancelled"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/ovhConfig/{id}/rollback" \
  -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: long
result = client.post("/hosting/web/{serviceName}/ovhConfig/{id}/rollback",
	rollbackId = None, # The configuration's id you want to rollback (type: long)
)

# 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: long
$result = $ovh->post("/hosting/web/{serviceName}/ovhConfig/{id}/rollback", array(
	rollbackId => null, // The configuration's id you want to rollback (type: long)
));

print_r($result);
?>
```

## Refresh .ovhconfig files

`POST /1.0/hosting/web/{serviceName}/ovhConfigRefresh`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/#post-hosting-web-servicename-ovhconfigrefresh

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

Refresh .ovhconfig files. Synchronizes the list of configurations with the .ovhconfig files on the hosting, and returns the task.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.web.task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `doneDate` | string (date-time) | read-only | Completion date |
| `function` | string | read-only | Function name |
| `id` | integer | read-only | the id of the task |
| `lastUpdate` | string (date-time) | read-only | last update |
| `objectId` | string | read-only | Task related object ID |
| `objectType` | hosting.web.task.ObjectTypeEnum | read-only | Task object type — one of `Abuse`, `AttachedDomain`, `BlockedIp`, `Cdn`, `Cron`, `Database`, `Dump`, `EnvVar`, `Filerz`, `Hostedssl`, `Hosting`, `Indy`, … |
| `startDate` | string (date-time) | read-only | Task Creation date |
| `status` | hosting.web.task.StatusEnum | read-only | Task status — one of `cancelled`, `doing`, `done`, `error`, `init`, `todo` |

```json
{
  "doneDate": "2024-01-01T12:00:00Z",
  "function": "string",
  "id": 0,
  "lastUpdate": "2024-01-01T12:00:00Z",
  "objectId": "string",
  "objectType": "Abuse",
  "startDate": "2024-01-01T12:00:00Z",
  "status": "cancelled"
}
```

### Example

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

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

print_r($result);
?>
```

## Run an action

`POST /1.0/hosting/web/{serviceName}/request`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/#post-hosting-web-servicename-request

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:request`

Run an action. Checks the quota, flushes the cache or runs an antihack scan on the hosting, and returns the task.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | hosting.web.RequestActionEnum | yes | Action you want to request — one of `CHECK_QUOTA`, `FLUSH_CACHE`, `SCAN_ANTIHACK` |

```json
{
  "action": "CHECK_QUOTA"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.web.task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `doneDate` | string (date-time) | read-only | Completion date |
| `function` | string | read-only | Function name |
| `id` | integer | read-only | the id of the task |
| `lastUpdate` | string (date-time) | read-only | last update |
| `objectId` | string | read-only | Task related object ID |
| `objectType` | hosting.web.task.ObjectTypeEnum | read-only | Task object type — one of `Abuse`, `AttachedDomain`, `BlockedIp`, `Cdn`, `Cron`, `Database`, `Dump`, `EnvVar`, `Filerz`, `Hostedssl`, `Hosting`, `Indy`, … |
| `startDate` | string (date-time) | read-only | Task Creation date |
| `status` | hosting.web.task.StatusEnum | read-only | Task status — one of `cancelled`, `doing`, `done`, `error`, `init`, `todo` |

```json
{
  "doneDate": "2024-01-01T12:00:00Z",
  "function": "string",
  "id": 0,
  "lastUpdate": "2024-01-01T12:00:00Z",
  "objectId": "string",
  "objectType": "Abuse",
  "startDate": "2024-01-01T12:00:00Z",
  "status": "cancelled"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/request" \
  -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: hosting.web.RequestActionEnum
result = client.post("/hosting/web/{serviceName}/request",
	action = None, # Action you want to request (type: hosting.web.RequestActionEnum)
)

# 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: hosting.web.RequestActionEnum
$result = $ovh->post("/hosting/web/{serviceName}/request", array(
	action => null, // Action you want to request (type: hosting.web.RequestActionEnum)
));

print_r($result);
?>
```

## Request a boost

`POST /1.0/hosting/web/{serviceName}/requestBoost`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/#post-hosting-web-servicename-requestboost

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:requestBoost`

Applies the requested boost offer to the hosting and returns the task. Send a null offer to disable the boost.

### Parameters

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

### Request body (required)

Type: `hosting.web.RequestBoostInput`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `offer` | hosting.web.OfferEnum |  | Requested boost offer — one of `CLOUDWEB_1`, `CLOUDWEB_2`, `CLOUDWEB_3`, `KS`, `PERFORMANCE_1`, `PERFORMANCE_2`, `PERFORMANCE_3`, `PERFORMANCE_4`, `PERSO`, `POWER_BETA_1`, `PRO`, `START`, … |

```json
{
  "offer": "CLOUDWEB_1"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.web.PublicTask | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `doneDate` | string (date-time) | read-only | Done date |
| `function` | hosting.web.task.FunctionEnum | read-only | Task function — one of `abuse/close`, `abuse/create`, `abuse/create/web`, `abuse/delete/web`, `abuse/update`, `abuse/update/web`, `agora/AnycastUpdateReference`, `agora/DnsAddonUpdateReference`, `agora/DnsUpdateReference`, `agora/updateReference`, `attachedDomain/create`, `attachedDomain/delete`, … |
| `id` | integer | read-only | Task's id |
| `lastUpdate` | string (date-time) | read-only | Last update date |
| `objectId` | string | read-only | Task object id |
| `objectType` | hosting.web.task.ObjectTypeEnum | read-only | Task object type — one of `Abuse`, `AttachedDomain`, `BlockedIp`, `Cdn`, `Cron`, `Database`, `Dump`, `EnvVar`, `Filerz`, `Hostedssl`, `Hosting`, `Indy`, … |
| `startDate` | string (date-time) | read-only | Start date |
| `status` | hosting.web.task.StatusEnum | read-only | Task status — one of `cancelled`, `doing`, `done`, `error`, `init`, `todo` |

```json
{
  "doneDate": "2024-01-01T12:00:00Z",
  "function": "abuse/close",
  "id": 0,
  "lastUpdate": "2024-01-01T12:00:00Z",
  "objectId": "string",
  "objectType": "Abuse",
  "startDate": "2024-01-01T12:00:00Z",
  "status": "cancelled"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/requestBoost" \
  -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: hosting.web.RequestBoostInput
result = client.post("/hosting/web/{serviceName}/requestBoost",
	offer = None, # Requested boost offer (type: hosting.web.OfferEnum, nullable)
)

# 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: hosting.web.RequestBoostInput
$result = $ovh->post("/hosting/web/{serviceName}/requestBoost", array(
	offer => null, // Requested boost offer (type: hosting.web.OfferEnum, nullable)
));

print_r($result);
?>
```

## Restore a backup

`POST /1.0/hosting/web/{serviceName}/restoreSnapshot`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/#post-hosting-web-servicename-restoresnapshot

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:restoreSnapshot`

Restore a backup. Restores the files of the hosting from a daily or weekly backup and returns the task. All current files are replaced by the backup. Databases are not restored.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `backup` | hosting.web.backup.TypeEnum | yes | The backup you want to restore — one of `daily.1`, `daily.2`, `daily.3`, `weekly.1`, `weekly.2` |

```json
{
  "backup": "daily.1"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.web.task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `doneDate` | string (date-time) | read-only | Completion date |
| `function` | string | read-only | Function name |
| `id` | integer | read-only | the id of the task |
| `lastUpdate` | string (date-time) | read-only | last update |
| `objectId` | string | read-only | Task related object ID |
| `objectType` | hosting.web.task.ObjectTypeEnum | read-only | Task object type — one of `Abuse`, `AttachedDomain`, `BlockedIp`, `Cdn`, `Cron`, `Database`, `Dump`, `EnvVar`, `Filerz`, `Hostedssl`, `Hosting`, `Indy`, … |
| `startDate` | string (date-time) | read-only | Task Creation date |
| `status` | hosting.web.task.StatusEnum | read-only | Task status — one of `cancelled`, `doing`, `done`, `error`, `init`, `todo` |

```json
{
  "doneDate": "2024-01-01T12:00:00Z",
  "function": "string",
  "id": 0,
  "lastUpdate": "2024-01-01T12:00:00Z",
  "objectId": "string",
  "objectType": "Abuse",
  "startDate": "2024-01-01T12:00:00Z",
  "status": "cancelled"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/restoreSnapshot" \
  -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: hosting.web.backup.TypeEnum
result = client.post("/hosting/web/{serviceName}/restoreSnapshot",
	backup = None, # The backup you want to restore (type: hosting.web.backup.TypeEnum)
)

# 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: hosting.web.backup.TypeEnum
$result = $ovh->post("/hosting/web/{serviceName}/restoreSnapshot", array(
	backup => null, // The backup you want to restore (type: hosting.web.backup.TypeEnum)
));

print_r($result);
?>
```

## Create a runtime configuration

`POST /1.0/hosting/web/{serviceName}/runtime`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/#post-hosting-web-servicename-runtime

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:runtime/create`

Create a runtime configuration. Creates a runtime configuration with a backend type, an environment, a bootstrap script and a public directory, linked to attached domains, and returns the task.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `appBootstrap` | string |  | The client application bootstrap script |
| `appEnv` | hosting.web.runtime.EnvEnum |  | The client application environment — one of `development`, `production` |
| `attachedDomains` | string[] |  | The attached domains fqdn to link to this runtime configuration |
| `isDefault` | boolean |  | Set if the runtime configuration is the one by default for the hosting |
| `name` | string |  | The custom display name of the runtime configuration |
| `publicDir` | string |  | The client application public directory |
| `type` | hosting.web.runtime.TypeEnum |  | The backend type of a runtime configuration — one of `nodejs-10`, `nodejs-11`, `nodejs-12`, `nodejs-14`, `nodejs-8`, `nodejs-9`, `phpfpm-5.6`, `phpfpm-7.0`, `phpfpm-7.1`, `phpfpm-7.2`, `phpfpm-7.3`, `phpfpm-7.4`, … |

```json
{
  "appBootstrap": "string",
  "appEnv": "development",
  "attachedDomains": [
    "string"
  ],
  "isDefault": true,
  "name": "string",
  "publicDir": "string",
  "type": "nodejs-10"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.web.task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `doneDate` | string (date-time) | read-only | Completion date |
| `function` | string | read-only | Function name |
| `id` | integer | read-only | the id of the task |
| `lastUpdate` | string (date-time) | read-only | last update |
| `objectId` | string | read-only | Task related object ID |
| `objectType` | hosting.web.task.ObjectTypeEnum | read-only | Task object type — one of `Abuse`, `AttachedDomain`, `BlockedIp`, `Cdn`, `Cron`, `Database`, `Dump`, `EnvVar`, `Filerz`, `Hostedssl`, `Hosting`, `Indy`, … |
| `startDate` | string (date-time) | read-only | Task Creation date |
| `status` | hosting.web.task.StatusEnum | read-only | Task status — one of `cancelled`, `doing`, `done`, `error`, `init`, `todo` |

```json
{
  "doneDate": "2024-01-01T12:00:00Z",
  "function": "string",
  "id": 0,
  "lastUpdate": "2024-01-01T12:00:00Z",
  "objectId": "string",
  "objectType": "Abuse",
  "startDate": "2024-01-01T12:00:00Z",
  "status": "cancelled"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/runtime" \
  -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: hosting.web.runtime.TypeEnum
result = client.post("/hosting/web/{serviceName}/runtime",
	appBootstrap = None, # The client application bootstrap script (type: string, nullable)
	appEnv = None, # The client application environment (type: hosting.web.runtime.EnvEnum, nullable)
	attachedDomains = None, # The attached domains fqdn to link to this runtime configuration (type: string[], nullable)
	isDefault = None, # Set if the runtime configuration is the one by default for the hosting (type: boolean, nullable)
	name = None, # The custom display name of the runtime configuration (type: string, nullable)
	publicDir = None, # The client application public directory (type: string, nullable)
	type = None, # The backend type of a runtime configuration (type: hosting.web.runtime.TypeEnum, nullable)
)

# 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: hosting.web.runtime.TypeEnum
$result = $ovh->post("/hosting/web/{serviceName}/runtime", array(
	appBootstrap => null, // The client application bootstrap script (type: string, nullable)
	appEnv => null, // The client application environment (type: hosting.web.runtime.EnvEnum, nullable)
	attachedDomains => null, // The attached domains fqdn to link to this runtime configuration (type: string[], nullable)
	isDefault => null, // Set if the runtime configuration is the one by default for the hosting (type: boolean, nullable)
	name => null, // The custom display name of the runtime configuration (type: string, nullable)
	publicDir => null, // The client application public directory (type: string, nullable)
	type => null, // The backend type of a runtime configuration (type: hosting.web.runtime.TypeEnum, nullable)
));

print_r($result);
?>
```

## Request termination

`POST /1.0/hosting/web/{serviceName}/terminate`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/#post-hosting-web-servicename-terminate

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:terminate`

Requests the termination of the service. Confirm it with confirmTermination and the token sent by email.

### Parameters

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

### Responses

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

```json
"string"
```

### Example

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

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

print_r($result);
?>
```

## Unblock outgoing TCP

`POST /1.0/hosting/web/{serviceName}/unblockTCPOut`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/#post-hosting-web-servicename-unblocktcpout

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:unblockTCPOut`

Requests the unblocking of the outgoing TCP connections of the hosting, blocked after an abuse. Their current state is outState in the abuse state.

### Parameters

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

### Responses

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

### Example

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

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

print_r($result);
?>
```

## Delete a runtime configuration

`DELETE /1.0/hosting/web/{serviceName}/runtime/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/#delete-hosting-web-servicename-runtime-id

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:runtime/delete`

Delete a runtime configuration. Deletes the runtime configuration and returns the task. Only a configuration with isDeletable set to true can be deleted.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | The runtime configuration ID |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.web.task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `doneDate` | string (date-time) | read-only | Completion date |
| `function` | string | read-only | Function name |
| `id` | integer | read-only | the id of the task |
| `lastUpdate` | string (date-time) | read-only | last update |
| `objectId` | string | read-only | Task related object ID |
| `objectType` | hosting.web.task.ObjectTypeEnum | read-only | Task object type — one of `Abuse`, `AttachedDomain`, `BlockedIp`, `Cdn`, `Cron`, `Database`, `Dump`, `EnvVar`, `Filerz`, `Hostedssl`, `Hosting`, `Indy`, … |
| `startDate` | string (date-time) | read-only | Task Creation date |
| `status` | hosting.web.task.StatusEnum | read-only | Task status — one of `cancelled`, `doing`, `done`, `error`, `init`, `todo` |

```json
{
  "doneDate": "2024-01-01T12:00:00Z",
  "function": "string",
  "id": 0,
  "lastUpdate": "2024-01-01T12:00:00Z",
  "objectId": "string",
  "objectType": "Abuse",
  "startDate": "2024-01-01T12:00:00Z",
  "status": "cancelled"
}
```

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/runtime/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/hosting/web/{serviceName}/runtime/{id}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/hosting/web/{serviceName}/runtime/{id}");

print_r($result);
?>
```

## Update a web hosting

`PUT /1.0/hosting/web/{serviceName}`

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

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:edit`

Updates the display name of the web hosting.

### Parameters

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

### Request body (required)

Type: `hosting.web.Service`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `availableBoostOffer` | hosting.web.AvailableOfferStruct[] | read-only | Available offers for boost option |
| `availableBoostOffer[].offer` | hosting.web.OfferEnum |  | Available boost offer — one of `CLOUDWEB_1`, `CLOUDWEB_2`, `CLOUDWEB_3`, `KS`, `PERFORMANCE_1`, `PERFORMANCE_2`, `PERFORMANCE_3`, `PERFORMANCE_4`, `PERSO`, `POWER_BETA_1`, `PRO`, `START`, … |
| `availableBoostOffer[].price` | order.Price |  | The price in month for this boost offer |
| `availableBoostOffer[].price.currencyCode` | order.CurrencyCodeEnum | read-only | Currency code — one of `AUD`, `CAD`, `CZK`, `EUR`, `GBP`, `INR`, `LTL`, `MAD`, `N/A`, `PLN`, `SGD`, `TND`, … |
| `availableBoostOffer[].price.priceInUcents` | integer | read-only | Price in microcents |
| `availableBoostOffer[].price.text` | string | read-only | Textual representation |
| `availableBoostOffer[].price.value` | number | read-only | The effective price |
| `boostOffer` | hosting.web.OfferEnum | read-only | Current boost offer — one of `CLOUDWEB_1`, `CLOUDWEB_2`, `CLOUDWEB_3`, `KS`, `PERFORMANCE_1`, `PERFORMANCE_2`, `PERFORMANCE_3`, `PERFORMANCE_4`, `PERSO`, `POWER_BETA_1`, `PRO`, `START`, … |
| `cluster` | string | read-only | Cluster name |
| `clusterIp` | ipv4 | read-only | This direct ip to your cluster ( usefull for application like api ) |
| `clusterIpv6` | ipv6 | read-only | This direct ipv6 to your cluster ( usefull for application like api ) |
| `countriesIp` | hosting.web.CountriesIp[] | read-only | Available clusterIp by countries |
| `countriesIp[].country` | hosting.web.CountryEnum | read-only | The whois country of the ip — one of `BE`, `CA`, `CZ`, `DE`, `ES`, `FI`, `FR`, `IE`, `IT`, `LT`, `NL`, `PL`, … |
| `countriesIp[].ip` | ipv4 | read-only | The cluster ip |
| `countriesIp[].ipv6` | ipv6 | read-only | The cluster ipv6 |
| `datacenter` | string | read-only | Datacenter where this account is located |
| `defaultAttachedDomain` | string | read-only | The default attached domain created along with your hosting |
| `displayName` | string |  | Set the name displayed in ManagerV6 for your hosting (max 50 chars) |
| `filer` | string | read-only | Filer name |
| `hasCdn` | boolean | read-only | Has a CDN service linked on the hosting |
| `hasHostedSsl` | boolean | read-only | Has a HostedSSL service linked on the hosting |
| `home` | string | read-only | Path of your home |
| `hostingIp` | ipv4 | read-only | The recommended ip for your hosting ( depends on hosting's linked services, e.g CDN or hostedSSL ) |
| `hostingIpv6` | ipv6 | read-only | The recommended ipv6 for your hosting ( depends on hosting's linked services, e.g CDN or hostedSSL ) |
| `lastOvhConfigScan` | string (date-time) | read-only | /hosting/web/{serviceName}/ovhConfig is stored in cache. This date is the last refresh of this data |
| `multipleSSL` | boolean | read-only | If set to true, service can manage more than only one certificate |
| `objectQuota` | number | read-only | objects allowed |
| `objectUsed` | number | read-only | objects used |
| `offer` | hosting.web.OfferEnum | read-only | Hosting offer — one of `CLOUDWEB_1`, `CLOUDWEB_2`, `CLOUDWEB_3`, `KS`, `PERFORMANCE_1`, `PERFORMANCE_2`, `PERFORMANCE_3`, `PERFORMANCE_4`, `PERSO`, `POWER_BETA_1`, `PRO`, `START`, … |
| `operatingSystem` | hosting.web.OperatingSystemEnum | read-only | Hosting's OS — one of `linux` |
| `phpVersions` | hosting.web.PhpVersion[] | read-only | State of available php versions for this account |
| `phpVersions[].support` | hosting.web.PhpVersionStateEnum |  | Current support of this php version — one of `BETA`, `END_OF_LIFE`, `SECURITY_FIXES`, `SUPPORTED` |
| `phpVersions[].version` | string |  | PHP version |
| `primaryLogin` | string | read-only | Hosting's main login |
| `quotaSize` | complexType.UnitAndValue_double | read-only | Space allowed |
| `quotaSize.unit` | string |  |  |
| `quotaSize.value` | number |  |  |
| `quotaUsed` | complexType.UnitAndValue_double | read-only | Space used |
| `quotaUsed.unit` | string |  |  |
| `quotaUsed.value` | number |  |  |
| `recommendedOffer` | hosting.web.OfferEnum | read-only | If your offer is old, return a recommended offer to migrate on — one of `CLOUDWEB_1`, `CLOUDWEB_2`, `CLOUDWEB_3`, `KS`, `PERFORMANCE_1`, `PERFORMANCE_2`, `PERFORMANCE_3`, `PERFORMANCE_4`, `PERSO`, `POWER_BETA_1`, `PRO`, `START`, … |
| `resourceType` | hosting.web.ResourceEnum | read-only | Hosting resource type — one of `bestEffort`, `cloud`, `dedicated`, `shared` |
| `serviceManagementAccess` | hosting.web.ServiceAccess | read-only | URLs to use to manage your webhosting |
| `serviceManagementAccess.ftp` | hosting.web.Address |  | Address with url and port to manage files by ftp |
| `serviceManagementAccess.ftp.port` | integer |  | Port to use to access to the service |
| `serviceManagementAccess.ftp.url` | string |  | Url to contact the service |
| `serviceManagementAccess.http` | hosting.web.Address |  | Address to see your webhosting without domain |
| `serviceManagementAccess.http.port` | integer |  | Port to use to access to the service |
| `serviceManagementAccess.http.url` | string |  | Url to contact the service |
| `serviceManagementAccess.ssh` | hosting.web.Address |  | Address with url and port to manage webhosting by ssh |
| `serviceManagementAccess.ssh.port` | integer |  | Port to use to access to the service |
| `serviceManagementAccess.ssh.url` | string |  | Url to contact the service |
| `serviceName` | string | read-only | Service name |
| `state` | hosting.web.StateEnum | read-only | State of your hosting — one of `active`, `blocked`, `bloqued`, `hardBlocked`, `hardBloqued`, `maintenance` |
| `token` | string | read-only | Use to link an external domain. ( This token has to be insert into a TXT field on your dns zone with ovhcontrol subdomain ) |
| `trafficQuotaSize` | complexType.UnitAndValue_double | read-only | Traffic quota allowed ( null = unlimited ) |
| `trafficQuotaSize.unit` | string |  |  |
| `trafficQuotaSize.value` | number |  |  |
| `trafficQuotaUsed` | complexType.UnitAndValue_double | read-only | Traffic quota used |
| `trafficQuotaUsed.unit` | string |  |  |
| `trafficQuotaUsed.value` | number |  |  |
| `updates` | string[] | read-only | List of updates on your hosting |

```json
{
  "displayName": "string"
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: hosting.web.Service
result = client.put("/hosting/web/{serviceName}",
	displayName = None, # Set the name displayed in ManagerV6 for your hosting (max 50 chars) (type: string, nullable)
)

# 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: hosting.web.Service
$result = $ovh->put("/hosting/web/{serviceName}", array(
	displayName => null, // Set the name displayed in ManagerV6 for your hosting (max 50 chars) (type: string, nullable)
));

print_r($result);
?>
```

## Update the configuration

`PUT /1.0/hosting/web/{serviceName}/configuration`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/#put-hosting-web-servicename-configuration

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:configuration/edit`

Update the configuration. Updates the language, version, environment, launch script or public directory of the application.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Request body (required)

Type: `hosting.web.configuration`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `appEnv` | hosting.web.configuration.EnvEnum |  | Application environment — one of `development`, `production` |
| `entryPoint` | string |  | Application launch script |
| `id` | integer | read-only | Id of the current configuration |
| `language` | hosting.web.configuration.LanguageEnum |  | language chosen for the current hosting — one of `nodejs`, `python`, `ruby` |
| `publicDir` | string |  | Directory of the application |
| `status` | hosting.web.configuration.StateEnum | read-only | Status of current configuration — one of `created`, `creating`, `deleting`, `updating` |
| `version` | string |  | version of the language chosen for the current hosting |

```json
{
  "appEnv": "development",
  "entryPoint": "string",
  "language": "nodejs",
  "publicDir": "string",
  "version": "string"
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/configuration" \
  -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: hosting.web.configuration
result = client.put("/hosting/web/{serviceName}/configuration",
	appEnv = None, # Application environment (type: hosting.web.configuration.EnvEnum)
	entryPoint = None, # Application launch script (type: string, nullable)
	language = None, # language chosen for the current hosting (type: hosting.web.configuration.LanguageEnum)
	publicDir = None, # Directory of the application (type: string, nullable)
	version = None, # version of the language chosen for the current hosting (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: hosting.web.configuration
$result = $ovh->put("/hosting/web/{serviceName}/configuration", array(
	appEnv => null, // Application environment (type: hosting.web.configuration.EnvEnum)
	entryPoint => null, // Application launch script (type: string, nullable)
	language => null, // language chosen for the current hosting (type: hosting.web.configuration.LanguageEnum)
	publicDir => null, // Directory of the application (type: string, nullable)
	version => null, // version of the language chosen for the current hosting (type: string)
));

print_r($result);
?>
```

## Update the email settings

`PUT /1.0/hosting/web/{serviceName}/email`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/#put-hosting-web-servicename-email

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:email/edit`

Update the email settings. Updates the email address that receives the sending errors of the hosting scripts. The other fields are read-only.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Request body (required)

Type: `hosting.web.email`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `bounce` | integer | read-only | Bounce |
| `email` | string |  | Email used to receive errors |
| `maxPerDay` | integer | read-only | Max email to sent per day |
| `sent` | integer | read-only | Email sent since hosting creation |
| `sentToday` | integer | read-only | Email sent today |
| `spoofing` | integer | read-only | Spoofing Bounce |
| `state` | hosting.web.mail.StateEnum | read-only | Email state — one of `bounce`, `force`, `ko`, `ok`, `purging`, `spam` |

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

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/email" \
  -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: hosting.web.email
result = client.put("/hosting/web/{serviceName}/email",
	email = None, # Email used to receive errors (type: string, nullable)
)

# 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: hosting.web.email
$result = $ovh->put("/hosting/web/{serviceName}/email", array(
	email => null, // Email used to receive errors (type: string, nullable)
));

print_r($result);
?>
```

## Update a runtime configuration

`PUT /1.0/hosting/web/{serviceName}/runtime/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/#put-hosting-web-servicename-runtime-id

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:runtime/edit`

Update a runtime configuration. Updates the name, backend type, environment, bootstrap script, public directory or default status of the runtime configuration.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | The runtime configuration ID |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Request body (required)

Type: `hosting.web.runtime`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `appBootstrap` | string |  | The client application bootstrap script |
| `appEnv` | hosting.web.runtime.EnvEnum |  | The client application environment — one of `development`, `production` |
| `creationDate` | string (date-time) | read-only | The creation date of the runtime configuration |
| `id` | integer | read-only | The runtime configuration ID |
| `isDefault` | boolean |  | Is the runtime configuration is the one by default for the hosting |
| `isDeletable` | boolean | read-only | Return if the runtime configuration can be deleted |
| `lastUpdate` | string (date-time) | read-only | The last update date of the runtime configuration |
| `name` | string |  | The custom display name of the runtime configuration |
| `publicDir` | string |  | The client application public directory |
| `status` | hosting.web.runtime.StateEnum | read-only | The status of the runtime — one of `created`, `creating`, `deleting`, `updating` |
| `taskId` | integer | read-only | The link current task for the runtime configuration |
| `type` | hosting.web.runtime.TypeEnum |  | The backend type of the runtime — one of `nodejs-10`, `nodejs-11`, `nodejs-12`, `nodejs-14`, `nodejs-8`, `nodejs-9`, `phpfpm-5.6`, `phpfpm-7.0`, `phpfpm-7.1`, `phpfpm-7.2`, `phpfpm-7.3`, `phpfpm-7.4`, … |

```json
{
  "appBootstrap": "string",
  "appEnv": "development",
  "isDefault": true,
  "name": "string",
  "publicDir": "string",
  "type": "nodejs-10"
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/runtime/{id}" \
  -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: hosting.web.runtime
result = client.put("/hosting/web/{serviceName}/runtime/{id}",
	appBootstrap = None, # The client application bootstrap script (type: string, nullable)
	appEnv = None, # The client application environment (type: hosting.web.runtime.EnvEnum)
	isDefault = None, # Is the runtime configuration is the one by default for the hosting (type: boolean)
	name = None, # The custom display name of the runtime configuration (type: string, nullable)
	publicDir = None, # The client application public directory (type: string, nullable)
	type = None, # The backend type of the runtime (type: hosting.web.runtime.TypeEnum)
)

# 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: hosting.web.runtime
$result = $ovh->put("/hosting/web/{serviceName}/runtime/{id}", array(
	appBootstrap => null, // The client application bootstrap script (type: string, nullable)
	appEnv => null, // The client application environment (type: hosting.web.runtime.EnvEnum)
	isDefault => null, // Is the runtime configuration is the one by default for the hosting (type: boolean)
	name => null, // The custom display name of the runtime configuration (type: string, nullable)
	publicDir => null, // The client application public directory (type: string, nullable)
	type => null, // The backend type of the runtime (type: hosting.web.runtime.TypeEnum)
));

print_r($result);
?>
```

## Update service information

`PUT /1.0/hosting/web/{serviceName}/serviceInfos`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/#put-hosting-web-servicename-serviceinfos

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:serviceInfos/edit`

Updates the renewal settings of the service.

### Parameters

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

### Request body (required)

Type: `services.Service`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `canDeleteAtExpiration` | boolean | read-only | Indicates that the service can be set up to be deleted at expiration |
| `contactAdmin` | string | read-only |  |
| `contactBilling` | string | read-only |  |
| `contactTech` | string | read-only |  |
| `creation` | string (date) | read-only |  |
| `domain` | string | read-only |  |
| `engagedUpTo` | string (date) | read-only |  |
| `expiration` | string (date) | read-only |  |
| `possibleRenewPeriod` | integer[] | read-only | All the possible renew period of your service in month |
| `renew` | service.RenewType |  | Way of handling the renew |
| `renew.automatic` | boolean |  | The service is automatically renewed |
| `renew.deleteAtExpiration` | boolean |  | The service will be deleted at expiration |
| `renew.forced` | boolean |  | The service forced to be renewed |
| `renew.manualPayment` | boolean |  | The service needs to be manually renewed and paid |
| `renew.period` | integer |  | period of renew in month |
| `renewalType` | service.RenewalTypeEnum | read-only | Detailed renewal type of a service — one of `automaticForcedProduct`, `automaticV2012`, `automaticV2014`, `automaticV2016`, `automaticV2024`, `manual`, `oneShot`, `option` |
| `serviceId` | integer | read-only |  |
| `status` | service.StateEnum | read-only | one of `autorenewInProgress`, `expired`, `inCreation`, `ok`, `pendingDebt`, `unPaid` |

```json
{
  "renew": {
    "automatic": true,
    "deleteAtExpiration": true,
    "forced": true,
    "manualPayment": true,
    "period": 0
  }
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/serviceInfos" \
  -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: services.Service
result = client.put("/hosting/web/{serviceName}/serviceInfos",
	renew = None, # Way of handling the renew (type: service.RenewType, nullable)
)

# 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: services.Service
$result = $ovh->put("/hosting/web/{serviceName}/serviceInfos", array(
	renew => null, // Way of handling the renew (type: service.RenewType, nullable)
));

print_r($result);
?>
```
