# Bare Metal Cloud › Licenses API

> Part of the OVHcloud developer hub. Index of every page and section: https://developers.eu.ovhcloud.com/llms.txt
> The Bare Metal Cloud product's sections: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/llms.txt
> Everything in one file: https://developers.eu.ovhcloud.com/llms-full.txt

> 113 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/bare-metal-cloud/licenses/

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

## Operations

- `GET /license/cloudLinux` — List available services
- `GET /license/cloudLinux/orderableVersions` — Get the orderable CloudLinux versions
- `GET /license/cloudLinux/{serviceName}` — Get this object properties
- `POST /license/cloudLinux/{serviceName}/confirmTermination` — Confirm service termination
- `GET /license/cloudLinux/{serviceName}/serviceInfos` — Get service information
- `PUT /license/cloudLinux/{serviceName}/serviceInfos` — Update service information
- `GET /license/cloudLinux/{serviceName}/tasks` — Tasks linked to this license
- `GET /license/cloudLinux/{serviceName}/tasks/{taskId}` — Get this object properties
- `POST /license/cloudLinux/{serviceName}/terminate` — Request service termination
- `GET /license/cpanel` — List available services
- `GET /license/cpanel/orderableVersions` — Get the orderable CPanel versions
- `GET /license/cpanel/{serviceName}` — Get this object properties
- `PUT /license/cpanel/{serviceName}` — Alter this object properties
- `GET /license/cpanel/{serviceName}/allowedDestinationIp` — Returns an array of ips where the license can be moved to
- `GET /license/cpanel/{serviceName}/canLicenseBeMovedTo` — Will tell if the ip can accept the license
- `POST /license/cpanel/{serviceName}/changeIp` — Move this license to another Ip
- `POST /license/cpanel/{serviceName}/confirmTermination` — Confirm service termination
- `GET /license/cpanel/{serviceName}/serviceInfos` — Get service information
- `PUT /license/cpanel/{serviceName}/serviceInfos` — Update service information
- `GET /license/cpanel/{serviceName}/tasks` — tasks linked to this license
- `GET /license/cpanel/{serviceName}/tasks/{taskId}` — Get this object properties
- `POST /license/cpanel/{serviceName}/terminate` — Request service termination
- `GET /license/directadmin` — List available services
- `GET /license/directadmin/orderableVersions` — Get the orderable DirectAdmin versions
- `GET /license/directadmin/{serviceName}` — Get this object properties
- `PUT /license/directadmin/{serviceName}` — Alter this object properties
- `GET /license/directadmin/{serviceName}/allowedDestinationIp` — Returns an array of ips where the license can be moved to
- `GET /license/directadmin/{serviceName}/canLicenseBeMovedTo` — Will tell if the ip can accept the license
- `POST /license/directadmin/{serviceName}/changeIp` — Move this license to another Ip
- `POST /license/directadmin/{serviceName}/changeOs` — Change the Operating System for a license
- `POST /license/directadmin/{serviceName}/confirmTermination` — Confirm service termination
- `GET /license/directadmin/{serviceName}/serviceInfos` — Get service information
- `PUT /license/directadmin/{serviceName}/serviceInfos` — Update service information
- `GET /license/directadmin/{serviceName}/tasks` — tasks linked to this license
- `GET /license/directadmin/{serviceName}/tasks/{taskId}` — Get this object properties
- `POST /license/directadmin/{serviceName}/terminate` — Request service termination
- `GET /license/plesk` — List available services
- `GET /license/plesk/orderableVersions` — Get the orderable Plesk versions and their associated compatibilities
- `GET /license/plesk/{serviceName}` — Get this object properties
- `PUT /license/plesk/{serviceName}` — Alter this object properties
- `GET /license/plesk/{serviceName}/allowedDestinationIp` — Returns an array of ips where the license can be moved to
- `GET /license/plesk/{serviceName}/canLicenseBeMovedTo` — Will tell if the ip can accept the license
- `POST /license/plesk/{serviceName}/changeIp` — Move this license to another Ip
- `POST /license/plesk/{serviceName}/confirmTermination` — Confirm service termination
- `GET /license/plesk/{serviceName}/option` — options attached to this license
- `GET /license/plesk/{serviceName}/option/{label}` — Get this object properties
- `DELETE /license/plesk/{serviceName}/option/{label}` — release this Option
- `GET /license/plesk/{serviceName}/serviceInfos` — Get service information
- `PUT /license/plesk/{serviceName}/serviceInfos` — Update service information
- `GET /license/plesk/{serviceName}/tasks` — tasks linked to this license
- `GET /license/plesk/{serviceName}/tasks/{taskId}` — Get this object properties
- `POST /license/plesk/{serviceName}/terminate` — Request service termination
- `GET /license/redhat` — List available services
- `GET /license/redhat/{serviceName}` — Get this object properties
- `PUT /license/redhat/{serviceName}` — Alter this object properties
- `POST /license/redhat/{serviceName}/confirmTermination` — Confirm service termination
- `GET /license/redhat/{serviceName}/serviceInfos` — Get service information
- `PUT /license/redhat/{serviceName}/serviceInfos` — Update service information
- `GET /license/redhat/{serviceName}/tasks` — tasks linked to this license
- `GET /license/redhat/{serviceName}/tasks/{taskId}` — Get this object properties
- `POST /license/redhat/{serviceName}/terminate` — Request service termination
- `GET /license/sqlserver` — List available services
- `GET /license/sqlserver/orderableVersions` — Get the orderable Sql Server versions
- `GET /license/sqlserver/{serviceName}` — Get this object properties
- `POST /license/sqlserver/{serviceName}/confirmTermination` — Confirm service termination
- `GET /license/sqlserver/{serviceName}/serviceInfos` — Get service information
- `PUT /license/sqlserver/{serviceName}/serviceInfos` — Update service information
- `GET /license/sqlserver/{serviceName}/tasks` — Tasks linked to this license
- `GET /license/sqlserver/{serviceName}/tasks/{taskId}` — Get this object properties
- `POST /license/sqlserver/{serviceName}/terminate` — Request service termination
- `GET /license/virtuozzo` — List available services
- `GET /license/virtuozzo/orderableVersions` — Get the orderable Virtuozzo versions
- `GET /license/virtuozzo/{serviceName}` — Get this object properties
- `PUT /license/virtuozzo/{serviceName}` — Alter this object properties
- `GET /license/virtuozzo/{serviceName}/allowedDestinationIp` — Returns an array of ips where the license can be moved to
- `GET /license/virtuozzo/{serviceName}/canLicenseBeMovedTo` — Will tell if the ip can accept the license
- `POST /license/virtuozzo/{serviceName}/changeIp` — Move this license to another Ip
- `POST /license/virtuozzo/{serviceName}/confirmTermination` — Confirm service termination
- `GET /license/virtuozzo/{serviceName}/option` — Options linked to this license
- `GET /license/virtuozzo/{serviceName}/option/{label}` — Get this object properties
- `DELETE /license/virtuozzo/{serviceName}/option/{label}` — release this Option
- `GET /license/virtuozzo/{serviceName}/serviceInfos` — Get service information
- `PUT /license/virtuozzo/{serviceName}/serviceInfos` — Update service information
- `GET /license/virtuozzo/{serviceName}/tasks` — tasks linked to this license
- `GET /license/virtuozzo/{serviceName}/tasks/{taskId}` — Get this object properties
- `POST /license/virtuozzo/{serviceName}/terminate` — Request service termination
- `GET /license/windows` — List available services
- `GET /license/windows/orderableVersions` — Get the orderable Windows versions
- `GET /license/windows/{serviceName}` — Get this object properties
- `PUT /license/windows/{serviceName}` — Alter this object properties
- `POST /license/windows/{serviceName}/confirmTermination` — Confirm service termination
- `GET /license/windows/{serviceName}/option` — options attached to this license
- `GET /license/windows/{serviceName}/option/{label}` — Get this object properties
- `DELETE /license/windows/{serviceName}/option/{label}` — release this Option
- `GET /license/windows/{serviceName}/serviceInfos` — Get service information
- `PUT /license/windows/{serviceName}/serviceInfos` — Update service information
- `POST /license/windows/{serviceName}/sqlServer` — Link your own sql server license to this Windows license
- `GET /license/windows/{serviceName}/tasks` — tasks linked to this license
- `GET /license/windows/{serviceName}/tasks/{taskId}` — Get this object properties
- `POST /license/windows/{serviceName}/terminate` — Request service termination
- `GET /license/worklight` — List available services
- `GET /license/worklight/orderableVersions` — Get the orderable WorkLight versions
- `GET /license/worklight/{serviceName}` — Get this object properties
- `PUT /license/worklight/{serviceName}` — Alter this object properties
- `GET /license/worklight/{serviceName}/allowedDestinationIp` — Returns an array of ips where the license can be moved to
- `GET /license/worklight/{serviceName}/canLicenseBeMovedTo` — Will tell if the ip can accept the license
- `POST /license/worklight/{serviceName}/changeIp` — Move this license to another Ip
- `POST /license/worklight/{serviceName}/confirmTermination` — Confirm service termination
- `GET /license/worklight/{serviceName}/serviceInfos` — Get service information
- `PUT /license/worklight/{serviceName}/serviceInfos` — Update service information
- `GET /license/worklight/{serviceName}/tasks` — Tasks linked to this license
- `GET /license/worklight/{serviceName}/tasks/{taskId}` — Get this object properties
- `POST /license/worklight/{serviceName}/terminate` — Request service termination

## List available services

`GET /1.0/license/cloudLinux`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-cloudlinux

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

### Parameters

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

### Responses

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

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

### Example

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

# 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("/license/cloudLinux");

print_r($result);
?>
```

## Get the orderable CloudLinux versions

`GET /1.0/license/cloudLinux/orderableVersions`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-cloudlinux-orderableversions

**Status:** Stable production version  
**IAM actions:** `account:apiovh:licenseCloudLinux/orderableVersions/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `ip` | query | ipv4 | yes | Your license Ip |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.CloudLinuxOrderConfiguration[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `orderableVersions` | license.OrderableCloudLinuxCompatibilityInfos[] |  |  |
| `orderableVersions[].version` | license.CloudLinuxVersionEnum |  | All versions for CloudLinux product — one of `SINGLE`, `WITH_CPANEL`, `WITH_PLESK12`, `cloudlinux-license` |
| `serviceType` | license.LicenseTypeEnum |  | Possible values for license type — one of `dedicated`, `dedicatedCloud`, `dedicatedFailover`, `failover`, `vm`, `vps`, `vps_ceph`, `vps_classic`, `vps_cloud`, `vps_cloud_2016`, `vps_ssd` |

```json
[
  {
    "orderableVersions": [
      {
        "version": "SINGLE"
      }
    ],
    "serviceType": "dedicated"
  }
]
```

### Example

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

# 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("/license/cloudLinux/orderableVersions");

print_r($result);
?>
```

## Get this object properties

`GET /1.0/license/cloudLinux/{serviceName}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-cloudlinux-servicename

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

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.cloudLinux.CloudLinuxWithIAM | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creation` | string (date-time) | read-only | This license creation date |
| `domain` | string | read-only | The internal name of your license |
| `iam` | iam.ResourceMetadata | read-only | IAM resource metadata |
| `iam.displayName` | string | read-only | Resource display name |
| `iam.id` | string (uuid) | read-only | Unique identifier of the resource |
| `iam.state` | iam.ResourceMetadata.StateEnum | read-only | Resource state — one of `EXPIRED`, `IN_CREATION`, `OK`, `SUSPENDED` |
| `iam.tags` | object | read-only | Resource tags. Tags that were internally computed are prefixed with ovh: |
| `iam.urn` | string | read-only | Unique resource name used in policies |
| `ip` | ipv4 | read-only | The ip on which this license is attached |
| `licenseId` | string | read-only | The license id on license provider side |
| `status` | license.StateEnum | read-only | This license state — one of `ok`, `released`, `terminated`, `toDeliver` |
| `version` | license.CloudLinuxVersionEnum | read-only | This license version — one of `SINGLE`, `WITH_CPANEL`, `WITH_PLESK12`, `cloudlinux-license` |

```json
{
  "creation": "2024-01-01T12:00:00Z",
  "domain": "string",
  "iam": {
    "displayName": "string",
    "id": "00000000-0000-0000-0000-000000000000",
    "state": "EXPIRED",
    "tags": {
      "key": "string"
    },
    "urn": "string"
  },
  "ip": "192.0.2.0",
  "licenseId": "string",
  "status": "ok",
  "version": "SINGLE"
}
```

### Example

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

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

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

result = client.get("/license/cloudLinux/{serviceName}")

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

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

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

$result = $ovh->get("/license/cloudLinux/{serviceName}");

print_r($result);
?>
```

## Confirm service termination

`POST /1.0/license/cloudLinux/{serviceName}/confirmTermination`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#post-license-cloudlinux-servicename-confirmtermination

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

Confirm service termination. Terminates the service with the token sent by email to the admin contact. A reason, a future use and a comment can be given.

### Parameters

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

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `commentary` | string |  | Commentary about your termination request |
| `futureUse` | service.TerminationFutureUseEnum |  | What next after your termination request — one of `NOT_REPLACING_SERVICE`, `OTHER`, `SUBSCRIBE_AN_OTHER_SERVICE`, `SUBSCRIBE_OTHER_KIND_OF_SERVICE_WITH_COMPETITOR`, `SUBSCRIBE_SIMILAR_SERVICE_WITH_COMPETITOR` |
| `reason` | service.TerminationReasonEnum |  | Reason of your termination request — one of `FEATURES_DONT_SUIT_ME`, `LACK_OF_PERFORMANCES`, `MIGRATED_TO_ANOTHER_OVH_PRODUCT`, `MIGRATED_TO_COMPETITOR`, `NOT_ENOUGH_RECOGNITION`, `NOT_NEEDED_ANYMORE`, `NOT_RELIABLE`, `NO_ANSWER`, `OTHER`, `PRODUCT_DIMENSION_DONT_SUIT_ME`, `PRODUCT_TOOLS_DONT_SUIT_ME`, `TOO_EXPENSIVE`, … |
| `token` | string | yes | The termination token sent by email to the admin contact |

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

### Responses

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

```json
"string"
```

### Example

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

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

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

result = client.post("/license/cloudLinux/{serviceName}/confirmTermination",
	commentary = None, # Commentary about your termination request (type: string, nullable)
	futureUse = None, # What next after your termination request (type: service.TerminationFutureUseEnum, nullable)
	reason = None, # Reason of your termination request (type: service.TerminationReasonEnum, nullable)
	token = None, # The termination token sent by email to the admin contact (type: string)
)

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

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

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

$result = $ovh->post("/license/cloudLinux/{serviceName}/confirmTermination", array(
	commentary => null, // Commentary about your termination request (type: string, nullable)
	futureUse => null, // What next after your termination request (type: service.TerminationFutureUseEnum, nullable)
	reason => null, // Reason of your termination request (type: service.TerminationReasonEnum, nullable)
	token => null, // The termination token sent by email to the admin contact (type: string)
));

print_r($result);
?>
```

## Get service information

`GET /1.0/license/cloudLinux/{serviceName}/serviceInfos`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-cloudlinux-servicename-serviceinfos

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

Get service information. Returns the status, creation and expiration dates, contacts and renewal settings of the service.

### Parameters

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

### Responses

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

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

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

### Example

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

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

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

result = client.get("/license/cloudLinux/{serviceName}/serviceInfos")

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

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

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

$result = $ovh->get("/license/cloudLinux/{serviceName}/serviceInfos");

print_r($result);
?>
```

## Update service information

`PUT /1.0/license/cloudLinux/{serviceName}/serviceInfos`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#put-license-cloudlinux-servicename-serviceinfos

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

Update service information. Updates the renewal settings of the service: automatic renewal, period, or deletion at expiration.

### Parameters

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

### Request body (required)

Type: `services.Service`

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

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

### Responses

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

### Example

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

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

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

# Request body type: services.Service
result = client.put("/license/cloudLinux/{serviceName}/serviceInfos",
	renew = None, # Way of handling the renew (type: service.RenewType, nullable)
)

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

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

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

// Request body type: services.Service
$result = $ovh->put("/license/cloudLinux/{serviceName}/serviceInfos", array(
	renew => null, // Way of handling the renew (type: service.RenewType, nullable)
));

print_r($result);
?>
```

## Tasks linked to this license

`GET /1.0/license/cloudLinux/{serviceName}/tasks`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-cloudlinux-servicename-tasks

**Status:** Stable production version  
**IAM actions:** `licenseCloudLinux:apiovh:tasks/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `action` | query | license.ActionType |  | Filter the value of action property (=) — one of `addWindowFromExistingSerial`, `changeIp`, `changeOs`, `installLicense`, `optionUpgrade`, `releaseOption`, `versionUpgrade` |
| `serviceName` | path | string | yes | The name of your CloudLinux license |
| `status` | query | license.TaskStateEnum |  | Filter the value of status property (=) — one of `cancelled`, `doing`, `done`, `error`, `todo` |

### Responses

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

```json
[
  0
]
```

### Example

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

# 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("/license/cloudLinux/{serviceName}/tasks");

print_r($result);
?>
```

## Get this object properties

`GET /1.0/license/cloudLinux/{serviceName}/tasks/{taskId}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-cloudlinux-servicename-tasks-taskid

**Status:** Stable production version  
**IAM actions:** `licenseCloudLinux:apiovh:tasks/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The name of your CloudLinux license |
| `taskId` | path | integer | yes | This Task id |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | license.ActionType | read-only | This Task description — one of `addWindowFromExistingSerial`, `changeIp`, `changeOs`, `installLicense`, `optionUpgrade`, `releaseOption`, `versionUpgrade` |
| `doneDate` | string (date-time) | read-only | When was this Task done |
| `lastUpdate` | string (date-time) | read-only | The last time this Task was updated |
| `name` | string | read-only | This Task name |
| `status` | license.TaskStateEnum | read-only | Current Taks status — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `taskId` | integer | read-only | This Task id |
| `todoDate` | string (date-time) | read-only | When was this Task created |

```json
{
  "action": "addWindowFromExistingSerial",
  "doneDate": "2024-01-01T12:00:00Z",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "name": "string",
  "status": "cancelled",
  "taskId": 0,
  "todoDate": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/license/cloudLinux/{serviceName}/tasks/{taskId}" \
  -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("/license/cloudLinux/{serviceName}/tasks/{taskId}")

# 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("/license/cloudLinux/{serviceName}/tasks/{taskId}");

print_r($result);
?>
```

## Request service termination

`POST /1.0/license/cloudLinux/{serviceName}/terminate`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#post-license-cloudlinux-servicename-terminate

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

Request service termination. Starts the termination of the service. The admin contact receives a token by email, to confirm with the `confirmTermination` call.

### Parameters

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

### Responses

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

```json
"string"
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/license/cloudLinux/{serviceName}/terminate" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

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

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

result = client.post("/license/cloudLinux/{serviceName}/terminate")

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

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

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

$result = $ovh->post("/license/cloudLinux/{serviceName}/terminate");

print_r($result);
?>
```

## List available services

`GET /1.0/license/cpanel`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-cpanel

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

### Parameters

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

### Responses

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

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

### Example

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

# 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("/license/cpanel");

print_r($result);
?>
```

## Get the orderable CPanel versions

`GET /1.0/license/cpanel/orderableVersions`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-cpanel-orderableversions

**Status:** Stable production version  
**IAM actions:** `account:apiovh:licenseCpanel/orderableVersions/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `ip` | query | ipv4 | yes | Your license Ip |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.CpanelOrderConfiguration[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `orderableVersions` | license.OrderableCpanelCompatibilityInfos[] |  |  |
| `orderableVersions[].version` | license.OrderableCpanelVersionEnum |  | All versions available for Cpanel products — one of `VERSION_11_FOR_LINUX`, `VERSION_11_FOR_VIRTUOZZO`, `VERSION_11_FOR_VPS`, `cpanel-license-admin-cloud`, `cpanel-license-plus-cloud`, `cpanel-license-premier-cloud-100-accounts`, `cpanel-license-premier-cloud-1000-accounts`, `cpanel-license-premier-cloud-10000-accounts`, `cpanel-license-premier-cloud-1100-accounts`, `cpanel-license-premier-cloud-1200-accounts`, `cpanel-license-premier-cloud-1300-accounts`, `cpanel-license-premier-cloud-1400-accounts`, … |
| `serviceType` | license.LicenseTypeEnum |  | Possible values for license type — one of `dedicated`, `dedicatedCloud`, `dedicatedFailover`, `failover`, `vm`, `vps`, `vps_ceph`, `vps_classic`, `vps_cloud`, `vps_cloud_2016`, `vps_ssd` |

```json
[
  {
    "orderableVersions": [
      {
        "version": "VERSION_11_FOR_LINUX"
      }
    ],
    "serviceType": "dedicated"
  }
]
```

### Example

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

# 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("/license/cpanel/orderableVersions");

print_r($result);
?>
```

## Get this object properties

`GET /1.0/license/cpanel/{serviceName}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-cpanel-servicename

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

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.cpanel.CpanelWithIAM | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creation` | string (date-time) | read-only | This license creation date |
| `deleteAtExpiration` | boolean |  | Shall we delete this on expiration ? |
| `domain` | string | read-only | The internal name of your license |
| `iam` | iam.ResourceMetadata | read-only | IAM resource metadata |
| `iam.displayName` | string | read-only | Resource display name |
| `iam.id` | string (uuid) | read-only | Unique identifier of the resource |
| `iam.state` | iam.ResourceMetadata.StateEnum | read-only | Resource state — one of `EXPIRED`, `IN_CREATION`, `OK`, `SUSPENDED` |
| `iam.tags` | object | read-only | Resource tags. Tags that were internally computed are prefixed with ovh: |
| `iam.urn` | string | read-only | Unique resource name used in policies |
| `ip` | ipv4 | read-only | The ip on which this license is attached |
| `licenseId` | string | read-only | The license id on license provider side |
| `status` | license.StateEnum | read-only | This license state — one of `ok`, `released`, `terminated`, `toDeliver` |
| `version` | license.CpanelVersionEnum | read-only | This license version — one of `VERSION_11_FOR_LINUX`, `VERSION_11_FOR_VIRTUOZZO`, `VERSION_11_FOR_VPS`, `cpanel-license-version-11`, `cpanel-license-version-11-for-virtuozzo`, `cpanel-license-version-11-for-vps`, `version-admin-cloud`, `version-plus-cloud`, `version-premier-cloud-100`, `version-premier-cloud-1000`, `version-premier-cloud-10000`, `version-premier-cloud-1100`, … |

```json
{
  "creation": "2024-01-01T12:00:00Z",
  "deleteAtExpiration": true,
  "domain": "string",
  "iam": {
    "displayName": "string",
    "id": "00000000-0000-0000-0000-000000000000",
    "state": "EXPIRED",
    "tags": {
      "key": "string"
    },
    "urn": "string"
  },
  "ip": "192.0.2.0",
  "licenseId": "string",
  "status": "ok",
  "version": "VERSION_11_FOR_LINUX"
}
```

### Example

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

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

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

result = client.get("/license/cpanel/{serviceName}")

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

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

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

$result = $ovh->get("/license/cpanel/{serviceName}");

print_r($result);
?>
```

## Alter this object properties

`PUT /1.0/license/cpanel/{serviceName}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#put-license-cpanel-servicename

**Status:** Stable production version  
**IAM actions:** `licenseCpanel:apiovh:put`

### Parameters

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

### Request body (required)

Type: `license.cpanel.Cpanel`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creation` | string (date-time) | read-only | This license creation date |
| `deleteAtExpiration` | boolean |  | Shall we delete this on expiration ? |
| `domain` | string | read-only | The internal name of your license |
| `ip` | ipv4 | read-only | The ip on which this license is attached |
| `licenseId` | string | read-only | The license id on license provider side |
| `status` | license.StateEnum | read-only | This license state — one of `ok`, `released`, `terminated`, `toDeliver` |
| `version` | license.CpanelVersionEnum | read-only | This license version — one of `VERSION_11_FOR_LINUX`, `VERSION_11_FOR_VIRTUOZZO`, `VERSION_11_FOR_VPS`, `cpanel-license-version-11`, `cpanel-license-version-11-for-virtuozzo`, `cpanel-license-version-11-for-vps`, `version-admin-cloud`, `version-plus-cloud`, `version-premier-cloud-100`, `version-premier-cloud-1000`, `version-premier-cloud-10000`, `version-premier-cloud-1100`, … |

```json
{
  "deleteAtExpiration": true
}
```

### Responses

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

### Example

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

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

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

# Request body type: license.cpanel.Cpanel
result = client.put("/license/cpanel/{serviceName}",
	deleteAtExpiration = None, # Shall we delete this on expiration ? (type: boolean)
)

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

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

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

// Request body type: license.cpanel.Cpanel
$result = $ovh->put("/license/cpanel/{serviceName}", array(
	deleteAtExpiration => null, // Shall we delete this on expiration ? (type: boolean)
));

print_r($result);
?>
```

## Returns an array of ips where the license can be moved to

`GET /1.0/license/cpanel/{serviceName}/allowedDestinationIp`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-cpanel-servicename-alloweddestinationip

**Status:** Stable production version  
**IAM actions:** `licenseCpanel:apiovh:allowedDestinationIp/get`

### Parameters

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

### Responses

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

```json
[
  "192.0.2.0/24"
]
```

### Example

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

# 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("/license/cpanel/{serviceName}/allowedDestinationIp");

print_r($result);
?>
```

## Will tell if the ip can accept the license

`GET /1.0/license/cpanel/{serviceName}/canLicenseBeMovedTo`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-cpanel-servicename-canlicensebemovedto

**Status:** Stable production version  
**IAM actions:** `licenseCpanel:apiovh:canLicenseBeMovedTo/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `destinationIp` | query | ipv4 | yes | The Ip on which you want to move this license |
| `serviceName` | path | string | yes | The name of your Cpanel license |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.ChangeIpStatus | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `message` | license.ChangeIpMessageEnum |  | Messages from change IP — one of `OK`, `destinationNotAllowed`, `licenseAlreadyExists`, `notAllowedToHandleThis`, `notSameType`, `sameIp`, `versionNotAllowed` |
| `success` | boolean |  |  |

```json
{
  "message": "OK",
  "success": true
}
```

### Example

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

# 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("/license/cpanel/{serviceName}/canLicenseBeMovedTo");

print_r($result);
?>
```

## Move this license to another Ip

`POST /1.0/license/cpanel/{serviceName}/changeIp`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#post-license-cpanel-servicename-changeip

**Status:** Stable production version  
**IAM actions:** `licenseCpanel:apiovh:changeIp`

### Parameters

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

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `destinationIp` | ipv4 | yes | The Ip on which you want to move this license |

```json
{
  "destinationIp": "192.0.2.0"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | license.ActionType | read-only | This Task description — one of `addWindowFromExistingSerial`, `changeIp`, `changeOs`, `installLicense`, `optionUpgrade`, `releaseOption`, `versionUpgrade` |
| `doneDate` | string (date-time) | read-only | When was this Task done |
| `lastUpdate` | string (date-time) | read-only | The last time this Task was updated |
| `name` | string | read-only | This Task name |
| `status` | license.TaskStateEnum | read-only | Current Taks status — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `taskId` | integer | read-only | This Task id |
| `todoDate` | string (date-time) | read-only | When was this Task created |

```json
{
  "action": "addWindowFromExistingSerial",
  "doneDate": "2024-01-01T12:00:00Z",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "name": "string",
  "status": "cancelled",
  "taskId": 0,
  "todoDate": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/license/cpanel/{serviceName}/changeIp" \
  -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: ipv4
result = client.post("/license/cpanel/{serviceName}/changeIp",
	destinationIp = None, # The Ip on which you want to move this license (type: ipv4)
)

# 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: ipv4
$result = $ovh->post("/license/cpanel/{serviceName}/changeIp", array(
	destinationIp => null, // The Ip on which you want to move this license (type: ipv4)
));

print_r($result);
?>
```

## Confirm service termination

`POST /1.0/license/cpanel/{serviceName}/confirmTermination`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#post-license-cpanel-servicename-confirmtermination

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

Confirm service termination. Terminates the service with the token sent by email to the admin contact. A reason, a future use and a comment can be given.

### Parameters

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

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `commentary` | string |  | Commentary about your termination request |
| `futureUse` | service.TerminationFutureUseEnum |  | What next after your termination request — one of `NOT_REPLACING_SERVICE`, `OTHER`, `SUBSCRIBE_AN_OTHER_SERVICE`, `SUBSCRIBE_OTHER_KIND_OF_SERVICE_WITH_COMPETITOR`, `SUBSCRIBE_SIMILAR_SERVICE_WITH_COMPETITOR` |
| `reason` | service.TerminationReasonEnum |  | Reason of your termination request — one of `FEATURES_DONT_SUIT_ME`, `LACK_OF_PERFORMANCES`, `MIGRATED_TO_ANOTHER_OVH_PRODUCT`, `MIGRATED_TO_COMPETITOR`, `NOT_ENOUGH_RECOGNITION`, `NOT_NEEDED_ANYMORE`, `NOT_RELIABLE`, `NO_ANSWER`, `OTHER`, `PRODUCT_DIMENSION_DONT_SUIT_ME`, `PRODUCT_TOOLS_DONT_SUIT_ME`, `TOO_EXPENSIVE`, … |
| `token` | string | yes | The termination token sent by email to the admin contact |

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

### Responses

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

```json
"string"
```

### Example

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

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

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

result = client.post("/license/cpanel/{serviceName}/confirmTermination",
	commentary = None, # Commentary about your termination request (type: string, nullable)
	futureUse = None, # What next after your termination request (type: service.TerminationFutureUseEnum, nullable)
	reason = None, # Reason of your termination request (type: service.TerminationReasonEnum, nullable)
	token = None, # The termination token sent by email to the admin contact (type: string)
)

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

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

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

$result = $ovh->post("/license/cpanel/{serviceName}/confirmTermination", array(
	commentary => null, // Commentary about your termination request (type: string, nullable)
	futureUse => null, // What next after your termination request (type: service.TerminationFutureUseEnum, nullable)
	reason => null, // Reason of your termination request (type: service.TerminationReasonEnum, nullable)
	token => null, // The termination token sent by email to the admin contact (type: string)
));

print_r($result);
?>
```

## Get service information

`GET /1.0/license/cpanel/{serviceName}/serviceInfos`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-cpanel-servicename-serviceinfos

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

Get service information. Returns the status, creation and expiration dates, contacts and renewal settings of the service.

### Parameters

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

### Responses

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

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

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

### Example

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

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

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

result = client.get("/license/cpanel/{serviceName}/serviceInfos")

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

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

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

$result = $ovh->get("/license/cpanel/{serviceName}/serviceInfos");

print_r($result);
?>
```

## Update service information

`PUT /1.0/license/cpanel/{serviceName}/serviceInfos`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#put-license-cpanel-servicename-serviceinfos

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

Update service information. Updates the renewal settings of the service: automatic renewal, period, or deletion at expiration.

### Parameters

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

### Request body (required)

Type: `services.Service`

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

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

### Responses

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

### Example

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

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

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

# Request body type: services.Service
result = client.put("/license/cpanel/{serviceName}/serviceInfos",
	renew = None, # Way of handling the renew (type: service.RenewType, nullable)
)

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

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

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

// Request body type: services.Service
$result = $ovh->put("/license/cpanel/{serviceName}/serviceInfos", array(
	renew => null, // Way of handling the renew (type: service.RenewType, nullable)
));

print_r($result);
?>
```

## tasks linked to this license

`GET /1.0/license/cpanel/{serviceName}/tasks`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-cpanel-servicename-tasks

**Status:** Stable production version  
**IAM actions:** `licenseCpanel:apiovh:tasks/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `action` | query | license.ActionType |  | Filter the value of action property (=) — one of `addWindowFromExistingSerial`, `changeIp`, `changeOs`, `installLicense`, `optionUpgrade`, `releaseOption`, `versionUpgrade` |
| `serviceName` | path | string | yes | The name of your Cpanel license |
| `status` | query | license.TaskStateEnum |  | Filter the value of status property (=) — one of `cancelled`, `doing`, `done`, `error`, `todo` |

### Responses

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

```json
[
  0
]
```

### Example

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

# 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("/license/cpanel/{serviceName}/tasks");

print_r($result);
?>
```

## Get this object properties

`GET /1.0/license/cpanel/{serviceName}/tasks/{taskId}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-cpanel-servicename-tasks-taskid

**Status:** Stable production version  
**IAM actions:** `licenseCpanel:apiovh:tasks/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The name of your Cpanel license |
| `taskId` | path | integer | yes | This Task id |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | license.ActionType | read-only | This Task description — one of `addWindowFromExistingSerial`, `changeIp`, `changeOs`, `installLicense`, `optionUpgrade`, `releaseOption`, `versionUpgrade` |
| `doneDate` | string (date-time) | read-only | When was this Task done |
| `lastUpdate` | string (date-time) | read-only | The last time this Task was updated |
| `name` | string | read-only | This Task name |
| `status` | license.TaskStateEnum | read-only | Current Taks status — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `taskId` | integer | read-only | This Task id |
| `todoDate` | string (date-time) | read-only | When was this Task created |

```json
{
  "action": "addWindowFromExistingSerial",
  "doneDate": "2024-01-01T12:00:00Z",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "name": "string",
  "status": "cancelled",
  "taskId": 0,
  "todoDate": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/license/cpanel/{serviceName}/tasks/{taskId}" \
  -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("/license/cpanel/{serviceName}/tasks/{taskId}")

# 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("/license/cpanel/{serviceName}/tasks/{taskId}");

print_r($result);
?>
```

## Request service termination

`POST /1.0/license/cpanel/{serviceName}/terminate`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#post-license-cpanel-servicename-terminate

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

Request service termination. Starts the termination of the service. The admin contact receives a token by email, to confirm with the `confirmTermination` call.

### Parameters

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

### Responses

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

```json
"string"
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/license/cpanel/{serviceName}/terminate" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

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

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

result = client.post("/license/cpanel/{serviceName}/terminate")

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

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

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

$result = $ovh->post("/license/cpanel/{serviceName}/terminate");

print_r($result);
?>
```

## List available services

`GET /1.0/license/directadmin`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-directadmin

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

### Parameters

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

### Responses

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

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

### Example

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

# 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("/license/directadmin");

print_r($result);
?>
```

## Get the orderable DirectAdmin versions

`GET /1.0/license/directadmin/orderableVersions`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-directadmin-orderableversions

**Status:** Stable production version  
**IAM actions:** `account:apiovh:licenseDirectAdmin/orderableVersions/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `ip` | query | ipv4 | yes | Your license Ip |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.DirectAdminOrderConfiguration[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `orderableVersions` | license.OrderableDirectAdminCompatibilityInfos[] |  |  |
| `orderableVersions[].version` | license.OrderableDirectAdminVersionEnum |  | All versions available for DirectAdmin products — one of `DIRECTADMIN_1`, `directadmin-license` |
| `serviceType` | license.LicenseTypeEnum |  | Possible values for license type — one of `dedicated`, `dedicatedCloud`, `dedicatedFailover`, `failover`, `vm`, `vps`, `vps_ceph`, `vps_classic`, `vps_cloud`, `vps_cloud_2016`, `vps_ssd` |

```json
[
  {
    "orderableVersions": [
      {
        "version": "DIRECTADMIN_1"
      }
    ],
    "serviceType": "dedicated"
  }
]
```

### Example

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

# 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("/license/directadmin/orderableVersions");

print_r($result);
?>
```

## Get this object properties

`GET /1.0/license/directadmin/{serviceName}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-directadmin-servicename

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

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.directadmin.DirectAdminWithIAM | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `clientId` | integer | read-only | The client id on license provider side |
| `creation` | string (date-time) | read-only | This license creation date |
| `deleteAtExpiration` | boolean |  | Shall we delete this on expiration ? |
| `domain` | string | read-only | The internal name of your license |
| `iam` | iam.ResourceMetadata | read-only | IAM resource metadata |
| `iam.displayName` | string | read-only | Resource display name |
| `iam.id` | string (uuid) | read-only | Unique identifier of the resource |
| `iam.state` | iam.ResourceMetadata.StateEnum | read-only | Resource state — one of `EXPIRED`, `IN_CREATION`, `OK`, `SUSPENDED` |
| `iam.tags` | object | read-only | Resource tags. Tags that were internally computed are prefixed with ovh: |
| `iam.urn` | string | read-only | Unique resource name used in policies |
| `ip` | ipv4 | read-only | The ip on which this license is attached |
| `licenseId` | string | read-only | The license id on license provider side |
| `os` | license.DirectAdminOsEnum |  | This license operating system — one of `CentOs_5.0_32`, `CentOs_5.0_64`, `CentOs_6_32`, `CentOs_6_64`, `CentOs_7_64`, `CentOs_8_64`, `Debian_10.0_64`, `Debian_11.0_64`, `Debian_5.0_32`, `Debian_5.0_64`, `Debian_6.0_32`, `Debian_6.0_64`, … |
| `status` | license.StateEnum | read-only | This license state — one of `ok`, `released`, `terminated`, `toDeliver` |
| `version` | license.DirectAdminVersionEnum | read-only | This license version — one of `DIRECTADMIN_1`, `directadmin-license` |

```json
{
  "clientId": 0,
  "creation": "2024-01-01T12:00:00Z",
  "deleteAtExpiration": true,
  "domain": "string",
  "iam": {
    "displayName": "string",
    "id": "00000000-0000-0000-0000-000000000000",
    "state": "EXPIRED",
    "tags": {
      "key": "string"
    },
    "urn": "string"
  },
  "ip": "192.0.2.0",
  "licenseId": "string",
  "os": "CentOs_5.0_32",
  "status": "ok",
  "version": "DIRECTADMIN_1"
}
```

### Example

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

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

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

result = client.get("/license/directadmin/{serviceName}")

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

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

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

$result = $ovh->get("/license/directadmin/{serviceName}");

print_r($result);
?>
```

## Alter this object properties

`PUT /1.0/license/directadmin/{serviceName}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#put-license-directadmin-servicename

**Status:** Stable production version  
**IAM actions:** `licenseDirectAdmin:apiovh:put`

### Parameters

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

### Request body (required)

Type: `license.directadmin.DirectAdmin`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `clientId` | integer | read-only | The client id on license provider side |
| `creation` | string (date-time) | read-only | This license creation date |
| `deleteAtExpiration` | boolean |  | Shall we delete this on expiration ? |
| `domain` | string | read-only | The internal name of your license |
| `ip` | ipv4 | read-only | The ip on which this license is attached |
| `licenseId` | string | read-only | The license id on license provider side |
| `os` | license.DirectAdminOsEnum |  | This license operating system — one of `CentOs_5.0_32`, `CentOs_5.0_64`, `CentOs_6_32`, `CentOs_6_64`, `CentOs_7_64`, `CentOs_8_64`, `Debian_10.0_64`, `Debian_11.0_64`, `Debian_5.0_32`, `Debian_5.0_64`, `Debian_6.0_32`, `Debian_6.0_64`, … |
| `status` | license.StateEnum | read-only | This license state — one of `ok`, `released`, `terminated`, `toDeliver` |
| `version` | license.DirectAdminVersionEnum | read-only | This license version — one of `DIRECTADMIN_1`, `directadmin-license` |

```json
{
  "deleteAtExpiration": true,
  "os": "CentOs_5.0_32"
}
```

### Responses

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

### Example

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

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

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

# Request body type: license.directadmin.DirectAdmin
result = client.put("/license/directadmin/{serviceName}",
	deleteAtExpiration = None, # Shall we delete this on expiration ? (type: boolean)
	os = None, # This license operating system (type: license.DirectAdminOsEnum)
)

# 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: license.directadmin.DirectAdmin
$result = $ovh->put("/license/directadmin/{serviceName}", array(
	deleteAtExpiration => null, // Shall we delete this on expiration ? (type: boolean)
	os => null, // This license operating system (type: license.DirectAdminOsEnum)
));

print_r($result);
?>
```

## Returns an array of ips where the license can be moved to

`GET /1.0/license/directadmin/{serviceName}/allowedDestinationIp`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-directadmin-servicename-alloweddestinationip

**Status:** Stable production version  
**IAM actions:** `licenseDirectAdmin:apiovh:allowedDestinationIp/get`

### Parameters

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

### Responses

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

```json
[
  "192.0.2.0/24"
]
```

### Example

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

# 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("/license/directadmin/{serviceName}/allowedDestinationIp");

print_r($result);
?>
```

## Will tell if the ip can accept the license

`GET /1.0/license/directadmin/{serviceName}/canLicenseBeMovedTo`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-directadmin-servicename-canlicensebemovedto

**Status:** Stable production version  
**IAM actions:** `licenseDirectAdmin:apiovh:canLicenseBeMovedTo/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `destinationIp` | query | ipv4 | yes | The Ip on which you want to move this license |
| `serviceName` | path | string | yes | The name of your DirectAdmin license |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.ChangeIpStatus | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `message` | license.ChangeIpMessageEnum |  | Messages from change IP — one of `OK`, `destinationNotAllowed`, `licenseAlreadyExists`, `notAllowedToHandleThis`, `notSameType`, `sameIp`, `versionNotAllowed` |
| `success` | boolean |  |  |

```json
{
  "message": "OK",
  "success": true
}
```

### Example

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

# 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("/license/directadmin/{serviceName}/canLicenseBeMovedTo");

print_r($result);
?>
```

## Move this license to another Ip

`POST /1.0/license/directadmin/{serviceName}/changeIp`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#post-license-directadmin-servicename-changeip

**Status:** Stable production version  
**IAM actions:** `licenseDirectAdmin:apiovh:changeIp`

### Parameters

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

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `destinationIp` | ipv4 | yes | The Ip on which you want to move this license |

```json
{
  "destinationIp": "192.0.2.0"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | license.ActionType | read-only | This Task description — one of `addWindowFromExistingSerial`, `changeIp`, `changeOs`, `installLicense`, `optionUpgrade`, `releaseOption`, `versionUpgrade` |
| `doneDate` | string (date-time) | read-only | When was this Task done |
| `lastUpdate` | string (date-time) | read-only | The last time this Task was updated |
| `name` | string | read-only | This Task name |
| `status` | license.TaskStateEnum | read-only | Current Taks status — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `taskId` | integer | read-only | This Task id |
| `todoDate` | string (date-time) | read-only | When was this Task created |

```json
{
  "action": "addWindowFromExistingSerial",
  "doneDate": "2024-01-01T12:00:00Z",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "name": "string",
  "status": "cancelled",
  "taskId": 0,
  "todoDate": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/license/directadmin/{serviceName}/changeIp" \
  -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: ipv4
result = client.post("/license/directadmin/{serviceName}/changeIp",
	destinationIp = None, # The Ip on which you want to move this license (type: ipv4)
)

# 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: ipv4
$result = $ovh->post("/license/directadmin/{serviceName}/changeIp", array(
	destinationIp => null, // The Ip on which you want to move this license (type: ipv4)
));

print_r($result);
?>
```

## Change the Operating System for a license

`POST /1.0/license/directadmin/{serviceName}/changeOs`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#post-license-directadmin-servicename-changeos

**Status:** Stable production version  
**IAM actions:** `licenseDirectAdmin:apiovh:changeOs`

### Parameters

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

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `os` | license.DirectAdminOsEnum | yes | The operating system you want for this license — one of `CentOs_5.0_32`, `CentOs_5.0_64`, `CentOs_6_32`, `CentOs_6_64`, `CentOs_7_64`, `CentOs_8_64`, `Debian_10.0_64`, `Debian_11.0_64`, `Debian_5.0_32`, `Debian_5.0_64`, `Debian_6.0_32`, `Debian_6.0_64`, … |

```json
{
  "os": "CentOs_5.0_32"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | license.ActionType | read-only | This Task description — one of `addWindowFromExistingSerial`, `changeIp`, `changeOs`, `installLicense`, `optionUpgrade`, `releaseOption`, `versionUpgrade` |
| `doneDate` | string (date-time) | read-only | When was this Task done |
| `lastUpdate` | string (date-time) | read-only | The last time this Task was updated |
| `name` | string | read-only | This Task name |
| `status` | license.TaskStateEnum | read-only | Current Taks status — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `taskId` | integer | read-only | This Task id |
| `todoDate` | string (date-time) | read-only | When was this Task created |

```json
{
  "action": "addWindowFromExistingSerial",
  "doneDate": "2024-01-01T12:00:00Z",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "name": "string",
  "status": "cancelled",
  "taskId": 0,
  "todoDate": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/license/directadmin/{serviceName}/changeOs" \
  -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: license.DirectAdminOsEnum
result = client.post("/license/directadmin/{serviceName}/changeOs",
	os = None, # The operating system you want for this license (type: license.DirectAdminOsEnum)
)

# 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: license.DirectAdminOsEnum
$result = $ovh->post("/license/directadmin/{serviceName}/changeOs", array(
	os => null, // The operating system you want for this license (type: license.DirectAdminOsEnum)
));

print_r($result);
?>
```

## Confirm service termination

`POST /1.0/license/directadmin/{serviceName}/confirmTermination`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#post-license-directadmin-servicename-confirmtermination

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

Confirm service termination. Terminates the service with the token sent by email to the admin contact. A reason, a future use and a comment can be given.

### Parameters

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

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `commentary` | string |  | Commentary about your termination request |
| `futureUse` | service.TerminationFutureUseEnum |  | What next after your termination request — one of `NOT_REPLACING_SERVICE`, `OTHER`, `SUBSCRIBE_AN_OTHER_SERVICE`, `SUBSCRIBE_OTHER_KIND_OF_SERVICE_WITH_COMPETITOR`, `SUBSCRIBE_SIMILAR_SERVICE_WITH_COMPETITOR` |
| `reason` | service.TerminationReasonEnum |  | Reason of your termination request — one of `FEATURES_DONT_SUIT_ME`, `LACK_OF_PERFORMANCES`, `MIGRATED_TO_ANOTHER_OVH_PRODUCT`, `MIGRATED_TO_COMPETITOR`, `NOT_ENOUGH_RECOGNITION`, `NOT_NEEDED_ANYMORE`, `NOT_RELIABLE`, `NO_ANSWER`, `OTHER`, `PRODUCT_DIMENSION_DONT_SUIT_ME`, `PRODUCT_TOOLS_DONT_SUIT_ME`, `TOO_EXPENSIVE`, … |
| `token` | string | yes | The termination token sent by email to the admin contact |

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

### Responses

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

```json
"string"
```

### Example

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

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

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

result = client.post("/license/directadmin/{serviceName}/confirmTermination",
	commentary = None, # Commentary about your termination request (type: string, nullable)
	futureUse = None, # What next after your termination request (type: service.TerminationFutureUseEnum, nullable)
	reason = None, # Reason of your termination request (type: service.TerminationReasonEnum, nullable)
	token = None, # The termination token sent by email to the admin contact (type: string)
)

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

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

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

$result = $ovh->post("/license/directadmin/{serviceName}/confirmTermination", array(
	commentary => null, // Commentary about your termination request (type: string, nullable)
	futureUse => null, // What next after your termination request (type: service.TerminationFutureUseEnum, nullable)
	reason => null, // Reason of your termination request (type: service.TerminationReasonEnum, nullable)
	token => null, // The termination token sent by email to the admin contact (type: string)
));

print_r($result);
?>
```

## Get service information

`GET /1.0/license/directadmin/{serviceName}/serviceInfos`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-directadmin-servicename-serviceinfos

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

Get service information. Returns the status, creation and expiration dates, contacts and renewal settings of the service.

### Parameters

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

### Responses

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

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

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

### Example

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

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

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

result = client.get("/license/directadmin/{serviceName}/serviceInfos")

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

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

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

$result = $ovh->get("/license/directadmin/{serviceName}/serviceInfos");

print_r($result);
?>
```

## Update service information

`PUT /1.0/license/directadmin/{serviceName}/serviceInfos`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#put-license-directadmin-servicename-serviceinfos

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

Update service information. Updates the renewal settings of the service: automatic renewal, period, or deletion at expiration.

### Parameters

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

### Request body (required)

Type: `services.Service`

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

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

### Responses

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

### Example

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

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

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

# Request body type: services.Service
result = client.put("/license/directadmin/{serviceName}/serviceInfos",
	renew = None, # Way of handling the renew (type: service.RenewType, nullable)
)

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

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

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

// Request body type: services.Service
$result = $ovh->put("/license/directadmin/{serviceName}/serviceInfos", array(
	renew => null, // Way of handling the renew (type: service.RenewType, nullable)
));

print_r($result);
?>
```

## tasks linked to this license

`GET /1.0/license/directadmin/{serviceName}/tasks`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-directadmin-servicename-tasks

**Status:** Stable production version  
**IAM actions:** `licenseDirectAdmin:apiovh:tasks/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `action` | query | license.ActionType |  | Filter the value of action property (=) — one of `addWindowFromExistingSerial`, `changeIp`, `changeOs`, `installLicense`, `optionUpgrade`, `releaseOption`, `versionUpgrade` |
| `serviceName` | path | string | yes | The name of your DirectAdmin license |
| `status` | query | license.TaskStateEnum |  | Filter the value of status property (=) — one of `cancelled`, `doing`, `done`, `error`, `todo` |

### Responses

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

```json
[
  0
]
```

### Example

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

# 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("/license/directadmin/{serviceName}/tasks");

print_r($result);
?>
```

## Get this object properties

`GET /1.0/license/directadmin/{serviceName}/tasks/{taskId}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-directadmin-servicename-tasks-taskid

**Status:** Stable production version  
**IAM actions:** `licenseDirectAdmin:apiovh:tasks/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The name of your DirectAdmin license |
| `taskId` | path | integer | yes | This Task id |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | license.ActionType | read-only | This Task description — one of `addWindowFromExistingSerial`, `changeIp`, `changeOs`, `installLicense`, `optionUpgrade`, `releaseOption`, `versionUpgrade` |
| `doneDate` | string (date-time) | read-only | When was this Task done |
| `lastUpdate` | string (date-time) | read-only | The last time this Task was updated |
| `name` | string | read-only | This Task name |
| `status` | license.TaskStateEnum | read-only | Current Taks status — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `taskId` | integer | read-only | This Task id |
| `todoDate` | string (date-time) | read-only | When was this Task created |

```json
{
  "action": "addWindowFromExistingSerial",
  "doneDate": "2024-01-01T12:00:00Z",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "name": "string",
  "status": "cancelled",
  "taskId": 0,
  "todoDate": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/license/directadmin/{serviceName}/tasks/{taskId}" \
  -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("/license/directadmin/{serviceName}/tasks/{taskId}")

# 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("/license/directadmin/{serviceName}/tasks/{taskId}");

print_r($result);
?>
```

## Request service termination

`POST /1.0/license/directadmin/{serviceName}/terminate`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#post-license-directadmin-servicename-terminate

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

Request service termination. Starts the termination of the service. The admin contact receives a token by email, to confirm with the `confirmTermination` call.

### Parameters

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

### Responses

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

```json
"string"
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/license/directadmin/{serviceName}/terminate" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

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

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

result = client.post("/license/directadmin/{serviceName}/terminate")

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

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

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

$result = $ovh->post("/license/directadmin/{serviceName}/terminate");

print_r($result);
?>
```

## List available services

`GET /1.0/license/plesk`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-plesk

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

### Parameters

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

### Responses

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

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

### Example

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

# 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("/license/plesk");

print_r($result);
?>
```

## Get the orderable Plesk versions and their associated compatibilities

`GET /1.0/license/plesk/orderableVersions`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-plesk-orderableversions

**Status:** Stable production version  
**IAM actions:** `account:apiovh:licensePlesk/orderableVersions/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `ip` | query | ipv4 | yes | Your license Ip |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.PleskOrderConfiguration[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `orderableVersions` | license.OrderablePleskCompatibilityInfos[] |  |  |
| `orderableVersions[].canHavePowerPack` | boolean |  |  |
| `orderableVersions[].canHaveResellerManagement` | boolean |  |  |
| `orderableVersions[].canHaveWordpressToolkit` | boolean |  |  |
| `orderableVersions[].compliantAntivirus` | license.OrderableAntivirusEnum[] |  |  |
| `orderableVersions[].compliantApplicationSets` | license.PleskApplicationSetEnum[] |  |  |
| `orderableVersions[].compliantDomains` | license.OrderablePleskDomainNumberEnum[] |  |  |
| `orderableVersions[].compliantLanguagePack` | license.OrderablePleskLanguagePackEnum[] |  |  |
| `orderableVersions[].potentialProblems` | license.PotentialProblemPleskEnum[] |  |  |
| `orderableVersions[].version` | license.PleskVersionEnum |  | All versions available for Plesk products — one of `PLESK_10_AND_LATER`, `PLESK_10_AND_LATER_FOR_KVM`, `PLESK_10_AND_LATER_FOR_VMWARE`, `PLESK_10_AND_LATER_FOR_VZ`, `PLESK_10_AND_LATER_FOR_WIN`, `PLESK_10_AND_LATER_FOR_WIN_FOR_VMWARE`, `PLESK_10_AND_LATER_FOR_WIN_FOR_VZ`, `PLESK_10_AND_LATER_FOR_WIN_FOR_XEN`, `PLESK_10_AND_LATER_FOR_XEN`, `PLESK_12_VPS_WEB_ADMIN`, `PLESK_12_VPS_WEB_APP`, `PLESK_12_VPS_WEB_HOST`, … |
| `serviceType` | license.LicenseTypeEnum |  | Possible values for license type — one of `dedicated`, `dedicatedCloud`, `dedicatedFailover`, `failover`, `vm`, `vps`, `vps_ceph`, `vps_classic`, `vps_cloud`, `vps_cloud_2016`, `vps_ssd` |

```json
[
  {
    "orderableVersions": [
      {
        "canHavePowerPack": true,
        "canHaveResellerManagement": true,
        "canHaveWordpressToolkit": true,
        "compliantAntivirus": [
          "DR_WEB"
        ],
        "compliantApplicationSets": [
          "applicationpack"
        ],
        "compliantDomains": [
          "10"
        ],
        "compliantLanguagePack": [
          "1"
        ],
        "potentialProblems": [
          "isHostOsHyperVLike"
        ],
        "version": "PLESK_10_AND_LATER"
      }
    ],
    "serviceType": "dedicated"
  }
]
```

### Example

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

# 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("/license/plesk/orderableVersions");

print_r($result);
?>
```

## Get this object properties

`GET /1.0/license/plesk/{serviceName}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-plesk-servicename

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

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.plesk.PleskWithIAM | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creation` | string (date-time) | read-only | This license creation date |
| `deleteAtExpiration` | boolean |  | Shall we delete this on expiration ? |
| `domain` | string | read-only | The internal name of your license |
| `domainNumber` | license.DomainNumberEnum | read-only | The amount of domain this license can manage — one of `0`, `1`, `10`, `100`, `30`, `300`, `unlimited` |
| `iam` | iam.ResourceMetadata | read-only | IAM resource metadata |
| `iam.displayName` | string | read-only | Resource display name |
| `iam.id` | string (uuid) | read-only | Unique identifier of the resource |
| `iam.state` | iam.ResourceMetadata.StateEnum | read-only | Resource state — one of `EXPIRED`, `IN_CREATION`, `OK`, `SUSPENDED` |
| `iam.tags` | object | read-only | Resource tags. Tags that were internally computed are prefixed with ovh: |
| `iam.urn` | string | read-only | Unique resource name used in policies |
| `informationKey` | string | read-only | This license Information key |
| `ip` | ipv4 | read-only | The ip on which this license is attached |
| `key` | string | read-only | This license key |
| `licenseId` | string | read-only | The license id on license provider side |
| `productKey` | string | read-only | This license product key |
| `status` | license.StateEnum | read-only | This license state — one of `ok`, `released`, `terminated`, `toDeliver` |
| `version` | license.PleskVersionEnum | read-only | This license version — one of `PLESK_10_AND_LATER`, `PLESK_10_AND_LATER_FOR_KVM`, `PLESK_10_AND_LATER_FOR_VMWARE`, `PLESK_10_AND_LATER_FOR_VZ`, `PLESK_10_AND_LATER_FOR_WIN`, `PLESK_10_AND_LATER_FOR_WIN_FOR_VMWARE`, `PLESK_10_AND_LATER_FOR_WIN_FOR_VZ`, `PLESK_10_AND_LATER_FOR_WIN_FOR_XEN`, `PLESK_10_AND_LATER_FOR_XEN`, `PLESK_12_VPS_WEB_ADMIN`, `PLESK_12_VPS_WEB_APP`, `PLESK_12_VPS_WEB_HOST`, … |

```json
{
  "creation": "2024-01-01T12:00:00Z",
  "deleteAtExpiration": true,
  "domain": "string",
  "domainNumber": "0",
  "iam": {
    "displayName": "string",
    "id": "00000000-0000-0000-0000-000000000000",
    "state": "EXPIRED",
    "tags": {
      "key": "string"
    },
    "urn": "string"
  },
  "informationKey": "string",
  "ip": "192.0.2.0",
  "key": "string",
  "licenseId": "string",
  "productKey": "string",
  "status": "ok",
  "version": "PLESK_10_AND_LATER"
}
```

### Example

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

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

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

result = client.get("/license/plesk/{serviceName}")

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

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

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

$result = $ovh->get("/license/plesk/{serviceName}");

print_r($result);
?>
```

## Alter this object properties

`PUT /1.0/license/plesk/{serviceName}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#put-license-plesk-servicename

**Status:** Stable production version  
**IAM actions:** `licensePlesk:apiovh:put`

### Parameters

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

### Request body (required)

Type: `license.plesk.Plesk`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creation` | string (date-time) | read-only | This license creation date |
| `deleteAtExpiration` | boolean |  | Shall we delete this on expiration ? |
| `domain` | string | read-only | The internal name of your license |
| `domainNumber` | license.DomainNumberEnum | read-only | The amount of domain this license can manage — one of `0`, `1`, `10`, `100`, `30`, `300`, `unlimited` |
| `informationKey` | string | read-only | This license Information key |
| `ip` | ipv4 | read-only | The ip on which this license is attached |
| `key` | string | read-only | This license key |
| `licenseId` | string | read-only | The license id on license provider side |
| `productKey` | string | read-only | This license product key |
| `status` | license.StateEnum | read-only | This license state — one of `ok`, `released`, `terminated`, `toDeliver` |
| `version` | license.PleskVersionEnum | read-only | This license version — one of `PLESK_10_AND_LATER`, `PLESK_10_AND_LATER_FOR_KVM`, `PLESK_10_AND_LATER_FOR_VMWARE`, `PLESK_10_AND_LATER_FOR_VZ`, `PLESK_10_AND_LATER_FOR_WIN`, `PLESK_10_AND_LATER_FOR_WIN_FOR_VMWARE`, `PLESK_10_AND_LATER_FOR_WIN_FOR_VZ`, `PLESK_10_AND_LATER_FOR_WIN_FOR_XEN`, `PLESK_10_AND_LATER_FOR_XEN`, `PLESK_12_VPS_WEB_ADMIN`, `PLESK_12_VPS_WEB_APP`, `PLESK_12_VPS_WEB_HOST`, … |

```json
{
  "deleteAtExpiration": true
}
```

### Responses

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

### Example

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

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

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

# Request body type: license.plesk.Plesk
result = client.put("/license/plesk/{serviceName}",
	deleteAtExpiration = None, # Shall we delete this on expiration ? (type: boolean)
)

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

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

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

// Request body type: license.plesk.Plesk
$result = $ovh->put("/license/plesk/{serviceName}", array(
	deleteAtExpiration => null, // Shall we delete this on expiration ? (type: boolean)
));

print_r($result);
?>
```

## Returns an array of ips where the license can be moved to

`GET /1.0/license/plesk/{serviceName}/allowedDestinationIp`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-plesk-servicename-alloweddestinationip

**Status:** Stable production version  
**IAM actions:** `licensePlesk:apiovh:allowedDestinationIp/get`

### Parameters

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

### Responses

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

```json
[
  "192.0.2.0/24"
]
```

### Example

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

# 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("/license/plesk/{serviceName}/allowedDestinationIp");

print_r($result);
?>
```

## Will tell if the ip can accept the license

`GET /1.0/license/plesk/{serviceName}/canLicenseBeMovedTo`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-plesk-servicename-canlicensebemovedto

**Status:** Stable production version  
**IAM actions:** `licensePlesk:apiovh:canLicenseBeMovedTo/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `destinationIp` | query | ipv4 | yes | The Ip on which you want to move this license |
| `serviceName` | path | string | yes | The name of your Plesk license |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.ChangeIpStatus | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `message` | license.ChangeIpMessageEnum |  | Messages from change IP — one of `OK`, `destinationNotAllowed`, `licenseAlreadyExists`, `notAllowedToHandleThis`, `notSameType`, `sameIp`, `versionNotAllowed` |
| `success` | boolean |  |  |

```json
{
  "message": "OK",
  "success": true
}
```

### Example

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

# 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("/license/plesk/{serviceName}/canLicenseBeMovedTo");

print_r($result);
?>
```

## Move this license to another Ip

`POST /1.0/license/plesk/{serviceName}/changeIp`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#post-license-plesk-servicename-changeip

**Status:** Stable production version  
**IAM actions:** `licensePlesk:apiovh:changeIp`

### Parameters

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

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `destinationIp` | ipv4 | yes | The Ip on which you want to move this license |

```json
{
  "destinationIp": "192.0.2.0"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | license.ActionType | read-only | This Task description — one of `addWindowFromExistingSerial`, `changeIp`, `changeOs`, `installLicense`, `optionUpgrade`, `releaseOption`, `versionUpgrade` |
| `doneDate` | string (date-time) | read-only | When was this Task done |
| `lastUpdate` | string (date-time) | read-only | The last time this Task was updated |
| `name` | string | read-only | This Task name |
| `status` | license.TaskStateEnum | read-only | Current Taks status — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `taskId` | integer | read-only | This Task id |
| `todoDate` | string (date-time) | read-only | When was this Task created |

```json
{
  "action": "addWindowFromExistingSerial",
  "doneDate": "2024-01-01T12:00:00Z",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "name": "string",
  "status": "cancelled",
  "taskId": 0,
  "todoDate": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/license/plesk/{serviceName}/changeIp" \
  -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: ipv4
result = client.post("/license/plesk/{serviceName}/changeIp",
	destinationIp = None, # The Ip on which you want to move this license (type: ipv4)
)

# 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: ipv4
$result = $ovh->post("/license/plesk/{serviceName}/changeIp", array(
	destinationIp => null, // The Ip on which you want to move this license (type: ipv4)
));

print_r($result);
?>
```

## Confirm service termination

`POST /1.0/license/plesk/{serviceName}/confirmTermination`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#post-license-plesk-servicename-confirmtermination

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

Confirm service termination. Terminates the service with the token sent by email to the admin contact. A reason, a future use and a comment can be given.

### Parameters

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

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `commentary` | string |  | Commentary about your termination request |
| `futureUse` | service.TerminationFutureUseEnum |  | What next after your termination request — one of `NOT_REPLACING_SERVICE`, `OTHER`, `SUBSCRIBE_AN_OTHER_SERVICE`, `SUBSCRIBE_OTHER_KIND_OF_SERVICE_WITH_COMPETITOR`, `SUBSCRIBE_SIMILAR_SERVICE_WITH_COMPETITOR` |
| `reason` | service.TerminationReasonEnum |  | Reason of your termination request — one of `FEATURES_DONT_SUIT_ME`, `LACK_OF_PERFORMANCES`, `MIGRATED_TO_ANOTHER_OVH_PRODUCT`, `MIGRATED_TO_COMPETITOR`, `NOT_ENOUGH_RECOGNITION`, `NOT_NEEDED_ANYMORE`, `NOT_RELIABLE`, `NO_ANSWER`, `OTHER`, `PRODUCT_DIMENSION_DONT_SUIT_ME`, `PRODUCT_TOOLS_DONT_SUIT_ME`, `TOO_EXPENSIVE`, … |
| `token` | string | yes | The termination token sent by email to the admin contact |

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

### Responses

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

```json
"string"
```

### Example

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

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

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

result = client.post("/license/plesk/{serviceName}/confirmTermination",
	commentary = None, # Commentary about your termination request (type: string, nullable)
	futureUse = None, # What next after your termination request (type: service.TerminationFutureUseEnum, nullable)
	reason = None, # Reason of your termination request (type: service.TerminationReasonEnum, nullable)
	token = None, # The termination token sent by email to the admin contact (type: string)
)

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

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

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

$result = $ovh->post("/license/plesk/{serviceName}/confirmTermination", array(
	commentary => null, // Commentary about your termination request (type: string, nullable)
	futureUse => null, // What next after your termination request (type: service.TerminationFutureUseEnum, nullable)
	reason => null, // Reason of your termination request (type: service.TerminationReasonEnum, nullable)
	token => null, // The termination token sent by email to the admin contact (type: string)
));

print_r($result);
?>
```

## options attached to this license

`GET /1.0/license/plesk/{serviceName}/option`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-plesk-servicename-option

**Status:** Stable production version  
**IAM actions:** `licensePlesk:apiovh:option/get`

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.OptionLabel[] | successful operation |

```json
[
  "ANTISPAM_SPAMASSASSIN"
]
```

### Example

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

# 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("/license/plesk/{serviceName}/option");

print_r($result);
?>
```

## Get this object properties

`GET /1.0/license/plesk/{serviceName}/option/{label}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-plesk-servicename-option-label

**Status:** Stable production version  
**IAM actions:** `licensePlesk:apiovh:option/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `label` | path | license.OptionLabel | yes | This option designation — one of `ANTISPAM_SPAMASSASSIN`, `ANTIVIRUS_DRWEB`, `ANTIVIRUS_KASPERSKY`, `DOMAINS`, `LANGUAGE_PACK`, `POWERPACK`, `SQL_SERVER`, `VIRTUOZZO_CONTAINERS` |
| `serviceName` | path | string | yes | The name of your Plesk license |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.Option | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `amount` | string | read-only | Quantity or corresponding label of the designated option enabled on your license |
| `canBeDeleted` | boolean | read-only | Specifies whether this option can be released or not |
| `expirationDate` | string (date-time) | read-only | This option expiration date |
| `label` | license.OptionLabel | read-only | This option designation — one of `ANTISPAM_SPAMASSASSIN`, `ANTIVIRUS_DRWEB`, `ANTIVIRUS_KASPERSKY`, `DOMAINS`, `LANGUAGE_PACK`, `POWERPACK`, `SQL_SERVER`, `VIRTUOZZO_CONTAINERS` |
| `version` | string | read-only | This option related version |

```json
{
  "amount": "string",
  "canBeDeleted": true,
  "expirationDate": "2024-01-01T12:00:00Z",
  "label": "ANTISPAM_SPAMASSASSIN",
  "version": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/license/plesk/{serviceName}/option/{label}" \
  -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("/license/plesk/{serviceName}/option/{label}")

# 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("/license/plesk/{serviceName}/option/{label}");

print_r($result);
?>
```

## release this Option

`DELETE /1.0/license/plesk/{serviceName}/option/{label}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#delete-license-plesk-servicename-option-label

**Status:** Stable production version  
**IAM actions:** `licensePlesk:apiovh:option/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `label` | path | license.OptionLabel | yes | This option designation — one of `ANTISPAM_SPAMASSASSIN`, `ANTIVIRUS_DRWEB`, `ANTIVIRUS_KASPERSKY`, `DOMAINS`, `LANGUAGE_PACK`, `POWERPACK`, `SQL_SERVER`, `VIRTUOZZO_CONTAINERS` |
| `serviceName` | path | string | yes | The name of your Plesk license |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | license.ActionType | read-only | This Task description — one of `addWindowFromExistingSerial`, `changeIp`, `changeOs`, `installLicense`, `optionUpgrade`, `releaseOption`, `versionUpgrade` |
| `doneDate` | string (date-time) | read-only | When was this Task done |
| `lastUpdate` | string (date-time) | read-only | The last time this Task was updated |
| `name` | string | read-only | This Task name |
| `status` | license.TaskStateEnum | read-only | Current Taks status — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `taskId` | integer | read-only | This Task id |
| `todoDate` | string (date-time) | read-only | When was this Task created |

```json
{
  "action": "addWindowFromExistingSerial",
  "doneDate": "2024-01-01T12:00:00Z",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "name": "string",
  "status": "cancelled",
  "taskId": 0,
  "todoDate": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/license/plesk/{serviceName}/option/{label}" \
  -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("/license/plesk/{serviceName}/option/{label}")

# 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("/license/plesk/{serviceName}/option/{label}");

print_r($result);
?>
```

## Get service information

`GET /1.0/license/plesk/{serviceName}/serviceInfos`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-plesk-servicename-serviceinfos

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

Get service information. Returns the status, creation and expiration dates, contacts and renewal settings of the service.

### Parameters

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

### Responses

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

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

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

### Example

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

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

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

result = client.get("/license/plesk/{serviceName}/serviceInfos")

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

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

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

$result = $ovh->get("/license/plesk/{serviceName}/serviceInfos");

print_r($result);
?>
```

## Update service information

`PUT /1.0/license/plesk/{serviceName}/serviceInfos`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#put-license-plesk-servicename-serviceinfos

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

Update service information. Updates the renewal settings of the service: automatic renewal, period, or deletion at expiration.

### Parameters

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

### Request body (required)

Type: `services.Service`

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

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

### Responses

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

### Example

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

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

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

# Request body type: services.Service
result = client.put("/license/plesk/{serviceName}/serviceInfos",
	renew = None, # Way of handling the renew (type: service.RenewType, nullable)
)

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

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

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

// Request body type: services.Service
$result = $ovh->put("/license/plesk/{serviceName}/serviceInfos", array(
	renew => null, // Way of handling the renew (type: service.RenewType, nullable)
));

print_r($result);
?>
```

## tasks linked to this license

`GET /1.0/license/plesk/{serviceName}/tasks`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-plesk-servicename-tasks

**Status:** Stable production version  
**IAM actions:** `licensePlesk:apiovh:tasks/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `action` | query | license.ActionType |  | Filter the value of action property (=) — one of `addWindowFromExistingSerial`, `changeIp`, `changeOs`, `installLicense`, `optionUpgrade`, `releaseOption`, `versionUpgrade` |
| `serviceName` | path | string | yes | The name of your Plesk license |
| `status` | query | license.TaskStateEnum |  | Filter the value of status property (=) — one of `cancelled`, `doing`, `done`, `error`, `todo` |

### Responses

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

```json
[
  0
]
```

### Example

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

# 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("/license/plesk/{serviceName}/tasks");

print_r($result);
?>
```

## Get this object properties

`GET /1.0/license/plesk/{serviceName}/tasks/{taskId}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-plesk-servicename-tasks-taskid

**Status:** Stable production version  
**IAM actions:** `licensePlesk:apiovh:tasks/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The name of your Plesk license |
| `taskId` | path | integer | yes | This Task id |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | license.ActionType | read-only | This Task description — one of `addWindowFromExistingSerial`, `changeIp`, `changeOs`, `installLicense`, `optionUpgrade`, `releaseOption`, `versionUpgrade` |
| `doneDate` | string (date-time) | read-only | When was this Task done |
| `lastUpdate` | string (date-time) | read-only | The last time this Task was updated |
| `name` | string | read-only | This Task name |
| `status` | license.TaskStateEnum | read-only | Current Taks status — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `taskId` | integer | read-only | This Task id |
| `todoDate` | string (date-time) | read-only | When was this Task created |

```json
{
  "action": "addWindowFromExistingSerial",
  "doneDate": "2024-01-01T12:00:00Z",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "name": "string",
  "status": "cancelled",
  "taskId": 0,
  "todoDate": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/license/plesk/{serviceName}/tasks/{taskId}" \
  -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("/license/plesk/{serviceName}/tasks/{taskId}")

# 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("/license/plesk/{serviceName}/tasks/{taskId}");

print_r($result);
?>
```

## Request service termination

`POST /1.0/license/plesk/{serviceName}/terminate`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#post-license-plesk-servicename-terminate

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

Request service termination. Starts the termination of the service. The admin contact receives a token by email, to confirm with the `confirmTermination` call.

### Parameters

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

### Responses

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

```json
"string"
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/license/plesk/{serviceName}/terminate" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

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

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

result = client.post("/license/plesk/{serviceName}/terminate")

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

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

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

$result = $ovh->post("/license/plesk/{serviceName}/terminate");

print_r($result);
?>
```

## List available services

`GET /1.0/license/redhat`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-redhat

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

### Parameters

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

### Responses

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

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

### Example

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

# 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("/license/redhat");

print_r($result);
?>
```

## Get this object properties

`GET /1.0/license/redhat/{serviceName}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-redhat-servicename

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

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.redhat.RedHatWithIAM | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creation` | string (date-time) | read-only | This license creation date |
| `deleteAtExpiration` | boolean |  | Shall we delete this on expiration ? |
| `domain` | string | read-only | The internal name of your license |
| `iam` | iam.ResourceMetadata | read-only | IAM resource metadata |
| `iam.displayName` | string | read-only | Resource display name |
| `iam.id` | string (uuid) | read-only | Unique identifier of the resource |
| `iam.state` | iam.ResourceMetadata.StateEnum | read-only | Resource state — one of `EXPIRED`, `IN_CREATION`, `OK`, `SUSPENDED` |
| `iam.tags` | object | read-only | Resource tags. Tags that were internally computed are prefixed with ovh: |
| `iam.urn` | string | read-only | Unique resource name used in policies |
| `ip` | ipv4 | read-only | The ip on which this license is attached |
| `licenseId` | string | read-only | The license id on license provider side |
| `status` | license.StateEnum | read-only | This license state — one of `ok`, `released`, `terminated`, `toDeliver` |
| `version` | license.RedHatVersionEnum | read-only | This license version — one of `redhat-enterprise-datacenter`, `redhat-enterprise-standard` |

```json
{
  "creation": "2024-01-01T12:00:00Z",
  "deleteAtExpiration": true,
  "domain": "string",
  "iam": {
    "displayName": "string",
    "id": "00000000-0000-0000-0000-000000000000",
    "state": "EXPIRED",
    "tags": {
      "key": "string"
    },
    "urn": "string"
  },
  "ip": "192.0.2.0",
  "licenseId": "string",
  "status": "ok",
  "version": "redhat-enterprise-datacenter"
}
```

### Example

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

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

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

result = client.get("/license/redhat/{serviceName}")

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

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

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

$result = $ovh->get("/license/redhat/{serviceName}");

print_r($result);
?>
```

## Alter this object properties

`PUT /1.0/license/redhat/{serviceName}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#put-license-redhat-servicename

**Status:** Beta version  
**IAM actions:** `licenseRedHat:apiovh:put`

### Parameters

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

### Request body (required)

Type: `license.redhat.RedHat`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creation` | string (date-time) | read-only | This license creation date |
| `deleteAtExpiration` | boolean |  | Shall we delete this on expiration ? |
| `domain` | string | read-only | The internal name of your license |
| `ip` | ipv4 | read-only | The ip on which this license is attached |
| `licenseId` | string | read-only | The license id on license provider side |
| `status` | license.StateEnum | read-only | This license state — one of `ok`, `released`, `terminated`, `toDeliver` |
| `version` | license.RedHatVersionEnum | read-only | This license version — one of `redhat-enterprise-datacenter`, `redhat-enterprise-standard` |

```json
{
  "deleteAtExpiration": true
}
```

### Responses

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

### Example

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

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

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

# Request body type: license.redhat.RedHat
result = client.put("/license/redhat/{serviceName}",
	deleteAtExpiration = None, # Shall we delete this on expiration ? (type: boolean)
)

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

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

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

// Request body type: license.redhat.RedHat
$result = $ovh->put("/license/redhat/{serviceName}", array(
	deleteAtExpiration => null, // Shall we delete this on expiration ? (type: boolean)
));

print_r($result);
?>
```

## Confirm service termination

`POST /1.0/license/redhat/{serviceName}/confirmTermination`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#post-license-redhat-servicename-confirmtermination

**Status:** Beta version  
**IAM actions:** `licenseRedHat:apiovh:confirmTermination`

Confirm service termination. Terminates the service with the token sent by email to the admin contact. A reason, a future use and a comment can be given.

### Parameters

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

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `commentary` | string |  | Commentary about your termination request |
| `futureUse` | service.TerminationFutureUseEnum |  | What next after your termination request — one of `NOT_REPLACING_SERVICE`, `OTHER`, `SUBSCRIBE_AN_OTHER_SERVICE`, `SUBSCRIBE_OTHER_KIND_OF_SERVICE_WITH_COMPETITOR`, `SUBSCRIBE_SIMILAR_SERVICE_WITH_COMPETITOR` |
| `reason` | service.TerminationReasonEnum |  | Reason of your termination request — one of `FEATURES_DONT_SUIT_ME`, `LACK_OF_PERFORMANCES`, `MIGRATED_TO_ANOTHER_OVH_PRODUCT`, `MIGRATED_TO_COMPETITOR`, `NOT_ENOUGH_RECOGNITION`, `NOT_NEEDED_ANYMORE`, `NOT_RELIABLE`, `NO_ANSWER`, `OTHER`, `PRODUCT_DIMENSION_DONT_SUIT_ME`, `PRODUCT_TOOLS_DONT_SUIT_ME`, `TOO_EXPENSIVE`, … |
| `token` | string | yes | The termination token sent by email to the admin contact |

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

### Responses

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

```json
"string"
```

### Example

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

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

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

result = client.post("/license/redhat/{serviceName}/confirmTermination",
	commentary = None, # Commentary about your termination request (type: string, nullable)
	futureUse = None, # What next after your termination request (type: service.TerminationFutureUseEnum, nullable)
	reason = None, # Reason of your termination request (type: service.TerminationReasonEnum, nullable)
	token = None, # The termination token sent by email to the admin contact (type: string)
)

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

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

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

$result = $ovh->post("/license/redhat/{serviceName}/confirmTermination", array(
	commentary => null, // Commentary about your termination request (type: string, nullable)
	futureUse => null, // What next after your termination request (type: service.TerminationFutureUseEnum, nullable)
	reason => null, // Reason of your termination request (type: service.TerminationReasonEnum, nullable)
	token => null, // The termination token sent by email to the admin contact (type: string)
));

print_r($result);
?>
```

## Get service information

`GET /1.0/license/redhat/{serviceName}/serviceInfos`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-redhat-servicename-serviceinfos

**Status:** Beta version  
**IAM actions:** `licenseRedHat:apiovh:serviceInfos/get`

Get service information. Returns the status, creation and expiration dates, contacts and renewal settings of the service.

### Parameters

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

### Responses

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

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

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

### Example

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

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

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

result = client.get("/license/redhat/{serviceName}/serviceInfos")

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

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

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

$result = $ovh->get("/license/redhat/{serviceName}/serviceInfos");

print_r($result);
?>
```

## Update service information

`PUT /1.0/license/redhat/{serviceName}/serviceInfos`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#put-license-redhat-servicename-serviceinfos

**Status:** Beta version  
**IAM actions:** `licenseRedHat:apiovh:serviceInfos/edit`

Update service information. Updates the renewal settings of the service: automatic renewal, period, or deletion at expiration.

### Parameters

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

### Request body (required)

Type: `services.Service`

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

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

### Responses

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

### Example

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

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

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

# Request body type: services.Service
result = client.put("/license/redhat/{serviceName}/serviceInfos",
	renew = None, # Way of handling the renew (type: service.RenewType, nullable)
)

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

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

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

// Request body type: services.Service
$result = $ovh->put("/license/redhat/{serviceName}/serviceInfos", array(
	renew => null, // Way of handling the renew (type: service.RenewType, nullable)
));

print_r($result);
?>
```

## tasks linked to this license

`GET /1.0/license/redhat/{serviceName}/tasks`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-redhat-servicename-tasks

**Status:** Beta version  
**IAM actions:** `licenseRedHat:apiovh:tasks/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `action` | query | license.ActionType |  | Filter the value of action property (=) — one of `addWindowFromExistingSerial`, `changeIp`, `changeOs`, `installLicense`, `optionUpgrade`, `releaseOption`, `versionUpgrade` |
| `serviceName` | path | string | yes | The name of your RedHat license |
| `status` | query | license.TaskStateEnum |  | Filter the value of status property (=) — one of `cancelled`, `doing`, `done`, `error`, `todo` |

### Responses

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

```json
[
  0
]
```

### Example

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

# 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("/license/redhat/{serviceName}/tasks");

print_r($result);
?>
```

## Get this object properties

`GET /1.0/license/redhat/{serviceName}/tasks/{taskId}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-redhat-servicename-tasks-taskid

**Status:** Beta version  
**IAM actions:** `licenseRedHat:apiovh:tasks/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The name of your RedHat license |
| `taskId` | path | integer | yes | This Task id |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | license.ActionType | read-only | This Task description — one of `addWindowFromExistingSerial`, `changeIp`, `changeOs`, `installLicense`, `optionUpgrade`, `releaseOption`, `versionUpgrade` |
| `doneDate` | string (date-time) | read-only | When was this Task done |
| `lastUpdate` | string (date-time) | read-only | The last time this Task was updated |
| `name` | string | read-only | This Task name |
| `status` | license.TaskStateEnum | read-only | Current Taks status — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `taskId` | integer | read-only | This Task id |
| `todoDate` | string (date-time) | read-only | When was this Task created |

```json
{
  "action": "addWindowFromExistingSerial",
  "doneDate": "2024-01-01T12:00:00Z",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "name": "string",
  "status": "cancelled",
  "taskId": 0,
  "todoDate": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/license/redhat/{serviceName}/tasks/{taskId}" \
  -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("/license/redhat/{serviceName}/tasks/{taskId}")

# 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("/license/redhat/{serviceName}/tasks/{taskId}");

print_r($result);
?>
```

## Request service termination

`POST /1.0/license/redhat/{serviceName}/terminate`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#post-license-redhat-servicename-terminate

**Status:** Beta version  
**IAM actions:** `licenseRedHat:apiovh:terminate`

Request service termination. Starts the termination of the service. The admin contact receives a token by email, to confirm with the `confirmTermination` call.

### Parameters

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

### Responses

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

```json
"string"
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/license/redhat/{serviceName}/terminate" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

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

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

result = client.post("/license/redhat/{serviceName}/terminate")

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

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

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

$result = $ovh->post("/license/redhat/{serviceName}/terminate");

print_r($result);
?>
```

## List available services

`GET /1.0/license/sqlserver`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-sqlserver

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

### Parameters

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

### Responses

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

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

### Example

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

# 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("/license/sqlserver");

print_r($result);
?>
```

## Get the orderable Sql Server versions

`GET /1.0/license/sqlserver/orderableVersions`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-sqlserver-orderableversions

**Status:** Stable production version  
**IAM actions:** `account:apiovh:licenseSqlServer/orderableVersions/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `ip` | query | ipv4 | yes | Your license Ip |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.SqlServerOrderConfiguration[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `orderableVersions` | license.OrderableSqlServerCompatibilityInfos[] |  |  |
| `orderableVersions[].version` | license.SqlServerVersionEnum |  | All versions for SQL Server product — one of `SQL_SERVER_2008_STANDARD_EDITION_2_CPU`, `SQL_SERVER_2008_STANDARD_EDITION_4_CPU`, `SQL_SERVER_2008_WEB_EDITION_2_CPU`, `SQL_SERVER_2008_WEB_EDITION_4_CPU`, `SQL_SERVER_2012_STANDARD_EDITION_10_CORES`, `SQL_SERVER_2012_STANDARD_EDITION_12_CORES`, `SQL_SERVER_2012_STANDARD_EDITION_16_CORES`, `SQL_SERVER_2012_STANDARD_EDITION_18_CORES`, `SQL_SERVER_2012_STANDARD_EDITION_20_CORES`, `SQL_SERVER_2012_STANDARD_EDITION_24_CORES`, `SQL_SERVER_2012_STANDARD_EDITION_2_CPU`, `SQL_SERVER_2012_STANDARD_EDITION_32_CORES`, … |
| `serviceType` | license.LicenseTypeEnum |  | Possible values for license type — one of `dedicated`, `dedicatedCloud`, `dedicatedFailover`, `failover`, `vm`, `vps`, `vps_ceph`, `vps_classic`, `vps_cloud`, `vps_cloud_2016`, `vps_ssd` |

```json
[
  {
    "orderableVersions": [
      {
        "version": "SQL_SERVER_2008_STANDARD_EDITION_2_CPU"
      }
    ],
    "serviceType": "dedicated"
  }
]
```

### Example

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

# 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("/license/sqlserver/orderableVersions");

print_r($result);
?>
```

## Get this object properties

`GET /1.0/license/sqlserver/{serviceName}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-sqlserver-servicename

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The name of your SQL Server license |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.sqlserver.SqlServerWithIAM | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creation` | string (date-time) | read-only | This license creation date |
| `domain` | string | read-only | The internal name of your license |
| `iam` | iam.ResourceMetadata | read-only | IAM resource metadata |
| `iam.displayName` | string | read-only | Resource display name |
| `iam.id` | string (uuid) | read-only | Unique identifier of the resource |
| `iam.state` | iam.ResourceMetadata.StateEnum | read-only | Resource state — one of `EXPIRED`, `IN_CREATION`, `OK`, `SUSPENDED` |
| `iam.tags` | object | read-only | Resource tags. Tags that were internally computed are prefixed with ovh: |
| `iam.urn` | string | read-only | Unique resource name used in policies |
| `ip` | ipv4 | read-only | The ip on which this license is attached |
| `licenseId` | string | read-only | The license id on license provider side |
| `status` | license.StateEnum | read-only | This license state — one of `ok`, `released`, `terminated`, `toDeliver` |
| `version` | license.SqlServerVersionEnum | read-only | This license version — one of `SQL_SERVER_2008_STANDARD_EDITION_2_CPU`, `SQL_SERVER_2008_STANDARD_EDITION_4_CPU`, `SQL_SERVER_2008_WEB_EDITION_2_CPU`, `SQL_SERVER_2008_WEB_EDITION_4_CPU`, `SQL_SERVER_2012_STANDARD_EDITION_10_CORES`, `SQL_SERVER_2012_STANDARD_EDITION_12_CORES`, `SQL_SERVER_2012_STANDARD_EDITION_16_CORES`, `SQL_SERVER_2012_STANDARD_EDITION_18_CORES`, `SQL_SERVER_2012_STANDARD_EDITION_20_CORES`, `SQL_SERVER_2012_STANDARD_EDITION_24_CORES`, `SQL_SERVER_2012_STANDARD_EDITION_2_CPU`, `SQL_SERVER_2012_STANDARD_EDITION_32_CORES`, … |

```json
{
  "creation": "2024-01-01T12:00:00Z",
  "domain": "string",
  "iam": {
    "displayName": "string",
    "id": "00000000-0000-0000-0000-000000000000",
    "state": "EXPIRED",
    "tags": {
      "key": "string"
    },
    "urn": "string"
  },
  "ip": "192.0.2.0",
  "licenseId": "string",
  "status": "ok",
  "version": "SQL_SERVER_2008_STANDARD_EDITION_2_CPU"
}
```

### Example

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

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

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

result = client.get("/license/sqlserver/{serviceName}")

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

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

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

$result = $ovh->get("/license/sqlserver/{serviceName}");

print_r($result);
?>
```

## Confirm service termination

`POST /1.0/license/sqlserver/{serviceName}/confirmTermination`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#post-license-sqlserver-servicename-confirmtermination

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

Confirm service termination. Terminates the service with the token sent by email to the admin contact. A reason, a future use and a comment can be given.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The name of your SQL Server license |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `commentary` | string |  | Commentary about your termination request |
| `futureUse` | service.TerminationFutureUseEnum |  | What next after your termination request — one of `NOT_REPLACING_SERVICE`, `OTHER`, `SUBSCRIBE_AN_OTHER_SERVICE`, `SUBSCRIBE_OTHER_KIND_OF_SERVICE_WITH_COMPETITOR`, `SUBSCRIBE_SIMILAR_SERVICE_WITH_COMPETITOR` |
| `reason` | service.TerminationReasonEnum |  | Reason of your termination request — one of `FEATURES_DONT_SUIT_ME`, `LACK_OF_PERFORMANCES`, `MIGRATED_TO_ANOTHER_OVH_PRODUCT`, `MIGRATED_TO_COMPETITOR`, `NOT_ENOUGH_RECOGNITION`, `NOT_NEEDED_ANYMORE`, `NOT_RELIABLE`, `NO_ANSWER`, `OTHER`, `PRODUCT_DIMENSION_DONT_SUIT_ME`, `PRODUCT_TOOLS_DONT_SUIT_ME`, `TOO_EXPENSIVE`, … |
| `token` | string | yes | The termination token sent by email to the admin contact |

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

### Responses

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

```json
"string"
```

### Example

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

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

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

result = client.post("/license/sqlserver/{serviceName}/confirmTermination",
	commentary = None, # Commentary about your termination request (type: string, nullable)
	futureUse = None, # What next after your termination request (type: service.TerminationFutureUseEnum, nullable)
	reason = None, # Reason of your termination request (type: service.TerminationReasonEnum, nullable)
	token = None, # The termination token sent by email to the admin contact (type: string)
)

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

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

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

$result = $ovh->post("/license/sqlserver/{serviceName}/confirmTermination", array(
	commentary => null, // Commentary about your termination request (type: string, nullable)
	futureUse => null, // What next after your termination request (type: service.TerminationFutureUseEnum, nullable)
	reason => null, // Reason of your termination request (type: service.TerminationReasonEnum, nullable)
	token => null, // The termination token sent by email to the admin contact (type: string)
));

print_r($result);
?>
```

## Get service information

`GET /1.0/license/sqlserver/{serviceName}/serviceInfos`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-sqlserver-servicename-serviceinfos

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

Get service information. Returns the status, creation and expiration dates, contacts and renewal settings of the service.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The name of your SQL Server license |

### Responses

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

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

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

### Example

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

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

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

result = client.get("/license/sqlserver/{serviceName}/serviceInfos")

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

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

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

$result = $ovh->get("/license/sqlserver/{serviceName}/serviceInfos");

print_r($result);
?>
```

## Update service information

`PUT /1.0/license/sqlserver/{serviceName}/serviceInfos`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#put-license-sqlserver-servicename-serviceinfos

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

Update service information. Updates the renewal settings of the service: automatic renewal, period, or deletion at expiration.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The name of your SQL Server license |

### Request body (required)

Type: `services.Service`

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

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

### Responses

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

### Example

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

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

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

# Request body type: services.Service
result = client.put("/license/sqlserver/{serviceName}/serviceInfos",
	renew = None, # Way of handling the renew (type: service.RenewType, nullable)
)

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

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

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

// Request body type: services.Service
$result = $ovh->put("/license/sqlserver/{serviceName}/serviceInfos", array(
	renew => null, // Way of handling the renew (type: service.RenewType, nullable)
));

print_r($result);
?>
```

## Tasks linked to this license

`GET /1.0/license/sqlserver/{serviceName}/tasks`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-sqlserver-servicename-tasks

**Status:** Stable production version  
**IAM actions:** `licenseSqlServer:apiovh:tasks/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `action` | query | license.ActionType |  | Filter the value of action property (=) — one of `addWindowFromExistingSerial`, `changeIp`, `changeOs`, `installLicense`, `optionUpgrade`, `releaseOption`, `versionUpgrade` |
| `serviceName` | path | string | yes | The name of your SQL Server license |
| `status` | query | license.TaskStateEnum |  | Filter the value of status property (=) — one of `cancelled`, `doing`, `done`, `error`, `todo` |

### Responses

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

```json
[
  0
]
```

### Example

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

# 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("/license/sqlserver/{serviceName}/tasks");

print_r($result);
?>
```

## Get this object properties

`GET /1.0/license/sqlserver/{serviceName}/tasks/{taskId}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-sqlserver-servicename-tasks-taskid

**Status:** Stable production version  
**IAM actions:** `licenseSqlServer:apiovh:tasks/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The name of your SQL Server license |
| `taskId` | path | integer | yes | This Task id |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | license.ActionType | read-only | This Task description — one of `addWindowFromExistingSerial`, `changeIp`, `changeOs`, `installLicense`, `optionUpgrade`, `releaseOption`, `versionUpgrade` |
| `doneDate` | string (date-time) | read-only | When was this Task done |
| `lastUpdate` | string (date-time) | read-only | The last time this Task was updated |
| `name` | string | read-only | This Task name |
| `status` | license.TaskStateEnum | read-only | Current Taks status — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `taskId` | integer | read-only | This Task id |
| `todoDate` | string (date-time) | read-only | When was this Task created |

```json
{
  "action": "addWindowFromExistingSerial",
  "doneDate": "2024-01-01T12:00:00Z",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "name": "string",
  "status": "cancelled",
  "taskId": 0,
  "todoDate": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/license/sqlserver/{serviceName}/tasks/{taskId}" \
  -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("/license/sqlserver/{serviceName}/tasks/{taskId}")

# 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("/license/sqlserver/{serviceName}/tasks/{taskId}");

print_r($result);
?>
```

## Request service termination

`POST /1.0/license/sqlserver/{serviceName}/terminate`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#post-license-sqlserver-servicename-terminate

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

Request service termination. Starts the termination of the service. The admin contact receives a token by email, to confirm with the `confirmTermination` call.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The name of your SQL Server license |

### Responses

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

```json
"string"
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/license/sqlserver/{serviceName}/terminate" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

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

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

result = client.post("/license/sqlserver/{serviceName}/terminate")

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

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

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

$result = $ovh->post("/license/sqlserver/{serviceName}/terminate");

print_r($result);
?>
```

## List available services

`GET /1.0/license/virtuozzo`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-virtuozzo

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

### Parameters

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

### Responses

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

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

### Example

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

# 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("/license/virtuozzo");

print_r($result);
?>
```

## Get the orderable Virtuozzo versions

`GET /1.0/license/virtuozzo/orderableVersions`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-virtuozzo-orderableversions

**Status:** Stable production version  
**IAM actions:** `account:apiovh:licenseVirtuozzo/orderableVersions/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `ip` | query | ipv4 | yes | Your license Ip |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.VirtuozzoOrderConfiguration[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `orderableVersions` | license.OrderableVirtuozzoCompatibilityInfos[] |  |  |
| `orderableVersions[].compliantContainers` | license.OrderableVirtuozzoContainerNumberEnum[] |  |  |
| `orderableVersions[].potentialProblems` | license.PotentialProblemVirtuozzoEnum[] |  |  |
| `orderableVersions[].version` | license.OrderableVirtuozzoVersionEnum |  | All versions available for Virtuozzo products — one of `VIRTUOZZO_CONTAINERS_4_FOR_LINUX`, `VIRTUOZZO_CONTAINERS_4_FOR_WINDOWS`, `virtuozzo-4`, `virtuozzo-4-for-windows` |
| `serviceType` | license.LicenseTypeEnum |  | Possible values for license type — one of `dedicated`, `dedicatedCloud`, `dedicatedFailover`, `failover`, `vm`, `vps`, `vps_ceph`, `vps_classic`, `vps_cloud`, `vps_cloud_2016`, `vps_ssd` |

```json
[
  {
    "orderableVersions": [
      {
        "compliantContainers": [
          "2_CPU_001_CONTAINER"
        ],
        "potentialProblems": [
          "isLinuxOs"
        ],
        "version": "VIRTUOZZO_CONTAINERS_4_FOR_LINUX"
      }
    ],
    "serviceType": "dedicated"
  }
]
```

### Example

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

# 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("/license/virtuozzo/orderableVersions");

print_r($result);
?>
```

## Get this object properties

`GET /1.0/license/virtuozzo/{serviceName}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-virtuozzo-servicename

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

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.virtuozzo.VirtuozzoWithIAM | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `containerNumber` | license.VirtuozzoContainerNumberEnum | read-only | The amount of containers this license can manage — one of `2_CPU_001_CONTAINER`, `2_CPU_003_CONTAINER`, `2_CPU_010_CONTAINER`, `2_CPU_030_CONTAINER`, `2_CPU_060_CONTAINER`, `2_CPU_100_CONTAINER` |
| `creation` | string (date-time) | read-only | This license creation date |
| `deleteAtExpiration` | boolean |  | Shall we delete this on expiration ? |
| `domain` | string | read-only | The internal name of your license |
| `iam` | iam.ResourceMetadata | read-only | IAM resource metadata |
| `iam.displayName` | string | read-only | Resource display name |
| `iam.id` | string (uuid) | read-only | Unique identifier of the resource |
| `iam.state` | iam.ResourceMetadata.StateEnum | read-only | Resource state — one of `EXPIRED`, `IN_CREATION`, `OK`, `SUSPENDED` |
| `iam.tags` | object | read-only | Resource tags. Tags that were internally computed are prefixed with ovh: |
| `iam.urn` | string | read-only | Unique resource name used in policies |
| `informationKey` | string | read-only | This license Information key |
| `ip` | ipv4 | read-only | The ip on which this license is attached |
| `licenseId` | string | read-only | The license id on license provider side |
| `productKey` | string | read-only | This license product key |
| `status` | license.StateEnum | read-only | This license state — one of `ok`, `released`, `terminated`, `toDeliver` |
| `version` | license.VirtuozzoVersionEnum | read-only | This license version — one of `VIRTUOZZO_CONTAINERS_4_FOR_LINUX`, `VIRTUOZZO_CONTAINERS_4_FOR_WINDOWS` |

```json
{
  "containerNumber": "2_CPU_001_CONTAINER",
  "creation": "2024-01-01T12:00:00Z",
  "deleteAtExpiration": true,
  "domain": "string",
  "iam": {
    "displayName": "string",
    "id": "00000000-0000-0000-0000-000000000000",
    "state": "EXPIRED",
    "tags": {
      "key": "string"
    },
    "urn": "string"
  },
  "informationKey": "string",
  "ip": "192.0.2.0",
  "licenseId": "string",
  "productKey": "string",
  "status": "ok",
  "version": "VIRTUOZZO_CONTAINERS_4_FOR_LINUX"
}
```

### Example

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

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

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

result = client.get("/license/virtuozzo/{serviceName}")

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

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

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

$result = $ovh->get("/license/virtuozzo/{serviceName}");

print_r($result);
?>
```

## Alter this object properties

`PUT /1.0/license/virtuozzo/{serviceName}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#put-license-virtuozzo-servicename

**Status:** Stable production version  
**IAM actions:** `licenseVirtuozzo:apiovh:put`

### Parameters

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

### Request body (required)

Type: `license.virtuozzo.Virtuozzo`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `containerNumber` | license.VirtuozzoContainerNumberEnum | read-only | The amount of containers this license can manage — one of `2_CPU_001_CONTAINER`, `2_CPU_003_CONTAINER`, `2_CPU_010_CONTAINER`, `2_CPU_030_CONTAINER`, `2_CPU_060_CONTAINER`, `2_CPU_100_CONTAINER` |
| `creation` | string (date-time) | read-only | This license creation date |
| `deleteAtExpiration` | boolean |  | Shall we delete this on expiration ? |
| `domain` | string | read-only | The internal name of your license |
| `informationKey` | string | read-only | This license Information key |
| `ip` | ipv4 | read-only | The ip on which this license is attached |
| `licenseId` | string | read-only | The license id on license provider side |
| `productKey` | string | read-only | This license product key |
| `status` | license.StateEnum | read-only | This license state — one of `ok`, `released`, `terminated`, `toDeliver` |
| `version` | license.VirtuozzoVersionEnum | read-only | This license version — one of `VIRTUOZZO_CONTAINERS_4_FOR_LINUX`, `VIRTUOZZO_CONTAINERS_4_FOR_WINDOWS` |

```json
{
  "deleteAtExpiration": true
}
```

### Responses

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

### Example

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

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

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

# Request body type: license.virtuozzo.Virtuozzo
result = client.put("/license/virtuozzo/{serviceName}",
	deleteAtExpiration = None, # Shall we delete this on expiration ? (type: boolean)
)

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

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

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

// Request body type: license.virtuozzo.Virtuozzo
$result = $ovh->put("/license/virtuozzo/{serviceName}", array(
	deleteAtExpiration => null, // Shall we delete this on expiration ? (type: boolean)
));

print_r($result);
?>
```

## Returns an array of ips where the license can be moved to

`GET /1.0/license/virtuozzo/{serviceName}/allowedDestinationIp`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-virtuozzo-servicename-alloweddestinationip

**Status:** Stable production version  
**IAM actions:** `licenseVirtuozzo:apiovh:allowedDestinationIp/get`

### Parameters

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

### Responses

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

```json
[
  "192.0.2.0/24"
]
```

### Example

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

# 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("/license/virtuozzo/{serviceName}/allowedDestinationIp");

print_r($result);
?>
```

## Will tell if the ip can accept the license

`GET /1.0/license/virtuozzo/{serviceName}/canLicenseBeMovedTo`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-virtuozzo-servicename-canlicensebemovedto

**Status:** Stable production version  
**IAM actions:** `licenseVirtuozzo:apiovh:canLicenseBeMovedTo/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `destinationIp` | query | ipv4 | yes | The Ip on which you want to move this license |
| `serviceName` | path | string | yes | The name of your Virtuozzo license |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.ChangeIpStatus | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `message` | license.ChangeIpMessageEnum |  | Messages from change IP — one of `OK`, `destinationNotAllowed`, `licenseAlreadyExists`, `notAllowedToHandleThis`, `notSameType`, `sameIp`, `versionNotAllowed` |
| `success` | boolean |  |  |

```json
{
  "message": "OK",
  "success": true
}
```

### Example

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

# 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("/license/virtuozzo/{serviceName}/canLicenseBeMovedTo");

print_r($result);
?>
```

## Move this license to another Ip

`POST /1.0/license/virtuozzo/{serviceName}/changeIp`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#post-license-virtuozzo-servicename-changeip

**Status:** Stable production version  
**IAM actions:** `licenseVirtuozzo:apiovh:changeIp`

### Parameters

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

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `destinationIp` | ipv4 | yes | The Ip on which you want to move this license |

```json
{
  "destinationIp": "192.0.2.0"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | license.ActionType | read-only | This Task description — one of `addWindowFromExistingSerial`, `changeIp`, `changeOs`, `installLicense`, `optionUpgrade`, `releaseOption`, `versionUpgrade` |
| `doneDate` | string (date-time) | read-only | When was this Task done |
| `lastUpdate` | string (date-time) | read-only | The last time this Task was updated |
| `name` | string | read-only | This Task name |
| `status` | license.TaskStateEnum | read-only | Current Taks status — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `taskId` | integer | read-only | This Task id |
| `todoDate` | string (date-time) | read-only | When was this Task created |

```json
{
  "action": "addWindowFromExistingSerial",
  "doneDate": "2024-01-01T12:00:00Z",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "name": "string",
  "status": "cancelled",
  "taskId": 0,
  "todoDate": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/license/virtuozzo/{serviceName}/changeIp" \
  -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: ipv4
result = client.post("/license/virtuozzo/{serviceName}/changeIp",
	destinationIp = None, # The Ip on which you want to move this license (type: ipv4)
)

# 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: ipv4
$result = $ovh->post("/license/virtuozzo/{serviceName}/changeIp", array(
	destinationIp => null, // The Ip on which you want to move this license (type: ipv4)
));

print_r($result);
?>
```

## Confirm service termination

`POST /1.0/license/virtuozzo/{serviceName}/confirmTermination`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#post-license-virtuozzo-servicename-confirmtermination

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

Confirm service termination. Terminates the service with the token sent by email to the admin contact. A reason, a future use and a comment can be given.

### Parameters

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

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `commentary` | string |  | Commentary about your termination request |
| `futureUse` | service.TerminationFutureUseEnum |  | What next after your termination request — one of `NOT_REPLACING_SERVICE`, `OTHER`, `SUBSCRIBE_AN_OTHER_SERVICE`, `SUBSCRIBE_OTHER_KIND_OF_SERVICE_WITH_COMPETITOR`, `SUBSCRIBE_SIMILAR_SERVICE_WITH_COMPETITOR` |
| `reason` | service.TerminationReasonEnum |  | Reason of your termination request — one of `FEATURES_DONT_SUIT_ME`, `LACK_OF_PERFORMANCES`, `MIGRATED_TO_ANOTHER_OVH_PRODUCT`, `MIGRATED_TO_COMPETITOR`, `NOT_ENOUGH_RECOGNITION`, `NOT_NEEDED_ANYMORE`, `NOT_RELIABLE`, `NO_ANSWER`, `OTHER`, `PRODUCT_DIMENSION_DONT_SUIT_ME`, `PRODUCT_TOOLS_DONT_SUIT_ME`, `TOO_EXPENSIVE`, … |
| `token` | string | yes | The termination token sent by email to the admin contact |

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

### Responses

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

```json
"string"
```

### Example

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

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

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

result = client.post("/license/virtuozzo/{serviceName}/confirmTermination",
	commentary = None, # Commentary about your termination request (type: string, nullable)
	futureUse = None, # What next after your termination request (type: service.TerminationFutureUseEnum, nullable)
	reason = None, # Reason of your termination request (type: service.TerminationReasonEnum, nullable)
	token = None, # The termination token sent by email to the admin contact (type: string)
)

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

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

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

$result = $ovh->post("/license/virtuozzo/{serviceName}/confirmTermination", array(
	commentary => null, // Commentary about your termination request (type: string, nullable)
	futureUse => null, // What next after your termination request (type: service.TerminationFutureUseEnum, nullable)
	reason => null, // Reason of your termination request (type: service.TerminationReasonEnum, nullable)
	token => null, // The termination token sent by email to the admin contact (type: string)
));

print_r($result);
?>
```

## Options linked to this license

`GET /1.0/license/virtuozzo/{serviceName}/option`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-virtuozzo-servicename-option

**Status:** Stable production version  
**IAM actions:** `licenseVirtuozzo:apiovh:option/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `label` | query | license.OptionLabel |  | Filter the value of label property (=) — one of `ANTISPAM_SPAMASSASSIN`, `ANTIVIRUS_DRWEB`, `ANTIVIRUS_KASPERSKY`, `DOMAINS`, `LANGUAGE_PACK`, `POWERPACK`, `SQL_SERVER`, `VIRTUOZZO_CONTAINERS` |
| `serviceName` | path | string | yes | The name of your Virtuozzo license |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.OptionLabel[] | successful operation |

```json
[
  "ANTISPAM_SPAMASSASSIN"
]
```

### Example

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

# 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("/license/virtuozzo/{serviceName}/option");

print_r($result);
?>
```

## Get this object properties

`GET /1.0/license/virtuozzo/{serviceName}/option/{label}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-virtuozzo-servicename-option-label

**Status:** Stable production version  
**IAM actions:** `licenseVirtuozzo:apiovh:option/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `label` | path | license.OptionLabel | yes | This option designation — one of `ANTISPAM_SPAMASSASSIN`, `ANTIVIRUS_DRWEB`, `ANTIVIRUS_KASPERSKY`, `DOMAINS`, `LANGUAGE_PACK`, `POWERPACK`, `SQL_SERVER`, `VIRTUOZZO_CONTAINERS` |
| `serviceName` | path | string | yes | The name of your Virtuozzo license |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.Option | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `amount` | string | read-only | Quantity or corresponding label of the designated option enabled on your license |
| `canBeDeleted` | boolean | read-only | Specifies whether this option can be released or not |
| `expirationDate` | string (date-time) | read-only | This option expiration date |
| `label` | license.OptionLabel | read-only | This option designation — one of `ANTISPAM_SPAMASSASSIN`, `ANTIVIRUS_DRWEB`, `ANTIVIRUS_KASPERSKY`, `DOMAINS`, `LANGUAGE_PACK`, `POWERPACK`, `SQL_SERVER`, `VIRTUOZZO_CONTAINERS` |
| `version` | string | read-only | This option related version |

```json
{
  "amount": "string",
  "canBeDeleted": true,
  "expirationDate": "2024-01-01T12:00:00Z",
  "label": "ANTISPAM_SPAMASSASSIN",
  "version": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/license/virtuozzo/{serviceName}/option/{label}" \
  -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("/license/virtuozzo/{serviceName}/option/{label}")

# 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("/license/virtuozzo/{serviceName}/option/{label}");

print_r($result);
?>
```

## release this Option

`DELETE /1.0/license/virtuozzo/{serviceName}/option/{label}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#delete-license-virtuozzo-servicename-option-label

**Status:** Stable production version  
**IAM actions:** `licenseVirtuozzo:apiovh:option/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `label` | path | license.OptionLabel | yes | This option designation — one of `ANTISPAM_SPAMASSASSIN`, `ANTIVIRUS_DRWEB`, `ANTIVIRUS_KASPERSKY`, `DOMAINS`, `LANGUAGE_PACK`, `POWERPACK`, `SQL_SERVER`, `VIRTUOZZO_CONTAINERS` |
| `serviceName` | path | string | yes | The name of your Virtuozzo license |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | license.ActionType | read-only | This Task description — one of `addWindowFromExistingSerial`, `changeIp`, `changeOs`, `installLicense`, `optionUpgrade`, `releaseOption`, `versionUpgrade` |
| `doneDate` | string (date-time) | read-only | When was this Task done |
| `lastUpdate` | string (date-time) | read-only | The last time this Task was updated |
| `name` | string | read-only | This Task name |
| `status` | license.TaskStateEnum | read-only | Current Taks status — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `taskId` | integer | read-only | This Task id |
| `todoDate` | string (date-time) | read-only | When was this Task created |

```json
{
  "action": "addWindowFromExistingSerial",
  "doneDate": "2024-01-01T12:00:00Z",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "name": "string",
  "status": "cancelled",
  "taskId": 0,
  "todoDate": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/license/virtuozzo/{serviceName}/option/{label}" \
  -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("/license/virtuozzo/{serviceName}/option/{label}")

# 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("/license/virtuozzo/{serviceName}/option/{label}");

print_r($result);
?>
```

## Get service information

`GET /1.0/license/virtuozzo/{serviceName}/serviceInfos`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-virtuozzo-servicename-serviceinfos

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

Get service information. Returns the status, creation and expiration dates, contacts and renewal settings of the service.

### Parameters

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

### Responses

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

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

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

### Example

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

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

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

result = client.get("/license/virtuozzo/{serviceName}/serviceInfos")

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

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

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

$result = $ovh->get("/license/virtuozzo/{serviceName}/serviceInfos");

print_r($result);
?>
```

## Update service information

`PUT /1.0/license/virtuozzo/{serviceName}/serviceInfos`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#put-license-virtuozzo-servicename-serviceinfos

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

Update service information. Updates the renewal settings of the service: automatic renewal, period, or deletion at expiration.

### Parameters

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

### Request body (required)

Type: `services.Service`

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

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

### Responses

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

### Example

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

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

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

# Request body type: services.Service
result = client.put("/license/virtuozzo/{serviceName}/serviceInfos",
	renew = None, # Way of handling the renew (type: service.RenewType, nullable)
)

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

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

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

// Request body type: services.Service
$result = $ovh->put("/license/virtuozzo/{serviceName}/serviceInfos", array(
	renew => null, // Way of handling the renew (type: service.RenewType, nullable)
));

print_r($result);
?>
```

## tasks linked to this license

`GET /1.0/license/virtuozzo/{serviceName}/tasks`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-virtuozzo-servicename-tasks

**Status:** Stable production version  
**IAM actions:** `licenseVirtuozzo:apiovh:tasks/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `action` | query | license.ActionType |  | Filter the value of action property (=) — one of `addWindowFromExistingSerial`, `changeIp`, `changeOs`, `installLicense`, `optionUpgrade`, `releaseOption`, `versionUpgrade` |
| `serviceName` | path | string | yes | The name of your Virtuozzo license |
| `status` | query | license.TaskStateEnum |  | Filter the value of status property (=) — one of `cancelled`, `doing`, `done`, `error`, `todo` |

### Responses

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

```json
[
  0
]
```

### Example

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

# 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("/license/virtuozzo/{serviceName}/tasks");

print_r($result);
?>
```

## Get this object properties

`GET /1.0/license/virtuozzo/{serviceName}/tasks/{taskId}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-virtuozzo-servicename-tasks-taskid

**Status:** Stable production version  
**IAM actions:** `licenseVirtuozzo:apiovh:tasks/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The name of your Virtuozzo license |
| `taskId` | path | integer | yes | This Task id |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | license.ActionType | read-only | This Task description — one of `addWindowFromExistingSerial`, `changeIp`, `changeOs`, `installLicense`, `optionUpgrade`, `releaseOption`, `versionUpgrade` |
| `doneDate` | string (date-time) | read-only | When was this Task done |
| `lastUpdate` | string (date-time) | read-only | The last time this Task was updated |
| `name` | string | read-only | This Task name |
| `status` | license.TaskStateEnum | read-only | Current Taks status — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `taskId` | integer | read-only | This Task id |
| `todoDate` | string (date-time) | read-only | When was this Task created |

```json
{
  "action": "addWindowFromExistingSerial",
  "doneDate": "2024-01-01T12:00:00Z",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "name": "string",
  "status": "cancelled",
  "taskId": 0,
  "todoDate": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/license/virtuozzo/{serviceName}/tasks/{taskId}" \
  -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("/license/virtuozzo/{serviceName}/tasks/{taskId}")

# 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("/license/virtuozzo/{serviceName}/tasks/{taskId}");

print_r($result);
?>
```

## Request service termination

`POST /1.0/license/virtuozzo/{serviceName}/terminate`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#post-license-virtuozzo-servicename-terminate

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

Request service termination. Starts the termination of the service. The admin contact receives a token by email, to confirm with the `confirmTermination` call.

### Parameters

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

### Responses

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

```json
"string"
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/license/virtuozzo/{serviceName}/terminate" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

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

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

result = client.post("/license/virtuozzo/{serviceName}/terminate")

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

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

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

$result = $ovh->post("/license/virtuozzo/{serviceName}/terminate");

print_r($result);
?>
```

## List available services

`GET /1.0/license/windows`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-windows

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

### Parameters

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

### Responses

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

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

### Example

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

# 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("/license/windows");

print_r($result);
?>
```

## Get the orderable Windows versions

`GET /1.0/license/windows/orderableVersions`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-windows-orderableversions

**Status:** Stable production version  
**IAM actions:** `account:apiovh:licenseWindows/orderableVersions/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `ip` | query | ipv4 | yes | Your license Ip |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.WindowsOrderConfiguration[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `orderableVersions` | license.OrderableWindowsCompatibilityInfos[] |  |  |
| `orderableVersions[].compliantSql` | license.WindowsSqlVersionEnum[] |  |  |
| `orderableVersions[].version` | license.WindowsOsVersionEnum |  | All versions for Windows products — one of `WINDOWS_SERVER_2003_ENTERPRISE_EDITION`, `WINDOWS_SERVER_2003_ENTERPRISE_EDITION_2_CPU`, `WINDOWS_SERVER_2003_STANDARD_EDITION`, `WINDOWS_SERVER_2003_WEB_EDITION`, `WINDOWS_SERVER_2003_WEB_EDITION_2_CPU`, `WINDOWS_SERVER_2003_WEB_ENHANCED_EDITION`, `WINDOWS_SERVER_2003_WEB_STANDARD_EDITION`, `WINDOWS_SERVER_2003_WEB_STANDARD_EDITION_2_CPU`, `WINDOWS_SERVER_2008_DATACENTER_EDITION`, `WINDOWS_SERVER_2008_DATACENTER_EDITION_2_CPU`, `WINDOWS_SERVER_2008_DATACENTER_EDITION_4_CPU`, `WINDOWS_SERVER_2008_ENTERPRISE_EDITION`, … |
| `serviceType` | license.LicenseTypeEnum |  | Possible values for license type — one of `dedicated`, `dedicatedCloud`, `dedicatedFailover`, `failover`, `vm`, `vps`, `vps_ceph`, `vps_classic`, `vps_cloud`, `vps_cloud_2016`, `vps_ssd` |

```json
[
  {
    "orderableVersions": [
      {
        "compliantSql": [
          "SQL_SERVER_2008_STANDARD_EDITION"
        ],
        "version": "WINDOWS_SERVER_2003_ENTERPRISE_EDITION"
      }
    ],
    "serviceType": "dedicated"
  }
]
```

### Example

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

# 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("/license/windows/orderableVersions");

print_r($result);
?>
```

## Get this object properties

`GET /1.0/license/windows/{serviceName}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-windows-servicename

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

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.windows.WindowsWithIAM | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creation` | string (date-time) | read-only | This license creation date |
| `deleteAtExpiration` | boolean |  | Shall we delete this on expiration ? |
| `domain` | string | read-only | The internal name of your license |
| `iam` | iam.ResourceMetadata | read-only | IAM resource metadata |
| `iam.displayName` | string | read-only | Resource display name |
| `iam.id` | string (uuid) | read-only | Unique identifier of the resource |
| `iam.state` | iam.ResourceMetadata.StateEnum | read-only | Resource state — one of `EXPIRED`, `IN_CREATION`, `OK`, `SUSPENDED` |
| `iam.tags` | object | read-only | Resource tags. Tags that were internally computed are prefixed with ovh: |
| `iam.urn` | string | read-only | Unique resource name used in policies |
| `ip` | ipv4 | read-only | The ip on which this license is attached |
| `licenseId` | string | read-only | The license id on license provider side |
| `status` | license.StateEnum | read-only | This license state — one of `ok`, `released`, `terminated`, `toDeliver` |
| `version` | license.WindowsOsVersionEnum | read-only | This license version — one of `WINDOWS_SERVER_2003_ENTERPRISE_EDITION`, `WINDOWS_SERVER_2003_ENTERPRISE_EDITION_2_CPU`, `WINDOWS_SERVER_2003_STANDARD_EDITION`, `WINDOWS_SERVER_2003_WEB_EDITION`, `WINDOWS_SERVER_2003_WEB_EDITION_2_CPU`, `WINDOWS_SERVER_2003_WEB_ENHANCED_EDITION`, `WINDOWS_SERVER_2003_WEB_STANDARD_EDITION`, `WINDOWS_SERVER_2003_WEB_STANDARD_EDITION_2_CPU`, `WINDOWS_SERVER_2008_DATACENTER_EDITION`, `WINDOWS_SERVER_2008_DATACENTER_EDITION_2_CPU`, `WINDOWS_SERVER_2008_DATACENTER_EDITION_4_CPU`, `WINDOWS_SERVER_2008_ENTERPRISE_EDITION`, … |

```json
{
  "creation": "2024-01-01T12:00:00Z",
  "deleteAtExpiration": true,
  "domain": "string",
  "iam": {
    "displayName": "string",
    "id": "00000000-0000-0000-0000-000000000000",
    "state": "EXPIRED",
    "tags": {
      "key": "string"
    },
    "urn": "string"
  },
  "ip": "192.0.2.0",
  "licenseId": "string",
  "status": "ok",
  "version": "WINDOWS_SERVER_2003_ENTERPRISE_EDITION"
}
```

### Example

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

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

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

result = client.get("/license/windows/{serviceName}")

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

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

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

$result = $ovh->get("/license/windows/{serviceName}");

print_r($result);
?>
```

## Alter this object properties

`PUT /1.0/license/windows/{serviceName}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#put-license-windows-servicename

**Status:** Stable production version  
**IAM actions:** `licenseWindows:apiovh:put`

### Parameters

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

### Request body (required)

Type: `license.windows.Windows`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creation` | string (date-time) | read-only | This license creation date |
| `deleteAtExpiration` | boolean |  | Shall we delete this on expiration ? |
| `domain` | string | read-only | The internal name of your license |
| `ip` | ipv4 | read-only | The ip on which this license is attached |
| `licenseId` | string | read-only | The license id on license provider side |
| `status` | license.StateEnum | read-only | This license state — one of `ok`, `released`, `terminated`, `toDeliver` |
| `version` | license.WindowsOsVersionEnum | read-only | This license version — one of `WINDOWS_SERVER_2003_ENTERPRISE_EDITION`, `WINDOWS_SERVER_2003_ENTERPRISE_EDITION_2_CPU`, `WINDOWS_SERVER_2003_STANDARD_EDITION`, `WINDOWS_SERVER_2003_WEB_EDITION`, `WINDOWS_SERVER_2003_WEB_EDITION_2_CPU`, `WINDOWS_SERVER_2003_WEB_ENHANCED_EDITION`, `WINDOWS_SERVER_2003_WEB_STANDARD_EDITION`, `WINDOWS_SERVER_2003_WEB_STANDARD_EDITION_2_CPU`, `WINDOWS_SERVER_2008_DATACENTER_EDITION`, `WINDOWS_SERVER_2008_DATACENTER_EDITION_2_CPU`, `WINDOWS_SERVER_2008_DATACENTER_EDITION_4_CPU`, `WINDOWS_SERVER_2008_ENTERPRISE_EDITION`, … |

```json
{
  "deleteAtExpiration": true
}
```

### Responses

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

### Example

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

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

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

# Request body type: license.windows.Windows
result = client.put("/license/windows/{serviceName}",
	deleteAtExpiration = None, # Shall we delete this on expiration ? (type: boolean)
)

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

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

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

// Request body type: license.windows.Windows
$result = $ovh->put("/license/windows/{serviceName}", array(
	deleteAtExpiration => null, // Shall we delete this on expiration ? (type: boolean)
));

print_r($result);
?>
```

## Confirm service termination

`POST /1.0/license/windows/{serviceName}/confirmTermination`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#post-license-windows-servicename-confirmtermination

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

Confirm service termination. Terminates the service with the token sent by email to the admin contact. A reason, a future use and a comment can be given.

### Parameters

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

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `commentary` | string |  | Commentary about your termination request |
| `futureUse` | service.TerminationFutureUseEnum |  | What next after your termination request — one of `NOT_REPLACING_SERVICE`, `OTHER`, `SUBSCRIBE_AN_OTHER_SERVICE`, `SUBSCRIBE_OTHER_KIND_OF_SERVICE_WITH_COMPETITOR`, `SUBSCRIBE_SIMILAR_SERVICE_WITH_COMPETITOR` |
| `reason` | service.TerminationReasonEnum |  | Reason of your termination request — one of `FEATURES_DONT_SUIT_ME`, `LACK_OF_PERFORMANCES`, `MIGRATED_TO_ANOTHER_OVH_PRODUCT`, `MIGRATED_TO_COMPETITOR`, `NOT_ENOUGH_RECOGNITION`, `NOT_NEEDED_ANYMORE`, `NOT_RELIABLE`, `NO_ANSWER`, `OTHER`, `PRODUCT_DIMENSION_DONT_SUIT_ME`, `PRODUCT_TOOLS_DONT_SUIT_ME`, `TOO_EXPENSIVE`, … |
| `token` | string | yes | The termination token sent by email to the admin contact |

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

### Responses

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

```json
"string"
```

### Example

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

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

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

result = client.post("/license/windows/{serviceName}/confirmTermination",
	commentary = None, # Commentary about your termination request (type: string, nullable)
	futureUse = None, # What next after your termination request (type: service.TerminationFutureUseEnum, nullable)
	reason = None, # Reason of your termination request (type: service.TerminationReasonEnum, nullable)
	token = None, # The termination token sent by email to the admin contact (type: string)
)

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

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

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

$result = $ovh->post("/license/windows/{serviceName}/confirmTermination", array(
	commentary => null, // Commentary about your termination request (type: string, nullable)
	futureUse => null, // What next after your termination request (type: service.TerminationFutureUseEnum, nullable)
	reason => null, // Reason of your termination request (type: service.TerminationReasonEnum, nullable)
	token => null, // The termination token sent by email to the admin contact (type: string)
));

print_r($result);
?>
```

## options attached to this license

`GET /1.0/license/windows/{serviceName}/option`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-windows-servicename-option

**Status:** Stable production version  
**IAM actions:** `licenseWindows:apiovh:option/get`

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.OptionLabel[] | successful operation |

```json
[
  "ANTISPAM_SPAMASSASSIN"
]
```

### Example

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

# 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("/license/windows/{serviceName}/option");

print_r($result);
?>
```

## Get this object properties

`GET /1.0/license/windows/{serviceName}/option/{label}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-windows-servicename-option-label

**Status:** Stable production version  
**IAM actions:** `licenseWindows:apiovh:option/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `label` | path | license.OptionLabel | yes | This option designation — one of `ANTISPAM_SPAMASSASSIN`, `ANTIVIRUS_DRWEB`, `ANTIVIRUS_KASPERSKY`, `DOMAINS`, `LANGUAGE_PACK`, `POWERPACK`, `SQL_SERVER`, `VIRTUOZZO_CONTAINERS` |
| `serviceName` | path | string | yes | The name of your Windows license |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.Option | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `amount` | string | read-only | Quantity or corresponding label of the designated option enabled on your license |
| `canBeDeleted` | boolean | read-only | Specifies whether this option can be released or not |
| `expirationDate` | string (date-time) | read-only | This option expiration date |
| `label` | license.OptionLabel | read-only | This option designation — one of `ANTISPAM_SPAMASSASSIN`, `ANTIVIRUS_DRWEB`, `ANTIVIRUS_KASPERSKY`, `DOMAINS`, `LANGUAGE_PACK`, `POWERPACK`, `SQL_SERVER`, `VIRTUOZZO_CONTAINERS` |
| `version` | string | read-only | This option related version |

```json
{
  "amount": "string",
  "canBeDeleted": true,
  "expirationDate": "2024-01-01T12:00:00Z",
  "label": "ANTISPAM_SPAMASSASSIN",
  "version": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/license/windows/{serviceName}/option/{label}" \
  -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("/license/windows/{serviceName}/option/{label}")

# 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("/license/windows/{serviceName}/option/{label}");

print_r($result);
?>
```

## release this Option

`DELETE /1.0/license/windows/{serviceName}/option/{label}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#delete-license-windows-servicename-option-label

**Status:** Stable production version  
**IAM actions:** `licenseWindows:apiovh:option/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `label` | path | license.OptionLabel | yes | This option designation — one of `ANTISPAM_SPAMASSASSIN`, `ANTIVIRUS_DRWEB`, `ANTIVIRUS_KASPERSKY`, `DOMAINS`, `LANGUAGE_PACK`, `POWERPACK`, `SQL_SERVER`, `VIRTUOZZO_CONTAINERS` |
| `serviceName` | path | string | yes | The name of your Windows license |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | license.ActionType | read-only | This Task description — one of `addWindowFromExistingSerial`, `changeIp`, `changeOs`, `installLicense`, `optionUpgrade`, `releaseOption`, `versionUpgrade` |
| `doneDate` | string (date-time) | read-only | When was this Task done |
| `lastUpdate` | string (date-time) | read-only | The last time this Task was updated |
| `name` | string | read-only | This Task name |
| `status` | license.TaskStateEnum | read-only | Current Taks status — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `taskId` | integer | read-only | This Task id |
| `todoDate` | string (date-time) | read-only | When was this Task created |

```json
{
  "action": "addWindowFromExistingSerial",
  "doneDate": "2024-01-01T12:00:00Z",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "name": "string",
  "status": "cancelled",
  "taskId": 0,
  "todoDate": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/license/windows/{serviceName}/option/{label}" \
  -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("/license/windows/{serviceName}/option/{label}")

# 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("/license/windows/{serviceName}/option/{label}");

print_r($result);
?>
```

## Get service information

`GET /1.0/license/windows/{serviceName}/serviceInfos`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-windows-servicename-serviceinfos

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

Get service information. Returns the status, creation and expiration dates, contacts and renewal settings of the service.

### Parameters

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

### Responses

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

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

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

### Example

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

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

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

result = client.get("/license/windows/{serviceName}/serviceInfos")

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

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

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

$result = $ovh->get("/license/windows/{serviceName}/serviceInfos");

print_r($result);
?>
```

## Update service information

`PUT /1.0/license/windows/{serviceName}/serviceInfos`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#put-license-windows-servicename-serviceinfos

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

Update service information. Updates the renewal settings of the service: automatic renewal, period, or deletion at expiration.

### Parameters

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

### Request body (required)

Type: `services.Service`

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

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

### Responses

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

### Example

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

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

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

# Request body type: services.Service
result = client.put("/license/windows/{serviceName}/serviceInfos",
	renew = None, # Way of handling the renew (type: service.RenewType, nullable)
)

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

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

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

// Request body type: services.Service
$result = $ovh->put("/license/windows/{serviceName}/serviceInfos", array(
	renew => null, // Way of handling the renew (type: service.RenewType, nullable)
));

print_r($result);
?>
```

## Link your own sql server license to this Windows license

`POST /1.0/license/windows/{serviceName}/sqlServer`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#post-license-windows-servicename-sqlserver

**Status:** Stable production version  
**IAM actions:** `licenseWindows:apiovh:sqlServer/create`

### Parameters

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

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `licenseId` | string | yes | Your license serial number |
| `version` | license.WindowsSqlVersionEnum | yes | Your license version — one of `SQL_SERVER_2008_STANDARD_EDITION`, `SQL_SERVER_2008_STANDARD_EDITION_2_CPU`, `SQL_SERVER_2008_WEB_EDITION`, `SQL_SERVER_2008_WEB_EDITION_2_CPU`, `SQL_SERVER_2012_STANDARD_EDITION`, `SQL_SERVER_2012_STANDARD_EDITION_12_CORES`, `SQL_SERVER_2012_STANDARD_EDITION_16_CORES`, `SQL_SERVER_2012_STANDARD_EDITION_18_CORES`, `SQL_SERVER_2012_STANDARD_EDITION_20_CORES`, `SQL_SERVER_2012_STANDARD_EDITION_24_CORES`, `SQL_SERVER_2012_STANDARD_EDITION_2_CPU`, `SQL_SERVER_2012_STANDARD_EDITION_32_CORES`, … |

```json
{
  "licenseId": "string",
  "version": "SQL_SERVER_2008_STANDARD_EDITION"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | license.ActionType | read-only | This Task description — one of `addWindowFromExistingSerial`, `changeIp`, `changeOs`, `installLicense`, `optionUpgrade`, `releaseOption`, `versionUpgrade` |
| `doneDate` | string (date-time) | read-only | When was this Task done |
| `lastUpdate` | string (date-time) | read-only | The last time this Task was updated |
| `name` | string | read-only | This Task name |
| `status` | license.TaskStateEnum | read-only | Current Taks status — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `taskId` | integer | read-only | This Task id |
| `todoDate` | string (date-time) | read-only | When was this Task created |

```json
{
  "action": "addWindowFromExistingSerial",
  "doneDate": "2024-01-01T12:00:00Z",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "name": "string",
  "status": "cancelled",
  "taskId": 0,
  "todoDate": "2024-01-01T12:00:00Z"
}
```

### Example

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

result = client.post("/license/windows/{serviceName}/sqlServer",
	licenseId = None, # Your license serial number (type: string)
	version = None, # Your license version (type: license.WindowsSqlVersionEnum)
)

# 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("/license/windows/{serviceName}/sqlServer", array(
	licenseId => null, // Your license serial number (type: string)
	version => null, // Your license version (type: license.WindowsSqlVersionEnum)
));

print_r($result);
?>
```

## tasks linked to this license

`GET /1.0/license/windows/{serviceName}/tasks`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-windows-servicename-tasks

**Status:** Stable production version  
**IAM actions:** `licenseWindows:apiovh:tasks/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `action` | query | license.ActionType |  | Filter the value of action property (=) — one of `addWindowFromExistingSerial`, `changeIp`, `changeOs`, `installLicense`, `optionUpgrade`, `releaseOption`, `versionUpgrade` |
| `serviceName` | path | string | yes | The name of your Windows license |
| `status` | query | license.TaskStateEnum |  | Filter the value of status property (=) — one of `cancelled`, `doing`, `done`, `error`, `todo` |

### Responses

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

```json
[
  0
]
```

### Example

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

# 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("/license/windows/{serviceName}/tasks");

print_r($result);
?>
```

## Get this object properties

`GET /1.0/license/windows/{serviceName}/tasks/{taskId}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-windows-servicename-tasks-taskid

**Status:** Stable production version  
**IAM actions:** `licenseWindows:apiovh:tasks/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The name of your Windows license |
| `taskId` | path | integer | yes | This Task id |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | license.ActionType | read-only | This Task description — one of `addWindowFromExistingSerial`, `changeIp`, `changeOs`, `installLicense`, `optionUpgrade`, `releaseOption`, `versionUpgrade` |
| `doneDate` | string (date-time) | read-only | When was this Task done |
| `lastUpdate` | string (date-time) | read-only | The last time this Task was updated |
| `name` | string | read-only | This Task name |
| `status` | license.TaskStateEnum | read-only | Current Taks status — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `taskId` | integer | read-only | This Task id |
| `todoDate` | string (date-time) | read-only | When was this Task created |

```json
{
  "action": "addWindowFromExistingSerial",
  "doneDate": "2024-01-01T12:00:00Z",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "name": "string",
  "status": "cancelled",
  "taskId": 0,
  "todoDate": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/license/windows/{serviceName}/tasks/{taskId}" \
  -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("/license/windows/{serviceName}/tasks/{taskId}")

# 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("/license/windows/{serviceName}/tasks/{taskId}");

print_r($result);
?>
```

## Request service termination

`POST /1.0/license/windows/{serviceName}/terminate`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#post-license-windows-servicename-terminate

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

Request service termination. Starts the termination of the service. The admin contact receives a token by email, to confirm with the `confirmTermination` call.

### Parameters

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

### Responses

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

```json
"string"
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/license/windows/{serviceName}/terminate" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

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

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

result = client.post("/license/windows/{serviceName}/terminate")

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

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

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

$result = $ovh->post("/license/windows/{serviceName}/terminate");

print_r($result);
?>
```

## List available services

`GET /1.0/license/worklight`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-worklight

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

### Parameters

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

### Responses

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

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

### Example

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

# 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("/license/worklight");

print_r($result);
?>
```

## Get the orderable WorkLight versions

`GET /1.0/license/worklight/orderableVersions`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-worklight-orderableversions

**Status:** Stable production version  
**IAM actions:** `account:apiovh:licenseWorklight/orderableVersions/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `ip` | query | ipv4 | yes | Your license Ip |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.WorkLightOrderConfiguration[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `orderableVersions` | license.OrderableWorkLightCompatibilityInfos[] |  |  |
| `orderableVersions[].version` | license.WorkLightVersionEnum |  | All versions for WorkLight product — one of `VERSION-6.1U.1CPU`, `VERSION-6.1U.2CPU`, `VERSION-6.2U.1CPU`, `VERSION-6.2U.2CPU`, `VERSION-6.EVALUATION`, `worklight-license-version-6-1cpu-1u`, `worklight-license-version-6-1cpu-2u`, `worklight-license-version-6-2cpu-1u`, `worklight-license-version-6-2cpu-2u` |
| `serviceType` | license.LicenseTypeEnum |  | Possible values for license type — one of `dedicated`, `dedicatedCloud`, `dedicatedFailover`, `failover`, `vm`, `vps`, `vps_ceph`, `vps_classic`, `vps_cloud`, `vps_cloud_2016`, `vps_ssd` |

```json
[
  {
    "orderableVersions": [
      {
        "version": "VERSION-6.1U.1CPU"
      }
    ],
    "serviceType": "dedicated"
  }
]
```

### Example

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

# 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("/license/worklight/orderableVersions");

print_r($result);
?>
```

## Get this object properties

`GET /1.0/license/worklight/{serviceName}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-worklight-servicename

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

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.worklight.WorkLightWithIAM | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creation` | string (date-time) | read-only | This license creation date |
| `deleteAtExpiration` | boolean |  | Shall we delete this on expiration ? |
| `domain` | string | read-only | The internal name of your license |
| `iam` | iam.ResourceMetadata | read-only | IAM resource metadata |
| `iam.displayName` | string | read-only | Resource display name |
| `iam.id` | string (uuid) | read-only | Unique identifier of the resource |
| `iam.state` | iam.ResourceMetadata.StateEnum | read-only | Resource state — one of `EXPIRED`, `IN_CREATION`, `OK`, `SUSPENDED` |
| `iam.tags` | object | read-only | Resource tags. Tags that were internally computed are prefixed with ovh: |
| `iam.urn` | string | read-only | Unique resource name used in policies |
| `ip` | ipv4 | read-only | The ip on which this license is attached |
| `licenseId` | string | read-only | The license id on license provider side |
| `status` | license.StateEnum | read-only | This license state — one of `ok`, `released`, `terminated`, `toDeliver` |
| `version` | license.WorkLightVersionEnum | read-only | This license version — one of `VERSION-6.1U.1CPU`, `VERSION-6.1U.2CPU`, `VERSION-6.2U.1CPU`, `VERSION-6.2U.2CPU`, `VERSION-6.EVALUATION`, `worklight-license-version-6-1cpu-1u`, `worklight-license-version-6-1cpu-2u`, `worklight-license-version-6-2cpu-1u`, `worklight-license-version-6-2cpu-2u` |

```json
{
  "creation": "2024-01-01T12:00:00Z",
  "deleteAtExpiration": true,
  "domain": "string",
  "iam": {
    "displayName": "string",
    "id": "00000000-0000-0000-0000-000000000000",
    "state": "EXPIRED",
    "tags": {
      "key": "string"
    },
    "urn": "string"
  },
  "ip": "192.0.2.0",
  "licenseId": "string",
  "status": "ok",
  "version": "VERSION-6.1U.1CPU"
}
```

### Example

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

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

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

result = client.get("/license/worklight/{serviceName}")

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

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

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

$result = $ovh->get("/license/worklight/{serviceName}");

print_r($result);
?>
```

## Alter this object properties

`PUT /1.0/license/worklight/{serviceName}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#put-license-worklight-servicename

**Status:** Stable production version  
**IAM actions:** `licenseWorklight:apiovh:put`

### Parameters

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

### Request body (required)

Type: `license.worklight.WorkLight`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creation` | string (date-time) | read-only | This license creation date |
| `deleteAtExpiration` | boolean |  | Shall we delete this on expiration ? |
| `domain` | string | read-only | The internal name of your license |
| `ip` | ipv4 | read-only | The ip on which this license is attached |
| `licenseId` | string | read-only | The license id on license provider side |
| `status` | license.StateEnum | read-only | This license state — one of `ok`, `released`, `terminated`, `toDeliver` |
| `version` | license.WorkLightVersionEnum | read-only | This license version — one of `VERSION-6.1U.1CPU`, `VERSION-6.1U.2CPU`, `VERSION-6.2U.1CPU`, `VERSION-6.2U.2CPU`, `VERSION-6.EVALUATION`, `worklight-license-version-6-1cpu-1u`, `worklight-license-version-6-1cpu-2u`, `worklight-license-version-6-2cpu-1u`, `worklight-license-version-6-2cpu-2u` |

```json
{
  "deleteAtExpiration": true
}
```

### Responses

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

### Example

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

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

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

# Request body type: license.worklight.WorkLight
result = client.put("/license/worklight/{serviceName}",
	deleteAtExpiration = None, # Shall we delete this on expiration ? (type: boolean)
)

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

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

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

// Request body type: license.worklight.WorkLight
$result = $ovh->put("/license/worklight/{serviceName}", array(
	deleteAtExpiration => null, // Shall we delete this on expiration ? (type: boolean)
));

print_r($result);
?>
```

## Returns an array of ips where the license can be moved to

`GET /1.0/license/worklight/{serviceName}/allowedDestinationIp`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-worklight-servicename-alloweddestinationip

**Status:** Stable production version  
**IAM actions:** `licenseWorklight:apiovh:allowedDestinationIp/get`

### Parameters

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

### Responses

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

```json
[
  "192.0.2.0/24"
]
```

### Example

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

# 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("/license/worklight/{serviceName}/allowedDestinationIp");

print_r($result);
?>
```

## Will tell if the ip can accept the license

`GET /1.0/license/worklight/{serviceName}/canLicenseBeMovedTo`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-worklight-servicename-canlicensebemovedto

**Status:** Stable production version  
**IAM actions:** `licenseWorklight:apiovh:canLicenseBeMovedTo/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `destinationIp` | query | ipv4 | yes | The Ip on which you want to move this license |
| `serviceName` | path | string | yes | The name of your WorkLight license |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.ChangeIpStatus | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `message` | license.ChangeIpMessageEnum |  | Messages from change IP — one of `OK`, `destinationNotAllowed`, `licenseAlreadyExists`, `notAllowedToHandleThis`, `notSameType`, `sameIp`, `versionNotAllowed` |
| `success` | boolean |  |  |

```json
{
  "message": "OK",
  "success": true
}
```

### Example

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

# 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("/license/worklight/{serviceName}/canLicenseBeMovedTo");

print_r($result);
?>
```

## Move this license to another Ip

`POST /1.0/license/worklight/{serviceName}/changeIp`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#post-license-worklight-servicename-changeip

**Status:** Stable production version  
**IAM actions:** `licenseWorklight:apiovh:changeIp`

### Parameters

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

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `destinationIp` | ipv4 | yes | The Ip on which you want to move this license |

```json
{
  "destinationIp": "192.0.2.0"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | license.ActionType | read-only | This Task description — one of `addWindowFromExistingSerial`, `changeIp`, `changeOs`, `installLicense`, `optionUpgrade`, `releaseOption`, `versionUpgrade` |
| `doneDate` | string (date-time) | read-only | When was this Task done |
| `lastUpdate` | string (date-time) | read-only | The last time this Task was updated |
| `name` | string | read-only | This Task name |
| `status` | license.TaskStateEnum | read-only | Current Taks status — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `taskId` | integer | read-only | This Task id |
| `todoDate` | string (date-time) | read-only | When was this Task created |

```json
{
  "action": "addWindowFromExistingSerial",
  "doneDate": "2024-01-01T12:00:00Z",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "name": "string",
  "status": "cancelled",
  "taskId": 0,
  "todoDate": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/license/worklight/{serviceName}/changeIp" \
  -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: ipv4
result = client.post("/license/worklight/{serviceName}/changeIp",
	destinationIp = None, # The Ip on which you want to move this license (type: ipv4)
)

# 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: ipv4
$result = $ovh->post("/license/worklight/{serviceName}/changeIp", array(
	destinationIp => null, // The Ip on which you want to move this license (type: ipv4)
));

print_r($result);
?>
```

## Confirm service termination

`POST /1.0/license/worklight/{serviceName}/confirmTermination`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#post-license-worklight-servicename-confirmtermination

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

Confirm service termination. Terminates the service with the token sent by email to the admin contact. A reason, a future use and a comment can be given.

### Parameters

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

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `commentary` | string |  | Commentary about your termination request |
| `futureUse` | service.TerminationFutureUseEnum |  | What next after your termination request — one of `NOT_REPLACING_SERVICE`, `OTHER`, `SUBSCRIBE_AN_OTHER_SERVICE`, `SUBSCRIBE_OTHER_KIND_OF_SERVICE_WITH_COMPETITOR`, `SUBSCRIBE_SIMILAR_SERVICE_WITH_COMPETITOR` |
| `reason` | service.TerminationReasonEnum |  | Reason of your termination request — one of `FEATURES_DONT_SUIT_ME`, `LACK_OF_PERFORMANCES`, `MIGRATED_TO_ANOTHER_OVH_PRODUCT`, `MIGRATED_TO_COMPETITOR`, `NOT_ENOUGH_RECOGNITION`, `NOT_NEEDED_ANYMORE`, `NOT_RELIABLE`, `NO_ANSWER`, `OTHER`, `PRODUCT_DIMENSION_DONT_SUIT_ME`, `PRODUCT_TOOLS_DONT_SUIT_ME`, `TOO_EXPENSIVE`, … |
| `token` | string | yes | The termination token sent by email to the admin contact |

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

### Responses

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

```json
"string"
```

### Example

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

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

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

result = client.post("/license/worklight/{serviceName}/confirmTermination",
	commentary = None, # Commentary about your termination request (type: string, nullable)
	futureUse = None, # What next after your termination request (type: service.TerminationFutureUseEnum, nullable)
	reason = None, # Reason of your termination request (type: service.TerminationReasonEnum, nullable)
	token = None, # The termination token sent by email to the admin contact (type: string)
)

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

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

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

$result = $ovh->post("/license/worklight/{serviceName}/confirmTermination", array(
	commentary => null, // Commentary about your termination request (type: string, nullable)
	futureUse => null, // What next after your termination request (type: service.TerminationFutureUseEnum, nullable)
	reason => null, // Reason of your termination request (type: service.TerminationReasonEnum, nullable)
	token => null, // The termination token sent by email to the admin contact (type: string)
));

print_r($result);
?>
```

## Get service information

`GET /1.0/license/worklight/{serviceName}/serviceInfos`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-worklight-servicename-serviceinfos

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

Get service information. Returns the status, creation and expiration dates, contacts and renewal settings of the service.

### Parameters

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

### Responses

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

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

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

### Example

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

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

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

result = client.get("/license/worklight/{serviceName}/serviceInfos")

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

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

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

$result = $ovh->get("/license/worklight/{serviceName}/serviceInfos");

print_r($result);
?>
```

## Update service information

`PUT /1.0/license/worklight/{serviceName}/serviceInfos`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#put-license-worklight-servicename-serviceinfos

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

Update service information. Updates the renewal settings of the service: automatic renewal, period, or deletion at expiration.

### Parameters

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

### Request body (required)

Type: `services.Service`

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

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

### Responses

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

### Example

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

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

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

# Request body type: services.Service
result = client.put("/license/worklight/{serviceName}/serviceInfos",
	renew = None, # Way of handling the renew (type: service.RenewType, nullable)
)

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

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

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

// Request body type: services.Service
$result = $ovh->put("/license/worklight/{serviceName}/serviceInfos", array(
	renew => null, // Way of handling the renew (type: service.RenewType, nullable)
));

print_r($result);
?>
```

## Tasks linked to this license

`GET /1.0/license/worklight/{serviceName}/tasks`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-worklight-servicename-tasks

**Status:** Stable production version  
**IAM actions:** `licenseWorklight:apiovh:tasks/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `action` | query | license.ActionType |  | Filter the value of action property (=) — one of `addWindowFromExistingSerial`, `changeIp`, `changeOs`, `installLicense`, `optionUpgrade`, `releaseOption`, `versionUpgrade` |
| `serviceName` | path | string | yes | The name of your WorkLight license |
| `status` | query | license.TaskStateEnum |  | Filter the value of status property (=) — one of `cancelled`, `doing`, `done`, `error`, `todo` |

### Responses

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

```json
[
  0
]
```

### Example

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

# 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("/license/worklight/{serviceName}/tasks");

print_r($result);
?>
```

## Get this object properties

`GET /1.0/license/worklight/{serviceName}/tasks/{taskId}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#get-license-worklight-servicename-tasks-taskid

**Status:** Stable production version  
**IAM actions:** `licenseWorklight:apiovh:tasks/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The name of your WorkLight license |
| `taskId` | path | integer | yes | This Task id |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | license.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | license.ActionType | read-only | This Task description — one of `addWindowFromExistingSerial`, `changeIp`, `changeOs`, `installLicense`, `optionUpgrade`, `releaseOption`, `versionUpgrade` |
| `doneDate` | string (date-time) | read-only | When was this Task done |
| `lastUpdate` | string (date-time) | read-only | The last time this Task was updated |
| `name` | string | read-only | This Task name |
| `status` | license.TaskStateEnum | read-only | Current Taks status — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `taskId` | integer | read-only | This Task id |
| `todoDate` | string (date-time) | read-only | When was this Task created |

```json
{
  "action": "addWindowFromExistingSerial",
  "doneDate": "2024-01-01T12:00:00Z",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "name": "string",
  "status": "cancelled",
  "taskId": 0,
  "todoDate": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/license/worklight/{serviceName}/tasks/{taskId}" \
  -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("/license/worklight/{serviceName}/tasks/{taskId}")

# 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("/license/worklight/{serviceName}/tasks/{taskId}");

print_r($result);
?>
```

## Request service termination

`POST /1.0/license/worklight/{serviceName}/terminate`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/licenses/#post-license-worklight-servicename-terminate

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

Request service termination. Starts the termination of the service. The admin contact receives a token by email, to confirm with the `confirmTermination` call.

### Parameters

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

### Responses

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

```json
"string"
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/license/worklight/{serviceName}/terminate" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

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

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

result = client.post("/license/worklight/{serviceName}/terminate")

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

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

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

$result = $ovh->post("/license/worklight/{serviceName}/terminate");

print_r($result);
?>
```
