# Web Cloud › Web Cloud DB › Databases › Dumps, import and restore 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-cloud-db/databases/dumps-import-and-restore/

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

## Operations

- `GET /hosting/privateDatabase/{serviceName}/database/{databaseName}/dump` — List database dumps
- `POST /hosting/privateDatabase/{serviceName}/database/{databaseName}/dump` — Create a database dump
- `GET /hosting/privateDatabase/{serviceName}/database/{databaseName}/dump/{id}` — Get a database dump
- `DELETE /hosting/privateDatabase/{serviceName}/database/{databaseName}/dump/{id}` — Delete a database dump
- `POST /hosting/privateDatabase/{serviceName}/database/{databaseName}/dump/{id}/restore` — Restore a dump
- `POST /hosting/privateDatabase/{serviceName}/database/{databaseName}/import` — Import a dump

## List database dumps

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

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-cloud-db/databases/dumps-import-and-restore/#get-hosting-privatedatabase-servicename-database-databasename-dump

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

Returns the IDs of the dumps of the database. To include dumps of deleted databases, list the dumps of the service.

### Parameters

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

### Responses

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

```json
[
  0
]
```

### Example

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

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

print_r($result);
?>
```

## Create a database dump

`POST /1.0/hosting/privateDatabase/{serviceName}/database/{databaseName}/dump`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-cloud-db/databases/dumps-import-and-restore/#post-hosting-privatedatabase-servicename-database-databasename-dump

**Status:** Stable production version  
**IAM actions:** `webCloudDatabases:apiovh:database/dump/create`

Creates a dump of the database and returns a task to follow it. The download link is valid for 30 days and is sent by email only when requested.

### Parameters

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

### Request body (required)

Type: `hosting.privateDatabase.Database.CreateDump`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `sendEmail` | boolean |  | Whether to receive an email when the import is complete (default to false) |

```json
{
  "sendEmail": true
}
```

### 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}/dump" \
  -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.privateDatabase.Database.CreateDump
result = client.post("/hosting/privateDatabase/{serviceName}/database/{databaseName}/dump",
	sendEmail = None, # Whether to receive an email when the import is complete (default to false) (type: boolean)
)

# 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.privateDatabase.Database.CreateDump
$result = $ovh->post("/hosting/privateDatabase/{serviceName}/database/{databaseName}/dump", array(
	sendEmail => null, // Whether to receive an email when the import is complete (default to false) (type: boolean)
));

print_r($result);
?>
```

## Get a database dump

`GET /1.0/hosting/privateDatabase/{serviceName}/database/{databaseName}/dump/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-cloud-db/databases/dumps-import-and-restore/#get-hosting-privatedatabase-servicename-database-databasename-dump-id

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

Returns the creation date, automatic deletion date and download URL of the dump.

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.privateDatabase.Database.Dump | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creationDate` | string (date-time) | read-only | Creation date of the dump |
| `databaseName` | string | read-only | Dump of this database name |
| `deletionDate` | string (date-time) | read-only | Automatic deletion date of the dump |
| `id` | integer | read-only | Dump id |
| `url` | string | read-only | Dump URL access |

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

### Example

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

print_r($result);
?>
```

## Delete a database dump

`DELETE /1.0/hosting/privateDatabase/{serviceName}/database/{databaseName}/dump/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-cloud-db/databases/dumps-import-and-restore/#delete-hosting-privatedatabase-servicename-database-databasename-dump-id

**Status:** Stable production version  
**IAM actions:** `webCloudDatabases:apiovh:database/dump/delete`

Deletes the dump before its automatic deletion date.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `databaseName` | path | string | yes | Database name |
| `id` | path | integer | yes | Id |
| `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 DELETE \
  "https://api.eu.ovhcloud.com/1.0/hosting/privateDatabase/{serviceName}/database/{databaseName}/dump/{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/privateDatabase/{serviceName}/database/{databaseName}/dump/{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/privateDatabase/{serviceName}/database/{databaseName}/dump/{id}");

print_r($result);
?>
```

## Restore a dump

`POST /1.0/hosting/privateDatabase/{serviceName}/database/{databaseName}/dump/{id}/restore`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-cloud-db/databases/dumps-import-and-restore/#post-hosting-privatedatabase-servicename-database-databasename-dump-id-restore

**Status:** Stable production version  
**IAM actions:** `webCloudDatabases:apiovh:database/dump/restore`

Restores the dump into the database it was taken from. By default, the database is flushed before the restore.

### Parameters

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

### Request body (required)

Type: `hosting.privateDatabase.Database.DumpRestorePayload`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `flushDatabase` | boolean |  | Whether to flush the database before restoring the dump (default to true) |

```json
{
  "flushDatabase": true
}
```

### 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}/dump/{id}/restore" \
  -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.privateDatabase.Database.DumpRestorePayload
result = client.post("/hosting/privateDatabase/{serviceName}/database/{databaseName}/dump/{id}/restore",
	flushDatabase = None, # Whether to flush the database before restoring the dump (default to true) (type: boolean)
)

# 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.privateDatabase.Database.DumpRestorePayload
$result = $ovh->post("/hosting/privateDatabase/{serviceName}/database/{databaseName}/dump/{id}/restore", array(
	flushDatabase => null, // Whether to flush the database before restoring the dump (default to true) (type: boolean)
));

print_r($result);
?>
```

## Import a dump

`POST /1.0/hosting/privateDatabase/{serviceName}/database/{databaseName}/import`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-cloud-db/databases/dumps-import-and-restore/#post-hosting-privatedatabase-servicename-database-databasename-import

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

Imports a dump file stored in /me/document into the database. The database is not flushed before the import unless requested.

### Parameters

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

### Request body (required)

Type: `hosting.privateDatabase.Database.ImportPayload`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `documentId` | string | yes | Documents ID of the dump from /me/documents |
| `flushDatabase` | boolean |  | Whether to flush the database before importing the dump (default to false) |
| `sendEmail` | boolean |  | Whether to receive an email when the import is complete (default to false) |

```json
{
  "documentId": "string",
  "flushDatabase": true,
  "sendEmail": true
}
```

### 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}/import" \
  -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.privateDatabase.Database.ImportPayload
result = client.post("/hosting/privateDatabase/{serviceName}/database/{databaseName}/import",
	documentId = None, # Documents ID of the dump from /me/documents (type: string)
	flushDatabase = None, # Whether to flush the database before importing the dump (default to false) (type: boolean)
	sendEmail = None, # Whether to receive an email when the import is complete (default to false) (type: boolean)
)

# 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.privateDatabase.Database.ImportPayload
$result = $ovh->post("/hosting/privateDatabase/{serviceName}/database/{databaseName}/import", array(
	documentId => null, // Documents ID of the dump from /me/documents (type: string)
	flushDatabase => null, // Whether to flush the database before importing the dump (default to false) (type: boolean)
	sendEmail => null, // Whether to receive an email when the import is complete (default to false) (type: boolean)
));

print_r($result);
?>
```
