This is the description of the Dedicated Server API.
The base url of this API is https://api.leaseweb.com
.
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 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.
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.
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 <ipv4> Example: ip=127.0.0.4 Filter the list of servers by ip address. |
macAddress | string([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})|([0-9... 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 |
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=00%3A15%3A17%3ADB%3A63%3A01&site=SOME_STRING_VALUE&privateRackId=SOME_STRING_VALUE&privateNetworkCapable=SOME_STRING_VALUE&privateNetworkEnabled=SOME_STRING_VALUE' \ --header 'X-Lsw-Auth: REPLACE_KEY_VALUE'
{- "_metadata": {
- "limit": 2,
- "offset": 80,
- "totalCount": 132
}, - "servers": [
- {
- "assetId": "627293",
- "contract": {
- "customerId": "32923828192",
- "deliveryStatus": "ACTIVE",
- "id": "674382",
- "reference": "database.server",
- "salesOrgId": "2300"
}, - "featureAvailability": {
- "automation": true,
- "ipmiReboot": false,
- "powerCycle": true,
- "privateNetwork": true,
- "remoteManagement": false
}, - "id": "12345",
- "location": {
- "rack": "A83",
- "site": "AMS-01",
- "suite": "99",
- "unit": "16-17"
}, - "networkInterfaces": {
- "internal": {
- "gateway": "10.22.192.12",
- "ip": "10.22.192.3",
- "mac": "AA:BB:CC:DD:EE:FF",
- "ports": [
- {
- "name": "EVO-AABB-01",
- "port": "30"
}
]
}, - "public": {
- "gateway": "95.211.162.62",
- "ip": "95.211.162.0",
- "mac": "AA:AC:CC:88:EE:E4",
- "ports": [ ]
}, - "remoteManagement": {
- "gateway": "10.22.192.126",
- "ip": "10.22.192.1",
- "mac": "AA:AC:CC:88:EE:E4",
- "ports": [ ]
}
}, - "powerPorts": [
- {
- "name": "EVO-JV12-APC02",
- "port": "10"
}
], - "privateNetworks": [
- {
- "id": "1",
- "linkSpeed": 1000,
- "status": "CONFIGURED",
- "subnet": "127.0.0.80/24",
- "vlanId": "2120"
}
], - "rack": {
- "type": "SHARED"
}
}, - {
- "assetId": "627294",
- "contract": {
- "customerId": "32923828192",
- "deliveryStatus": "ACTIVE",
- "id": "929282",
- "reference": "web.server",
- "salesOrgId": "2300"
}, - "featureAvailability": {
- "automation": false,
- "powerCycle": false,
- "privateNetwork": false,
- "remoteManagement": false
}, - "id": "47854",
- "location": {
- "rack": "13",
- "site": "AMS-01",
- "suite": "A6",
- "unit": "18"
}, - "networkInterfaces": {
- "internal": {
- "mac": null,
- "ip": null,
- "nullRouted": null,
- "gateway": null,
- "ports": [ ]
}, - "public": {
- "mac": null,
- "ip": null,
- "nullRouted": null,
- "gateway": null,
- "ports": [ ]
}, - "remoteManagement": {
- "mac": null,
- "ip": null,
- "nullRouted": null,
- "gateway": null,
- "ports": [ ]
}
}, - "privateNetworks": [
- {
- "id": "2",
- "linkSpeed": 1000,
- "status": "CONFIGURED",
- "subnet": "127.0.0.80/24",
- "vlanId": "2130"
}
], - "rack": {
- "type": "SHARED"
}
}
]
}
Use this API to get information about a single server.
serverId required | string Example: 12345 The ID of a server |
curl --request GET \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345 \ --header 'X-Lsw-Auth: REPLACE_KEY_VALUE'
{- "assetId": "627294",
- "contract": {
- "billingCycle": 12,
- "billingFrequency": "MONTH",
- "contractTerm": 12,
- "currency": "EUR",
- "customerId": "32923828192",
- "deliveryStatus": "ACTIVE",
- "endsAt": "2023-01-01T00:00:00Z",
- "id": "674382",
- "networkTraffic": {
- "datatrafficLimit": 100,
- "datatrafficUnit": "TB|Mbps",
- "trafficType": "PREMIUM|VOLUME",
- "type": "95|FLATFEE|DATATRAFFIC"
}, - "pricePerFrequency": "1090.52",
- "reference": "database.server",
- "salesOrgId": "2300",
- "sla": "BRONZE",
- "softwareLicenses": [
- {
- "currency": "EUR",
- "name": "WINDOWS_2012_R2_SERVER",
- "price": 12.12
}
], - "startsAt": "2010-01-01T00:00:00Z"
}, - "featureAvailability": {
- "automation": true,
- "ipmiReboot": false,
- "powerCycle": true,
- "privateNetwork": true,
- "remoteManagement": false
}, - "id": "12345",
- "location": {
- "rack": "13",
- "site": "AMS-01",
- "suite": "A6",
- "unit": "16-17"
}, - "networkInterfaces": {
- "internal": {
- "gateway": "123.123.123.126",
- "ip": "123.123.123.123/27",
- "mac": "AA:BB:CC:DD:EE:FF",
- "ports": [ ]
}, - "public": {
- "gateway": "123.123.123.126",
- "ip": "123.123.123.123/27",
- "mac": "AA:BB:CC:DD:EE:FF",
- "ports": [
- {
- "name": "EVO-JV12-1",
- "port": "33"
}
]
}, - "remoteManagement": {
- "mac": null,
- "ip": null,
- "nullRouted": null,
- "gateway": null,
- "ports": [ ],
- "locationId": null
}
}, - "powerPorts": [
- {
- "name": "EVO-JV12-APC02",
- "port": "10"
}
], - "privateNetworks": [
- {
- "id": "1",
- "linkSpeed": 1000,
- "status": "CONFIGURED",
- "subnet": "127.0.0.80/24",
- "vlanId": "2120"
}
], - "rack": {
- "type": "DEDICATED"
}, - "serialNumber": "JDK18291JK",
- "specs": {
- "chassis": "Dell R210 II",
- "cpu": {
- "quantity": 4,
- "type": "Intel Xeon E3-1220"
}, - "hardwareRaidCapable": true,
- "hdd": [
- {
- "amount": 2,
- "id": "SATA2TB",
- "performanceType": null,
- "size": 2,
- "type": "SATA",
- "unit": "TB"
}
], - "pciCards": [
- {
- "description": "2x10GE UTP card"
}, - {
- "description": "2x30GE UTP card"
}
], - "ram": {
- "size": 32,
- "unit": "GB"
}
}
}
Update the reference for a server.
serverId required | string Example: 12345 The ID of a server |
reference required | string The reference for this server |
{- "reference": "database-server"
}
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "401",
- "errorMessage": "You are not authorized to view this resource."
}
This information is generated when running a hardware scan for your server. A hardware scan collects hardware information about your system.
serverId required | string Example: 12345 The ID of a server |
curl --request GET \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/hardwareInfo \ --header 'X-Lsw-Auth: REPLACE_KEY_VALUE'
{- "id": "2378237",
- "parserVersion": "3.6",
- "result": {
- "chassis": {
- "description": "Rack Mount Chassis",
- "firmware": {
- "date": "07/01/2013",
- "description": "BIOS",
- "vendor": "HP",
- "version": "J01"
}, - "motherboard": {
- "product": "",
- "serial": "",
- "vendor": ""
}, - "product": "ProLiant DL120 G7 (647339-B21)",
- "serial": "CZ33109CHV",
- "vendor": "HP"
}, - "cpu": [
- {
- "capabilities": {
- "cpufreq": "CPU Frequency scaling",
- "ht": "HyperThreading",
- "vmx": false,
- "x86-64": "64bits extensions (x86-64)"
}, - "description": "Intel(R) Xeon(R) CPU E31230",
- "hz": "2792640000",
- "serial_number": "",
- "settings": {
- "cores": "4",
- "enabledcores": "4",
- "threads": "8"
}, - "slot": "Proc 1",
- "vendor": "Intel Corp."
}
], - "disks": [
- {
- "description": "ATA Disk",
- "id": "disk:0",
- "product": "Hitachi HDS72302",
- "serial_number": "MS77215W07S6SA",
- "size": "2000398934016",
- "smartctl": {
- "ata_version": "ATA8-ACS T13/1699-D revision 4",
- "attributes": {
- "Power_On_Hours": {
- "flag": "0x0012",
- "id": " 9",
- "raw_value": "39832",
- "thresh": "000",
- "type": "Old_age",
- "updated": "Always",
- "value": "095",
- "when_failed": "-",
- "worst": "095"
}, - "Reallocated_Sector_Ct": {
- "flag": "0x0033",
- "id": " 5",
- "raw_value": "0",
- "thresh": "005",
- "type": "Pre-fail",
- "updated": "Always",
- "value": "100",
- "when_failed": "-",
- "worst": "100"
}
}, - "device_model": "Hitachi HDS723020BLE640",
- "execution_status": "0",
- "firmware_version": "MX4OAAB0",
- "is_sas": false,
- "overall_health": "PASSED",
- "rpm": "7200 rpm",
- "sata_version": "SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)",
- "sector_size": "512 bytes logical, 4096 bytes physical",
- "serial_number": "MS77215W07S6SA",
- "smart_error_log": "No Errors Logged",
- "smart_support": {
- "available": true,
- "enabled": true
}, - "smartctl_version": "6.2",
- "user_capacity": "2,000,398,934,016 bytes [2.00 TB]"
}, - "vendor": "Hitachi"
}
], - "ipmi": {
- "defgateway": "10.19.79.126",
- "firmware": "1.88",
- "ipaddress": "10.19.79.67",
- "ipsource": "DHCP Address",
- "macaddress": "28:92:4a:33:48:e8",
- "subnetmask": "255.255.255.192",
- "vendor": "Hewlett-Packard"
}, - "memory": [
- {
- "clock_hz": "1333000000",
- "description": "DIMM DDR3 Synchronous 1333 MHz (0.8 ns)",
- "id": "memory/bank:0",
- "serial_number": "8369AF58",
- "size_bytes": "4294967296"
}, - {
- "clock_hz": "1333000000",
- "description": "DIMM DDR3 Synchronous 1333 MHz (0.8 ns)",
- "id": "memory/bank:1",
- "serial_number": "8369B174",
- "size_bytes": "4294967296"
}
], - "network": [
- {
- "capabilities": {
- "autonegotiation": "Auto-negotiation",
- "bus_master": "bus mastering",
- "cap_list": "PCI capabilities listing",
- "ethernet": "",
- "link_speeds": {
- "1000bt-fd": "1Gbit/s (full duplex)",
- "100bt": "100Mbit/s",
- "100bt-fd": "100Mbit/s (full duplex)",
- "10bt": "10Mbit/s",
- "10bt-fd": "10Mbit/s (full duplex)"
}, - "msi": "Message Signalled Interrupts",
- "msix": "MSI-X",
- "pciexpress": "PCI Express",
- "physical": "Physical interface",
- "pm": "Power Management",
- "tp": "twisted pair"
}, - "lldp": {
- "chassis": {
- "description": "Juniper Networks, Inc. ex3300-48t Ethernet Switch, kernel JUNOS 15.1R5.5, Build date: 2016-11-25 16:02:59 UTC Copyright (c) 1996-2016 Juniper Networks, Inc.",
- "mac_address": "4c:16:fc:3a:84:c0",
- "name": "EVO-NS19-1"
}, - "port": {
- "auto_negotiation": {
- "enabled": "yes",
- "supported": "yes"
}, - "description": "ge-0/0/2.0"
}, - "vlan": {
- "id": "0",
- "label": "VLAN",
- "name": "default"
}
}, - "logical_name": "eth0",
- "mac_address": "28:92:4a:33:48:e6",
- "product": "82574L Gigabit Network Connection",
- "settings": {
- "autonegotiation": "on",
- "broadcast": "yes",
- "driver": "e1000e",
- "driverversion": "3.2.6-k",
- "duplex": "full",
- "firmware": "2.1-2",
- "ip": "212.32.230.67",
- "latency": "0",
- "link": "yes",
- "multicast": "yes",
- "port": "twisted pair",
- "speed": "1Gbit/s"
}, - "vendor": "Intel Corporation"
}
]
}, - "scannedAt": "2017-09-27T14:21:01Z",
- "serverId": "62264"
}
List all IP Addresses associated with this server. Optionally filtered.
serverId required | string Example: 12345 The ID of a server |
networkType | string Enum: "INTERNAL" "PUBLIC" "REMOTE_MANAGEMENT" Example: networkType=INTERNAL 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. |
curl --request GET \ --url 'https://api.leaseweb.com/bareMetals/v2/servers/12345/ips?networkType=INTERNAL&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'
{- "ddos": {
- "detectionProfile": "ADVANCED_LOW_UDP",
- "protectionType": "ADVANCED"
}, - "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
}
Get a single IP address associated with this server.
serverId required | string Example: 12345 The ID of a server |
ip required | string Example: 127.0.0.6 The IP Address |
curl --request GET \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/ips/127.0.0.6 \ --header 'X-Lsw-Auth: REPLACE_KEY_VALUE'
{- "ddos": {
- "detectionProfile": "ADVANCED_LOW_UDP",
- "protectionType": "ADVANCED"
}, - "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 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.
serverId required | string Example: 12345 The ID of a server |
ip required | string Example: 127.0.0.6 The IP Address |
detectionProfile | string Enum: "ADVANCED_DEFAULT" "ADVANCED_LOW_UDP" "ADVANCED_MED_UDP" The detection profile value |
reverseLookup | string The reverse lookup value |
{- "detectionProfile": "ADVANCED_LOW_UDP",
- "reverseLookup": "domain.example.com"
}
{- "ddos": {
- "detectionProfile": "ADVANCED_LOW_UDP",
- "protectionType": "ADVANCED"
}, - "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 the given IP address. It might take a few minutes before the change is propagated across the network.
serverId required | string Example: 12345 The ID of a server |
ip required | string Example: 127.0.0.6 The IP Address |
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'
{- "ddos": {
- "detectionProfile": "ADVANCED_LOW_UDP",
- "protectionType": "ADVANCED"
}, - "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 an existing null route for the given IP address. It might take a few minutes before the change is propagated across the network.
serverId required | string Example: 12345 The ID of a server |
ip required | string Example: 127.0.0.6 The IP Address |
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'
{- "ddos": {
- "detectionProfile": "ADVANCED_LOW_UDP",
- "protectionType": "ADVANCED"
}, - "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 all null route history for any ips associated with this server.
serverId required | string Example: 12345 The ID of a server |
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
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'
{- "_metadata": {
- "limit": 10,
- "offset": 0,
- "totalCount": 1
}, - "nullRoutes": [
- {
- "automatedUnnullingAt": "2016-08-12T07:45:33+00:00",
- "comment": "Device Null Route related to DDoS Mitigation",
- "ip": "1.1.1.1/32",
- "nullLevel": 3,
- "nulledAt": "2016-08-12T07:40:27+00:00",
- "ticketId": "282912"
}
]
}
List all network interfaces for this server, including their current status.
serverId required | string Example: 12345 The ID of a server |
curl --request GET \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/networkInterfaces \ --header 'X-Lsw-Auth: REPLACE_KEY_VALUE'
{- "_metadata": {
- "limit": 10,
- "offset": 0,
- "totalCount": 1
}, - "networkInterfaces": [
- {
- "linkSpeed": "100Mbps",
- "operStatus": "OPEN",
- "status": "OPEN",
- "switchInterface": "33",
- "switchName": "EVO-AA11-1",
- "type": "PUBLIC"
}
]
}
Close all network interfaces for this server.
serverId required | string Example: 12345 The ID of a server |
curl --request POST \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/networkInterfaces/close \ --header 'X-Lsw-Auth: REPLACE_KEY_VALUE'
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "401",
- "errorMessage": "You are not authorized to view this resource."
}
Open all network interfaces of this server.
serverId required | string Example: 12345 The ID of a server |
curl --request POST \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/networkInterfaces/open \ --header 'X-Lsw-Auth: REPLACE_KEY_VALUE'
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "401",
- "errorMessage": "You are not authorized to view this resource."
}
Show the network interface of the given type of this server, including its status.
serverId required | string Example: 12345 The ID of a server |
networkTypeURL required | string (networkTypeURL) Enum: "internal" "public" "remoteManagement" Example: internal Type of network |
curl --request GET \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/networkInterfaces/%7BnetworkTypeURL%7D \ --header 'X-Lsw-Auth: REPLACE_KEY_VALUE'
{- "linkSpeed": "100Mbps",
- "operStatus": "OPEN",
- "status": "OPEN",
- "switchInterface": "33",
- "switchName": "EVO-JV12-1",
- "type": "PUBLIC"
}
Close the network interface of this type of this server.
serverId required | string Example: 12345 The ID of a server |
networkTypeURL required | string (networkTypeURL) Enum: "internal" "public" "remoteManagement" Example: internal Type of network |
curl --request POST \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/networkInterfaces/%7BnetworkTypeURL%7D/close \ --header 'X-Lsw-Auth: REPLACE_KEY_VALUE'
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "401",
- "errorMessage": "You are not authorized to view this resource."
}
Open all network interfaces of the given type for this server.
serverId required | string Example: 12345 The ID of a server |
networkTypeURL required | string (networkTypeURL) Enum: "internal" "public" "remoteManagement" Example: internal Type of network |
curl --request POST \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/networkInterfaces/%7BnetworkTypeURL%7D/open \ --header 'X-Lsw-Auth: REPLACE_KEY_VALUE'
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "401",
- "errorMessage": "You are not authorized to view this resource."
}
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
.
serverId required | string Example: 12345 The ID of a server |
privateNetworkId required | string Example: 892 The ID of a Private Network |
curl --request DELETE \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/privateNetworks/892 \ --header 'X-Lsw-Auth: REPLACE_KEY_VALUE'
{- "correlationId": "f8d84555-9822-49fb-919a-d4945b201fe3",
- "errorCode": "400",
- "errorMessage": "Equipment 27072 is not part of private network 3943"
}
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
.
serverId required | string Example: 12345 The ID of a server |
privateNetworkId required | string Example: 892 The ID of a Private Network |
linkSpeed required | integer (linkSpeed) Enum: 100 1000 10000 The port speed in Mbps |
{- "linkSpeed": 100
}
{- "correlationId": "f8d84555-9822-49fb-919a-d4945b201fe3",
- "errorCode": "400",
- "errorMessage": "Equipment 27072 is not part of private network 3943"
}
Delete a DHCP reservation for this server.
serverId required | string Example: 12345 The ID of a server |
curl --request DELETE \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/leases \ --header 'X-Lsw-Auth: REPLACE_KEY_VALUE'
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "401",
- "errorMessage": "You are not authorized to view this resource."
}
Please note that this will only show reservations for the public network interface.
serverId required | string Example: 12345 The ID of a server |
curl --request GET \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/leases \ --header 'X-Lsw-Auth: REPLACE_KEY_VALUE'
{- "_metadata": {
- "limit": 10,
- "offset": 0,
- "totalCount": 1
}, - "leases": [
- {
- "createdAt": "2019-10-18T17:31:01+00:00",
- "gateway": "192.168.0.254",
- "hostname": "my-server",
- "ip": "192.168.0.100",
- "lastClientRequest": {
- "relayAgent": null,
- "type": "DHCP_REQUEST",
- "userAgent": "Ubuntu 18.04 dhcpc"
}, - "mac": "AA:BB:CC:DD:EE:FF",
- "netmask": "255.255.255.0",
- "site": "AMS-01",
- "updatedAt": "2019-11-18T19:29:01+00:00"
}
]
}
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.
serverId required | string Example: 12345 The ID of a server |
bootfile required | string The URL of PXE boot you want your server to boot from |
hostname | string The hostname for the server |
{- "hostname": "my-server"
}
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
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.
serverId required | string Example: 12345 The ID of a server |
curl --request POST \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/cancelActiveJob \ --header 'X-Lsw-Auth: REPLACE_KEY_VALUE'
{- "createdAt": "2021-01-09T08:54:06+0000",
- "flow": "#stop",
- "isRunning": false,
- "node": "80:18:44:E0:AF:C4!JGNTQ92",
- "payload": {
- "configurable": true,
- "device": "SATA2TB",
- "fileserverBaseUrl": "",
- "jobType": "install",
- "numberOfDisks": null,
- "operatingSystemId": "UBUNTU_22_04_64BIT",
- "os": {
- "architecture": "64bit",
- "family": "ubuntu",
- "name": "Ubuntu 22.04 LTS (Jammy Jellyfish) (amd64)",
- "type": "linux",
- "version": "22.04"
}, - "partitions": [
- {
- "filesystem": "swap",
- "size": 4096
}
], - "pop": "AMS-01",
- "powerCycle": true,
- "raidLevel": null,
- "serverId": "99944",
- "timezone": "UTC",
- "x": 1
}, - "progress": {
- "canceled": 1,
- "expired": 0,
- "failed": 0,
- "finished": 0,
- "inprogress": 0,
- "pending": 0,
- "percentage": 0,
- "total": 1,
- "waiting": 0
}, - "serverId": "99944",
- "status": "CANCELED",
- "tasks": [
- {
- "description": "dummy",
- "errorMessage": "The job was canceled by the api consumer",
- "flow": "tasks",
- "onError": "break",
- "status": "CANCELED",
- "statusTimestamps": {
- "CANCELED": "2021-01-09T08:54:15+00:00",
- "PENDING": "2021-01-09T08:54:06+00:00",
- "WAITING": "2021-01-09T08:54:06+00:00"
}, - "uuid": "085ce145-39bd-4cb3-8e2b-53f17a97a463"
}
], - "type": "install",
- "updatedAt": "2021-01-09T08:54:15+0000",
- "uuid": "c77d8a6b-d255-4744-8b95-8bf4af6f8b48"
}
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.
serverId required | string Example: 12345 The ID of a server |
curl --request POST \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/expireActiveJob \ --header 'X-Lsw-Auth: REPLACE_KEY_VALUE'
{- "createdAt": "2021-01-09T08:50:45+0000",
- "flow": "#stop",
- "isRunning": false,
- "node": "80:18:44:E0:AF:C4!JGNTQ92",
- "payload": {
- "configurable": true,
- "device": "SATA2TB",
- "fileserverBaseUrl": "",
- "jobType": "install",
- "numberOfDisks": null,
- "operatingSystemId": "UBUNTU_22_04_64BIT",
- "os": {
- "architecture": "64bit",
- "family": "ubuntu",
- "name": "Ubuntu 22.04 LTS (Jammy Jellyfish) (amd64)",
- "type": "linux",
- "version": "22.04"
}, - "partitions": [
- {
- "filesystem": "swap",
- "size": 4096
}
], - "pop": "AMS-01",
- "powerCycle": true,
- "raidLevel": null,
- "serverId": "99944",
- "timezone": "UTC",
- "x": 1
}, - "progress": {
- "canceled": 0,
- "expired": 1,
- "failed": 0,
- "finished": 0,
- "inprogress": 0,
- "pending": 0,
- "percentage": 0,
- "total": 1,
- "waiting": 0
}, - "serverId": "99944",
- "status": "EXPIRED",
- "tasks": [
- {
- "description": "dummy",
- "errorMessage": "The job was expired by the api consumer",
- "flow": "tasks",
- "onError": "break",
- "status": "EXPIRED",
- "statusTimestamps": {
- "EXPIRED": "2021-01-09T08:51:54+00:00",
- "PENDING": "2021-01-09T08:50:45+00:00",
- "WAITING": "2021-01-09T08:50:45+00:00"
}, - "uuid": "0286423e-06ac-49bf-ace5-35af97bde4b1"
}
], - "type": "install",
- "updatedAt": "2021-01-09T08:51:54+0000",
- "uuid": "fe54dd20-a815-47da-bcb4-5550a160dbbe"
}
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.
serverId required | string Example: 12345 The ID of a server |
callbackUrl | string <uri> Url which will receive callbacks |
powerCycle | boolean Default: true If set to |
{- "powerCycle": false
}
{- "createdAt": "2018-01-09T09:07:09+0000",
- "flow": "tasks",
- "isRunning": true,
- "node": "80:18:44:E0:AF:C4!JGNTQ92",
- "payload": {
- "fileserverBaseUrl": "",
- "jobType": "hardwareScan",
- "pop": "AMS-01",
- "powerCycle": true,
- "serverId": "99944"
}, - "progress": {
- "canceled": 0,
- "expired": 0,
- "failed": 0,
- "finished": 0,
- "inprogress": 0,
- "pending": 1,
- "percentage": 0,
- "total": 5,
- "waiting": 4
}, - "serverId": "99944",
- "status": "ACTIVE",
- "tasks": [
- {
- "description": "dummy",
- "errorMessage": null,
- "flow": "tasks",
- "onError": "break",
- "status": "PENDING",
- "statusTimestamps": {
- "PENDING": "2018-01-09T10:38:12+00:00",
- "WAITING": "2018-01-09T10:38:12+00:00"
}, - "uuid": "8a10b74b-2a94-4a3b-88da-b9c07faa240d"
}
], - "type": "hardwareScan",
- "updatedAt": "2018-01-09T09:07:09+0000",
- "uuid": "2dcca92d-b5df-4837-bd99-b568ac54569a"
}
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.
serverId required | string Example: 12345 The ID of a server |
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 (partition) 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 (raid) 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 |
{- "controlPanelId": "PLESK_12",
- "device": "SATA2TB",
- "hostname": "ubuntu22.local",
- "operatingSystemId": "UBUNTU_22_04_64BIT",
- "partitions": [
- {
- "filesystem": "ext2",
- "mountpoint": "/boot",
- "size": "1024"
}, - {
- "filesystem": "swap",
- "size": "4096"
}, - {
- "filesystem": "ext4",
- "mountpoint": "/tmp",
- "size": "4096"
}, - {
- "filesystem": "ext4",
- "mountpoint": "/",
- "size": "*"
}
], - "sshKeys": "ssh-rsa AAAAB3NzaC1y... user@domain.com"
}
{- "createdAt": "2021-03-06T21:55:32Z",
- "flow": "tasks",
- "isRunning": true,
- "node": "AA:BB:CC:DD:EE:FF!DKFJKD8989",
- "payload": {
- "configurable": true,
- "device": "SATA2TB",
- "fileserverBaseUrl": "10.11.20.2",
- "isUnassignedServer": false,
- "jobType": "install",
- "numberOfDisks": null,
- "operatingSystemId": "UBUNTU_22_04_64BIT",
- "os": {
- "architecture": "64bit",
- "family": "ubuntu",
- "name": "Ubuntu 22.04 LTS (Jammy Jellyfish) (amd64)",
- "type": "linux",
- "version": "22.04"
}, - "partitions": [
- {
- "filesystem": "ext2",
- "mountpoint": "/boot",
- "size": "1024"
}, - {
- "filesystem": "swap",
- "size": "4096"
}, - {
- "filesystem": "ext4",
- "mountpoint": "/tmp",
- "size": "4096"
}, - {
- "filesystem": "ext4",
- "mountpoint": "/",
- "size": "*"
}
], - "pop": "AMS-01",
- "powerCycle": true,
- "raidLevel": null,
- "serverId": "12345",
- "timezone": "UTC"
}, - "progress": {
- "canceled": 0,
- "expired": 0,
- "failed": 0,
- "finished": 0,
- "inprogress": 0,
- "pending": 1,
- "percentage": 0,
- "total": 26,
- "waiting": 25
}, - "serverId": "12345",
- "status": "ACTIVE",
- "tasks": [
- {
- "description": "dummy",
- "errorMessage": null,
- "flow": "tasks",
- "onError": "break",
- "status": "PENDING",
- "statusTimestamps": {
- "PENDING": "2021-01-09T09:18:06Z",
- "WAITING": "2021-01-09T09:18:06Z"
}, - "uuid": "c1a56a5a-ae38-4b12-acb6-0cba9ceb1016"
}
], - "type": "install",
- "updatedAt": "2021-03-06T21:55:32Z",
- "uuid": "bcf2bedf-8450-4b22-86a8-f30aeb3a38f9"
}
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.",
serverId required | string Example: 12345 The ID of a server |
callbackUrl | string <uri> Url which will receive callbacks |
powerCycle | boolean Default: true If set to |
{
}
{- "createdAt": "2018-01-09T09:18:06+0000",
- "flow": "tasks",
- "isRunning": true,
- "node": "80:18:44:E0:AF:C4!JGNTQ92",
- "payload": {
- "fileserverBaseUrl": "",
- "hasPublicIpmiIp": false,
- "jobType": "ipmiReset",
- "pop": "AMS-01",
- "powerCycle": true,
- "serverId": "99944"
}, - "progress": {
- "canceled": 0,
- "expired": 0,
- "failed": 0,
- "finished": 0,
- "inprogress": 0,
- "pending": 1,
- "percentage": 0,
- "total": 1,
- "waiting": 0
}, - "serverId": "99944",
- "status": "ACTIVE",
- "tasks": [
- {
- "description": "dummy",
- "errorMessage": null,
- "flow": "tasks",
- "onError": "break",
- "status": "PENDING",
- "statusTimestamps": {
- "PENDING": "2018-01-09T09:18:06+00:00",
- "WAITING": "2018-01-09T09:18:06+00:00"
}, - "uuid": "c1a56a5a-ae38-4b12-acb6-0cba9ceb1016"
}
], - "type": "ipmiReset",
- "updatedAt": "2018-01-09T09:18:06+0000",
- "uuid": "754154c2-cc7f-4d5f-b8bf-b654084ba4a9"
}
List all jobs for this server.
serverId required | string Example: 12345 The ID of a server |
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 |
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'
{- "_metadata": {
- "limit": 10,
- "offset": 0,
- "totalCount": 1
}, - "jobs": [
- {
- "createdAt": "2018-01-09T10:38:12+0000",
- "flow": "tasks",
- "isRunning": true,
- "node": "80:18:44:E0:AF:C4!JGNTQ92",
- "progress": {
- "canceled": 0,
- "expired": 0,
- "failed": 0,
- "finished": 0,
- "inprogress": 0,
- "pending": 1,
- "percentage": 0,
- "total": 1,
- "waiting": 0
}, - "serverId": "99944",
- "status": "ACTIVE",
- "type": "install",
- "updatedAt": "2018-01-09T10:38:12+0000",
- "uuid": "3a867358-5b4b-44ee-88ac-4274603ef641"
}
]
}
Get a single job for this server.
serverId required | string Example: 12345 The ID of a server |
jobId required | string Example: 3a867358-5b4b-44ee-88ac-4274603ef641 The ID of a Job |
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'
{- "createdAt": "2021-01-09T10:38:12+0000",
- "flow": "tasks",
- "isRunning": true,
- "metadata": {
- "BATCH_ID": "biannual-os-upgrade-installs"
}, - "node": "80:18:44:E0:AF:C4!JGNTQ92",
- "payload": {
- "configurable": true,
- "device": "SATA2TB",
- "fileserverBaseUrl": "",
- "jobType": "install",
- "numberOfDisks": null,
- "operatingSystemId": "UBUNTU_22_04_64BIT",
- "os": {
- "architecture": "64bit",
- "family": "ubuntu",
- "name": "Ubuntu 22.04 LTS (Jammy Jellyfish) (amd64)",
- "type": "linux",
- "version": "22.04"
}, - "partitions": [
- {
- "filesystem": "swap",
- "size": 4096
}
], - "pop": "AMS-01",
- "powerCycle": true,
- "raidLevel": null,
- "serverId": "99944",
- "timezone": "UTC",
- "x": 1
}, - "progress": {
- "canceled": 0,
- "expired": 0,
- "failed": 0,
- "finished": 0,
- "inprogress": 0,
- "pending": 1,
- "percentage": 0,
- "total": 1,
- "waiting": 0
}, - "serverId": "99944",
- "status": "ACTIVE",
- "tasks": [
- {
- "description": "dummy",
- "errorMessage": null,
- "flow": "tasks",
- "onError": "break",
- "status": "PENDING",
- "statusTimestamps": {
- "PENDING": "2021-01-09T10:38:12+00:00",
- "WAITING": "2021-01-09T10:38:12+00:00"
}, - "uuid": "8a10b74b-2a94-4a3b-88da-b9c07faa240d"
}
], - "type": "install",
- "updatedAt": "2021-01-09T10:38:12+0000",
- "uuid": "3a867358-5b4b-44ee-88ac-4274603ef641"
}
Retry a job for a specific server.
serverId required | string Example: 12345 The ID of a server |
jobId required | string Example: 3a867358-5b4b-44ee-88ac-4274603ef641 The ID of a Job |
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'
{- "createdAt": "2021-01-09T10:38:12+0000",
- "flow": "tasks",
- "isRunning": true,
- "metadata": {
- "BATCH_ID": "biannual-os-upgrade-installs"
}, - "node": "80:18:44:E0:AF:C4!JGNTQ92",
- "payload": {
- "configurable": true,
- "device": "SATA2TB",
- "fileserverBaseUrl": "",
- "jobType": "install",
- "numberOfDisks": null,
- "operatingSystemId": "UBUNTU_22_04_64BIT",
- "os": {
- "architecture": "64bit",
- "family": "ubuntu",
- "name": "Ubuntu 22.04 LTS (Jammy Jellyfish) (amd64)",
- "type": "linux",
- "version": "22.04"
}, - "partitions": [
- {
- "filesystem": "swap",
- "size": 4096
}
], - "pop": "AMS-01",
- "powerCycle": true,
- "raidLevel": null,
- "serverId": "99944",
- "timezone": "UTC"
}, - "progress": {
- "canceled": 0,
- "expired": 0,
- "failed": 0,
- "finished": 0,
- "inprogress": 0,
- "pending": 1,
- "percentage": 0,
- "total": 1,
- "waiting": 0
}, - "serverId": "99944",
- "status": "ACTIVE",
- "tasks": [
- {
- "description": "dummy",
- "errorMessage": null,
- "flow": "tasks",
- "onError": "break",
- "status": "PENDING",
- "statusTimestamps": {
- "PENDING": "2021-01-09T10:38:12+00:00",
- "WAITING": "2021-01-09T10:38:12+00:00"
}, - "uuid": "8a10b74b-2a94-4a3b-88da-b9c07faa240d"
}
], - "type": "install",
- "updatedAt": "2021-01-09T10:38:12+0000",
- "uuid": "3a867358-5b4b-44ee-88ac-4274603ef641"
}
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
.
serverId required | string Example: 12345 The ID of a server |
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 |
rescueImageId required | string Default: "GRML" Rescue image identifier |
sshKeys | string User ssh keys |
{- "powerCycle": true,
- "rescueImageId": "GRML",
- "sshKeys": "ssh-rsa AAAAB3NzaC1y... user@domain.com"
}
{- "createdAt": "2018-03-06T22:53:31+0000",
- "flow": "tasks",
- "isRunning": true,
- "node": "AA:BB:CC:DD:EE:FF!JKDJFK890",
- "payload": {
- "fileserverBaseUrl": "10.11.20.2",
- "isUnassignedServer": false,
- "jobType": "rescueMode",
- "pop": "AMS-01",
- "powerCycle": true,
- "serverId": "2349839"
}, - "progress": {
- "canceled": 0,
- "expired": 0,
- "failed": 0,
- "finished": 0,
- "inprogress": 0,
- "pending": 1,
- "percentage": 0,
- "total": 12,
- "waiting": 11
}, - "serverId": "2349839",
- "status": "ACTIVE",
- "tasks": [
- {
- "description": "dummy",
- "errorMessage": null,
- "flow": "tasks",
- "onError": "break",
- "status": "PENDING",
- "statusTimestamps": {
- "PENDING": "2018-01-09T10:38:12+00:00",
- "WAITING": "2018-01-09T10:38:12+00:00"
}, - "uuid": "8a10b74b-2a94-4a3b-88da-b9c07faa240d"
}
], - "type": "rescueMode",
- "updatedAt": "2018-03-06T22:53:31+0000",
- "uuid": "ac99431b-640d-4282-95a9-a444eedb9309"
}
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.
serverId required | string Example: 12345 The ID of a server |
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
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'
{- "_metadata": {
- "limit": 20,
- "offset": 0,
- "totalCount": 13
}, - "credentials": [
- {
- "type": "REMOTE_MANAGEMENT",
- "username": "admin"
}, - {
- "type": "RESCUE_MODE",
- "username": "root"
}, - {
- "type": "OPERATING_SYSTEM",
- "username": "root"
}, - {
- "type": "CONTROL_PANEL",
- "username": "user"
}, - {
- "type": "SWITCH",
- "username": "admin"
}, - {
- "type": "PDU",
- "username": "root"
}, - {
- "type": "FIREWALL",
- "username": "root"
}, - {
- "type": "LOAD_BALANCER",
- "username": "user"
}, - {
- "type": "VNC",
- "username": "admin"
}, - {
- "type": "TEMPORARY_OPERATING_SYSTEM",
- "username": "root"
}, - {
- "type": "VPN_USER",
- "username": "root"
}, - {
- "type": "COMBINATION_LOCK",
- "username": "user"
}, - {
- "type": "DATABASE",
- "username": "user"
}
]
}
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.
serverId required | string Example: 12345 The ID of a server |
password required | string The password for the credentials |
type required | string (credentialType) Enum: "OPERATING_SYSTEM" "RESCUE_MODE" "REMOTE_MANAGEMENT" "CONTROL_PANEL" "SWITCH" "PDU" "FIREWALL" "LOAD_BALANCER" "VNC" "TEMPORARY_OPERATING_SYSTEM" "VPN_USER" "COMBINATION_LOCK" "DATABASE" The type of the credential. |
username required | string The username for the credentials |
{- "password": "mys3cr3tp@ssw0rd",
- "type": "OPERATING_SYSTEM",
- "username": "root"
}
{- "password": "mys3cr3tp@ssw0rd",
- "type": "OPERATING_SYSTEM",
- "username": "root"
}
List all the credentials filtered by the specified type that are associated with this server.
serverId required | string Example: 12345 The ID of a server |
type required | string (credentialType) Enum: "OPERATING_SYSTEM" "RESCUE_MODE" "REMOTE_MANAGEMENT" "CONTROL_PANEL" "SWITCH" "PDU" "FIREWALL" "LOAD_BALANCER" "VNC" "TEMPORARY_OPERATING_SYSTEM" "VPN_USER" "COMBINATION_LOCK" "DATABASE" The type of the credential. |
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
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'
{- "_metadata": {
- "limit": 20,
- "offset": 0,
- "totalCount": 2
}, - "credentials": [
- {
- "type": "OPERATING_SYSTEM",
- "username": "root"
}, - {
- "type": "OPERATING_SYSTEM",
- "username": "user"
}
]
}
This action is purely administrative and will only remove the username and password associated with this resource from our database.
serverId required | string Example: 12345 The ID of a server |
type required | string (credentialType) Enum: "OPERATING_SYSTEM" "RESCUE_MODE" "REMOTE_MANAGEMENT" "CONTROL_PANEL" "SWITCH" "PDU" "FIREWALL" "LOAD_BALANCER" "VNC" "TEMPORARY_OPERATING_SYSTEM" "VPN_USER" "COMBINATION_LOCK" "DATABASE" The type of the credential. |
username required | string Example: root Username |
curl --request DELETE \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/credentials/%7Btype%7D/%7Busername%7D \ --header 'X-Lsw-Auth: REPLACE_KEY_VALUE'
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "401",
- "errorMessage": "You are not authorized to view this resource."
}
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).
serverId required | string Example: 12345 The ID of a server |
type required | string (credentialType) Enum: "OPERATING_SYSTEM" "RESCUE_MODE" "REMOTE_MANAGEMENT" "CONTROL_PANEL" "SWITCH" "PDU" "FIREWALL" "LOAD_BALANCER" "VNC" "TEMPORARY_OPERATING_SYSTEM" "VPN_USER" "COMBINATION_LOCK" "DATABASE" The type of the credential. |
username required | string Example: root Username |
curl --request GET \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/credentials/%7Btype%7D/%7Busername%7D \ --header 'X-Lsw-Auth: REPLACE_KEY_VALUE'
{- "password": "mys3cr3tp@ssw0rd",
- "type": "OPERATING_SYSTEM",
- "username": "root"
}
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.
serverId required | string Example: 12345 The ID of a server |
type required | string (credentialType) Enum: "OPERATING_SYSTEM" "RESCUE_MODE" "REMOTE_MANAGEMENT" "CONTROL_PANEL" "SWITCH" "PDU" "FIREWALL" "LOAD_BALANCER" "VNC" "TEMPORARY_OPERATING_SYSTEM" "VPN_USER" "COMBINATION_LOCK" "DATABASE" The type of the credential. |
username required | string Example: root Username |
password required | string The password for the credentials |
{- "password": "mys3cr3tp@ssw0rd"
}
{- "password": "mys3cr3tp@ssw0rd",
- "type": "OPERATING_SYSTEM",
- "username": "root"
}
At this moment only bandwidth information for the public interface is supported.
serverId required | string Example: 12345 The ID of a server |
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 |
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'
{- "_metadata": {
- "aggregation": "AVG",
- "from": "2016-10-20T09:00:00Z",
- "granularity": "HOUR",
- "to": "2016-10-20T11:00:00Z"
}, - "metrics": {
- "DOWN_PUBLIC": {
- "unit": "bps",
- "values": [
- {
- "timestamp": "2016-10-20T09:00:00Z",
- "value": 202499
}, - {
- "timestamp": "2016-10-20T10:00:00Z",
- "value": 29900
}
]
}, - "UP_PUBLIC": {
- "unit": "bps",
- "values": [
- {
- "timestamp": "2016-10-20T09:00:00Z",
- "value": 43212393
}, - {
- "timestamp": "2016-10-20T10:00:00Z",
- "value": 12342929
}
]
}
}
}
At this moment only bandwidth information for the public interface is supported.
serverId required | string Example: 12345 The ID of a server |
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. |
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'
{- "_metadata": {
- "aggregation": "SUM",
- "from": "2016-10-20T09:00:00Z",
- "granularity": "HOUR",
- "to": "2016-10-20T11:00:00Z"
}, - "metrics": {
- "DOWN_PUBLIC": {
- "unit": "B",
- "values": [
- {
- "timestamp": "2016-10-20T09:00:00Z",
- "value": 202499
}, - {
- "timestamp": "2016-10-20T10:00:00Z",
- "value": 29900
}
]
}, - "UP_PUBLIC": {
- "unit": "B",
- "values": [
- {
- "timestamp": "2016-10-20T09:00:00Z",
- "value": 43212393
}, - {
- "timestamp": "2016-10-20T10:00:00Z",
- "value": 12342929
}
]
}
}
}
List all bandwidth notification settings for this server.
serverId required | string Example: 12345 The ID of a server |
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
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'
{- "_metadata": {
- "limit": 10,
- "offset": 0,
- "totalCount": 2
}, - "bandwidthNotificationSettings": [
- {
- "actions": [
- {
- "lastTriggeredAt": "2021-03-16T01:01:44+00:00",
- "type": "EMAIL"
}
], - "frequency": "WEEKLY",
- "id": "12345",
- "lastCheckedAt": "2021-03-16T01:01:41+00:00",
- "threshold": "1",
- "thresholdExceededAt": "2021-03-16T01:01:41+00:00",
- "unit": "Gbps"
}, - {
- "actions": [
- {
- "lastTriggeredAt": "2021-03-16T01:01:44+00:00",
- "type": "EMAIL"
}
], - "frequency": "DAILY",
- "id": "123456",
- "lastCheckedAt": "2021-03-16T01:01:41+00:00",
- "threshold": "1",
- "thresholdExceededAt": "2021-03-16T01:01:41+00:00",
- "unit": "Mbps"
}
]
}
Create a new bandwidth notification setting for this server.
serverId required | string Example: 12345 The ID of a server |
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 |
{- "frequency": "DAILY",
- "threshold": "1",
- "unit": "Gbps"
}
{- "actions": [
- {
- "lastTriggeredAt": "2021-03-16T01:01:44+00:00",
- "type": "EMAIL"
}
], - "frequency": "WEEKLY",
- "id": "12345",
- "lastCheckedAt": "2021-03-16T01:01:41+00:00",
- "threshold": "1",
- "thresholdExceededAt": "2021-03-16T01:01:41+00:00",
- "unit": "Gbps"
}
Remove a Bandwidth Notification setting for this server.
serverId required | string Example: 12345 The ID of a server |
notificationSettingId required | string Example: 839111 The ID of a notification setting |
curl --request DELETE \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/notificationSettings/bandwidth/839111 \ --header 'X-Lsw-Auth: REPLACE_KEY_VALUE'
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "401",
- "errorMessage": "You are not authorized to view this resource."
}
Get a bandwidth notification setting for this server.
serverId required | string Example: 12345 The ID of a server |
notificationSettingId required | string Example: 839111 The ID of a notification setting |
curl --request GET \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/notificationSettings/bandwidth/839111 \ --header 'X-Lsw-Auth: REPLACE_KEY_VALUE'
{- "actions": [
- {
- "lastTriggeredAt": "2021-03-16T01:01:44+00:00",
- "type": "EMAIL"
}
], - "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 an existing bandwidth notification setting for this server.
serverId required | string Example: 12345 The ID of a server |
notificationSettingId required | string Example: 839111 The ID of a notification setting |
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 |
{- "frequency": "DAILY",
- "threshold": "1",
- "unit": "Gbps"
}
{- "actions": [
- {
- "lastTriggeredAt": "2021-03-16T01:01:44+00:00",
- "type": "EMAIL"
}
], - "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 all datatraffic notification settings for this server.
serverId required | string Example: 12345 The ID of a server |
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
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'
{- "_metadata": {
- "limit": 10,
- "offset": 0,
- "totalCount": 2
}, - "datatrafficNotificationSettings": [
- {
- "id": "64371",
- "frequency": "DAILY",
- "threshold": "25000",
- "unit": "MB",
- "lastCheckedAt": null,
- "thresholdExceededAt": null,
- "actions": [
- {
- "type": "EMAIL",
- "lastTriggeredAt": null
}
]
}, - {
- "id": "64372",
- "frequency": "MONTHLY",
- "threshold": "10000000",
- "unit": "MB",
- "lastCheckedAt": null,
- "thresholdExceededAt": null,
- "actions": [
- {
- "type": "EMAIL",
- "lastTriggeredAt": null
}
]
}
]
}
Create a new data traffic notification setting for this server.
serverId required | string Example: 12345 The ID of a server |
frequency required | string Enum: "DAILY" "WEEKLY" "MONTHLY" Frequency for the Data Traffic Notification |
threshold required | string Threshold Value for the Data Traffic Notification |
unit required | string Enum: "MB" "GB" "TB" Unit for the Data Traffic Notification |
{- "frequency": "DAILY",
- "threshold": "1",
- "unit": "MB"
}
{- "actions": [
- {
- "lastTriggeredAt": "2021-03-16T01:01:44+00:00",
- "type": "EMAIL"
}
], - "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 the given data traffic notification setting for this server.
serverId required | string Example: 12345 The ID of a server |
notificationSettingId required | string Example: 839111 The ID of a notification setting |
curl --request DELETE \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/notificationSettings/datatraffic/839111 \ --header 'X-Lsw-Auth: REPLACE_KEY_VALUE'
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "401",
- "errorMessage": "You are not authorized to view this resource."
}
Get a datatraffic notification setting for this server.
serverId required | string Example: 12345 The ID of a server |
notificationSettingId required | string Example: 839111 The ID of a notification setting |
curl --request GET \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/notificationSettings/datatraffic/839111 \ --header 'X-Lsw-Auth: REPLACE_KEY_VALUE'
{- "actions": [
- {
- "lastTriggeredAt": "2021-03-16T01:01:44+00:00",
- "type": "EMAIL"
}
], - "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 an existing data traffic notification setting for this server.
serverId required | string Example: 12345 The ID of a server |
notificationSettingId required | string Example: 839111 The ID of a notification setting |
frequency required | string Enum: "DAILY" "WEEKLY" "MONTHLY" Frequency for the Data Traffic Notification |
threshold required | string Threshold Value for the Data Traffic Notification |
unit required | string Enum: "MB" "GB" "TB" Unit for the Data Traffic Notification |
{- "frequency": "DAILY",
- "threshold": "1",
- "unit": "GB"
}
{- "frequency": "DAILY",
- "threshold": "1",
- "unit": "MB"
}
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.
serverId required | string Example: 12345 The ID of a server |
curl --request GET \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/notificationSettings/ddos \ --header 'X-Lsw-Auth: REPLACE_KEY_VALUE'
{- "nulling": "ENABLED",
- "scrubbing": "DISABLED"
}
Update your DDoS notification settings for this server.
serverId required | string Example: 12345 The ID of a server |
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 |
{- "nulling": "DISABLED",
- "scrubbing": "ENABLED"
}
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Powercyle the server.
serverId required | string Example: 12345 The ID of a server |
curl --request POST \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/powerCycle \ --header 'X-Lsw-Auth: REPLACE_KEY_VALUE'
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
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.
serverId required | string Example: 12345 The ID of a server |
curl --request GET \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/powerInfo \ --header 'X-Lsw-Auth: REPLACE_KEY_VALUE'
{- "ipmi": {
- "status": "off"
}, - "pdu": {
- "status": "on"
}
}
Power off the given server.
serverId required | string Example: 12345 The ID of a server |
curl --request POST \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/powerOff \ --header 'X-Lsw-Auth: REPLACE_KEY_VALUE'
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Power on the given server.
serverId required | string Example: 12345 The ID of a server |
curl --request POST \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/powerOn \ --header 'X-Lsw-Auth: REPLACE_KEY_VALUE'
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
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).
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 |
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'
{- "_metadata": {
- "limit": 100,
- "offset": 0,
- "totalCount": 26
}, - "operatingSystems": [
- {
- "id": "ALMALINUX_8_64BIT",
- "name": "AlmaLinux 8 (x86_64)"
}, - {
- "id": "CENTOS_7_64BIT",
- "name": "CentOS 7 (x86_64)"
}, - {
- "id": "ROCKY_LINUX_8_64BIT",
- "name": "Rocky Linux 8 (x86_64)"
}, - {
- "id": "DEBIAN_11_64BIT",
- "name": "Debian 11 (amd64)"
}, - {
- "id": "DEBIAN_10_64BIT",
- "name": "Debian 10 (amd64)"
}, - {
- "id": "UBUNTU_22_04_64BIT",
- "name": "Ubuntu 22.04 LTS (Jammy Jellyfish) (amd64)"
}, - {
- "id": "UBUNTU_20_04_64BIT",
- "name": "Ubuntu 20.04 LTS (Focal Fossa) (amd64)"
}, - {
- "id": "UBUNTU_18_04_64BIT",
- "name": "Ubuntu 18.04 LTS (Bionic Beaver) (amd64)"
}, - {
- "id": "WINDOWS_SERVER_2019_STANDARD_64BIT",
- "name": "Windows Server 2019 Standard (x64)"
}, - {
- "id": "WINDOWS_SERVER_2019_DATACENTER_64BIT",
- "name": "Windows Server 2019 Datacenter (x64)"
}, - {
- "id": "WINDOWS_SERVER_2016_STANDARD_64BIT",
- "name": "Windows Server 2016 Standard (x64)"
}, - {
- "id": "WINDOWS_SERVER_2016_DATACENTER_64BIT",
- "name": "Windows Server 2016 Datacenter (x64)"
}, - {
- "id": "WINDOWS_SERVER_2012_R2_STANDARD_64BIT",
- "name": "Windows Server 2012 R2 Standard (x64)"
}, - {
- "id": "WINDOWS_SERVER_2012_R2_DATACENTER_64BIT",
- "name": "Windows Server 2012 R2 Datacenter (x64)"
}, - {
- "id": "WINDOWS_SERVER_2012_STANDARD_64BIT",
- "name": "Windows Server 2012 Standard (x64) (Only available to existing license holders)"
}, - {
- "id": "WINDOWS_SERVER_2012_DATACENTER_64BIT",
- "name": "Windows Server 2012 Datacenter (x64) (Only available to existing license holders)"
}, - {
- "id": "ESXI_7_0_64BIT_CSTM",
- "name": "ESXi 7.0 Targeted (x86_64)"
}, - {
- "id": "ESXI_7_0_64BIT",
- "name": "ESXi 7.0 (x86_64)"
}, - {
- "id": "ESXI_6_7_64BIT_CSTM",
- "name": "ESXi 6.7 Targeted (x86_64)"
}, - {
- "id": "ESXI_6_7_64BIT",
- "name": "ESXi 6.7 (x86_64)"
}, - {
- "id": "ESXI_6_5_64BIT_CSTM",
- "name": "ESXi 6.5 Targeted (x86_64)"
}, - {
- "id": "ESXI_6_5_64BIT",
- "name": "ESXi 6.5 (x86_64)"
}, - {
- "id": "FREEBSD_13_64BIT",
- "name": "FreeBSD 13.1 (amd64)"
}, - {
- "id": "FREEBSD_12_64BIT",
- "name": "FreeBSD 12.3 (amd64)"
}
]
}
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.
operatingSystemId required | string Example: UBUNTU_22_04_64BIT Operating system ID |
controlPanelId required | string The Control Panel ID |
curl --request GET \ --url 'https://api.leaseweb.com/bareMetals/v2/operatingSystems/%7BoperatingSystemId%7D?controlPanelId=SOME_STRING_VALUE' \ --header 'X-Lsw-Auth: REPLACE_KEY_VALUE'
{- "architecture": "64bit",
- "configurable": true,
- "defaults": {
- "device": "SATA_SAS",
- "partitions": [
- {
- "mountpoint": "/boot",
- "size": "1024",
- "filesystem": "ext2"
}, - {
- "size": "4096",
- "filesystem": "swap"
}, - {
- "mountpoint": "/tmp",
- "size": "4096",
- "filesystem": "ext4"
}, - {
- "mountpoint": "/",
- "size": "*",
- "filesystem": "ext4"
}
]
}, - "family": "centos",
- "features": [
- "PARTITIONING",
- "SW_RAID",
- "TIMEZONE",
- "HOSTNAME",
- "SSH_KEYS",
- "POST_INSTALL_SCRIPTS",
- "CONTROL_PANEL",
- "DB_MARIADB",
- "DB_REDIS",
- "DB_MONGODB",
- "DB_POSTGRESQL"
], - "id": "CENTOS_7_64BIT",
- "name": "CentOS 7 (x86_64)",
- "supportedBootDevices": [
- "SATA_SAS",
- "NVME"
], - "supportedFileSystems": [
- "ext2",
- "ext3",
- "ext4",
- "xfs",
- "swap"
], - "type": "linux",
- "version": "7"
}
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.
operatingSystemId required | string Example: UBUNTU_22_04_64BIT Operating system ID |
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 |
curl --request GET \ --url 'https://api.leaseweb.com/bareMetals/v2/operatingSystems/%7BoperatingSystemId%7D/controlPanels?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE&operatingSystemId=SOME_STRING_VALUE' \ --header 'X-Lsw-Auth: REPLACE_KEY_VALUE'
{- "_metadata": {
- "limit": 10,
- "offset": 0,
- "totalCount": 2
}, - "controlPanels": [
- {
- "id": "CPANEL_PREMIER_100",
- "name": "cPanel Premier 100"
}, - {
- "id": "CPANEL_PREMIER_150",
- "name": "cPanel Premier 150"
}, - {
- "id": "CPANEL_PREMIER_200",
- "name": "cPanel Premier 200"
}, - {
- "id": "CPANEL_PREMIER_250",
- "name": "cPanel Premier 250"
}, - {
- "id": "PLESK_DEDSER_WEB_ADMIN",
- "name": "Plesk Web Admin 10 Domains"
}, - {
- "id": "PLESK_DEDSER_WEB_PRO",
- "name": "Plesk Web Pro 30 Domains"
}, - {
- "id": "PLESK_DEDSER_WEB_HOST",
- "name": "Plesk Web Host Unlimited Domains"
}, - {
- "id": "VESTA",
- "name": "Vesta CP"
}
]
}
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).
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
curl --request GET \ --url 'https://api.leaseweb.com/bareMetals/v2/controlPanels?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \ --header 'X-Lsw-Auth: REPLACE_KEY_VALUE'
{- "_metadata": {
- "limit": 10,
- "offset": 0,
- "totalCount": 2
}, - "controlPanels": [
- {
- "id": "CPANEL_PREMIER_100",
- "name": "cPanel Premier 100"
}, - {
- "id": "CPANEL_PREMIER_150",
- "name": "cPanel Premier 150"
}, - {
- "id": "CPANEL_PREMIER_200",
- "name": "cPanel Premier 200"
}, - {
- "id": "CPANEL_PREMIER_250",
- "name": "cPanel Premier 250"
}, - {
- "id": "PLESK_DEDSER_WEB_ADMIN",
- "name": "Plesk Web Admin 10 Domains"
}, - {
- "id": "PLESK_DEDSER_WEB_PRO",
- "name": "Plesk Web Pro 30 Domains"
}, - {
- "id": "PLESK_DEDSER_WEB_HOST",
- "name": "Plesk Web Host Unlimited Domains"
}, - {
- "id": "VESTA",
- "name": "Vesta CP"
}
]
}
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.
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
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'
{- "_metadata": {
- "limit": 10,
- "offset": 0,
- "totalCount": 2
}, - "rescueImages": [
- {
- "id": "GRML",
- "name": "GRML Linux Rescue Image (amd64)"
}, - {
- "id": "CENTOS_7",
- "name": "CentOS 7 Linux Rescue Image (amd64)"
}, - {
- "id": "FREEBSD",
- "name": "FreeBSD Rescue Image (amd64)"
}
]
}