# Bare Metal Cloud › Dedicated Servers › Server 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

> 24 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/dedicated-servers/server/

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

## Operations

- `GET /dedicated/server` — List dedicated server resources
- `GET /dedicated/server/{serviceName}` — Get dedicated server resource
- `PUT /dedicated/server/{serviceName}` — Update a server
- `GET /dedicated/server/{serviceName}/serviceInfos` — Get service information
- `PUT /dedicated/server/{serviceName}/serviceInfos` — Update service information
- `GET /dedicated/server/{serviceName}/specifications/hardware` — Get the hardware specifications
- `GET /dedicated/server/{serviceName}/specifications/ip` — Get the IP capabilities
- `GET /dedicated/server/{serviceName}/specifications/network` — Get the network specifications
- `GET /dedicated/server/{serviceName}/option` — List options
- `GET /dedicated/server/{serviceName}/option/{option}` — Get an option
- `DELETE /dedicated/server/{serviceName}/option/{option}` — Release an option
- `GET /dedicated/server/{serviceName}/task` — List tasks
- `GET /dedicated/server/{serviceName}/task/{taskId}` — Get a task
- `GET /dedicated/server/{serviceName}/task/{taskId}/availableTimeslots` — List available time slots
- `POST /dedicated/server/{serviceName}/task/{taskId}/cancel` — Cancel a task
- `POST /dedicated/server/{serviceName}/task/{taskId}/schedule` — Schedule an intervention
- `GET /dedicated/server/{serviceName}/ongoing` — List ongoing tasks
- `POST /dedicated/server/{serviceName}/support/replace/cooling` — Request a cooling module replacement
- `POST /dedicated/server/{serviceName}/support/replace/hardDiskDrive` — Request a disk replacement
- `POST /dedicated/server/{serviceName}/support/replace/memory` — Request a memory module replacement
- `POST /dedicated/server/{serviceName}/authenticationSecret` — Get access credentials
- `POST /dedicated/server/{serviceName}/changeContact` — Change service contacts
- `POST /dedicated/server/{serviceName}/terminate` — Request service termination
- `POST /dedicated/server/{serviceName}/confirmTermination` — Confirm service termination

## List dedicated server resources

`GET /v2/dedicated/server`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/server/#get-dedicated-server

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

Get the list of all my dedicated server resources.

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicated.serverWithIAM[] | successful operation |
| 500 | object | Error 500 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Checksum of the target spec (mutable params). Send it back on update. Rejected if another caller changed the target since your read. |
| `currentState` | dedicated.server.CurrentState | read-only | State observed on the server |
| `currentState.actions` | dedicated.server.AvailableAction[] | read-only | Availability of each action the server can be asked to perform. Present only when the read asks for it with actions=true. Absence means it was not asked for. |
| `currentState.actions[].action` | dedicated.server.ActionEnum | read-only | Action whose availability this entry reports — one of `ENABLE_ENCRYPTION_AT_REST` |
| `currentState.actions[].blockedBy` | dedicated.server.ActionReason[] | read-only | All reasons that make the action unavailable. Null unless status is UNAVAILABLE. |
| `currentState.actions[].status` | dedicated.server.ActionStatusEnum | read-only | Whether the server accepts the action now — one of `AVAILABLE`, `UNAVAILABLE`, `UNDETERMINED` |
| `currentState.features` | dedicated.server.Features | read-only | Features observed on the server |
| `currentState.features.encryptionAtRest` | dedicated.server.FeatureEncryptionAtRest | read-only | Encryption of the data at rest on the server disks. Reported on every server, with `enabled` false when the encryption is not in force. |
| `currentTasks` | common.CurrentTask[] | read-only | Asynchronous operations currently running. Omitted, never null, when no update is running, and always omitted from the server list. |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `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 |
| `id` | string | read-only | Service name of the dedicated server resource |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Reflects the readiness of the dedicated server resource. A new target specification request will be accepted only in `READY` status. — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | dedicated.server.TargetSpec | read-only | Target specification last declared on the server |
| `targetSpec.features` | dedicated.server.TargetSpecFeatures | yes | Desired state of every feature of the server |
| `targetSpec.features.encryptionAtRest` | dedicated.server.TargetSpecFeatureEncryptionAtRest | yes | Desired encryption of the data at rest on the server disks |

```json
[
  {
    "checksum": "string",
    "currentState": {
      "actions": [
        {
          "action": "ENABLE_ENCRYPTION_AT_REST",
          "blockedBy": [
            {
              "code": null,
              "details": null,
              "nature": null
            }
          ],
          "status": "AVAILABLE"
        }
      ],
      "features": {
        "encryptionAtRest": {
          "enabled": true
        }
      }
    },
    "currentTasks": [
      {
        "errors": [
          {
            "message": "string"
          }
        ],
        "id": "00000000-0000-0000-0000-000000000000",
        "link": "string",
        "status": "ERROR",
        "type": "string"
      }
    ],
    "iam": {
      "displayName": "string",
      "id": "00000000-0000-0000-0000-000000000000",
      "state": "EXPIRED",
      "tags": {
        "key": "string"
      },
      "urn": "string"
    },
    "id": "string",
    "resourceStatus": "CREATING",
    "targetSpec": {
      "features": {
        "encryptionAtRest": {
          "enabled": true
        }
      }
    }
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/dedicated/server" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

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

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

result = client.get("/v2/dedicated/server")

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

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

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

$result = $ovh->get("/v2/dedicated/server");

print_r($result);
?>
```

## Get dedicated server resource

`GET /v2/dedicated/server/{serviceName}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/server/#get-dedicated-server-servicename

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

Get the details of the dedicated server resource.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `actions` | query | boolean |  | Also report, under currentState.actions, whether the server accepts each action it can be asked to perform |
| `serviceName` | path | string | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicated.serverWithIAM | successful operation |
| 404 | object | Error 404 response |
| 500 | object | Error 500 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Checksum of the target spec (mutable params). Send it back on update. Rejected if another caller changed the target since your read. |
| `currentState` | dedicated.server.CurrentState | read-only | State observed on the server |
| `currentState.actions` | dedicated.server.AvailableAction[] | read-only | Availability of each action the server can be asked to perform. Present only when the read asks for it with actions=true. Absence means it was not asked for. |
| `currentState.actions[].action` | dedicated.server.ActionEnum | read-only | Action whose availability this entry reports — one of `ENABLE_ENCRYPTION_AT_REST` |
| `currentState.actions[].blockedBy` | dedicated.server.ActionReason[] | read-only | All reasons that make the action unavailable. Null unless status is UNAVAILABLE. |
| `currentState.actions[].status` | dedicated.server.ActionStatusEnum | read-only | Whether the server accepts the action now — one of `AVAILABLE`, `UNAVAILABLE`, `UNDETERMINED` |
| `currentState.features` | dedicated.server.Features | read-only | Features observed on the server |
| `currentState.features.encryptionAtRest` | dedicated.server.FeatureEncryptionAtRest | read-only | Encryption of the data at rest on the server disks. Reported on every server, with `enabled` false when the encryption is not in force. |
| `currentTasks` | common.CurrentTask[] | read-only | Asynchronous operations currently running. Omitted, never null, when no update is running, and always omitted from the server list. |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `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 |
| `id` | string | read-only | Service name of the dedicated server resource |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Reflects the readiness of the dedicated server resource. A new target specification request will be accepted only in `READY` status. — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | dedicated.server.TargetSpec | read-only | Target specification last declared on the server |
| `targetSpec.features` | dedicated.server.TargetSpecFeatures | yes | Desired state of every feature of the server |
| `targetSpec.features.encryptionAtRest` | dedicated.server.TargetSpecFeatureEncryptionAtRest | yes | Desired encryption of the data at rest on the server disks |

```json
{
  "checksum": "string",
  "currentState": {
    "actions": [
      {
        "action": "ENABLE_ENCRYPTION_AT_REST",
        "blockedBy": [
          {
            "code": "EXCLUSIVE_OPERATION_RUNNING",
            "details": {
              "key": null
            },
            "nature": "PERMANENT"
          }
        ],
        "status": "AVAILABLE"
      }
    ],
    "features": {
      "encryptionAtRest": {
        "enabled": true
      }
    }
  },
  "currentTasks": [
    {
      "errors": [
        {
          "message": "string"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "link": "string",
      "status": "ERROR",
      "type": "string"
    }
  ],
  "iam": {
    "displayName": "string",
    "id": "00000000-0000-0000-0000-000000000000",
    "state": "EXPIRED",
    "tags": {
      "key": "string"
    },
    "urn": "string"
  },
  "id": "string",
  "resourceStatus": "CREATING",
  "targetSpec": {
    "features": {
      "encryptionAtRest": {
        "enabled": true
      }
    }
  }
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/dedicated/server/{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("/v2/dedicated/server/{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("/v2/dedicated/server/{serviceName}");

print_r($result);
?>
```

## Update a server

`PUT /1.0/dedicated/server/{serviceName}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/server/#put-dedicated-server-servicename

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

Update a server. Updates the writable properties of the server, such as its boot, rescue, monitoring and datacenter intervention settings. The other properties are read-only.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Request body (required)

Type: `dedicated.server.Dedicated`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `availabilityZone` | string | read-only | dedicated AZ localisation |
| `bootId` | integer |  |  |
| `bootScript` | string |  | Ipxe script served on boot |
| `commercialRange` | string | read-only | dedicater server commercial range |
| `datacenter` | dedicated.DatacenterEnum | read-only | dedicated datacenter localisation — one of `bhs1`, `bhs2`, `bhs3`, `bhs4`, `bhs5`, `bhs6`, `bhs7`, `bhs8`, `cch01`, `crx1`, `crx2`, `dc1`, … |
| `efiBootloaderPath` | string |  | EfiBootloader path |
| `ip` | ipv4 | read-only | dedicated server ip |
| `linkSpeed` | integer | read-only |  |
| `monitoring` | boolean |  | Icmp monitoring state |
| `name` | string | read-only | dedicated server name |
| `newUpgradeSystem` | boolean | read-only |  |
| `noIntervention` | boolean |  | Prevent datacenter intervention |
| `os` | string | read-only | Operating system |
| `powerState` | dedicated.server.PowerStateEnum | read-only | Power state of the server — one of `poweroff`, `poweron` |
| `professionalUse` | boolean | read-only | Does this server have professional use option |
| `rack` | string | read-only |  |
| `region` | string | read-only | dedicated region localisation |
| `rescueMail` | string |  | Custom email used to receive rescue credentials |
| `rescueSshKey` | string |  | Public SSH Key used in the rescue mode |
| `reverse` | string | read-only | dedicated server reverse |
| `rootDevice` | string |  |  |
| `serverId` | integer | read-only | your server id |
| `state` | dedicated.server.StateEnum |  | All states a Dedicated can in — one of `error`, `hacked`, `hackedBlocked`, `ok` |
| `supportLevel` | dedicated.server.SupportLevelEnum | read-only | Dedicated server support level — one of `critical`, `fastpath`, `gs`, `pro` |

```json
{
  "bootId": 0,
  "bootScript": "string",
  "efiBootloaderPath": "string",
  "monitoring": true,
  "noIntervention": true,
  "rescueMail": "string",
  "rescueSshKey": "string",
  "rootDevice": "string",
  "state": "error"
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{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: dedicated.server.Dedicated
result = client.put("/dedicated/server/{serviceName}",
	bootId = None, #  (type: integer, nullable)
	bootScript = None, # Ipxe script served on boot (type: string, nullable)
	efiBootloaderPath = None, # EfiBootloader path (type: string, nullable)
	monitoring = None, # Icmp monitoring state (type: boolean)
	noIntervention = None, # Prevent datacenter intervention (type: boolean)
	rescueMail = None, # Custom email used to receive rescue credentials (type: string, nullable)
	rescueSshKey = None, # Public SSH Key used in the rescue mode (type: string, nullable)
	rootDevice = None, #  (type: string, nullable)
	state = None, #  (type: )
)

# 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: dedicated.server.Dedicated
$result = $ovh->put("/dedicated/server/{serviceName}", array(
	bootId => null, //  (type: integer, nullable)
	bootScript => null, // Ipxe script served on boot (type: string, nullable)
	efiBootloaderPath => null, // EfiBootloader path (type: string, nullable)
	monitoring => null, // Icmp monitoring state (type: boolean)
	noIntervention => null, // Prevent datacenter intervention (type: boolean)
	rescueMail => null, // Custom email used to receive rescue credentials (type: string, nullable)
	rescueSshKey => null, // Public SSH Key used in the rescue mode (type: string, nullable)
	rootDevice => null, //  (type: string, nullable)
	state => null, //  (type: )
));

print_r($result);
?>
```

## Get service information

`GET /1.0/dedicated/server/{serviceName}/serviceInfos`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/server/#get-dedicated-server-servicename-serviceinfos

**Status:** Stable production version  
**IAM actions:** `dedicatedServer: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 internal name of your dedicated server |

### 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/dedicated/server/{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("/dedicated/server/{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("/dedicated/server/{serviceName}/serviceInfos");

print_r($result);
?>
```

## Update service information

`PUT /1.0/dedicated/server/{serviceName}/serviceInfos`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/server/#put-dedicated-server-servicename-serviceinfos

**Status:** Stable production version  
**IAM actions:** `dedicatedServer: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 internal name of your dedicated server |

### 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/dedicated/server/{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("/dedicated/server/{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("/dedicated/server/{serviceName}/serviceInfos", array(
	renew => null, // Way of handling the renew (type: service.RenewType, nullable)
));

print_r($result);
?>
```

## Get the hardware specifications

`GET /1.0/dedicated/server/{serviceName}/specifications/hardware`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/server/#get-dedicated-server-servicename-specifications-hardware

**Status:** Stable production version  
**IAM actions:** `dedicatedServer:apiovh:specifications/hardware/get`

Get the hardware specifications. Returns the hardware of the server: commercial name, processors, memory, disk groups, expansion cards, motherboard, form factor and default RAID settings.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicated.server.HardwareSpecifications | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `bootMode` | dedicated.server.BootModeEnum |  | Server boot mode — one of `legacy`, `uefi`, `uefi-legacy` |
| `coresPerProcessor` | integer |  | number of cores per processor |
| `defaultDiskGroupId` | integer |  | Default disk group id used for OS reinstallation when not specified |
| `defaultHardwareRaidSize` | complexType.UnitAndValue_long |  | Default hardware raid size for this server |
| `defaultHardwareRaidSize.unit` | string |  |  |
| `defaultHardwareRaidSize.value` | integer |  |  |
| `defaultHardwareRaidType` | dedicated.server.HardwareSpecificationsRaidHardEnum |  | Default hardware raid type configured on this server — one of `raid0`, `raid1`, `raid10`, `raid1E`, `raid5`, `raid50`, `raid6`, `raid60` |
| `description` | string |  | commercial name of this server |
| `diskGroups` | dedicated.server.HardwareSpecificationsDisk[] |  | details about the groups of disks in the server |
| `diskGroups[].defaultHardwareRaidSize` | complexType.UnitAndValue_long |  | default hardware raid size for this disk group |
| `diskGroups[].defaultHardwareRaidSize.unit` | string |  |  |
| `diskGroups[].defaultHardwareRaidSize.value` | integer |  |  |
| `diskGroups[].defaultHardwareRaidType` | dedicated.server.HardwareSpecificationsRaidHardEnum |  | default hardware raid type for this disk group — one of `raid0`, `raid1`, `raid10`, `raid1E`, `raid5`, `raid50`, `raid6`, `raid60` |
| `diskGroups[].description` | string |  | human readable description of this disk group |
| `diskGroups[].diskGroupId` | integer |  | identifier of this disk group |
| `diskGroups[].diskSize` | complexType.UnitAndValue_long |  | disk capacity |
| `diskGroups[].diskSize.unit` | string |  |  |
| `diskGroups[].diskSize.value` | integer |  |  |
| `diskGroups[].diskType` | string |  | type of the disk (SSD, SATA, SAS, ...) |
| `diskGroups[].numberOfDisks` | integer |  | number of disks in this group |
| `diskGroups[].raidController` | string |  | raid controller, if any, managing this group of disks |
| `expansionCards` | dedicated.server.HardwareSpecificationsExpansionCard[] |  | details about the server's expansion cards |
| `expansionCards[].description` | string |  | expansion card description |
| `expansionCards[].type` | dedicated.server.HardwareSpecificationsExpansionCardTypeEnum |  | expansion card type — one of `fpga`, `gpu` |
| `formFactor` | dedicated.server.FormFactorEnum |  | Server form factor — one of `0.25u`, `0.5u`, `1u`, `2u`, `3u`, `4u` |
| `memorySize` | complexType.UnitAndValue_long |  | ram capacity |
| `memorySize.unit` | string |  |  |
| `memorySize.value` | integer |  |  |
| `motherboard` | string |  | server motherboard |
| `numberOfProcessors` | integer |  | number of processors in this dedicated server |
| `processorArchitecture` | dedicated.server.CpuFamilyEnum |  | processor architecture bit — one of `arm64`, `armhf32`, `ppc64`, `x86`, `x86-ht`, `x86_64` |
| `processorName` | string |  | processor name |
| `threadsPerProcessor` | integer |  | number of threads per processor |
| `usbKeys` | complexType.UnitAndValue_long[] |  | Capacity of the USB keys installed on your server, if any |
| `usbKeys[].unit` | string |  |  |
| `usbKeys[].value` | integer |  |  |

```json
{
  "bootMode": "legacy",
  "coresPerProcessor": 0,
  "defaultDiskGroupId": 0,
  "defaultHardwareRaidSize": {
    "unit": "string",
    "value": 0
  },
  "defaultHardwareRaidType": "raid0",
  "description": "string",
  "diskGroups": [
    {
      "defaultHardwareRaidSize": {
        "unit": "string",
        "value": 0
      },
      "defaultHardwareRaidType": "raid0",
      "description": "string",
      "diskGroupId": 0,
      "diskSize": {
        "unit": "string",
        "value": 0
      },
      "diskType": "string",
      "numberOfDisks": 0,
      "raidController": "string"
    }
  ],
  "expansionCards": [
    {
      "description": "string",
      "type": "fpga"
    }
  ],
  "formFactor": "0.25u",
  "memorySize": {
    "unit": "string",
    "value": 0
  },
  "motherboard": "string",
  "numberOfProcessors": 0,
  "processorArchitecture": "arm64",
  "processorName": "string",
  "threadsPerProcessor": 0,
  "usbKeys": [
    {
      "unit": "string",
      "value": 0
    }
  ]
}
```

### Example

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

# 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("/dedicated/server/{serviceName}/specifications/hardware");

print_r($result);
?>
```

## Get the IP capabilities

`GET /1.0/dedicated/server/{serviceName}/specifications/ip`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/server/#get-dedicated-server-servicename-specifications-ip

**Status:** Stable production version  
**IAM actions:** `dedicatedServer:apiovh:specifications/ip/get`

Get the IP capabilities. Returns the IPv4 and IPv6 addresses that can be ordered for the server. For each IP type, it gives the orderable block sizes, how many IPs and prefixes can be routed to the server, and whether they are included in the offer.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicated.server.IpOrderable | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `ipv4` | dedicated.server.IpOrderableDetails[] |  | Orderable IP v4 details |
| `ipv4[].blockSizes` | dedicated.server.IpBlockSizeEnum[] |  | Orderable IP blocks sizes |
| `ipv4[].included` | boolean |  | Are those IP included with your offer |
| `ipv4[].ipNumber` | integer |  | Total number of IP that can be routed to this server |
| `ipv4[].number` | integer |  | Total number of prefixes that can be routed to this server |
| `ipv4[].optionRequired` | dedicated.server.OptionRequiredEnum |  | Which option is required to order this type of IP — one of `professionalUse` |
| `ipv4[].type` | dedicated.server.IpTypeOrderableEnum |  | this IP type — one of `failover`, `static`, `unshielded` |
| `ipv6` | dedicated.server.IpOrderableDetails[] |  | Orderable IP v6 details |
| `ipv6[].blockSizes` | dedicated.server.IpBlockSizeEnum[] |  | Orderable IP blocks sizes |
| `ipv6[].included` | boolean |  | Are those IP included with your offer |
| `ipv6[].ipNumber` | integer |  | Total number of IP that can be routed to this server |
| `ipv6[].number` | integer |  | Total number of prefixes that can be routed to this server |
| `ipv6[].optionRequired` | dedicated.server.OptionRequiredEnum |  | Which option is required to order this type of IP — one of `professionalUse` |
| `ipv6[].type` | dedicated.server.IpTypeOrderableEnum |  | this IP type — one of `failover`, `static`, `unshielded` |

```json
{
  "ipv4": [
    {
      "blockSizes": [
        1
      ],
      "included": true,
      "ipNumber": 0,
      "number": 0,
      "optionRequired": "professionalUse",
      "type": "failover"
    }
  ],
  "ipv6": [
    {
      "blockSizes": [
        1
      ],
      "included": true,
      "ipNumber": 0,
      "number": 0,
      "optionRequired": "professionalUse",
      "type": "failover"
    }
  ]
}
```

### Example

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

# 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("/dedicated/server/{serviceName}/specifications/ip");

print_r($result);
?>
```

## Get the network specifications

`GET /1.0/dedicated/server/{serviceName}/specifications/network`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/server/#get-dedicated-server-servicename-specifications-network

**Status:** Stable production version  
**IAM actions:** `dedicatedServer:apiovh:specifications/network/get`

Get the network specifications. Returns the network specifications of the server: connection rate, bandwidth, vRack bandwidth, traffic, OLA, routing, switching and virtual MAC details.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicated.server.NetworkSpecifications | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `bandwidth` | dedicated.server.BandwidthDetails |  | Bandwidth details |
| `bandwidth.InternetToOvh` | complexType.UnitAndValue_long |  | bandwidth limitation Internet to OVH |
| `bandwidth.InternetToOvh.unit` | string |  |  |
| `bandwidth.InternetToOvh.value` | integer |  |  |
| `bandwidth.OvhToInternet` | complexType.UnitAndValue_long |  | bandwidth limitation OVH to Internet |
| `bandwidth.OvhToInternet.unit` | string |  |  |
| `bandwidth.OvhToInternet.value` | integer |  |  |
| `bandwidth.OvhToOvh` | complexType.UnitAndValue_long |  | bandwidth limitation OVH to OVH |
| `bandwidth.OvhToOvh.unit` | string |  |  |
| `bandwidth.OvhToOvh.value` | integer |  |  |
| `bandwidth.type` | dedicated.server.BandwidthTypeEnum |  | bandwidth offer type — one of `improved`, `included`, `platinum`, `premium`, `standard`, `ultimate` |
| `connection` | complexType.UnitAndValue_long |  | Network connection flow rate |
| `connection.unit` | string |  |  |
| `connection.value` | integer |  |  |
| `ola` | dedicated.server.OlaDetails |  | OLA details |
| `ola.available` | boolean |  | Is the OLA feature available |
| `ola.availableModes` | dedicated.server.OlaAvailableModes[] |  | What modes are supported |
| `ola.availableModes[].default` | boolean |  | Is it the default configuration of the server |
| `ola.availableModes[].interfaces` | dedicated.server.OlaInterface[] |  | Interface layout |
| `ola.availableModes[].name` | string |  | Mode name |
| `ola.supportedModes` | dedicated.virtualNetworkInterface.VirtualNetworkInterfaceModeEnum[] |  | (DEPRECATED) What modes are supported |
| `routing` | dedicated.server.RoutingDetails |  | Routing details |
| `routing.ipv4` | dedicated.server.RoutingDetailsIpv4 |  | Ipv4 routing details |
| `routing.ipv4.gateway` | ipv4 |  | Server gateway |
| `routing.ipv4.ip` | ipv4 |  | Server main IP |
| `routing.ipv4.network` | ipv4Block |  | Server network |
| `routing.ipv6` | dedicated.server.RoutingDetailsIpv6 |  | Ipv6 routing details |
| `routing.ipv6.gateway` | ipv6 |  | Server gateway |
| `routing.ipv6.ip` | ipv6Block |  | Server main IP |
| `routing.ipv6.network` | ipv6Block |  | Server network |
| `switching` | dedicated.server.SwitchingDetails |  | Switching details |
| `switching.name` | string |  | Switch name |
| `traffic` | dedicated.server.TrafficDetails |  | Traffic details |
| `traffic.inputQuotaSize` | complexType.UnitAndValue_long |  | Monthly input traffic quota allowed |
| `traffic.inputQuotaSize.unit` | string |  |  |
| `traffic.inputQuotaSize.value` | integer |  |  |
| `traffic.inputQuotaUsed` | complexType.UnitAndValue_long |  | Monthly input traffic consumed this month |
| `traffic.inputQuotaUsed.unit` | string |  |  |
| `traffic.inputQuotaUsed.value` | integer |  |  |
| `traffic.isThrottled` | boolean |  | Is bandwidth throttleted for being over quota |
| `traffic.outputQuotaSize` | complexType.UnitAndValue_long |  | Monthly output traffic quota allowed |
| `traffic.outputQuotaSize.unit` | string |  |  |
| `traffic.outputQuotaSize.value` | integer |  |  |
| `traffic.outputQuotaUsed` | complexType.UnitAndValue_long |  | Monthly output traffic consumed this month |
| `traffic.outputQuotaUsed.unit` | string |  |  |
| `traffic.outputQuotaUsed.value` | integer |  |  |
| `traffic.resetQuotaDate` | string |  | Next reset quota date for traffic counter |
| `vmac` | dedicated.server.VmacDetails |  | A structure describing VMAC Infos for this dedicated server |
| `vmac.quota` | integer |  | Maximum number of VirtualMacs allowed on this server |
| `vmac.supported` | boolean |  | Server is compatible vmac or not |
| `vrack` | dedicated.server.BandwidthvRackDetails |  | vRack details |
| `vrack.bandwidth` | complexType.UnitAndValue_long |  | vrack bandwidth limitation |
| `vrack.bandwidth.unit` | string |  |  |
| `vrack.bandwidth.value` | integer |  |  |
| `vrack.type` | dedicated.server.BandwidthvRackTypeEnum |  | bandwidth offer type — one of `included`, `standard` |

```json
{
  "bandwidth": {
    "InternetToOvh": {
      "unit": "string",
      "value": 0
    },
    "OvhToInternet": {
      "unit": "string",
      "value": 0
    },
    "OvhToOvh": {
      "unit": "string",
      "value": 0
    },
    "type": "improved"
  },
  "connection": {
    "unit": "string",
    "value": 0
  },
  "ola": {
    "available": true,
    "availableModes": [
      {
        "default": true,
        "interfaces": [
          {
            "aggregation": true,
            "count": 0,
            "type": "public"
          }
        ],
        "name": "string"
      }
    ],
    "supportedModes": [
      "public"
    ]
  },
  "routing": {
    "ipv4": {
      "gateway": "192.0.2.0",
      "ip": "192.0.2.0",
      "network": "192.0.2.0/24"
    },
    "ipv6": {
      "gateway": "2001:41d0:1:1994::1",
      "ip": "2001:41d0::/128",
      "network": "2001:41d0::/128"
    }
  },
  "switching": {
    "name": "string"
  },
  "traffic": {
    "inputQuotaSize": {
      "unit": "string",
      "value": 0
    },
    "inputQuotaUsed": {
      "unit": "string",
      "value": 0
    },
    "isThrottled": true,
    "outputQuotaSize": {
      "unit": "string",
      "value": 0
    },
    "outputQuotaUsed": {
      "unit": "string",
      "value": 0
    },
    "resetQuotaDate": "string"
  },
  "vmac": {
    "quota": 0,
    "supported": true
  },
  "vrack": {
    "bandwidth": {
      "unit": "string",
      "value": 0
    },
    "type": "included"
  }
}
```

### Example

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

# 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("/dedicated/server/{serviceName}/specifications/network");

print_r($result);
?>
```

## List options

`GET /1.0/dedicated/server/{serviceName}/option`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/server/#get-dedicated-server-servicename-option

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

List options. Returns the names of the options of the server. Get an option to know whether it is subscribed or released.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicated.server.OptionEnum[] | successful operation |

```json
[
  "BACKUPPROTOCOL"
]
```

### Example

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

print_r($result);
?>
```

## Get an option

`GET /1.0/dedicated/server/{serviceName}/option/{option}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/server/#get-dedicated-server-servicename-option-option

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

Get an option. Returns the state of an option of the server, subscribed or released. The option is identified by its name, such as BANDWIDTH, OLA or SGX.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `option` | path | dedicated.server.OptionEnum | yes | The option name — one of `BACKUPPROTOCOL`, `BANDWIDTH`, `BANDWIDTH_VRACK`, `OLA`, `SGX`, `TRAFFIC`, `TRAFFIC_DISCOVER`, `TUNING`, `TUNING_FIREWALL`, `TUNING_KVM`, `USB_KVM_IP` |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicated.server.Option | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `option` | dedicated.server.OptionEnum | read-only | The option name — one of `BACKUPPROTOCOL`, `BANDWIDTH`, `BANDWIDTH_VRACK`, `OLA`, `SGX`, `TRAFFIC`, `TRAFFIC_DISCOVER`, `TUNING`, `TUNING_FIREWALL`, `TUNING_KVM`, `USB_KVM_IP` |
| `state` | dedicated.server.OptionStateEnum | read-only | The state of the option — one of `released`, `subscribed` |

```json
{
  "option": "BACKUPPROTOCOL",
  "state": "released"
}
```

### Example

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

print_r($result);
?>
```

## Release an option

`DELETE /1.0/dedicated/server/{serviceName}/option/{option}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/server/#delete-dedicated-server-servicename-option-option

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

Release an option. Releases an option of the server, identified by its name, such as BANDWIDTH, TRAFFIC or USB_KVM_IP. The name is one of the options a server can have and release.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `option` | path | dedicated.server.OptionEnum | yes | The option name — one of `BACKUPPROTOCOL`, `BANDWIDTH`, `BANDWIDTH_VRACK`, `OLA`, `SGX`, `TRAFFIC`, `TRAFFIC_DISCOVER`, `TUNING`, `TUNING_FIREWALL`, `TUNING_KVM`, `USB_KVM_IP` |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Responses

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

### Example

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

print_r($result);
?>
```

## List tasks

`GET /1.0/dedicated/server/{serviceName}/task`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/server/#get-dedicated-server-servicename-task

**Status:** Stable production version  
**IAM actions:** `dedicatedServer:apiovh:task/get`

List tasks. Returns the IDs of the tasks of the server, such as reboots, reinstallations and IP moves. Filter them by function or status.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `function` | query | dedicated.TaskFunctionEnum |  | Filter the value of function property (=) — one of `INFRA_002_VirtualNetworkInterface`, `INFRA_002_VirtualNetworkInterface_group`, `INFRA_002_VirtualNetworkInterface_ungroup`, `INFRA_ONE_NETWORK_ONEAPI_VirtualNetworkInterface_group`, `INFRA_ONE_NETWORK_ONEAPI_VirtualNetworkInterface_ungroup`, `INFRA_ONE_NETWORK_VirtualNetworkInterface_group`, `INFRA_ONE_NETWORK_VirtualNetworkInterface_ungroup`, `addVirtualMac`, `addWindowSplaFromExistingSerial`, `applyBackupFtpAcls`, `applyBackupFtpQuota`, `bypassAntiDDosGame`, … |
| `serviceName` | path | string | yes | The internal name of your dedicated server |
| `status` | query | dedicated.TaskStatusEnum |  | Filter the value of status property (=) — one of `cancelled`, `customerError`, `doing`, `done`, `init`, `ovhError`, `todo` |

### Responses

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

```json
[
  0
]
```

### Example

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

# 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("/dedicated/server/{serviceName}/task");

print_r($result);
?>
```

## Get a task

`GET /1.0/dedicated/server/{serviceName}/task/{taskId}`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/server/#get-dedicated-server-servicename-task-taskid

**Status:** Stable production version  
**IAM actions:** `dedicatedServer:apiovh:task/get`

Get a task. Returns the function, status and dates of a task of the server. needSchedule tells whether the task must be scheduled, and plannedInterventionId links it to a planned intervention.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your dedicated server |
| `taskId` | path | integer | yes | the id of the task |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicated.server.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `changeUuid` | string | read-only | UUID of the change linked to this task |
| `comment` | string | read-only | Details of this task |
| `doneDate` | string (date-time) | read-only | Completion date |
| `function` | dedicated.TaskFunctionEnum | read-only | Function name — one of `INFRA_002_VirtualNetworkInterface`, `INFRA_002_VirtualNetworkInterface_group`, `INFRA_002_VirtualNetworkInterface_ungroup`, `INFRA_ONE_NETWORK_ONEAPI_VirtualNetworkInterface_group`, `INFRA_ONE_NETWORK_ONEAPI_VirtualNetworkInterface_ungroup`, `INFRA_ONE_NETWORK_VirtualNetworkInterface_group`, `INFRA_ONE_NETWORK_VirtualNetworkInterface_ungroup`, `addVirtualMac`, `addWindowSplaFromExistingSerial`, `applyBackupFtpAcls`, `applyBackupFtpQuota`, `bypassAntiDDosGame`, … |
| `lastUpdate` | string (date-time) | read-only | last update |
| `needSchedule` | boolean | read-only | Whether this task need to be scheduled or not |
| `note` | string | read-only | Extra information about this task |
| `plannedInterventionId` | integer | read-only | ID of the planned intervention for this task |
| `startDate` | string (date-time) | read-only | Task Creation date |
| `status` | dedicated.TaskStatusEnum | read-only | Task status — one of `cancelled`, `customerError`, `doing`, `done`, `init`, `ovhError`, `todo` |
| `tags` | complexType.SafeKeyValueCanBeNull_string[] | read-only | Task result tags output |
| `tags[].key` | string |  |  |
| `tags[].value` | string |  |  |
| `taskId` | integer | read-only | the id of the task |
| `ticketReference` | string | read-only | Reference of the thread on the support tool |

```json
{
  "changeUuid": "string",
  "comment": "string",
  "doneDate": "2024-01-01T12:00:00Z",
  "function": "INFRA_002_VirtualNetworkInterface",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "needSchedule": true,
  "note": "string",
  "plannedInterventionId": 0,
  "startDate": "2024-01-01T12:00:00Z",
  "status": "cancelled",
  "tags": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "taskId": 0,
  "ticketReference": "string"
}
```

### Example

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

print_r($result);
?>
```

## List available time slots

`GET /1.0/dedicated/server/{serviceName}/task/{taskId}/availableTimeslots`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/server/#get-dedicated-server-servicename-task-taskid-availabletimeslots

**Status:** Beta version  
**IAM actions:** `dedicatedServer:apiovh:task/availableTimeslots/get`

List available time slots. Returns the time slots available for the planned intervention of a task, between periodStart and periodEnd. Only a task whose needSchedule is true has slots; any other task returns an error.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `periodEnd` | query | string (date) | yes | End of the period to query |
| `periodStart` | query | string (date) | yes | Begining of the period to query |
| `serviceName` | path | string | yes | The internal name of your dedicated server |
| `taskId` | path | integer | yes | the id of the task |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicated.PlannedInterventionTimeSlot[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `endDate` | string (date-time) |  | End date for the planned intervention |
| `startDate` | string (date-time) |  | Start date for the planned intervention |

```json
[
  {
    "endDate": "2024-01-01T12:00:00Z",
    "startDate": "2024-01-01T12:00:00Z"
  }
]
```

### Example

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

# 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("/dedicated/server/{serviceName}/task/{taskId}/availableTimeslots");

print_r($result);
?>
```

## Cancel a task

`POST /1.0/dedicated/server/{serviceName}/task/{taskId}/cancel`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/server/#post-dedicated-server-servicename-task-taskid-cancel

**Status:** Stable production version  
**IAM actions:** `dedicatedServer:apiovh:task/cancel`

Cancel a task. Stops the progression of a task of the server, if possible. Not every task can be canceled: a task that is already done returns an error.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your dedicated server |
| `taskId` | path | integer | yes | the id of the task |

### Responses

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

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/task/{taskId}/cancel" \
  -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("/dedicated/server/{serviceName}/task/{taskId}/cancel")

# 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("/dedicated/server/{serviceName}/task/{taskId}/cancel");

print_r($result);
?>
```

## Schedule an intervention

`POST /1.0/dedicated/server/{serviceName}/task/{taskId}/schedule`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/server/#post-dedicated-server-servicename-task-taskid-schedule

**Status:** Beta version  
**IAM actions:** `dedicatedServer:apiovh:task/schedule`

Schedule an intervention. Schedules the intervention linked to a task at the wanted start date. The body must also state whether a backup of the data has been made. A task whose needSchedule is false cannot be scheduled.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your dedicated server |
| `taskId` | path | integer | yes | the id of the task |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `hasPerformedBackup` | boolean | yes | Whether or not you have made a backup of your data |
| `wantedBeginingDate` | string (date-time) | yes | Wanted begining date for your intervention |

```json
{
  "hasPerformedBackup": true,
  "wantedBeginingDate": "2024-01-01T12:00:00Z"
}
```

### Responses

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

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/task/{taskId}/schedule" \
  -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("/dedicated/server/{serviceName}/task/{taskId}/schedule",
	hasPerformedBackup = None, # Whether or not you have made a backup of your data (type: boolean)
	wantedBeginingDate = None, # Wanted begining date for your intervention (type: datetime)
)

# 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("/dedicated/server/{serviceName}/task/{taskId}/schedule", array(
	hasPerformedBackup => null, // Whether or not you have made a backup of your data (type: boolean)
	wantedBeginingDate => null, // Wanted begining date for your intervention (type: datetime)
));

print_r($result);
?>
```

## List ongoing tasks

`GET /1.0/dedicated/server/{serviceName}/ongoing`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/server/#get-dedicated-server-servicename-ongoing

**Status:** Beta version  
**IAM actions:** `dedicatedServer:apiovh:ongoing/get`

List ongoing tasks. Returns what is in progress on the server. Each entry gives a short description, the datacenter of the server and the processing date.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicated.ExposedTask[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `datacenter` | dedicated.DatacenterEnum |  | Location of the server — one of `bhs1`, `bhs2`, `bhs3`, `bhs4`, `bhs5`, `bhs6`, `bhs7`, `bhs8`, `cch01`, `crx1`, `crx2`, `dc1`, … |
| `description` | string |  | Short text describing the entry |
| `server` | string |  | Name of the dedicated server |
| `todoDate` | string (date-time) |  | Timestamp for processing |

```json
[
  {
    "datacenter": "bhs1",
    "description": "string",
    "server": "string",
    "todoDate": "2024-01-01T12:00:00Z"
  }
]
```

### Example

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

# 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("/dedicated/server/{serviceName}/ongoing");

print_r($result);
?>
```

## Request a cooling module replacement

`POST /1.0/dedicated/server/{serviceName}/support/replace/cooling`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/server/#post-dedicated-server-servicename-support-replace-cooling

**Status:** Beta version  
**IAM actions:** `dedicatedServer:apiovh:support/replace/cooling/create`

Request a cooling module replacement. Opens a support request to replace a cooling module of the server, with a comment and technical details or logs. Returns the identifiers of the created support ticket and message.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `comment` | string | yes | User comment |
| `details` | string | yes | Technical details or logs |

```json
{
  "comment": "string",
  "details": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | support.NewMessageInfo | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `additionalNotice` | string |  | Notice or warning |
| `messageId` | integer |  | Message identifier |
| `ticketId` | integer |  | Ticket identifier |
| `ticketNumber` | integer |  | Ticket external number |

```json
{
  "additionalNotice": "string",
  "messageId": 0,
  "ticketId": 0,
  "ticketNumber": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/support/replace/cooling" \
  -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("/dedicated/server/{serviceName}/support/replace/cooling",
	comment = None, # User comment (type: text)
	details = None, # Technical details or logs (type: text)
)

# 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("/dedicated/server/{serviceName}/support/replace/cooling", array(
	comment => null, // User comment (type: text)
	details => null, // Technical details or logs (type: text)
));

print_r($result);
?>
```

## Request a disk replacement

`POST /1.0/dedicated/server/{serviceName}/support/replace/hardDiskDrive`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/server/#post-dedicated-server-servicename-support-replace-harddiskdrive

**Status:** Beta version  
**IAM actions:** `dedicatedServer:apiovh:support/replace/hardDiskDrive/create`

Request a disk replacement. Opens a support request to replace disks of the server, identified by serial number or slot. With inverse set to true, the listed disks are kept and all the other disks are replaced. Returns the identifiers of the created support ticket and message.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `comment` | string | yes | User comment |
| `disks` | dedicated.server.SupportReplaceHddInfo[] | yes | If 'inverse' is set as 'false', the list of HDD TO REPLACE. If 'inverse' is set as 'true', the list of HDD TO NOT REPLACE. |
| `disks[].disk_serial` | string |  | Disk serial number |
| `disks[].slot_id` | integer |  | Disk slotId (if any) |
| `inverse` | boolean | yes | If set to 'true', replace only NON LISTED DISKS |

```json
{
  "comment": "string",
  "disks": [
    {
      "disk_serial": "string",
      "slot_id": 0
    }
  ],
  "inverse": true
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | support.NewMessageInfo | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `additionalNotice` | string |  | Notice or warning |
| `messageId` | integer |  | Message identifier |
| `ticketId` | integer |  | Ticket identifier |
| `ticketNumber` | integer |  | Ticket external number |

```json
{
  "additionalNotice": "string",
  "messageId": 0,
  "ticketId": 0,
  "ticketNumber": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/support/replace/hardDiskDrive" \
  -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: boolean
result = client.post("/dedicated/server/{serviceName}/support/replace/hardDiskDrive",
	comment = None, # User comment (type: text)
	disks = None, # If 'inverse' is set as 'false', the list of HDD TO REPLACE. If 'inverse' is set as 'true', the list of HDD TO NOT REPLACE. (type: dedicated.server.SupportReplaceHddInfo[])
	inverse = None, # If set to 'true', replace only NON LISTED DISKS (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: boolean
$result = $ovh->post("/dedicated/server/{serviceName}/support/replace/hardDiskDrive", array(
	comment => null, // User comment (type: text)
	disks => null, // If 'inverse' is set as 'false', the list of HDD TO REPLACE. If 'inverse' is set as 'true', the list of HDD TO NOT REPLACE. (type: dedicated.server.SupportReplaceHddInfo[])
	inverse => null, // If set to 'true', replace only NON LISTED DISKS (type: boolean)
));

print_r($result);
?>
```

## Request a memory module replacement

`POST /1.0/dedicated/server/{serviceName}/support/replace/memory`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/server/#post-dedicated-server-servicename-support-replace-memory

**Status:** Beta version  
**IAM actions:** `dedicatedServer:apiovh:support/replace/memory/create`

Request a memory module replacement. Opens a support request to replace a faulty RAM module of the server, with a comment and technical details or logs. The faulty slots can be listed if known. Returns the identifiers of the created support ticket and message.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `comment` | string | yes | User comment |
| `details` | string | yes | Technical details or logs |
| `slots` | string[] |  | The list of faulty RAM slots (if you have the information) |

```json
{
  "comment": "string",
  "details": "string",
  "slots": [
    "string"
  ]
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | support.NewMessageInfo | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `additionalNotice` | string |  | Notice or warning |
| `messageId` | integer |  | Message identifier |
| `ticketId` | integer |  | Ticket identifier |
| `ticketNumber` | integer |  | Ticket external number |

```json
{
  "additionalNotice": "string",
  "messageId": 0,
  "ticketId": 0,
  "ticketNumber": 0
}
```

### Example

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

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

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

# Request body type: string[]
result = client.post("/dedicated/server/{serviceName}/support/replace/memory",
	comment = None, # User comment (type: text)
	details = None, # Technical details or logs (type: text)
	slots = None, # The list of faulty RAM slots (if you have the information) (type: string[], nullable)
)

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

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

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

// Request body type: string[]
$result = $ovh->post("/dedicated/server/{serviceName}/support/replace/memory", array(
	comment => null, // User comment (type: text)
	details => null, // Technical details or logs (type: text)
	slots => null, // The list of faulty RAM slots (if you have the information) (type: string[], nullable)
));

print_r($result);
?>
```

## Get access credentials

`POST /1.0/dedicated/server/{serviceName}/authenticationSecret`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/server/#post-dedicated-server-servicename-authenticationsecret

**Status:** Stable production version  
**IAM actions:** `dedicatedServer:apiovh:authenticationSecret/create`

Get access credentials. Returns the credentials to connect to the server or to an application installed on it, such as SSH, RDP, SQL Server or a web control panel. Each entry gives the access type, URL, login and password.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicated.server.Access[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `password` | string (password) |  | Password |
| `type` | dedicated.server.AccessTypeEnum |  | Application access type — one of `DIRECTADMIN_PANEL`, `PLESK_PANEL`, `PROXMOX_PANEL`, `RDP`, `SQL_SERVER`, `SSH`, `WEB_PANEL` |
| `url` | string |  | Url |
| `user` | string |  | Login |

```json
[
  {
    "password": "string",
    "type": "DIRECTADMIN_PANEL",
    "url": "string",
    "user": "string"
  }
]
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/authenticationSecret" \
  -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("/dedicated/server/{serviceName}/authenticationSecret")

# 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("/dedicated/server/{serviceName}/authenticationSecret");

print_r($result);
?>
```

## Change service contacts

`POST /1.0/dedicated/server/{serviceName}/changeContact`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/server/#post-dedicated-server-servicename-changecontact

**Status:** Stable production version  
**IAM actions:** `dedicatedServer:apiovh:changeContact`

Change service contacts. Starts a procedure to change the admin, tech or billing contact of the service.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your dedicated server |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `contactAdmin` | string |  | The contact to set as admin contact |
| `contactBilling` | string |  | The contact to set as billing contact |
| `contactTech` | string |  | The contact to set as tech contact |

```json
{
  "contactAdmin": "string",
  "contactBilling": "string",
  "contactTech": "string"
}
```

### Responses

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

```json
[
  0
]
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{serviceName}/changeContact" \
  -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: coreTypes.AccountId:string
result = client.post("/dedicated/server/{serviceName}/changeContact",
	contactAdmin = None, # The contact to set as admin contact (type: coreTypes.AccountId:string, nullable)
	contactBilling = None, # The contact to set as billing contact (type: coreTypes.AccountId:string, nullable)
	contactTech = None, # The contact to set as tech contact (type: coreTypes.AccountId:string, nullable)
)

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

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

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

// Request body type: coreTypes.AccountId:string
$result = $ovh->post("/dedicated/server/{serviceName}/changeContact", array(
	contactAdmin => null, // The contact to set as admin contact (type: coreTypes.AccountId:string, nullable)
	contactBilling => null, // The contact to set as billing contact (type: coreTypes.AccountId:string, nullable)
	contactTech => null, // The contact to set as tech contact (type: coreTypes.AccountId:string, nullable)
));

print_r($result);
?>
```

## Request service termination

`POST /1.0/dedicated/server/{serviceName}/terminate`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/server/#post-dedicated-server-servicename-terminate

**Status:** Stable production version  
**IAM actions:** `dedicatedServer: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 internal name of your dedicated server |

### Responses

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

```json
"string"
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/dedicated/server/{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("/dedicated/server/{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("/dedicated/server/{serviceName}/terminate");

print_r($result);
?>
```

## Confirm service termination

`POST /1.0/dedicated/server/{serviceName}/confirmTermination`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/dedicated-servers/server/#post-dedicated-server-servicename-confirmtermination

**Status:** Stable production version  
**IAM actions:** `dedicatedServer: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 internal name of your dedicated server |

### 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/dedicated/server/{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("/dedicated/server/{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("/dedicated/server/{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);
?>
```
