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

> 6 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/modules/

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

## Operations

- `GET /hosting/web/moduleList` — List available modules
- `GET /hosting/web/moduleList/{id}` — Get an available module
- `GET /hosting/web/{serviceName}/module` — List installed modules
- `GET /hosting/web/{serviceName}/module/{id}` — Get an installed module
- `POST /hosting/web/{serviceName}/module` — Install a module
- `DELETE /hosting/web/{serviceName}/module/{id}` — Delete an installed module

## List available modules

`GET /1.0/hosting/web/moduleList`

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

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

List available modules. Returns the IDs of the modules that can be installed. Filter them by active, branch or latest.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `active` | query | boolean |  | Filter the value of active property (=) |
| `branch` | query | hosting.web.module.BranchEnum |  | Filter the value of branch property (=) — one of `old`, `stable`, `testing` |
| `latest` | query | boolean |  | Filter the value of latest property (=) |

### Responses

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

```json
[
  0
]
```

### Example

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

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

print_r($result);
?>
```

## Get an available module

`GET /1.0/hosting/web/moduleList/{id}`

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

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

Get an available module. Returns the name, version, branch, languages and requirements of the module, and the modules it can be upgraded to.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | The ID of the module |

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `active` | boolean | read-only | Is the module available? |
| `adminNameType` | hosting.web.module.AdminNameTypeEnum | read-only | The type of the admin name — one of `email`, `string` |
| `author` | string | read-only | The packager of this module for OVH |
| `branch` | hosting.web.module.BranchEnum | read-only | The branch of the module — one of `old`, `stable`, `testing` |
| `id` | integer | read-only | The ID of the module |
| `keywords` | string[] | read-only | The keywords for this module |
| `language` | hosting.web.module.LanguageEnum[] | read-only | All available languages for this module |
| `languageRequirement` | complexType.UnitAndValue_string | read-only | Minimal language version required to run this module |
| `languageRequirement.unit` | string |  |  |
| `languageRequirement.value` | string |  |  |
| `latest` | boolean | read-only | Is this the latest version available? |
| `name` | string | read-only | The name of the module |
| `size` | complexType.UnitAndValue_double | read-only | Size of the module |
| `size.unit` | string |  |  |
| `size.value` | number |  |  |
| `upgradeFrom` | integer[] | read-only | The IDs of the module you can upgrade to |
| `version` | string | read-only | The version of the module |

```json
{
  "active": true,
  "adminNameType": "email",
  "author": "string",
  "branch": "old",
  "id": 0,
  "keywords": [
    "string"
  ],
  "language": [
    "cz"
  ],
  "languageRequirement": {
    "unit": "string",
    "value": "string"
  },
  "latest": true,
  "name": "string",
  "size": {
    "unit": "string",
    "value": 0
  },
  "upgradeFrom": [
    0
  ],
  "version": "string"
}
```

### Example

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

print_r($result);
?>
```

## List installed modules

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

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

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

List installed modules. Returns the installation IDs of the modules installed on the hosting. Get the details of one with its installation ID.

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

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

print_r($result);
?>
```

## Get an installed module

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

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

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

Get an installed module. Returns the path, URL, admin login, language, dependencies and status of the installed module.

### Parameters

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

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `adminFolder` | string | read-only | The admin folder, relative to the module's installation path |
| `adminName` | string | read-only | Login for the admin account |
| `creationDate` | string (date-time) | read-only | Date of the installation of the module |
| `dependencies` | hosting.web.module.DependencyType[] | read-only | The dependencies to which the module has access. A dependency can be a standard database (like MySQL or PostgreSQL) or a key-value store (like Redis or Memcached) for example |
| `dependencies[].name` | string |  | The name of this dependency |
| `dependencies[].password` | string (password) |  | The password associated with the user |
| `dependencies[].port` | integer |  | The port on where to contact this dependency |
| `dependencies[].prefix` | string |  | The prefix to set to the data to distinguish between the data from the module and the rest |
| `dependencies[].server` | string |  | The server on where your dependency is hosted |
| `dependencies[].type` | hosting.web.module.DependencyTypeEnum |  | Type — one of `mysql` |
| `dependencies[].user` | string |  | The user to use to connect to this dependency |
| `id` | integer | read-only | Installation ID |
| `language` | hosting.web.module.LanguageEnum | read-only | The language of the module — one of `cz`, `de`, `en`, `es`, `fi`, `fr`, `it`, `lt`, `nl`, `pl`, `pt` |
| `lastUpdate` | string (date-time) | read-only | Date of the last module's upgrade |
| `moduleId` | integer | read-only | ID of the module associated with this installation |
| `path` | string | read-only | Where the module is installed, relative to your home directory |
| `status` | hosting.web.module.StatusEnum | read-only | The module status — one of `created`, `creating`, `deleting`, `updating` |
| `targetUrl` | string | read-only | The URL from where your module can be reached |
| `taskId` | integer | read-only | The task ID working on this module |

```json
{
  "adminFolder": "string",
  "adminName": "string",
  "creationDate": "2024-01-01T12:00:00Z",
  "dependencies": [
    {
      "name": "string",
      "password": "string",
      "port": 0,
      "prefix": "string",
      "server": "string",
      "type": "mysql",
      "user": "string"
    }
  ],
  "id": 0,
  "language": "cz",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "moduleId": 0,
  "path": "string",
  "status": "created",
  "targetUrl": "string",
  "taskId": 0
}
```

### Example

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

print_r($result);
?>
```

## Install a module

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

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

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

Install a module. Installs a module from the available modules in a folder of the hosting, with its admin account and dependencies, and returns the task. The admin password needs at least 8 characters.

### 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 |
| --- | --- | --- | --- |
| `adminName` | string |  | The login for the admin account (may be a standard string or your email) |
| `adminPassword` | string (password) |  | The password for the admin account (at least 8 characters) |
| `dependencies` | hosting.web.module.DependencyType[] |  | The dependencies that we have to configure on your module. A dependency can be a standard database (like MySQL or PostgreSQL) or a key-value store (like Redis or Memcached) for example |
| `dependencies[].name` | string |  | The name of this dependency |
| `dependencies[].password` | string (password) |  | The password associated with the user |
| `dependencies[].port` | integer |  | The port on where to contact this dependency |
| `dependencies[].prefix` | string |  | The prefix to set to the data to distinguish between the data from the module and the rest |
| `dependencies[].server` | string |  | The server on where your dependency is hosted |
| `dependencies[].type` | hosting.web.module.DependencyTypeEnum |  | Type — one of `mysql` |
| `dependencies[].user` | string |  | The user to use to connect to this dependency |
| `domain` | string |  | On which domain the module has to be available (it can be a multidomain or a subdomain) - if not set, the module will be available on your serviceName domain |
| `language` | hosting.web.module.LanguageEnum |  | The language to set to your module — one of `cz`, `de`, `en`, `es`, `fi`, `fr`, `it`, `lt`, `nl`, `pl`, `pt` |
| `moduleId` | integer | yes | ID of the module you want to install |
| `path` | string |  | Where to install the module, relative to your home directory |

```json
{
  "adminName": "string",
  "adminPassword": "string",
  "dependencies": [
    {
      "name": "string",
      "password": "string",
      "port": 0,
      "prefix": "string",
      "server": "string",
      "type": "mysql",
      "user": "string"
    }
  ],
  "domain": "string",
  "language": "cz",
  "moduleId": 0,
  "path": "string"
}
```

### 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}/module" \
  -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: string
result = client.post("/hosting/web/{serviceName}/module",
	adminName = None, # The login for the admin account (may be a standard string or your email) (type: string, nullable)
	adminPassword = None, # The password for the admin account (at least 8 characters) (type: password, nullable)
	dependencies = None, # The dependencies that we have to configure on your module. A dependency can be a standard database (like MySQL or PostgreSQL) or a key-value store (like Redis or Memcached) for example (type: hosting.web.module.DependencyType[], nullable)
	domain = None, # On which domain the module has to be available (it can be a multidomain or a subdomain) - if not set, the module will be available on your serviceName domain (type: string, nullable)
	language = None, # The language to set to your module (type: hosting.web.module.LanguageEnum, nullable)
	moduleId = None, # ID of the module you want to install (type: long)
	path = None, # Where to install the module, relative to your home directory (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: string
$result = $ovh->post("/hosting/web/{serviceName}/module", array(
	adminName => null, // The login for the admin account (may be a standard string or your email) (type: string, nullable)
	adminPassword => null, // The password for the admin account (at least 8 characters) (type: password, nullable)
	dependencies => null, // The dependencies that we have to configure on your module. A dependency can be a standard database (like MySQL or PostgreSQL) or a key-value store (like Redis or Memcached) for example (type: hosting.web.module.DependencyType[], nullable)
	domain => null, // On which domain the module has to be available (it can be a multidomain or a subdomain) - if not set, the module will be available on your serviceName domain (type: string, nullable)
	language => null, // The language to set to your module (type: hosting.web.module.LanguageEnum, nullable)
	moduleId => null, // ID of the module you want to install (type: long)
	path => null, // Where to install the module, relative to your home directory (type: string, nullable)
));

print_r($result);
?>
```

## Delete an installed module

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

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

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

Delete an installed module. Deletes the module installation and returns the task. Use the installation ID, not the module ID.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Installation 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}/module/{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}/module/{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}/module/{id}");

print_r($result);
?>
```
