# Web Cloud › Web Cloud DB › Databases › Extensions 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

> 4 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-cloud-db/databases/extensions/

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

## Operations

- `GET /hosting/privateDatabase/{serviceName}/database/{databaseName}/extension` — List database extensions
- `GET /hosting/privateDatabase/{serviceName}/database/{databaseName}/extension/{extensionName}` — Get a database extension
- `POST /hosting/privateDatabase/{serviceName}/database/{databaseName}/extension/{extensionName}/disable` — Disable an extension
- `POST /hosting/privateDatabase/{serviceName}/database/{databaseName}/extension/{extensionName}/enable` — Enable an extension

## List database extensions

`GET /1.0/hosting/privateDatabase/{serviceName}/database/{databaseName}/extension`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-cloud-db/databases/extensions/#get-hosting-privatedatabase-servicename-database-databasename-extension

**Status:** Stable production version  
**IAM actions:** `webCloudDatabases:apiovh:database/extension/get`

Returns the names of the extensions available for the database.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `databaseName` | path | string | yes | Database name |
| `extensionName` | query | string |  | Filter results on extension name (like) |
| `serviceName` | path | string | yes | Service name |
| `status` | query | hosting.privateDatabase.extension.StatusEnum |  | Filter results on status (=) — one of `disabled`, `disabling`, `enabled`, `enabling` |

### Responses

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

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

### Example

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

# 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/privateDatabase/{serviceName}/database/{databaseName}/extension");

print_r($result);
?>
```

## Get a database extension

`GET /1.0/hosting/privateDatabase/{serviceName}/database/{databaseName}/extension/{extensionName}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-cloud-db/databases/extensions/#get-hosting-privatedatabase-servicename-database-databasename-extension-extensionname

**Status:** Stable production version  
**IAM actions:** `webCloudDatabases:apiovh:database/extension/get`

Returns the status and description of the extension, and the extensions it requires.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `databaseName` | path | string | yes | Database name |
| `extensionName` | path | string | yes | Extension name |
| `serviceName` | path | string | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.privateDatabase.Extension | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `description` | string | read-only | Extension details |
| `extensionName` | string | read-only | Extension name |
| `requiredExtensions` | string[] | read-only | Required extensions |
| `status` | hosting.privateDatabase.extension.StatusEnum | read-only | Extension status — one of `disabled`, `disabling`, `enabled`, `enabling` |

```json
{
  "description": "string",
  "extensionName": "string",
  "requiredExtensions": [
    "string"
  ],
  "status": "disabled"
}
```

### Example

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

# 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/privateDatabase/{serviceName}/database/{databaseName}/extension/{extensionName}");

print_r($result);
?>
```

## Disable an extension

`POST /1.0/hosting/privateDatabase/{serviceName}/database/{databaseName}/extension/{extensionName}/disable`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-cloud-db/databases/extensions/#post-hosting-privatedatabase-servicename-database-databasename-extension-extensionname-disable

**Status:** Stable production version  
**IAM actions:** `webCloudDatabases:apiovh:database/extension/disable`

Disables the extension on the database. Returns a task to follow the change.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `databaseName` | path | string | yes | Database name |
| `extensionName` | path | string | yes | Extension name |
| `serviceName` | path | string | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.privateDatabase.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `databaseName` | string | read-only | Database name on which the task is working |
| `doneDate` | string (date-time) | read-only | Completion date |
| `dumpId` | integer | read-only | DumpId on which the task is working |
| `function` | hosting.privateDatabase.task.FunctionEnum | read-only | Function name — one of `abuse`, `changeFtpPassword`, `changeRam`, `changeVersion`, `configuration/update`, `create`, `database/copy`, `database/copyRestore`, `database/create`, `database/delete`, `database/dump`, `database/dump/delete`, … |
| `id` | integer | read-only | The id of the task |
| `lastUpdate` | string (date-time) | read-only | Last update |
| `startDate` | string (date-time) | read-only | Task creation date |
| `status` | hosting.privateDatabase.task.StatusEnum | read-only | Task status — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `userName` | string | read-only | User name on which the task is working |

```json
{
  "databaseName": "string",
  "doneDate": "2024-01-01T12:00:00Z",
  "dumpId": 0,
  "function": "abuse",
  "id": 0,
  "lastUpdate": "2024-01-01T12:00:00Z",
  "startDate": "2024-01-01T12:00:00Z",
  "status": "cancelled",
  "userName": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/hosting/privateDatabase/{serviceName}/database/{databaseName}/extension/{extensionName}/disable" \
  -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/privateDatabase/{serviceName}/database/{databaseName}/extension/{extensionName}/disable")

# 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/privateDatabase/{serviceName}/database/{databaseName}/extension/{extensionName}/disable");

print_r($result);
?>
```

## Enable an extension

`POST /1.0/hosting/privateDatabase/{serviceName}/database/{databaseName}/extension/{extensionName}/enable`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-cloud-db/databases/extensions/#post-hosting-privatedatabase-servicename-database-databasename-extension-extensionname-enable

**Status:** Stable production version  
**IAM actions:** `webCloudDatabases:apiovh:database/extension/enable`

Enables the extension on the database. The extensions it requires are not enabled automatically: enable them first.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `databaseName` | path | string | yes | Database name |
| `extensionName` | path | string | yes | Extension name |
| `serviceName` | path | string | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.privateDatabase.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `databaseName` | string | read-only | Database name on which the task is working |
| `doneDate` | string (date-time) | read-only | Completion date |
| `dumpId` | integer | read-only | DumpId on which the task is working |
| `function` | hosting.privateDatabase.task.FunctionEnum | read-only | Function name — one of `abuse`, `changeFtpPassword`, `changeRam`, `changeVersion`, `configuration/update`, `create`, `database/copy`, `database/copyRestore`, `database/create`, `database/delete`, `database/dump`, `database/dump/delete`, … |
| `id` | integer | read-only | The id of the task |
| `lastUpdate` | string (date-time) | read-only | Last update |
| `startDate` | string (date-time) | read-only | Task creation date |
| `status` | hosting.privateDatabase.task.StatusEnum | read-only | Task status — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `userName` | string | read-only | User name on which the task is working |

```json
{
  "databaseName": "string",
  "doneDate": "2024-01-01T12:00:00Z",
  "dumpId": 0,
  "function": "abuse",
  "id": 0,
  "lastUpdate": "2024-01-01T12:00:00Z",
  "startDate": "2024-01-01T12:00:00Z",
  "status": "cancelled",
  "userName": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/hosting/privateDatabase/{serviceName}/database/{databaseName}/extension/{extensionName}/enable" \
  -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/privateDatabase/{serviceName}/database/{databaseName}/extension/{extensionName}/enable")

# 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/privateDatabase/{serviceName}/database/{databaseName}/extension/{extensionName}/enable");

print_r($result);
?>
```
