Dedicated Servers API (v2)

This is the description of the Dedicated Server API.

The base url of this API is https://api.leaseweb.com.

Errors

The API uses standard HTTP status codes to indicate the success or failure of the API call. The response will be JSON. Most APIs use the following format:

{
  "errorCode" : "APP00800",
  "errorMessage" : "The connection with the DB cannot be established.",
  "correlationId" : "550e8400-e29b-41d4-a716-446655440000",
  "userMessage" : "Cannot handle your request at the moment. Please try again later.",
  "reference" : "https://developer.leaseweb.com/errors/APP00800"
}

Authentication

Authentication for the APIs is required. To authenticate your call, you will need to sent your API key as X-LSW-Auth header.

You can generate API keys in the Customer Portal.

Getting Started

List servers

List your Dedicated Servers. This api call supports pagination. Use the limit and offset query string parameters to paginate through all your dedicated servers.

Every server object in the json response lists a few properties of a server. Use the single resource api call to get more details for a single server.

Authorizations:
query Parameters
limit
integer
Example: limit=20

Limit the number of results returned.

offset
integer
Example: offset=10

Return results starting from the given offset.

reference
string
Example: reference=my-db

Filter the list of servers by reference.

ip
string
Example: ip=127.0.0.4

Filter the list of servers by ip address.

macAddress
string
Example: macAddress=aa:bb:cc:dd:ee:ff

Filter the list of servers by mac address.

site
string
Example: site=FRA-10

Filter the list of servers by site (location).

privateRackId
string
Example: privateRackId=123

Filter the list of servers by dedicated rack id.

privateNetworkCapable
string
Enum: "true" "false"

Filter the list for private network capable servers

privateNetworkEnabled
string
Enum: "true" "false"

Filter the list for private network enabled servers

Responses

Request samples

curl --request GET \
  --url 'https://api.leaseweb.com/bareMetals/v2/servers?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE&reference=SOME_STRING_VALUE&ip=SOME_STRING_VALUE&macAddress=SOME_STRING_VALUE&site=SOME_STRING_VALUE&privateRackId=SOME_STRING_VALUE&privateNetworkCapable=SOME_STRING_VALUE&privateNetworkEnabled=SOME_STRING_VALUE' \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "_metadata": {
    },
  • "servers": [
    ]
}

Get server

Use this API to get information about a single server.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

Responses

Request samples

curl --request GET \
  --url https://api.leaseweb.com/bareMetals/v2/servers/12345 \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "assetId": "627294",
  • "contract": {
    },
  • "featureAvailability": {
    },
  • "id": "12345",
  • "location": {
    },
  • "networkInterfaces": {
    },
  • "powerPorts": [
    ],
  • "rack": {
    },
  • "serialNumber": "JDK18291JK",
  • "specs": {
    }
}

Update server

Update the reference for a server.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

Request Body schema: application/json
reference
required
string

The reference for this server

Responses

Request samples

Content type
application/json
{
  • "reference": "database-server"
}

Response samples

Content type
application/json
{
  • "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
  • "errorCode": "404",
  • "errorMessage": "Resource not found"
}

Show hardware information

This information is generated when running a hardware scan for your server. A hardware scan collects hardware information about your system.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

Responses

Request samples

curl --request GET \
  --url https://api.leaseweb.com/bareMetals/v2/servers/12345/hardwareInfo \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "id": "2378237",
  • "parserVersion": "3.6",
  • "result": {
    },
  • "scannedAt": "2017-09-27T14:21:01Z",
  • "serverId": "62264"
}

IPs

List IPs

List all IP Addresses associated with this server. Optionally filtered.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

query Parameters
networkType
string

Filter the collection of ip addresses by network type

version
string

Filter the collection by ip version

nullRouted
string

Filter Ips by Nulled-Status

ips
string

Filter the collection of Ips for the comma separated list of Ips

limit
integer
Example: limit=20

Limit the number of results returned.

offset
integer
Example: offset=10

Return results starting from the given offset.

Responses

Request samples

curl --request GET \
  --url 'https://api.leaseweb.com/bareMetals/v2/servers/12345/ips?networkType=SOME_STRING_VALUE&version=SOME_STRING_VALUE&nullRouted=SOME_STRING_VALUE&ips=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "_metadata": {
    },
  • "ips": [
    ]
}

Show an IP

Get a single IP address associated with this server.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

ip
required
string
Example: 127.0.0.6

The IP Address

Responses

Request samples

curl --request GET \
  --url https://api.leaseweb.com/bareMetals/v2/servers/12345/ips/127.0.0.6 \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "ddos": {
    },
  • "floatingIp": false,
  • "gateway": "12.123.123.254",
  • "ip": "12.123.123.1/24",
  • "mainIp": true,
  • "networkType": "PUBLIC",
  • "nullRouted": false,
  • "reverseLookup": "domain.example.com",
  • "version": 4
}

Update an IP

Update the reverse lookup or DDoS detection profile for the ip address.

DDoS detection profiles can only be changed if the IP address is protected using Advanced DDoS protection.

For more information about DDoS detection profiles click here for our KB related article.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

ip
required
string
Example: 127.0.0.6

The IP Address

Request Body schema: application/json
detectionProfile
string
Enum: "ADVANCED_DEFAULT" "ADVANCED_LOW_UDP" "ADVANCED_MED_UDP"

The detection profile value

reverseLookup
string

The reverse lookup value

Responses

Request samples

Content type
application/json
{
  • "detectionProfile": "ADVANCED_LOW_UDP",
  • "reverseLookup": "domain.example.com"
}

Response samples

Content type
application/json
{
  • "ddos": {
    },
  • "floatingIp": false,
  • "gateway": "12.123.123.254",
  • "ip": "12.123.123.1/24",
  • "mainIp": true,
  • "networkType": "PUBLIC",
  • "nullRouted": false,
  • "reverseLookup": "domain.example.com",
  • "version": 4
}

Null route an IP

Null the given IP address. It might take a few minutes before the change is propagated across the network.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

ip
required
string
Example: 127.0.0.6

The IP Address

Responses

Request samples

curl --request POST \
  --url https://api.leaseweb.com/bareMetals/v2/servers/12345/ips/127.0.0.6/null \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "ddos": {
    },
  • "floatingIp": false,
  • "gateway": "12.123.123.254",
  • "ip": "12.123.123.1/24",
  • "mainIp": true,
  • "networkType": "PUBLIC",
  • "nullRouted": false,
  • "reverseLookup": "domain.example.com",
  • "version": 4
}

Remove a null route

Remove an existing null route for the given IP address. It might take a few minutes before the change is propagated across the network.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

ip
required
string
Example: 127.0.0.6

The IP Address

Responses

Request samples

curl --request POST \
  --url https://api.leaseweb.com/bareMetals/v2/servers/12345/ips/127.0.0.6/unnull \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "ddos": {
    },
  • "floatingIp": false,
  • "gateway": "12.123.123.254",
  • "ip": "12.123.123.1/24",
  • "mainIp": true,
  • "networkType": "PUBLIC",
  • "nullRouted": false,
  • "reverseLookup": "domain.example.com",
  • "version": 4
}

Show null route history

Show all null route history for any ips associated with this server.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

query Parameters
limit
integer
Example: limit=20

Limit the number of results returned.

offset
integer
Example: offset=10

Return results starting from the given offset.

Responses

Request samples

curl --request GET \
  --url 'https://api.leaseweb.com/bareMetals/v2/servers/12345/nullRouteHistory?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "_metadata": {
    },
  • "nullRoutes": [
    ]
}

Network Interfaces

List network interfaces

List all network interfaces for this server, including their current status.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

Responses

Request samples

curl --request GET \
  --url https://api.leaseweb.com/bareMetals/v2/servers/12345/networkInterfaces \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "_metadata": {
    },
  • "networkInterfaces": [
    ]
}

Close all network interfaces

Close all network interfaces for this server.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

Responses

Request samples

curl --request POST \
  --url https://api.leaseweb.com/bareMetals/v2/servers/12345/networkInterfaces/close \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Open all network interfaces

Open all network interfaces of this server.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

Responses

Request samples

curl --request POST \
  --url https://api.leaseweb.com/bareMetals/v2/servers/12345/networkInterfaces/open \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Show a network interface

List the network interfaces of the given type of this server, including their status.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

networkType
required
string
Enum: "public" "internal" "remoteManagement"
Example: public

The network type

Responses

Request samples

curl --request GET \
  --url https://api.leaseweb.com/bareMetals/v2/servers/12345/networkInterfaces/%7BnetworkType%7D \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "linkSpeed": "100Mbps",
  • "operStatus": "OPEN",
  • "status": "OPEN",
  • "switchInterface": "33",
  • "switchName": "EVO-JV12-1",
  • "type": "PUBLIC"
}

Close network interface

Close all network interfaces of this server.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

networkType
required
string
Enum: "public" "internal" "remoteManagement"
Example: public

The network type

Responses

Request samples

curl --request POST \
  --url https://api.leaseweb.com/bareMetals/v2/servers/12345/networkInterfaces/%7BnetworkType%7D/close \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Open network interface

Open all network interfaces of the given type for this server.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

networkType
required
string
Enum: "public" "internal" "remoteManagement"
Example: public

The network type

Responses

Request samples

curl --request POST \
  --url https://api.leaseweb.com/bareMetals/v2/servers/12345/networkInterfaces/%7BnetworkType%7D/open \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Private Networks

Delete a server from a private network

This API call will remove the dedicated server from the private network.

It takes a few minutes before the server has been removed from the private network.

To get the current status of the server you can call /bareMetals/v2/servers/{serverId}.

While the server is being removed the status changes to REMOVING.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

privateNetworkId
required
string
Example: 892

The ID of a Private Network

Responses

Request samples

curl --request DELETE \
  --url https://api.leaseweb.com/bareMetals/v2/servers/12345/privateNetworks/892 \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "correlationId": "f8d84555-9822-49fb-919a-d4945b201fe3",
  • "errorCode": "400",
  • "errorMessage": "Equipment 27072 is not part of private network 3943"
}

Add a server to private network

It takes a few minutes before the server has access to the private network.

To get the current status of the server you can call /bareMetals/v2/servers/{serverId}.

Once the server is added to the private network the status changes from CONFIGURING to CONFIGURED.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

privateNetworkId
required
string
Example: 892

The ID of a Private Network

Request Body schema: application/json
linkSpeed
required
integer
Enum: 100 1000 10000

The port speed in Mbps

Responses

Request samples

Content type
application/json
{
  • "linkSpeed": 100
}

Response samples

Content type
application/json
{
  • "correlationId": "f8d84555-9822-49fb-919a-d4945b201fe3",
  • "errorCode": "400",
  • "errorMessage": "Equipment 27072 is not part of private network 3943"
}

DHCP Leases

Delete a DHCP reservation

Delete a DHCP reservation for this server.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

Responses

Request samples

curl --request DELETE \
  --url https://api.leaseweb.com/bareMetals/v2/servers/12345/leases \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

List DHCP reservations

Please note that this will only show reservations for the public network interface.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

Responses

Request samples

curl --request GET \
  --url https://api.leaseweb.com/bareMetals/v2/servers/12345/leases \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "_metadata": {
    },
  • "leases": [
    ]
}

Create a DHCP reservation

After rebooting your server it will acquire this DHCP reservation and boot from the specified bootfile url.

Please note that this API call will not reboot or power cycle your server.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

Request Body schema: application/json
bootfile
required
string

The URL of PXE boot you want your server to boot from

hostname
string

The hostname for the server

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "correlationId": "f8d84555-9822-49fb-919a-d4945b201fe3",
  • "errorCode": "400",
  • "errorDetails": {
    },
  • "errorMessage": "Validation Failed"
}

Jobs

Cancel active job

Canceling an active job will trigger the onfail flow of the current job often resulting in a server reboot. If you do not want the server state to change expire the active job instead.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

Responses

Request samples

curl --request POST \
  --url https://api.leaseweb.com/bareMetals/v2/servers/12345/cancelActiveJob \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "createdAt": "2021-01-09T08:54:06+0000",
  • "flow": "#stop",
  • "isRunning": false,
  • "node": "80:18:44:E0:AF:C4!JGNTQ92",
  • "payload": {
    },
  • "progress": {
    },
  • "serverId": "99944",
  • "status": "CANCELED",
  • "tasks": [
    ],
  • "type": "install",
  • "updatedAt": "2021-01-09T08:54:15+0000",
  • "uuid": "c77d8a6b-d255-4744-8b95-8bf4af6f8b48"
}

Expire active job

Expiring an active job will not have any influence on the current state of the server and is merely an administrative action.

Often you want to cancel the job, resulting in a server reboot. In that case\nuse the /cancelActiveJob API call instead.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

Responses

Request samples

curl --request POST \
  --url https://api.leaseweb.com/bareMetals/v2/servers/12345/expireActiveJob \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "createdAt": "2021-01-09T08:50:45+0000",
  • "flow": "#stop",
  • "isRunning": false,
  • "node": "80:18:44:E0:AF:C4!JGNTQ92",
  • "payload": {
    },
  • "progress": {
    },
  • "serverId": "99944",
  • "status": "EXPIRED",
  • "tasks": [
    ],
  • "type": "install",
  • "updatedAt": "2021-01-09T08:51:54+0000",
  • "uuid": "fe54dd20-a815-47da-bcb4-5550a160dbbe"
}

Launch hardware scan

A hardware scan collects hardware related information from your server.

A hardware scan will require a reboot of your server. The contents of your hard drive won't be altered in any way. After a successful hardware scan your server is booted back into the original operating system.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

Request Body schema: application/json
callbackUrl
string <uri>

Url which will receive callbacks

powerCycle
boolean
Default: true

If set to true, server will be power cycled in order to complete the operation

Responses

Request samples

Content type
application/json
{
  • "powerCycle": false
}

Response samples

Content type
application/json
{
  • "createdAt": "2018-01-09T09:07:09+0000",
  • "flow": "tasks",
  • "isRunning": true,
  • "node": "80:18:44:E0:AF:C4!JGNTQ92",
  • "payload": {
    },
  • "progress": {
    },
  • "serverId": "99944",
  • "status": "ACTIVE",
  • "tasks": [
    ],
  • "type": "hardwareScan",
  • "updatedAt": "2018-01-09T09:07:09+0000",
  • "uuid": "2dcca92d-b5df-4837-bd99-b568ac54569a"
}

Launch installation

Install your server with an Operating System and optional Control Panel.

To retrieve a list of available operating systems use the /v2/operatingSystems endpoint.

To retrieve a list of available control panels use the /v2/controlPanels endpoint.

The default device / partitions to be used are operating system depended and can be retrieved via the /v2/operatingSystems/{operatingSystemId} endpoint.

You are now able to target a specific diskset, like SATA1TB, SATA2TB, SSD256GB, etc. To see which disksets are available in your server check the /v2/servers/{serverId} endpoint and look for the corresponding diskset id from the hdd array.

For more information about Dedicated Server installation, click here for our related Knowledge Base article.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

Request Body schema: application/json
callbackUrl
string <uri>

Url which will receive callbacks when the installation is finished or failed

controlPanelId
string

Control panel identifier

device
string

Block devices in a disk set in which the partitions will be installed. Supported values are any disk set id, SATA_SAS or NVME

hostname
string

Hostname to be used in your installation

operatingSystemId
required
string

Operating system identifier

Array of objects

Array of partition objects that should be installed per partition

password
string

Server root password. If not provided, it would be automatically generated

postInstallScript
string

Base64 Encoded string containing a valid bash script to be run right after the installation

powerCycle
boolean

If true, allows system reboots to happen automatically within the process. Otherwise, you should do them manually

object

Contains RAID related information about the installation request

sshKeys
string

List of public sshKeys to be setup in your installation, separated by new lines

timezone
string

Timezone represented as Geographical_Area/City

Responses

Request samples

Content type
application/json
{
  • "controlPanelId": "PLESK_12",
  • "device": "SATA2TB",
  • "hostname": "ubuntu22.local",
  • "operatingSystemId": "UBUNTU_22_04_64BIT",
  • "partitions": [
    ],
  • "sshKeys": "ssh-rsa AAAAB3NzaC1y... user@domain.com"
}

Response samples

Content type
application/json
{
  • "createdAt": "2021-03-06T21:55:32+0000",
  • "flow": "tasks",
  • "isRunning": true,
  • "node": "AA:BB:CC:DD:EE:FF!DKFJKD8989",
  • "payload": {
    },
  • "progress": {
    },
  • "serverId": "12345",
  • "status": "ACTIVE",
  • "tasks": [
    ],
  • "type": "install",
  • "updatedAt": "2021-03-06T21:55:32+0000",
  • "uuid": "bcf2bedf-8450-4b22-86a8-f30aeb3a38f9"
}

Launch IPMI reset

A reset makes sure that your IPMI interface of your server is compatible with Leaseweb automation.

An IPMI reset will require a reboot of your server. The contents of your hard drive won't be altered in any way. After a successful IPMI reset your server is booted back into the original operating system.",

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

Request Body schema: application/json
callbackUrl
string <uri>

Url which will receive callbacks

powerCycle
boolean
Default: true

If set to true, server will be power cycled in order to complete the operation

Responses

Request samples

Content type
application/json

Response samples

Content type
application/json
{
  • "createdAt": "2018-01-09T09:18:06+0000",
  • "flow": "tasks",
  • "isRunning": true,
  • "node": "80:18:44:E0:AF:C4!JGNTQ92",
  • "payload": {
    },
  • "progress": {
    },
  • "serverId": "99944",
  • "status": "ACTIVE",
  • "tasks": [
    ],
  • "type": "ipmiReset",
  • "updatedAt": "2018-01-09T09:18:06+0000",
  • "uuid": "754154c2-cc7f-4d5f-b8bf-b654084ba4a9"
}

List jobs

List all jobs for this server.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

query Parameters
limit
integer
Example: limit=20

Limit the number of results returned.

offset
integer
Example: offset=10

Return results starting from the given offset.

type
string
Example: type=install

Filter the list of jobs by type.

status
string
Example: status=CANCELED

Filter the list of jobs by status.

isRunning
string
Enum: "true" "false"
Example: isRunning=true

Filter the list for running jobs

Responses

Request samples

curl --request GET \
  --url 'https://api.leaseweb.com/bareMetals/v2/servers/12345/jobs?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE&type=SOME_STRING_VALUE&status=SOME_STRING_VALUE&isRunning=SOME_STRING_VALUE' \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "_metadata": {
    },
  • "jobs": [
    ]
}

Show a job

Get a single job for this server.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

jobId
required
string
Example: 3a867358-5b4b-44ee-88ac-4274603ef641

The ID of a Job

Responses

Request samples

curl --request GET \
  --url https://api.leaseweb.com/bareMetals/v2/servers/12345/jobs/3a867358-5b4b-44ee-88ac-4274603ef641 \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "createdAt": "2021-01-09T10:38:12+0000",
  • "flow": "tasks",
  • "isRunning": true,
  • "metadata": {
    },
  • "node": "80:18:44:E0:AF:C4!JGNTQ92",
  • "payload": {
    },
  • "progress": {
    },
  • "serverId": "99944",
  • "status": "ACTIVE",
  • "tasks": [
    ],
  • "type": "install",
  • "updatedAt": "2021-01-09T10:38:12+0000",
  • "uuid": "3a867358-5b4b-44ee-88ac-4274603ef641"
}

Retry a job

Retry a job for a specific server.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

jobId
required
string
Example: 3a867358-5b4b-44ee-88ac-4274603ef641

The ID of a Job

Responses

Request samples

curl --request POST \
  --url https://api.leaseweb.com/bareMetals/v2/servers/12345/jobs/3a867358-5b4b-44ee-88ac-4274603ef641/retry \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "createdAt": "2021-01-09T10:38:12+0000",
  • "flow": "tasks",
  • "isRunning": true,
  • "metadata": {
    },
  • "node": "80:18:44:E0:AF:C4!JGNTQ92",
  • "payload": {
    },
  • "progress": {
    },
  • "serverId": "99944",
  • "status": "ACTIVE",
  • "tasks": [
    ],
  • "type": "install",
  • "updatedAt": "2021-01-09T10:38:12+0000",
  • "uuid": "3a867358-5b4b-44ee-88ac-4274603ef641"
}

Launch rescue mode

Rescue mode allows you to trouble shoot your server in case your installed operating system is no longer reachable.

You can supply a postInstallScript key in the body of the request which should contain a base64 encoded string with a valid script. This script will be executed as soon as rescue mode is launched and can be used to further automate the process. A requirement for the post install script is that it starts with a shebang line like #!/usr/bin/env bash.

After a rescue mode is launched you can manually reboot the server. After this reboot the server will boot into the existing operating system.

To get a list of available rescue images, you could do so by sending a GET request to /bareMetals/v2/rescueImages.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

Request Body schema: application/json
callbackUrl
string <uri>

Url which will receive callbacks

password
string non-empty

Rescue mode password. If not provided, it would be automatically generated

postInstallScript
string

Base64 Encoded string containing a valid bash script to be run right after rescue mode is launched

powerCycle
boolean
Default: true

If set to true, server will be power cycled in order to complete the operation

rescueImageId
required
string
Default: "GRML"

Rescue image identifier

sshKeys
string

User ssh keys

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "createdAt": "2018-03-06T22:53:31+0000",
  • "flow": "tasks",
  • "isRunning": true,
  • "node": "AA:BB:CC:DD:EE:FF!JKDJFK890",
  • "payload": {
    },
  • "progress": {
    },
  • "serverId": "2349839",
  • "status": "ACTIVE",
  • "tasks": [
    ],
  • "type": "rescueMode",
  • "updatedAt": "2018-03-06T22:53:31+0000",
  • "uuid": "ac99431b-640d-4282-95a9-a444eedb9309"
}

Credentials

List credentials

The credentials API allows you to store usernames and passwords securely.

During (re)installations, rescue modes and ipmi resets the newly generated passwords are stored and can be retrieved using this API.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

query Parameters
limit
integer
Example: limit=20

Limit the number of results returned.

offset
integer
Example: offset=10

Return results starting from the given offset.

Responses

Request samples

curl --request GET \
  --url 'https://api.leaseweb.com/bareMetals/v2/servers/12345/credentials?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "_metadata": {
    },
  • "credentials": [
    ]
}

Create new credentials

Password will NOT be updated on the server. The ability to update credentials is for convenience only. It provides a secure way to communicate passwords with Leaseweb engineers in case support is required.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

Request Body schema: application/json
password
required
string

The password for the credentials

type
required
string
Enum: "OPERATING_SYSTEM" "CONTROL_PANEL" "REMOTE_MANAGEMENT" "RESCUE_MODE" "SWITCH" "PDU" "FIREWALL" "LOAD_BALANCER"

The type of the credential

username
required
string

The username for the credentials

Responses

Request samples

Content type
application/json
{
  • "password": "mys3cr3tp@ssw0rd",
  • "type": "OPERATING_SYSTEM",
  • "username": "root"
}

Response samples

Content type
application/json
{
  • "password": "mys3cr3tp@ssw0rd",
  • "type": "OPERATING_SYSTEM",
  • "username": "root"
}

List credentials by type

List all the credentials filtered by the specified type that are associated with this server.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

type
required
string
Example: OPERATING_SYSTEM

Credential type

query Parameters
limit
integer
Example: limit=20

Limit the number of results returned.

offset
integer
Example: offset=10

Return results starting from the given offset.

Responses

Request samples

curl --request GET \
  --url 'https://api.leaseweb.com/bareMetals/v2/servers/12345/credentials/%7Btype%7D?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "_metadata": {
    },
  • "credentials": [
    ]
}

Delete user credentials

This action is purely administrative and will only remove the username and password associated with this resource from our database.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

type
required
string
Example: OPERATING_SYSTEM

Credential type

username
required
string
Example: root

Username

Responses

Request samples

curl --request DELETE \
  --url https://api.leaseweb.com/bareMetals/v2/servers/12345/credentials/%7Btype%7D/%7Busername%7D \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Show user credentials

View the password for the given credential, identified by type and username. Auto generated credentials (during a re-install, rescue mode or ipmi reset can be found here).

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

type
required
string
Example: OPERATING_SYSTEM

Credential type

username
required
string
Example: root

Username

Responses

Request samples

curl --request GET \
  --url https://api.leaseweb.com/bareMetals/v2/servers/12345/credentials/%7Btype%7D/%7Busername%7D \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "password": "mys3cr3tp@ssw0rd",
  • "type": "OPERATING_SYSTEM",
  • "username": "root"
}

Update user credentials

The usernames or types cannot be changed. In order to change those remove this credentials and create a new one.

This action is purely administrative and will only update the password associated with this resource in our database.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

type
required
string
Example: OPERATING_SYSTEM

Credential type

username
required
string
Example: root

Username

Request Body schema: application/json
password
required
string

The password for the credentials

Responses

Request samples

Content type
application/json
{
  • "password": "mys3cr3tp@ssw0rd"
}

Response samples

Content type
application/json
{
  • "password": "mys3cr3tp@ssw0rd",
  • "type": "OPERATING_SYSTEM",
  • "username": "root"
}

Metrics

Show bandwidth metrics

At this moment only bandwidth information for the public interface is supported.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

query Parameters
from
required
string <date-time>
Example: from=2019-06-01T00:00:00Z

Start of date interval in ISO-8601 format. The returned data will include everything up from - and including - the specified date time.

to
required
string <date-time>
Example: to=2019-06-05T00:00:00Z

End of date interval in ISO-8601 format. The returned data will include everything up until - but not including - the specified date time.

granularity
string
Enum: "5MIN" "HOUR" "DAY" "WEEK" "MONTH" "YEAR"

Specify the preferred interval for each metric. If granularity is omitted from the request, only one metric is returned.

aggregation
required
string
Enum: "AVG" "95TH"

Aggregate each metric using the given aggregation function. When the aggregation type 95TH is specified the granularity parameter should be omitted from the request.

Responses

Request samples

curl --request GET \
  --url 'https://api.leaseweb.com/bareMetals/v2/servers/12345/metrics/bandwidth?from=SOME_STRING_VALUE&to=SOME_STRING_VALUE&granularity=SOME_STRING_VALUE&aggregation=SOME_STRING_VALUE' \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "_metadata": {
    },
  • "metrics": {
    }
}

Show datatraffic metrics

At this moment only bandwidth information for the public interface is supported.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

query Parameters
from
required
string <date-time>
Example: from=2019-06-01T00:00:00Z

Start of date interval in ISO-8601 format. The returned data will include everything up from - and including - the specified date time.

to
required
string <date-time>
Example: to=2019-06-05T00:00:00Z

End of date interval in ISO-8601 format. The returned data will include everything up until - but not including - the specified date time.

granularity
string
Enum: "DAY" "WEEK" "MONTH" "YEAR"

Specify the preferred interval for each metric. If granularity is omitted from the request, only one metric is returned.

aggregation
required
string
Value: "SUM"

Aggregate each metric using the given aggregation function.

Responses

Request samples

curl --request GET \
  --url 'https://api.leaseweb.com/bareMetals/v2/servers/12345/metrics/datatraffic?from=SOME_STRING_VALUE&to=SOME_STRING_VALUE&granularity=SOME_STRING_VALUE&aggregation=SOME_STRING_VALUE' \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "_metadata": {
    },
  • "metrics": {
    }
}

Notification Settings

List bandwidth notification settings

List all bandwith notification settings for this server.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

query Parameters
limit
integer
Example: limit=20

Limit the number of results returned.

offset
integer
Example: offset=10

Return results starting from the given offset.

Responses

Request samples

curl --request GET \
  --url 'https://api.leaseweb.com/bareMetals/v2/servers/12345/notificationSettings/bandwidth?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "_metadata": {
    },
  • "bandwidthNotificationSettings": [
    ]
}

Create a bandwidth notification setting

Create a new bandwidth notification setting for this server.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

Request Body schema: application/json
frequency
required
string
Enum: "DAILY" "WEEKLY" "MONTHLY"

Frequency for the Bandwidth Notification

threshold
required
string

Threshold Value for the Bandwidth Notification

unit
required
string
Enum: "Gbps" "Mbps"

Unit for the Bandwidth Notification

Responses

Request samples

Content type
application/json
{
  • "frequency": "DAILY",
  • "threshold": "1",
  • "unit": "Gbps"
}

Response samples

Content type
application/json
{
  • "actions": [
    ],
  • "frequency": "WEEKLY",
  • "id": "12345",
  • "lastCheckedAt": "2021-03-16T01:01:41+00:00",
  • "threshold": "1",
  • "thresholdExceededAt": "2021-03-16T01:01:41+00:00",
  • "unit": "Gbps"
}

Delete a bandwidth notification setting

Remove a Bandwidth Notification setting for this server.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

notificationSettingId
required
string
Example: 839111

The ID of a notification setting

Responses

Request samples

curl --request DELETE \
  --url https://api.leaseweb.com/bareMetals/v2/servers/12345/notificationSettings/bandwidth/839111 \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Show a bandwidth notification setting

Get a bandwidth notification setting for this server.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

notificationSettingId
required
string
Example: 839111

The ID of a notification setting

Responses

Request samples

curl --request GET \
  --url https://api.leaseweb.com/bareMetals/v2/servers/12345/notificationSettings/bandwidth/839111 \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "actions": [
    ],
  • "frequency": "WEEKLY",
  • "id": "12345",
  • "lastCheckedAt": "2021-03-16T01:01:41+00:00",
  • "threshold": "1",
  • "thresholdExceededAt": "2021-03-16T01:01:41+00:00",
  • "unit": "Gbps"
}

Update a bandwidth notification setting

Update an existing bandwidth notification setting for this server.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

notificationSettingId
required
string
Example: 839111

The ID of a notification setting

Request Body schema: application/json
frequency
required
string
Enum: "DAILY" "WEEKLY" "MONTHLY"

Frequency for the Bandwidth Notification

threshold
required
string

Threshold Value for the Bandwidth Notification

unit
required
string
Enum: "Gbps" "Mbps"

Unit for the Bandwidth Notification

Responses

Request samples

Content type
application/json
{
  • "frequency": "DAILY",
  • "threshold": "1",
  • "unit": "Gbps"
}

Response samples

Content type
application/json
{
  • "actions": [
    ],
  • "frequency": "WEEKLY",
  • "id": "12345",
  • "lastCheckedAt": "2021-03-16T01:01:41+00:00",
  • "threshold": "1",
  • "thresholdExceededAt": "2021-03-16T01:01:41+00:00",
  • "unit": "Gbps"
}

List datatraffic notification settings

List all datatraffic notification settings for this server.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

query Parameters
limit
integer
Example: limit=20

Limit the number of results returned.

offset
integer
Example: offset=10

Return results starting from the given offset.

Responses

Request samples

curl --request GET \
  --url 'https://api.leaseweb.com/bareMetals/v2/servers/12345/notificationSettings/datatraffic?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "_metadata": {
    },
  • "datatrafficNotificationSettings": [
    ]
}

Create a datatraffic notification setting

Create a new datatraffic notification setting for this server.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

Request Body schema: application/json
frequency
required
string
Enum: "DAILY" "WEEKLY" "MONTHLY"

Frequency for the Datatraffic Notification

threshold
required
string

Threshold Value for the Datatraffic Notification

unit
required
string
Enum: "MB" "GB" "TB"

Unit for the Datatraffic Notification

Responses

Request samples

Content type
application/json
{
  • "frequency": "DAILY",
  • "threshold": "1",
  • "unit": "MB"
}

Response samples

Content type
application/json
{
  • "actions": [
    ],
  • "frequency": "WEEKLY",
  • "id": "12345",
  • "lastCheckedAt": "2021-03-16T01:01:41+00:00",
  • "threshold": "1",
  • "thresholdExceededAt": "2021-03-16T01:01:41+00:00",
  • "unit": "GB"
}

Delete a datatraffic notification setting

Delete the given datatraffic notification setting for this server.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

notificationSettingId
required
string
Example: 839111

The ID of a notification setting

Responses

Request samples

curl --request DELETE \
  --url https://api.leaseweb.com/bareMetals/v2/servers/12345/notificationSettings/datatraffic/839111 \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Show a datatraffic notification setting

Get a datatraffic notification setting for this server.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

notificationSettingId
required
string
Example: 839111

The ID of a notification setting

Responses

Request samples

curl --request GET \
  --url https://api.leaseweb.com/bareMetals/v2/servers/12345/notificationSettings/datatraffic/839111 \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "actions": [
    ],
  • "frequency": "WEEKLY",
  • "id": "12345",
  • "lastCheckedAt": "2021-03-16T01:01:41+00:00",
  • "threshold": "1",
  • "thresholdExceededAt": "2021-03-16T01:01:41+00:00",
  • "unit": "GB"
}

Update a datatraffic notification setting

Update an existing datatraffic notification setting for this server.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

notificationSettingId
required
string
Example: 839111

The ID of a notification setting

Request Body schema: application/json
frequency
required
string
Enum: "DAILY" "WEEKLY" "MONTHLY"

Frequency for the Datatraffic Notification

threshold
required
string

Threshold Value for the Datatraffic Notification

unit
required
string
Enum: "MB" "GB" "TB"

Unit for the Datatraffic Notification

Responses

Request samples

Content type
application/json
{
  • "frequency": "DAILY",
  • "threshold": "1",
  • "unit": "GB"
}

Response samples

Content type
application/json
{
  • "actions": [
    ],
  • "frequency": "WEEKLY",
  • "id": "12345",
  • "lastCheckedAt": "2021-03-16T01:01:41+00:00",
  • "threshold": "1",
  • "thresholdExceededAt": "2021-03-16T01:01:41+00:00",
  • "unit": "GB"
}

Inspect DDoS notification settings

Show all DDoS Protection related notification settings for this server. These settings control if you want to be notified via email in case a DDoS was mitigated.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

Responses

Request samples

curl --request GET \
  --url https://api.leaseweb.com/bareMetals/v2/servers/12345/notificationSettings/ddos \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "nulling": "ENABLED",
  • "scrubbing": "DISABLED"
}

Update DDoS notification settings

Update your DDoS notification settings for this server.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

Request Body schema: application/json
nulling
string
Enum: "ENABLED" "DISABLED"

Enable or disable email notifications for nulling events

scrubbing
string
Enum: "ENABLED" "DISABLED"

Enable or disable email notifications for nulling events

Responses

Request samples

Content type
application/json
{
  • "nulling": "DISABLED",
  • "scrubbing": "ENABLED"
}

Response samples

Content type
application/json
{
  • "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
  • "errorCode": "400",
  • "errorDetails": { },
  • "errorMessage": "Validation Failed."
}

Power

Power cycle a server

Powercyle the server.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

Responses

Request samples

curl --request POST \
  --url https://api.leaseweb.com/bareMetals/v2/servers/12345/powerCycle \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
  • "errorCode": "400",
  • "errorDetails": { },
  • "errorMessage": "Validation Failed."
}

Show power status

The server can either be ON or OFF. Servers can be powered on or off by using the respective /powerOn and /powerOff API calls. In addition servers can also be rebooted using the /powerCycle API call.

The pdu object describes the power status from the power distribution unit (PDU) point of view. If your server is connected to multiple PDU ports the status property will report on if at least one PDU port has power.

The ipmi object describes the power status by quering the remote management interface of your server.

Note that pdu.status can report on but your server can still be powered off if it was shutdown via IPMI for example.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

Responses

Request samples

curl --request GET \
  --url https://api.leaseweb.com/bareMetals/v2/servers/12345/powerInfo \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "ipmi": {
    },
  • "pdu": {
    }
}

Power off server

Power off the given server.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

Responses

Request samples

curl --request POST \
  --url https://api.leaseweb.com/bareMetals/v2/servers/12345/powerOff \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
  • "errorCode": "400",
  • "errorDetails": { },
  • "errorMessage": "Validation Failed."
}

Power on server

Power on the given server.

Authorizations:
path Parameters
serverId
required
string
Example: 12345

The ID of a server

Responses

Request samples

curl --request POST \
  --url https://api.leaseweb.com/bareMetals/v2/servers/12345/powerOn \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
  • "errorCode": "400",
  • "errorDetails": { },
  • "errorMessage": "Validation Failed."
}

Operating Systems

List Operating Systems

An id of a operating system can be supplied when (re)installing a dedicated server (for more information on how to install dedicated servers via the API refer to the API documentation).

Authorizations:
query Parameters
limit
integer
Example: limit=20

Limit the number of results returned.

offset
integer
Example: offset=10

Return results starting from the given offset.

controlPanelId
string

Filter operating systems by control panel id

Responses

Request samples

curl --request GET \
  --url 'https://api.leaseweb.com/bareMetals/v2/operatingSystems?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE&controlPanelId=SOME_STRING_VALUE' \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "_metadata": {
    },
  • "operatingSystems": [
    ]
}

Show an operating system

This detailed information shows default options when installing the given operating system on a dedicated server.

For some operating systems these defaults can be adjusted when making the POST request to /install. If the configurable parameter is true these defaults can be adjusted by the client.

Authorizations:
path Parameters
operatingSystemId
required
string
Example: UBUNTU_22_04_64BIT

Credential type

query Parameters
controlPanelId
required
string

The Control Panel ID

Responses

Request samples

curl --request GET \
  --url 'https://api.leaseweb.com/bareMetals/v2/operatingSystems/%7BoperatingSystemId%7D?controlPanelId=SOME_STRING_VALUE' \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "architecture": "64bit",
  • "configurable": true,
  • "defaults": {
    },
  • "family": "ubuntu",
  • "features": [
    ],
  • "id": "UBUNTU_22_04_64BIT",
  • "name": "Ubuntu 22.04 LTS (Jammy Jellyfish) (amd64)",
  • "supportedBootDevices": [
    ],
  • "supportedFileSystems": [
    ],
  • "type": "linux",
  • "version": "22.04"
}

List control panels

An id of a control panel can be supplied when (re)installing a dedicated server (for more information on how to install dedicated servers via the API refer to the API documentation).

Authorizations:
path Parameters
operatingSystemId
required
string
Example: UBUNTU_22_04_64BIT

Credential type

query Parameters
limit
integer
Example: limit=20

Limit the number of results returned.

offset
integer
Example: offset=10

Return results starting from the given offset.

Responses

Request samples

curl --request GET \
  --url 'https://api.leaseweb.com/bareMetals/v2/operatingSystems/%7BoperatingSystemId%7D/controlPanels?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "_metadata": {
    },
  • "controlPanels": [
    ]
}

Control Panels

List control panels

An id of a control panel can be supplied when (re)installing a dedicated server (for more information on how to install dedicated servers via the API refer to the API documentation).

Not all operating systems support all control panels. Some operating systems do not allow for installation of a control panel. To filter the list of control panels which are supported for an operating system use the operatingSystemId query string parameter to filter this list.

Authorizations:
query Parameters
limit
integer
Example: limit=20

Limit the number of results returned.

offset
integer
Example: offset=10

Return results starting from the given offset.

operatingSystemId
string

Filter control panels by operating system id

Responses

Request samples

curl --request GET \
  --url 'https://api.leaseweb.com/bareMetals/v2/controlPanels?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE&operatingSystemId=SOME_STRING_VALUE' \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "_metadata": {
    },
  • "controlPanels": [
    ]
}

Rescue Images

Rescue Images

Lists all Rescue Images which are available for launching a dedicated server into rescue mode.

A rescueImageId can be supplied to the POST /rescueMode API call and will reboot your server into rescue mode.

Launching rescue mode for a server is often used to troubleshoot an existing installation.

Note that launching rescue mode does not modify any data on the disks of your server. It will require your server to be rebooted.

Authorizations:
query Parameters
limit
integer
Example: limit=20

Limit the number of results returned.

offset
integer
Example: offset=10

Return results starting from the given offset.

Responses

Request samples

curl --request GET \
  --url 'https://api.leaseweb.com/bareMetals/v2/rescueImages?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "_metadata": {
    },
  • "rescueImages": [
    ]
}