# Web Cloud › Managed WordPress › My sites 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

> 12 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/managed-wordpress/my-sites/

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

## Operations

- `GET /managedCMS/resource/{serviceId}/website` — List websites
- `GET /managedCMS/resource/{serviceId}/website/{websiteId}` — Get a website
- `POST /managedCMS/resource/{serviceId}/website` — Create a website
- `POST /managedCMS/resource/{serviceId}/website/{websiteId}/flushCDN` — Flush the website CDN
- `POST /managedCMS/resource/{serviceId}/website/{websiteId}/resetDatabasePassword` — Reset the database password
- `POST /managedCMS/resource/{serviceId}/website/{websiteId}/resetPhpMyAdminPassword` — Reset the PhpMyAdmin password
- `POST /managedCMS/resource/{serviceId}/website/{websiteId}/resetSftpPassword` — Reset the SFTP password
- `POST /managedCMS/resource/{serviceId}/website/{websiteId}/snapshot` — Export a website backup
- `GET /managedCMS/resource/{serviceId}/website/{websiteId}/backupDownload` — Get the download links of a backup of a website
- `DELETE /managedCMS/resource/{serviceId}/website/{websiteId}` — Delete a website
- `PUT /managedCMS/resource/{serviceId}/website/{websiteId}` — Update a website
- `POST /managedCMS/resource/{serviceId}/website/{websiteId}/applicationPassword` — Create an application password on the website

## List websites

`GET /v2/managedCMS/resource/{serviceId}/website`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/managed-wordpress/my-sites/#get-managedcms-resource-serviceid-website

**Status:** Alpha version  
**IAM actions:** `managedCMS:apiovh:website/get`

Returns the websites of the service.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Pagination-Cursor` | header | string |  | Pagination cursor |
| `X-Pagination-Size` | header | integer |  | Pagination size |
| `serviceId` | path | string (uuid) | yes | Service ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | managedCMS.Website[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Computed hash used to control concurrent modification requests |
| `currentState` | managedCMS.WebsiteCurrentState | read-only | Current state of the website |
| `currentState.backups` | managedCMS.WebsiteCurrentStateBackup[] | read-only | Backups of the website, automatic and manual, being created or available, most recent first. Expired backups and backups being deleted are not listed. Download links are returned by the backupDownload route of the website. Null while the website is being created. |
| `currentState.backups[].expiresAt` | string (date-time) | read-only | Date after which the backup is deleted, null while the backup is being created |
| `currentState.backups[].id` | string (uuid) | read-only | Unique identifier of the backup |
| `currentState.backups[].sizeBytes` | integer | read-only | Size of the backup, in bytes, null while the backup is being created |
| `currentState.backups[].startedAt` | string (date-time) | read-only | Date the backup was triggered at |
| `currentState.backups[].status` | managedCMS.BackupStatusEnum | read-only | Status of the backup — one of `CREATING`, `READY` |
| `currentState.backups[].type` | managedCMS.BackupTypeEnum | read-only | Whether the backup was taken automatically or requested by the customer — one of `AUTOMATIC`, `MANUAL` |
| `currentState.cms` | managedCMS.CMSEnum | read-only | Content management system of the website — one of `WORDPRESS` |
| `currentState.cmsVersion` | string | read-only | CMS version used by the website |
| `currentState.createdAt` | string (date-time) | read-only | Date of creation of the website |
| `currentState.databaseHost` | string | read-only | Database hostname to connect to the website's database |
| `currentState.databasePort` | integer | read-only | Database port to connect to the website's database |
| `currentState.defaultFQDN` | string | read-only | Default technical FQDN of the website |
| `currentState.diskUsageBytes` | integer | read-only | Current disk usage of the website in bytes |
| `currentState.domains` | managedCMS.Domain[] | read-only | Domains currently attached to the website, including the ones being detached |
| `currentState.domains[].fqdn` | string |  | Fully Qualified Domain Name of the domain |
| `currentState.import` | managedCMS.WebsiteCurrentStateImport | read-only | Information about the current website import, if exists |
| `currentState.import.checkResult` | managedCMS.WebsiteImportCheckResult | read-only | Result of the import check |
| `currentState.phpMyAdminURL` | string | read-only | PhpMyAdmin URL to manage the website's database |
| `currentState.phpMyAdminUsername` | string | read-only | PhpMyAdmin login used to manage the website's database |
| `currentState.phpVersion` | string | read-only | PHP version used by the website |
| `currentState.plannedUpdate` | managedCMS.UpdateCurrentState | read-only | Current state of the planned update on the website, if any |
| `currentState.plannedUpdate.cmsVersion` | string | read-only | Target CMS version of the update |
| `currentState.plannedUpdate.dryRun` | managedCMS.UpdateCurrentStateDryRun | read-only | Current State of the dry run |
| `currentState.plannedUpdate.plannedAt` | string (date-time) | read-only | Planned date for the version update |
| `currentState.plannedUpdate.runtimeVersion` | string | read-only | Target runtime version of the update |
| `currentState.plannedUpdate.status` | managedCMS.UpdateStatusEnum | read-only | Status of the update — one of `TEST_DOING`, `TEST_DONE`, `TEST_FAILED`, `TEST_IMPOSSIBLE`, `UPDATE_DOING`, `UPDATE_DONE` |
| `currentState.primaryFQDN` | string | read-only | Primary FQDN of the website |
| `currentState.serviceId` | string (uuid) | read-only | Unique identifier of the service the website belongs to |
| `currentState.sftpHost` | string | read-only | SFTP hostname to connect to the website's files |
| `currentState.sftpPort` | integer | read-only | SFTP port to connect to the website's files |
| `currentState.sftpUsername` | string | read-only | SFTP login used to connect to the website's files |
| `currentTasks` | common.CurrentTask[] | read-only | Ongoing asynchronous tasks related to the website |
| `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 |
| `id` | string (uuid) | read-only | Unique identifier of the website |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Website readiness in the system — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | managedCMS.WebsiteTargetSpec | read-only | Target specification of the website |
| `targetSpec.clone` | managedCMS.WebsiteTargetSpecClone | read-only | Target specification of the clone this website originates from, if any |
| `targetSpec.clone.sourceWebsiteId` | string (uuid) | read-only | Identifier of the website this one was cloned from |
| `targetSpec.creation` | managedCMS.WebsiteTargetSpecCreation | read-only | Target specification of the current website creation, if exists |
| `targetSpec.creation.adminLogin` | string | read-only | Login to set when creating the administrator user |
| `targetSpec.creation.cms` | managedCMS.CMSEnum | read-only | Which content management system to install — one of `WORDPRESS` |
| `targetSpec.creation.cmsSpecific` | managedCMS.CMSSpecific.WebsiteTargetSpecCreation | read-only | Parameters specific to the chosen content management system |
| `targetSpec.creation.phpVersion` | string | read-only | Which PHP version to use, latest by default. The set grows as new PHP releases are supported: retrieve the current one with GET /managedCMS/reference/supportedPHPVersions. |
| `targetSpec.domains` | managedCMS.Domain[] | read-only | Domains targeted for the website: the ones already attached plus the ones being attached, excluding the ones being detached |
| `targetSpec.domains[].fqdn` | string |  | Fully Qualified Domain Name of the domain |
| `targetSpec.import` | managedCMS.WebsiteTargetSpecImport | read-only | Target specification of the current website import, if exists |
| `targetSpec.import.adminLogin` | string | read-only | Login of the source website's admin interface |
| `targetSpec.import.adminURL` | string | read-only | URL of the source website's admin interface' |
| `targetSpec.import.cms` | managedCMS.CMSEnum | read-only | Content management system of the source website — one of `WORDPRESS` |
| `targetSpec.import.cmsSpecific` | managedCMS.CMSSpecific.WebsiteTargetSpecImport | read-only | Data specific to the website's content management system |
| `targetSpec.plannedUpdate` | managedCMS.UpdateTargetSpec | read-only | Current state of the planned update on the website, if any |
| `targetSpec.plannedUpdate.cmsVersion` | string |  | Target CMS version of the update |
| `targetSpec.plannedUpdate.dryRun` | managedCMS.UpdateTargetSpecDryRun |  | Target specification of the dry run |
| `targetSpec.plannedUpdate.plannedAt` | string (date-time) |  | Planned date for the version update |
| `targetSpec.plannedUpdate.runtimeVersion` | string |  | Target runtime version of the update |
| `targetSpec.restoreBackup` | managedCMS.WebsiteTargetSpecRestoreBackup | read-only | Backup being restored on the website, if any |
| `targetSpec.restoreBackup.backupId` | string (uuid) | read-only | Identifier of the backup being restored on the website |

```json
[
  {
    "checksum": "string",
    "currentState": {
      "backups": [
        {
          "expiresAt": "2024-01-01T12:00:00Z",
          "id": "00000000-0000-0000-0000-000000000000",
          "sizeBytes": 0,
          "startedAt": "2024-01-01T12:00:00Z",
          "status": "CREATING",
          "type": "AUTOMATIC"
        }
      ],
      "cms": "WORDPRESS",
      "cmsVersion": "string",
      "createdAt": "2024-01-01T12:00:00Z",
      "databaseHost": "string",
      "databasePort": 0,
      "defaultFQDN": "string",
      "diskUsageBytes": 0,
      "domains": [
        {
          "fqdn": "string"
        }
      ],
      "import": {
        "checkResult": {
          "cmsSpecific": {
            "wordpress": {
              "plugins": null,
              "themes": null
            }
          }
        }
      },
      "phpMyAdminURL": "string",
      "phpMyAdminUsername": "string",
      "phpVersion": "string",
      "plannedUpdate": {
        "cmsVersion": "string",
        "dryRun": {
          "date": "2024-01-01T12:00:00Z",
          "result": "string",
          "url": "string"
        },
        "plannedAt": "2024-01-01T12:00:00Z",
        "runtimeVersion": "string",
        "status": "TEST_DOING"
      },
      "primaryFQDN": "string",
      "serviceId": "00000000-0000-0000-0000-000000000000",
      "sftpHost": "string",
      "sftpPort": 0,
      "sftpUsername": "string"
    },
    "currentTasks": [
      {
        "errors": [
          {
            "message": "string"
          }
        ],
        "id": "00000000-0000-0000-0000-000000000000",
  …
```

### Example

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

# 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/managedCMS/resource/{serviceId}/website");

print_r($result);
?>
```

## Get a website

`GET /v2/managedCMS/resource/{serviceId}/website/{websiteId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/managed-wordpress/my-sites/#get-managedcms-resource-serviceid-website-websiteid

**Status:** Alpha version  
**IAM actions:** `managedCMS:apiovh:website/get`

Returns the CMS and PHP versions, domains, SFTP and database access, disk usage and planned update of the website.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceId` | path | string (uuid) | yes | Service ID |
| `websiteId` | path | string (uuid) | yes | Website ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | managedCMS.Website | successful operation |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Computed hash used to control concurrent modification requests |
| `currentState` | managedCMS.WebsiteCurrentState | read-only | Current state of the website |
| `currentState.backups` | managedCMS.WebsiteCurrentStateBackup[] | read-only | Backups of the website, automatic and manual, being created or available, most recent first. Expired backups and backups being deleted are not listed. Download links are returned by the backupDownload route of the website. Null while the website is being created. |
| `currentState.backups[].expiresAt` | string (date-time) | read-only | Date after which the backup is deleted, null while the backup is being created |
| `currentState.backups[].id` | string (uuid) | read-only | Unique identifier of the backup |
| `currentState.backups[].sizeBytes` | integer | read-only | Size of the backup, in bytes, null while the backup is being created |
| `currentState.backups[].startedAt` | string (date-time) | read-only | Date the backup was triggered at |
| `currentState.backups[].status` | managedCMS.BackupStatusEnum | read-only | Status of the backup — one of `CREATING`, `READY` |
| `currentState.backups[].type` | managedCMS.BackupTypeEnum | read-only | Whether the backup was taken automatically or requested by the customer — one of `AUTOMATIC`, `MANUAL` |
| `currentState.cms` | managedCMS.CMSEnum | read-only | Content management system of the website — one of `WORDPRESS` |
| `currentState.cmsVersion` | string | read-only | CMS version used by the website |
| `currentState.createdAt` | string (date-time) | read-only | Date of creation of the website |
| `currentState.databaseHost` | string | read-only | Database hostname to connect to the website's database |
| `currentState.databasePort` | integer | read-only | Database port to connect to the website's database |
| `currentState.defaultFQDN` | string | read-only | Default technical FQDN of the website |
| `currentState.diskUsageBytes` | integer | read-only | Current disk usage of the website in bytes |
| `currentState.domains` | managedCMS.Domain[] | read-only | Domains currently attached to the website, including the ones being detached |
| `currentState.domains[].fqdn` | string |  | Fully Qualified Domain Name of the domain |
| `currentState.import` | managedCMS.WebsiteCurrentStateImport | read-only | Information about the current website import, if exists |
| `currentState.import.checkResult` | managedCMS.WebsiteImportCheckResult | read-only | Result of the import check |
| `currentState.phpMyAdminURL` | string | read-only | PhpMyAdmin URL to manage the website's database |
| `currentState.phpMyAdminUsername` | string | read-only | PhpMyAdmin login used to manage the website's database |
| `currentState.phpVersion` | string | read-only | PHP version used by the website |
| `currentState.plannedUpdate` | managedCMS.UpdateCurrentState | read-only | Current state of the planned update on the website, if any |
| `currentState.plannedUpdate.cmsVersion` | string | read-only | Target CMS version of the update |
| `currentState.plannedUpdate.dryRun` | managedCMS.UpdateCurrentStateDryRun | read-only | Current State of the dry run |
| `currentState.plannedUpdate.plannedAt` | string (date-time) | read-only | Planned date for the version update |
| `currentState.plannedUpdate.runtimeVersion` | string | read-only | Target runtime version of the update |
| `currentState.plannedUpdate.status` | managedCMS.UpdateStatusEnum | read-only | Status of the update — one of `TEST_DOING`, `TEST_DONE`, `TEST_FAILED`, `TEST_IMPOSSIBLE`, `UPDATE_DOING`, `UPDATE_DONE` |
| `currentState.primaryFQDN` | string | read-only | Primary FQDN of the website |
| `currentState.serviceId` | string (uuid) | read-only | Unique identifier of the service the website belongs to |
| `currentState.sftpHost` | string | read-only | SFTP hostname to connect to the website's files |
| `currentState.sftpPort` | integer | read-only | SFTP port to connect to the website's files |
| `currentState.sftpUsername` | string | read-only | SFTP login used to connect to the website's files |
| `currentTasks` | common.CurrentTask[] | read-only | Ongoing asynchronous tasks related to the website |
| `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 |
| `id` | string (uuid) | read-only | Unique identifier of the website |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Website readiness in the system — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | managedCMS.WebsiteTargetSpec | read-only | Target specification of the website |
| `targetSpec.clone` | managedCMS.WebsiteTargetSpecClone | read-only | Target specification of the clone this website originates from, if any |
| `targetSpec.clone.sourceWebsiteId` | string (uuid) | read-only | Identifier of the website this one was cloned from |
| `targetSpec.creation` | managedCMS.WebsiteTargetSpecCreation | read-only | Target specification of the current website creation, if exists |
| `targetSpec.creation.adminLogin` | string | read-only | Login to set when creating the administrator user |
| `targetSpec.creation.cms` | managedCMS.CMSEnum | read-only | Which content management system to install — one of `WORDPRESS` |
| `targetSpec.creation.cmsSpecific` | managedCMS.CMSSpecific.WebsiteTargetSpecCreation | read-only | Parameters specific to the chosen content management system |
| `targetSpec.creation.phpVersion` | string | read-only | Which PHP version to use, latest by default. The set grows as new PHP releases are supported: retrieve the current one with GET /managedCMS/reference/supportedPHPVersions. |
| `targetSpec.domains` | managedCMS.Domain[] | read-only | Domains targeted for the website: the ones already attached plus the ones being attached, excluding the ones being detached |
| `targetSpec.domains[].fqdn` | string |  | Fully Qualified Domain Name of the domain |
| `targetSpec.import` | managedCMS.WebsiteTargetSpecImport | read-only | Target specification of the current website import, if exists |
| `targetSpec.import.adminLogin` | string | read-only | Login of the source website's admin interface |
| `targetSpec.import.adminURL` | string | read-only | URL of the source website's admin interface' |
| `targetSpec.import.cms` | managedCMS.CMSEnum | read-only | Content management system of the source website — one of `WORDPRESS` |
| `targetSpec.import.cmsSpecific` | managedCMS.CMSSpecific.WebsiteTargetSpecImport | read-only | Data specific to the website's content management system |
| `targetSpec.plannedUpdate` | managedCMS.UpdateTargetSpec | read-only | Current state of the planned update on the website, if any |
| `targetSpec.plannedUpdate.cmsVersion` | string |  | Target CMS version of the update |
| `targetSpec.plannedUpdate.dryRun` | managedCMS.UpdateTargetSpecDryRun |  | Target specification of the dry run |
| `targetSpec.plannedUpdate.plannedAt` | string (date-time) |  | Planned date for the version update |
| `targetSpec.plannedUpdate.runtimeVersion` | string |  | Target runtime version of the update |
| `targetSpec.restoreBackup` | managedCMS.WebsiteTargetSpecRestoreBackup | read-only | Backup being restored on the website, if any |
| `targetSpec.restoreBackup.backupId` | string (uuid) | read-only | Identifier of the backup being restored on the website |

```json
{
  "checksum": "string",
  "currentState": {
    "backups": [
      {
        "expiresAt": "2024-01-01T12:00:00Z",
        "id": "00000000-0000-0000-0000-000000000000",
        "sizeBytes": 0,
        "startedAt": "2024-01-01T12:00:00Z",
        "status": "CREATING",
        "type": "AUTOMATIC"
      }
    ],
    "cms": "WORDPRESS",
    "cmsVersion": "string",
    "createdAt": "2024-01-01T12:00:00Z",
    "databaseHost": "string",
    "databasePort": 0,
    "defaultFQDN": "string",
    "diskUsageBytes": 0,
    "domains": [
      {
        "fqdn": "string"
      }
    ],
    "import": {
      "checkResult": {
        "cmsSpecific": {
          "wordpress": {
            "plugins": [
              null
            ],
            "themes": [
              null
            ]
          }
        }
      }
    },
    "phpMyAdminURL": "string",
    "phpMyAdminUsername": "string",
    "phpVersion": "string",
    "plannedUpdate": {
      "cmsVersion": "string",
      "dryRun": {
        "date": "2024-01-01T12:00:00Z",
        "result": "string",
        "url": "string"
      },
      "plannedAt": "2024-01-01T12:00:00Z",
      "runtimeVersion": "string",
      "status": "TEST_DOING"
    },
    "primaryFQDN": "string",
    "serviceId": "00000000-0000-0000-0000-000000000000",
    "sftpHost": "string",
    "sftpPort": 0,
    "sftpUsername": "string"
  },
  "currentTasks": [
    {
      "errors": [
        {
          "message": "string"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "link": "string",
      "status": "ERROR",
      "type": "string"
    }
  …
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/managedCMS/resource/{serviceId}/website/{websiteId}" \
  -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/managedCMS/resource/{serviceId}/website/{websiteId}")

# 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/managedCMS/resource/{serviceId}/website/{websiteId}");

print_r($result);
?>
```

## Create a website

`POST /v2/managedCMS/resource/{serviceId}/website`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/managed-wordpress/my-sites/#post-managedcms-resource-serviceid-website

**Status:** Alpha version  
**IAM actions:** `managedCMS:apiovh:website/create`

Creates a WordPress website, imports one from its admin URL and credentials, or clones a website of the same service. The admin login of a created website must be an email address. Creation is asynchronous: follow its task in currentTasks.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceId` | path | string (uuid) | yes | Service ID |

### Request body (required)

Type: `managedCMS.WebsiteCreationBody`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `targetSpec` | managedCMS.WebsiteCreationTargetSpec | yes | Target specification of the website |
| `targetSpec.clone` | managedCMS.WebsiteCreationTargetSpecClone |  | Target specification to clone an existing website of the same service |
| `targetSpec.clone.sourceWebsiteId` | string (uuid) | yes | Identifier of the website to clone, which must belong to the same service |
| `targetSpec.creation` | managedCMS.WebsiteCreationTargetSpecCreation |  | Target specification to create a website |
| `targetSpec.creation.adminLogin` | string | yes | Login to set when creating the administrator user |
| `targetSpec.creation.adminPassword` | string (password) | yes | Password to set when creating the administrator user |
| `targetSpec.creation.cms` | managedCMS.CMSEnum | yes | Which content management system to install — one of `WORDPRESS` |
| `targetSpec.creation.cmsSpecific` | managedCMS.CMSSpecific.WebsiteCreationTargetSpecCreation |  | Parameters specific to the chosen content management system |
| `targetSpec.creation.phpVersion` | string |  | Which PHP version to use, latest by default. The set grows as new PHP releases are supported: retrieve the current one with GET /managedCMS/reference/supportedPHPVersions. |
| `targetSpec.import` | managedCMS.WebsiteCreationTargetSpecImport |  | Target specification to import a website |
| `targetSpec.import.adminLogin` | string | yes | Login of the source website's admin interface |
| `targetSpec.import.adminPassword` | string (password) | yes | Password of the source website's admin interface |
| `targetSpec.import.adminURL` | string | yes | URL of the source website's admin interface |
| `targetSpec.import.cms` | managedCMS.CMSEnum | yes | Content management system of the source website — one of `WORDPRESS` |

```json
{
  "targetSpec": {
    "clone": {
      "sourceWebsiteId": "00000000-0000-0000-0000-000000000000"
    },
    "creation": {
      "adminLogin": "string",
      "adminPassword": "string",
      "cms": "WORDPRESS",
      "cmsSpecific": {
        "wordpress": {
          "language": "de_DE"
        }
      },
      "phpVersion": "string"
    },
    "import": {
      "adminLogin": "string",
      "adminPassword": "string",
      "adminURL": "string",
      "cms": "WORDPRESS"
    }
  }
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | managedCMS.Website | successful operation |
| 400 | object | Error 400 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Computed hash used to control concurrent modification requests |
| `currentState` | managedCMS.WebsiteCurrentState | read-only | Current state of the website |
| `currentState.backups` | managedCMS.WebsiteCurrentStateBackup[] | read-only | Backups of the website, automatic and manual, being created or available, most recent first. Expired backups and backups being deleted are not listed. Download links are returned by the backupDownload route of the website. Null while the website is being created. |
| `currentState.backups[].expiresAt` | string (date-time) | read-only | Date after which the backup is deleted, null while the backup is being created |
| `currentState.backups[].id` | string (uuid) | read-only | Unique identifier of the backup |
| `currentState.backups[].sizeBytes` | integer | read-only | Size of the backup, in bytes, null while the backup is being created |
| `currentState.backups[].startedAt` | string (date-time) | read-only | Date the backup was triggered at |
| `currentState.backups[].status` | managedCMS.BackupStatusEnum | read-only | Status of the backup — one of `CREATING`, `READY` |
| `currentState.backups[].type` | managedCMS.BackupTypeEnum | read-only | Whether the backup was taken automatically or requested by the customer — one of `AUTOMATIC`, `MANUAL` |
| `currentState.cms` | managedCMS.CMSEnum | read-only | Content management system of the website — one of `WORDPRESS` |
| `currentState.cmsVersion` | string | read-only | CMS version used by the website |
| `currentState.createdAt` | string (date-time) | read-only | Date of creation of the website |
| `currentState.databaseHost` | string | read-only | Database hostname to connect to the website's database |
| `currentState.databasePort` | integer | read-only | Database port to connect to the website's database |
| `currentState.defaultFQDN` | string | read-only | Default technical FQDN of the website |
| `currentState.diskUsageBytes` | integer | read-only | Current disk usage of the website in bytes |
| `currentState.domains` | managedCMS.Domain[] | read-only | Domains currently attached to the website, including the ones being detached |
| `currentState.domains[].fqdn` | string |  | Fully Qualified Domain Name of the domain |
| `currentState.import` | managedCMS.WebsiteCurrentStateImport | read-only | Information about the current website import, if exists |
| `currentState.import.checkResult` | managedCMS.WebsiteImportCheckResult | read-only | Result of the import check |
| `currentState.phpMyAdminURL` | string | read-only | PhpMyAdmin URL to manage the website's database |
| `currentState.phpMyAdminUsername` | string | read-only | PhpMyAdmin login used to manage the website's database |
| `currentState.phpVersion` | string | read-only | PHP version used by the website |
| `currentState.plannedUpdate` | managedCMS.UpdateCurrentState | read-only | Current state of the planned update on the website, if any |
| `currentState.plannedUpdate.cmsVersion` | string | read-only | Target CMS version of the update |
| `currentState.plannedUpdate.dryRun` | managedCMS.UpdateCurrentStateDryRun | read-only | Current State of the dry run |
| `currentState.plannedUpdate.plannedAt` | string (date-time) | read-only | Planned date for the version update |
| `currentState.plannedUpdate.runtimeVersion` | string | read-only | Target runtime version of the update |
| `currentState.plannedUpdate.status` | managedCMS.UpdateStatusEnum | read-only | Status of the update — one of `TEST_DOING`, `TEST_DONE`, `TEST_FAILED`, `TEST_IMPOSSIBLE`, `UPDATE_DOING`, `UPDATE_DONE` |
| `currentState.primaryFQDN` | string | read-only | Primary FQDN of the website |
| `currentState.serviceId` | string (uuid) | read-only | Unique identifier of the service the website belongs to |
| `currentState.sftpHost` | string | read-only | SFTP hostname to connect to the website's files |
| `currentState.sftpPort` | integer | read-only | SFTP port to connect to the website's files |
| `currentState.sftpUsername` | string | read-only | SFTP login used to connect to the website's files |
| `currentTasks` | common.CurrentTask[] | read-only | Ongoing asynchronous tasks related to the website |
| `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 |
| `id` | string (uuid) | read-only | Unique identifier of the website |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Website readiness in the system — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | managedCMS.WebsiteTargetSpec | read-only | Target specification of the website |
| `targetSpec.clone` | managedCMS.WebsiteTargetSpecClone | read-only | Target specification of the clone this website originates from, if any |
| `targetSpec.clone.sourceWebsiteId` | string (uuid) | read-only | Identifier of the website this one was cloned from |
| `targetSpec.creation` | managedCMS.WebsiteTargetSpecCreation | read-only | Target specification of the current website creation, if exists |
| `targetSpec.creation.adminLogin` | string | read-only | Login to set when creating the administrator user |
| `targetSpec.creation.cms` | managedCMS.CMSEnum | read-only | Which content management system to install — one of `WORDPRESS` |
| `targetSpec.creation.cmsSpecific` | managedCMS.CMSSpecific.WebsiteTargetSpecCreation | read-only | Parameters specific to the chosen content management system |
| `targetSpec.creation.phpVersion` | string | read-only | Which PHP version to use, latest by default. The set grows as new PHP releases are supported: retrieve the current one with GET /managedCMS/reference/supportedPHPVersions. |
| `targetSpec.domains` | managedCMS.Domain[] | read-only | Domains targeted for the website: the ones already attached plus the ones being attached, excluding the ones being detached |
| `targetSpec.domains[].fqdn` | string |  | Fully Qualified Domain Name of the domain |
| `targetSpec.import` | managedCMS.WebsiteTargetSpecImport | read-only | Target specification of the current website import, if exists |
| `targetSpec.import.adminLogin` | string | read-only | Login of the source website's admin interface |
| `targetSpec.import.adminURL` | string | read-only | URL of the source website's admin interface' |
| `targetSpec.import.cms` | managedCMS.CMSEnum | read-only | Content management system of the source website — one of `WORDPRESS` |
| `targetSpec.import.cmsSpecific` | managedCMS.CMSSpecific.WebsiteTargetSpecImport | read-only | Data specific to the website's content management system |
| `targetSpec.plannedUpdate` | managedCMS.UpdateTargetSpec | read-only | Current state of the planned update on the website, if any |
| `targetSpec.plannedUpdate.cmsVersion` | string |  | Target CMS version of the update |
| `targetSpec.plannedUpdate.dryRun` | managedCMS.UpdateTargetSpecDryRun |  | Target specification of the dry run |
| `targetSpec.plannedUpdate.plannedAt` | string (date-time) |  | Planned date for the version update |
| `targetSpec.plannedUpdate.runtimeVersion` | string |  | Target runtime version of the update |
| `targetSpec.restoreBackup` | managedCMS.WebsiteTargetSpecRestoreBackup | read-only | Backup being restored on the website, if any |
| `targetSpec.restoreBackup.backupId` | string (uuid) | read-only | Identifier of the backup being restored on the website |

```json
{
  "checksum": "string",
  "currentState": {
    "backups": [
      {
        "expiresAt": "2024-01-01T12:00:00Z",
        "id": "00000000-0000-0000-0000-000000000000",
        "sizeBytes": 0,
        "startedAt": "2024-01-01T12:00:00Z",
        "status": "CREATING",
        "type": "AUTOMATIC"
      }
    ],
    "cms": "WORDPRESS",
    "cmsVersion": "string",
    "createdAt": "2024-01-01T12:00:00Z",
    "databaseHost": "string",
    "databasePort": 0,
    "defaultFQDN": "string",
    "diskUsageBytes": 0,
    "domains": [
      {
        "fqdn": "string"
      }
    ],
    "import": {
      "checkResult": {
        "cmsSpecific": {
          "wordpress": {
            "plugins": [
              null
            ],
            "themes": [
              null
            ]
          }
        }
      }
    },
    "phpMyAdminURL": "string",
    "phpMyAdminUsername": "string",
    "phpVersion": "string",
    "plannedUpdate": {
      "cmsVersion": "string",
      "dryRun": {
        "date": "2024-01-01T12:00:00Z",
        "result": "string",
        "url": "string"
      },
      "plannedAt": "2024-01-01T12:00:00Z",
      "runtimeVersion": "string",
      "status": "TEST_DOING"
    },
    "primaryFQDN": "string",
    "serviceId": "00000000-0000-0000-0000-000000000000",
    "sftpHost": "string",
    "sftpPort": 0,
    "sftpUsername": "string"
  },
  "currentTasks": [
    {
      "errors": [
        {
          "message": "string"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "link": "string",
      "status": "ERROR",
      "type": "string"
    }
  …
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/v2/managedCMS/resource/{serviceId}/website" \
  -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: managedCMS.WebsiteCreationBody
result = client.post("/v2/managedCMS/resource/{serviceId}/website",
	targetSpec = None, # Target specification of the website (type: managedCMS.WebsiteCreationTargetSpec)
)

# 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: managedCMS.WebsiteCreationBody
$result = $ovh->post("/v2/managedCMS/resource/{serviceId}/website", array(
	targetSpec => null, // Target specification of the website (type: managedCMS.WebsiteCreationTargetSpec)
));

print_r($result);
?>
```

## Flush the website CDN

`POST /v2/managedCMS/resource/{serviceId}/website/{websiteId}/flushCDN`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/managed-wordpress/my-sites/#post-managedcms-resource-serviceid-website-websiteid-flushcdn

**Status:** Alpha version  
**IAM actions:** `managedCMS:apiovh:website/cdn/flush`

Flushes the CDN cache of the website and returns the task.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceId` | path | string (uuid) | yes | Service ID |
| `websiteId` | path | string (uuid) | yes | Website ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | common.CurrentTask | successful operation |
| 400 | object | Error 400 response |
| 404 | object | Error 404 response |
| 409 | object | Error 409 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `errors[].message` | string | read-only | Error description |
| `id` | string (uuid) | read-only | Identifier of the current task |
| `link` | string | read-only | Link to the task details |
| `status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `type` | string | read-only | Type of the current task |

```json
{
  "errors": [
    {
      "message": "string"
    }
  ],
  "id": "00000000-0000-0000-0000-000000000000",
  "link": "string",
  "status": "ERROR",
  "type": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/v2/managedCMS/resource/{serviceId}/website/{websiteId}/flushCDN" \
  -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("/v2/managedCMS/resource/{serviceId}/website/{websiteId}/flushCDN")

# 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("/v2/managedCMS/resource/{serviceId}/website/{websiteId}/flushCDN");

print_r($result);
?>
```

## Reset the database password

`POST /v2/managedCMS/resource/{serviceId}/website/{websiteId}/resetDatabasePassword`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/managed-wordpress/my-sites/#post-managedcms-resource-serviceid-website-websiteid-resetdatabasepassword

**Status:** Alpha version  
**IAM actions:** `managedCMS:apiovh:website/database/resetPassword`

Generates a new database password and sets it on the database and in the WordPress configuration. Use it to revoke a leaked password: the new password is not returned.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceId` | path | string (uuid) | yes | Service ID |
| `websiteId` | path | string (uuid) | yes | Website ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | common.CurrentTask | successful operation |
| 400 | object | Error 400 response |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `errors[].message` | string | read-only | Error description |
| `id` | string (uuid) | read-only | Identifier of the current task |
| `link` | string | read-only | Link to the task details |
| `status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `type` | string | read-only | Type of the current task |

```json
{
  "errors": [
    {
      "message": "string"
    }
  ],
  "id": "00000000-0000-0000-0000-000000000000",
  "link": "string",
  "status": "ERROR",
  "type": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/v2/managedCMS/resource/{serviceId}/website/{websiteId}/resetDatabasePassword" \
  -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("/v2/managedCMS/resource/{serviceId}/website/{websiteId}/resetDatabasePassword")

# 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("/v2/managedCMS/resource/{serviceId}/website/{websiteId}/resetDatabasePassword");

print_r($result);
?>
```

## Reset the PhpMyAdmin password

`POST /v2/managedCMS/resource/{serviceId}/website/{websiteId}/resetPhpMyAdminPassword`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/managed-wordpress/my-sites/#post-managedcms-resource-serviceid-website-websiteid-resetphpmyadminpassword

**Status:** Alpha version  
**IAM actions:** `managedCMS:apiovh:website/phpMyAdmin/resetPassword`

Sets a new PhpMyAdmin password for the website and returns the task. The password needs 9 to 30 alphanumeric characters, with at least one uppercase letter, one lowercase letter and one digit.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceId` | path | string (uuid) | yes | Service ID |
| `websiteId` | path | string (uuid) | yes | Website ID |

### Request body (required)

Type: `managedCMS.ResetTechnicalPasswordBody`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `password` | string (password) | yes | New password (9-30 alphanumeric characters, with at least one uppercase, one lowercase and one digit) |

```json
{
  "password": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | common.CurrentTask | successful operation |
| 400 | object | Error 400 response |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `errors[].message` | string | read-only | Error description |
| `id` | string (uuid) | read-only | Identifier of the current task |
| `link` | string | read-only | Link to the task details |
| `status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `type` | string | read-only | Type of the current task |

```json
{
  "errors": [
    {
      "message": "string"
    }
  ],
  "id": "00000000-0000-0000-0000-000000000000",
  "link": "string",
  "status": "ERROR",
  "type": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/v2/managedCMS/resource/{serviceId}/website/{websiteId}/resetPhpMyAdminPassword" \
  -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: managedCMS.ResetTechnicalPasswordBody
result = client.post("/v2/managedCMS/resource/{serviceId}/website/{websiteId}/resetPhpMyAdminPassword",
	password = None, # New password (9-30 alphanumeric characters, with at least one uppercase, one lowercase and one digit) (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: managedCMS.ResetTechnicalPasswordBody
$result = $ovh->post("/v2/managedCMS/resource/{serviceId}/website/{websiteId}/resetPhpMyAdminPassword", array(
	password => null, // New password (9-30 alphanumeric characters, with at least one uppercase, one lowercase and one digit) (type: string)
));

print_r($result);
?>
```

## Reset the SFTP password

`POST /v2/managedCMS/resource/{serviceId}/website/{websiteId}/resetSftpPassword`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/managed-wordpress/my-sites/#post-managedcms-resource-serviceid-website-websiteid-resetsftppassword

**Status:** Alpha version  
**IAM actions:** `managedCMS:apiovh:website/sftp/resetPassword`

Sets a new SFTP password for the website and returns the task. The password needs 9 to 30 alphanumeric characters, with at least one uppercase letter, one lowercase letter and one digit.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceId` | path | string (uuid) | yes | Service ID |
| `websiteId` | path | string (uuid) | yes | Website ID |

### Request body (required)

Type: `managedCMS.ResetTechnicalPasswordBody`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `password` | string (password) | yes | New password (9-30 alphanumeric characters, with at least one uppercase, one lowercase and one digit) |

```json
{
  "password": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | common.CurrentTask | successful operation |
| 400 | object | Error 400 response |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `errors[].message` | string | read-only | Error description |
| `id` | string (uuid) | read-only | Identifier of the current task |
| `link` | string | read-only | Link to the task details |
| `status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `type` | string | read-only | Type of the current task |

```json
{
  "errors": [
    {
      "message": "string"
    }
  ],
  "id": "00000000-0000-0000-0000-000000000000",
  "link": "string",
  "status": "ERROR",
  "type": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/v2/managedCMS/resource/{serviceId}/website/{websiteId}/resetSftpPassword" \
  -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: managedCMS.ResetTechnicalPasswordBody
result = client.post("/v2/managedCMS/resource/{serviceId}/website/{websiteId}/resetSftpPassword",
	password = None, # New password (9-30 alphanumeric characters, with at least one uppercase, one lowercase and one digit) (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: managedCMS.ResetTechnicalPasswordBody
$result = $ovh->post("/v2/managedCMS/resource/{serviceId}/website/{websiteId}/resetSftpPassword", array(
	password => null, // New password (9-30 alphanumeric characters, with at least one uppercase, one lowercase and one digit) (type: string)
));

print_r($result);
?>
```

## Export a website backup

`POST /v2/managedCMS/resource/{serviceId}/website/{websiteId}/snapshot`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/managed-wordpress/my-sites/#post-managedcms-resource-serviceid-website-websiteid-snapshot

**Status:** Alpha version  
**IAM actions:** `managedCMS:apiovh:website/snapshot/create`

Exports a full backup of the website, files and database, and returns the task. The download links are sent by email.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceId` | path | string (uuid) | yes | Service ID |
| `websiteId` | path | string (uuid) | yes | Website ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | common.CurrentTask | successful operation |
| 400 | object | Error 400 response |
| 404 | object | Error 404 response |
| 409 | object | Error 409 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `errors[].message` | string | read-only | Error description |
| `id` | string (uuid) | read-only | Identifier of the current task |
| `link` | string | read-only | Link to the task details |
| `status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `type` | string | read-only | Type of the current task |

```json
{
  "errors": [
    {
      "message": "string"
    }
  ],
  "id": "00000000-0000-0000-0000-000000000000",
  "link": "string",
  "status": "ERROR",
  "type": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/v2/managedCMS/resource/{serviceId}/website/{websiteId}/snapshot" \
  -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("/v2/managedCMS/resource/{serviceId}/website/{websiteId}/snapshot")

# 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("/v2/managedCMS/resource/{serviceId}/website/{websiteId}/snapshot");

print_r($result);
?>
```

## Get the download links of a backup of a website

`GET /v2/managedCMS/resource/{serviceId}/website/{websiteId}/backupDownload`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/managed-wordpress/my-sites/#get-managedcms-resource-serviceid-website-websiteid-backupdownload

**Status:** Beta version  
**IAM actions:** `managedCMS:apiovh:website/backup/download`

Returns a backup of the website with its download links, one for its files and one for its database, available once the backup is READY. Backups are listed in the current state of the website.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `backupId` | query | string (uuid) | yes | Identifier of the backup, as listed in the current state of the website |
| `serviceId` | path | string (uuid) | yes | Service ID |
| `websiteId` | path | string (uuid) | yes | Website ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | managedCMS.Backup | successful operation |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `databaseDownloadURL` | string | read-only | URL to download the database of the backup, null while the backup is being created |
| `expiresAt` | string (date-time) | read-only | Date after which the backup is deleted, null while the backup is being created |
| `filesDownloadURL` | string | read-only | URL to download the files of the backup, null while the backup is being created |
| `id` | string (uuid) | read-only | Unique identifier of the backup |
| `sizeBytes` | integer | read-only | Size of the backup, in bytes, null while the backup is being created |
| `startedAt` | string (date-time) | read-only | Date the backup was triggered at |
| `status` | managedCMS.BackupStatusEnum | read-only | Status of the backup — one of `CREATING`, `READY` |
| `type` | managedCMS.BackupTypeEnum | read-only | Whether the backup was taken automatically or requested by the customer — one of `AUTOMATIC`, `MANUAL` |

```json
{
  "databaseDownloadURL": "string",
  "expiresAt": "2024-01-01T12:00:00Z",
  "filesDownloadURL": "string",
  "id": "00000000-0000-0000-0000-000000000000",
  "sizeBytes": 0,
  "startedAt": "2024-01-01T12:00:00Z",
  "status": "CREATING",
  "type": "AUTOMATIC"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/managedCMS/resource/{serviceId}/website/{websiteId}/backupDownload" \
  -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/managedCMS/resource/{serviceId}/website/{websiteId}/backupDownload")

# 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/managedCMS/resource/{serviceId}/website/{websiteId}/backupDownload");

print_r($result);
?>
```

## Delete a website

`DELETE /v2/managedCMS/resource/{serviceId}/website/{websiteId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/managed-wordpress/my-sites/#delete-managedcms-resource-serviceid-website-websiteid

**Status:** Alpha version  
**IAM actions:** `managedCMS:apiovh:website/delete`

Permanently deletes the website, with its files and database.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceId` | path | string (uuid) | yes | Service ID |
| `websiteId` | path | string (uuid) | yes | Website ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | managedCMS.Website | successful operation |
| 400 | object | Error 400 response |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Computed hash used to control concurrent modification requests |
| `currentState` | managedCMS.WebsiteCurrentState | read-only | Current state of the website |
| `currentState.backups` | managedCMS.WebsiteCurrentStateBackup[] | read-only | Backups of the website, automatic and manual, being created or available, most recent first. Expired backups and backups being deleted are not listed. Download links are returned by the backupDownload route of the website. Null while the website is being created. |
| `currentState.backups[].expiresAt` | string (date-time) | read-only | Date after which the backup is deleted, null while the backup is being created |
| `currentState.backups[].id` | string (uuid) | read-only | Unique identifier of the backup |
| `currentState.backups[].sizeBytes` | integer | read-only | Size of the backup, in bytes, null while the backup is being created |
| `currentState.backups[].startedAt` | string (date-time) | read-only | Date the backup was triggered at |
| `currentState.backups[].status` | managedCMS.BackupStatusEnum | read-only | Status of the backup — one of `CREATING`, `READY` |
| `currentState.backups[].type` | managedCMS.BackupTypeEnum | read-only | Whether the backup was taken automatically or requested by the customer — one of `AUTOMATIC`, `MANUAL` |
| `currentState.cms` | managedCMS.CMSEnum | read-only | Content management system of the website — one of `WORDPRESS` |
| `currentState.cmsVersion` | string | read-only | CMS version used by the website |
| `currentState.createdAt` | string (date-time) | read-only | Date of creation of the website |
| `currentState.databaseHost` | string | read-only | Database hostname to connect to the website's database |
| `currentState.databasePort` | integer | read-only | Database port to connect to the website's database |
| `currentState.defaultFQDN` | string | read-only | Default technical FQDN of the website |
| `currentState.diskUsageBytes` | integer | read-only | Current disk usage of the website in bytes |
| `currentState.domains` | managedCMS.Domain[] | read-only | Domains currently attached to the website, including the ones being detached |
| `currentState.domains[].fqdn` | string |  | Fully Qualified Domain Name of the domain |
| `currentState.import` | managedCMS.WebsiteCurrentStateImport | read-only | Information about the current website import, if exists |
| `currentState.import.checkResult` | managedCMS.WebsiteImportCheckResult | read-only | Result of the import check |
| `currentState.phpMyAdminURL` | string | read-only | PhpMyAdmin URL to manage the website's database |
| `currentState.phpMyAdminUsername` | string | read-only | PhpMyAdmin login used to manage the website's database |
| `currentState.phpVersion` | string | read-only | PHP version used by the website |
| `currentState.plannedUpdate` | managedCMS.UpdateCurrentState | read-only | Current state of the planned update on the website, if any |
| `currentState.plannedUpdate.cmsVersion` | string | read-only | Target CMS version of the update |
| `currentState.plannedUpdate.dryRun` | managedCMS.UpdateCurrentStateDryRun | read-only | Current State of the dry run |
| `currentState.plannedUpdate.plannedAt` | string (date-time) | read-only | Planned date for the version update |
| `currentState.plannedUpdate.runtimeVersion` | string | read-only | Target runtime version of the update |
| `currentState.plannedUpdate.status` | managedCMS.UpdateStatusEnum | read-only | Status of the update — one of `TEST_DOING`, `TEST_DONE`, `TEST_FAILED`, `TEST_IMPOSSIBLE`, `UPDATE_DOING`, `UPDATE_DONE` |
| `currentState.primaryFQDN` | string | read-only | Primary FQDN of the website |
| `currentState.serviceId` | string (uuid) | read-only | Unique identifier of the service the website belongs to |
| `currentState.sftpHost` | string | read-only | SFTP hostname to connect to the website's files |
| `currentState.sftpPort` | integer | read-only | SFTP port to connect to the website's files |
| `currentState.sftpUsername` | string | read-only | SFTP login used to connect to the website's files |
| `currentTasks` | common.CurrentTask[] | read-only | Ongoing asynchronous tasks related to the website |
| `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 |
| `id` | string (uuid) | read-only | Unique identifier of the website |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Website readiness in the system — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | managedCMS.WebsiteTargetSpec | read-only | Target specification of the website |
| `targetSpec.clone` | managedCMS.WebsiteTargetSpecClone | read-only | Target specification of the clone this website originates from, if any |
| `targetSpec.clone.sourceWebsiteId` | string (uuid) | read-only | Identifier of the website this one was cloned from |
| `targetSpec.creation` | managedCMS.WebsiteTargetSpecCreation | read-only | Target specification of the current website creation, if exists |
| `targetSpec.creation.adminLogin` | string | read-only | Login to set when creating the administrator user |
| `targetSpec.creation.cms` | managedCMS.CMSEnum | read-only | Which content management system to install — one of `WORDPRESS` |
| `targetSpec.creation.cmsSpecific` | managedCMS.CMSSpecific.WebsiteTargetSpecCreation | read-only | Parameters specific to the chosen content management system |
| `targetSpec.creation.phpVersion` | string | read-only | Which PHP version to use, latest by default. The set grows as new PHP releases are supported: retrieve the current one with GET /managedCMS/reference/supportedPHPVersions. |
| `targetSpec.domains` | managedCMS.Domain[] | read-only | Domains targeted for the website: the ones already attached plus the ones being attached, excluding the ones being detached |
| `targetSpec.domains[].fqdn` | string |  | Fully Qualified Domain Name of the domain |
| `targetSpec.import` | managedCMS.WebsiteTargetSpecImport | read-only | Target specification of the current website import, if exists |
| `targetSpec.import.adminLogin` | string | read-only | Login of the source website's admin interface |
| `targetSpec.import.adminURL` | string | read-only | URL of the source website's admin interface' |
| `targetSpec.import.cms` | managedCMS.CMSEnum | read-only | Content management system of the source website — one of `WORDPRESS` |
| `targetSpec.import.cmsSpecific` | managedCMS.CMSSpecific.WebsiteTargetSpecImport | read-only | Data specific to the website's content management system |
| `targetSpec.plannedUpdate` | managedCMS.UpdateTargetSpec | read-only | Current state of the planned update on the website, if any |
| `targetSpec.plannedUpdate.cmsVersion` | string |  | Target CMS version of the update |
| `targetSpec.plannedUpdate.dryRun` | managedCMS.UpdateTargetSpecDryRun |  | Target specification of the dry run |
| `targetSpec.plannedUpdate.plannedAt` | string (date-time) |  | Planned date for the version update |
| `targetSpec.plannedUpdate.runtimeVersion` | string |  | Target runtime version of the update |
| `targetSpec.restoreBackup` | managedCMS.WebsiteTargetSpecRestoreBackup | read-only | Backup being restored on the website, if any |
| `targetSpec.restoreBackup.backupId` | string (uuid) | read-only | Identifier of the backup being restored on the website |

```json
{
  "checksum": "string",
  "currentState": {
    "backups": [
      {
        "expiresAt": "2024-01-01T12:00:00Z",
        "id": "00000000-0000-0000-0000-000000000000",
        "sizeBytes": 0,
        "startedAt": "2024-01-01T12:00:00Z",
        "status": "CREATING",
        "type": "AUTOMATIC"
      }
    ],
    "cms": "WORDPRESS",
    "cmsVersion": "string",
    "createdAt": "2024-01-01T12:00:00Z",
    "databaseHost": "string",
    "databasePort": 0,
    "defaultFQDN": "string",
    "diskUsageBytes": 0,
    "domains": [
      {
        "fqdn": "string"
      }
    ],
    "import": {
      "checkResult": {
        "cmsSpecific": {
          "wordpress": {
            "plugins": [
              null
            ],
            "themes": [
              null
            ]
          }
        }
      }
    },
    "phpMyAdminURL": "string",
    "phpMyAdminUsername": "string",
    "phpVersion": "string",
    "plannedUpdate": {
      "cmsVersion": "string",
      "dryRun": {
        "date": "2024-01-01T12:00:00Z",
        "result": "string",
        "url": "string"
      },
      "plannedAt": "2024-01-01T12:00:00Z",
      "runtimeVersion": "string",
      "status": "TEST_DOING"
    },
    "primaryFQDN": "string",
    "serviceId": "00000000-0000-0000-0000-000000000000",
    "sftpHost": "string",
    "sftpPort": 0,
    "sftpUsername": "string"
  },
  "currentTasks": [
    {
      "errors": [
        {
          "message": "string"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "link": "string",
      "status": "ERROR",
      "type": "string"
    }
  …
```

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/v2/managedCMS/resource/{serviceId}/website/{websiteId}" \
  -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("/v2/managedCMS/resource/{serviceId}/website/{websiteId}")

# 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("/v2/managedCMS/resource/{serviceId}/website/{websiteId}");

print_r($result);
?>
```

## Update a website

`PUT /v2/managedCMS/resource/{serviceId}/website/{websiteId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/managed-wordpress/my-sites/#put-managedcms-resource-serviceid-website-websiteid

**Status:** Alpha version  
**IAM actions:** `managedCMS:apiovh:website/edit`

Updates the domains, primary FQDN or planned update of the website. It can also flush its CDN, or reset its database, SFTP or PhpMyAdmin password.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceId` | path | string (uuid) | yes | Service ID |
| `websiteId` | path | string (uuid) | yes | Website ID |

### Request body (required)

Type: `managedCMS.WebsiteEditionBody`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `targetSpec` | managedCMS.WebsiteEditionTargetSpec |  | Target specification to edit a website |
| `targetSpec.createBackupDate` | string (date-time) |  | Modify this to trigger a manual backup of the website, files and database. Cannot be combined with any other field. |
| `targetSpec.deleteBackup` | managedCMS.WebsiteEditionTargetSpecDeleteBackup |  | Set this to delete a manual backup of the website. Automatic backups cannot be deleted. Cannot be combined with any other field. |
| `targetSpec.deleteBackup.backupId` | string (uuid) | yes | Identifier of the backup to delete, which must be a manual backup of this website |
| `targetSpec.domains` | managedCMS.Domain[] |  | Domains attached to the website |
| `targetSpec.domains[].fqdn` | string |  | Fully Qualified Domain Name of the domain |
| `targetSpec.flushCDNDate` | string (date-time) |  | Modify this to trigger a flush of CDN of the website |
| `targetSpec.phpMyAdminPassword` | string (password) |  | Set this to reset the website's PhpMyAdmin password (9-30 alphanumeric characters, with at least one uppercase, one lowercase and one digit) |
| `targetSpec.plannedUpdate` | managedCMS.UpdateTargetSpec |  | Modify this to trigger an update on the website, if any |
| `targetSpec.plannedUpdate.cmsVersion` | string |  | Target CMS version of the update |
| `targetSpec.plannedUpdate.dryRun` | managedCMS.UpdateTargetSpecDryRun |  | Target specification of the dry run |
| `targetSpec.plannedUpdate.plannedAt` | string (date-time) |  | Planned date for the version update |
| `targetSpec.plannedUpdate.runtimeVersion` | string |  | Target runtime version of the update |
| `targetSpec.primaryFQDN` | string |  | Modify the primary FQDN of the website |
| `targetSpec.resetDatabasePasswordDate` | string (date-time) |  | Modify this to trigger a reset of the website's database password |
| `targetSpec.restoreBackup` | managedCMS.WebsiteEditionTargetSpecRestoreBackup |  | Set this to restore a backup on the website, files and database together. Cannot be combined with any other field. |
| `targetSpec.restoreBackup.backupId` | string (uuid) | yes | Identifier of the backup to restore, which must be a READY backup of this website |
| `targetSpec.sftpPassword` | string (password) |  | Set this to reset the website's SFTP password (9-30 alphanumeric characters, with at least one uppercase, one lowercase and one digit) |

```json
{
  "targetSpec": {
    "createBackupDate": "2024-01-01T12:00:00Z",
    "deleteBackup": {
      "backupId": "00000000-0000-0000-0000-000000000000"
    },
    "domains": [
      {
        "fqdn": "string"
      }
    ],
    "flushCDNDate": "2024-01-01T12:00:00Z",
    "phpMyAdminPassword": "string",
    "plannedUpdate": {
      "cmsVersion": "string",
      "dryRun": {
        "date": "2024-01-01T12:00:00Z"
      },
      "plannedAt": "2024-01-01T12:00:00Z",
      "runtimeVersion": "string"
    },
    "primaryFQDN": "string",
    "resetDatabasePasswordDate": "2024-01-01T12:00:00Z",
    "restoreBackup": {
      "backupId": "00000000-0000-0000-0000-000000000000"
    },
    "sftpPassword": "string"
  }
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | managedCMS.Website | successful operation |
| 400 | object | Error 400 response |
| 404 | object | Error 404 response |
| 409 | object | Error 409 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Computed hash used to control concurrent modification requests |
| `currentState` | managedCMS.WebsiteCurrentState | read-only | Current state of the website |
| `currentState.backups` | managedCMS.WebsiteCurrentStateBackup[] | read-only | Backups of the website, automatic and manual, being created or available, most recent first. Expired backups and backups being deleted are not listed. Download links are returned by the backupDownload route of the website. Null while the website is being created. |
| `currentState.backups[].expiresAt` | string (date-time) | read-only | Date after which the backup is deleted, null while the backup is being created |
| `currentState.backups[].id` | string (uuid) | read-only | Unique identifier of the backup |
| `currentState.backups[].sizeBytes` | integer | read-only | Size of the backup, in bytes, null while the backup is being created |
| `currentState.backups[].startedAt` | string (date-time) | read-only | Date the backup was triggered at |
| `currentState.backups[].status` | managedCMS.BackupStatusEnum | read-only | Status of the backup — one of `CREATING`, `READY` |
| `currentState.backups[].type` | managedCMS.BackupTypeEnum | read-only | Whether the backup was taken automatically or requested by the customer — one of `AUTOMATIC`, `MANUAL` |
| `currentState.cms` | managedCMS.CMSEnum | read-only | Content management system of the website — one of `WORDPRESS` |
| `currentState.cmsVersion` | string | read-only | CMS version used by the website |
| `currentState.createdAt` | string (date-time) | read-only | Date of creation of the website |
| `currentState.databaseHost` | string | read-only | Database hostname to connect to the website's database |
| `currentState.databasePort` | integer | read-only | Database port to connect to the website's database |
| `currentState.defaultFQDN` | string | read-only | Default technical FQDN of the website |
| `currentState.diskUsageBytes` | integer | read-only | Current disk usage of the website in bytes |
| `currentState.domains` | managedCMS.Domain[] | read-only | Domains currently attached to the website, including the ones being detached |
| `currentState.domains[].fqdn` | string |  | Fully Qualified Domain Name of the domain |
| `currentState.import` | managedCMS.WebsiteCurrentStateImport | read-only | Information about the current website import, if exists |
| `currentState.import.checkResult` | managedCMS.WebsiteImportCheckResult | read-only | Result of the import check |
| `currentState.phpMyAdminURL` | string | read-only | PhpMyAdmin URL to manage the website's database |
| `currentState.phpMyAdminUsername` | string | read-only | PhpMyAdmin login used to manage the website's database |
| `currentState.phpVersion` | string | read-only | PHP version used by the website |
| `currentState.plannedUpdate` | managedCMS.UpdateCurrentState | read-only | Current state of the planned update on the website, if any |
| `currentState.plannedUpdate.cmsVersion` | string | read-only | Target CMS version of the update |
| `currentState.plannedUpdate.dryRun` | managedCMS.UpdateCurrentStateDryRun | read-only | Current State of the dry run |
| `currentState.plannedUpdate.plannedAt` | string (date-time) | read-only | Planned date for the version update |
| `currentState.plannedUpdate.runtimeVersion` | string | read-only | Target runtime version of the update |
| `currentState.plannedUpdate.status` | managedCMS.UpdateStatusEnum | read-only | Status of the update — one of `TEST_DOING`, `TEST_DONE`, `TEST_FAILED`, `TEST_IMPOSSIBLE`, `UPDATE_DOING`, `UPDATE_DONE` |
| `currentState.primaryFQDN` | string | read-only | Primary FQDN of the website |
| `currentState.serviceId` | string (uuid) | read-only | Unique identifier of the service the website belongs to |
| `currentState.sftpHost` | string | read-only | SFTP hostname to connect to the website's files |
| `currentState.sftpPort` | integer | read-only | SFTP port to connect to the website's files |
| `currentState.sftpUsername` | string | read-only | SFTP login used to connect to the website's files |
| `currentTasks` | common.CurrentTask[] | read-only | Ongoing asynchronous tasks related to the website |
| `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 |
| `id` | string (uuid) | read-only | Unique identifier of the website |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Website readiness in the system — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | managedCMS.WebsiteTargetSpec | read-only | Target specification of the website |
| `targetSpec.clone` | managedCMS.WebsiteTargetSpecClone | read-only | Target specification of the clone this website originates from, if any |
| `targetSpec.clone.sourceWebsiteId` | string (uuid) | read-only | Identifier of the website this one was cloned from |
| `targetSpec.creation` | managedCMS.WebsiteTargetSpecCreation | read-only | Target specification of the current website creation, if exists |
| `targetSpec.creation.adminLogin` | string | read-only | Login to set when creating the administrator user |
| `targetSpec.creation.cms` | managedCMS.CMSEnum | read-only | Which content management system to install — one of `WORDPRESS` |
| `targetSpec.creation.cmsSpecific` | managedCMS.CMSSpecific.WebsiteTargetSpecCreation | read-only | Parameters specific to the chosen content management system |
| `targetSpec.creation.phpVersion` | string | read-only | Which PHP version to use, latest by default. The set grows as new PHP releases are supported: retrieve the current one with GET /managedCMS/reference/supportedPHPVersions. |
| `targetSpec.domains` | managedCMS.Domain[] | read-only | Domains targeted for the website: the ones already attached plus the ones being attached, excluding the ones being detached |
| `targetSpec.domains[].fqdn` | string |  | Fully Qualified Domain Name of the domain |
| `targetSpec.import` | managedCMS.WebsiteTargetSpecImport | read-only | Target specification of the current website import, if exists |
| `targetSpec.import.adminLogin` | string | read-only | Login of the source website's admin interface |
| `targetSpec.import.adminURL` | string | read-only | URL of the source website's admin interface' |
| `targetSpec.import.cms` | managedCMS.CMSEnum | read-only | Content management system of the source website — one of `WORDPRESS` |
| `targetSpec.import.cmsSpecific` | managedCMS.CMSSpecific.WebsiteTargetSpecImport | read-only | Data specific to the website's content management system |
| `targetSpec.plannedUpdate` | managedCMS.UpdateTargetSpec | read-only | Current state of the planned update on the website, if any |
| `targetSpec.plannedUpdate.cmsVersion` | string |  | Target CMS version of the update |
| `targetSpec.plannedUpdate.dryRun` | managedCMS.UpdateTargetSpecDryRun |  | Target specification of the dry run |
| `targetSpec.plannedUpdate.plannedAt` | string (date-time) |  | Planned date for the version update |
| `targetSpec.plannedUpdate.runtimeVersion` | string |  | Target runtime version of the update |
| `targetSpec.restoreBackup` | managedCMS.WebsiteTargetSpecRestoreBackup | read-only | Backup being restored on the website, if any |
| `targetSpec.restoreBackup.backupId` | string (uuid) | read-only | Identifier of the backup being restored on the website |

```json
{
  "checksum": "string",
  "currentState": {
    "backups": [
      {
        "expiresAt": "2024-01-01T12:00:00Z",
        "id": "00000000-0000-0000-0000-000000000000",
        "sizeBytes": 0,
        "startedAt": "2024-01-01T12:00:00Z",
        "status": "CREATING",
        "type": "AUTOMATIC"
      }
    ],
    "cms": "WORDPRESS",
    "cmsVersion": "string",
    "createdAt": "2024-01-01T12:00:00Z",
    "databaseHost": "string",
    "databasePort": 0,
    "defaultFQDN": "string",
    "diskUsageBytes": 0,
    "domains": [
      {
        "fqdn": "string"
      }
    ],
    "import": {
      "checkResult": {
        "cmsSpecific": {
          "wordpress": {
            "plugins": [
              null
            ],
            "themes": [
              null
            ]
          }
        }
      }
    },
    "phpMyAdminURL": "string",
    "phpMyAdminUsername": "string",
    "phpVersion": "string",
    "plannedUpdate": {
      "cmsVersion": "string",
      "dryRun": {
        "date": "2024-01-01T12:00:00Z",
        "result": "string",
        "url": "string"
      },
      "plannedAt": "2024-01-01T12:00:00Z",
      "runtimeVersion": "string",
      "status": "TEST_DOING"
    },
    "primaryFQDN": "string",
    "serviceId": "00000000-0000-0000-0000-000000000000",
    "sftpHost": "string",
    "sftpPort": 0,
    "sftpUsername": "string"
  },
  "currentTasks": [
    {
      "errors": [
        {
          "message": "string"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "link": "string",
      "status": "ERROR",
      "type": "string"
    }
  …
```

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/v2/managedCMS/resource/{serviceId}/website/{websiteId}" \
  -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: managedCMS.WebsiteEditionBody
result = client.put("/v2/managedCMS/resource/{serviceId}/website/{websiteId}",
	targetSpec = None, # Target specification to edit a website (type: managedCMS.WebsiteEditionTargetSpec)
)

# 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: managedCMS.WebsiteEditionBody
$result = $ovh->put("/v2/managedCMS/resource/{serviceId}/website/{websiteId}", array(
	targetSpec => null, // Target specification to edit a website (type: managedCMS.WebsiteEditionTargetSpec)
));

print_r($result);
?>
```

## Create an application password on the website

`POST /v2/managedCMS/resource/{serviceId}/website/{websiteId}/applicationPassword`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/managed-wordpress/my-sites/#post-managedcms-resource-serviceid-website-websiteid-applicationpassword

**Status:** Beta version  
**IAM actions:** `managedCMS:apiovh:website/applicationPassword/create`

Each call creates a new application password on the existing administrator user. The previous ones stay valid. They can be revoked from the CMS administration.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceId` | path | string (uuid) | yes | Service ID |
| `websiteId` | path | string (uuid) | yes | Website ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | managedCMS.ApplicationPassword | successful operation |
| 400 | object | Error 400 response |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `login` | string | read-only | Login of the user the application password belongs to |
| `password` | string (password) | read-only | Application password to authenticate as `login` on the CMS API, returned only in this response |

```json
{
  "login": "string",
  "password": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/v2/managedCMS/resource/{serviceId}/website/{websiteId}/applicationPassword" \
  -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("/v2/managedCMS/resource/{serviceId}/website/{websiteId}/applicationPassword")

# 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("/v2/managedCMS/resource/{serviceId}/website/{websiteId}/applicationPassword");

print_r($result);
?>
```
