The base URL for this API is: https://api.leaseweb.com/bareMetals/v2/
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" : "http://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.
This API returns a paginated list of all private racks.
limit | integer Default: 10 Limit the number of results returned |
offset | integer Default: 0 Return results starting from the given offset |
privateNetworkCapable | boolean Enum: "true" "false" Filter the list of private network private racks |
privateNetworkEnabled | boolean Enum: "true" "false" Filter the list of private network enabled private racks |
Created
Authentication is required.
curl --request GET \ --url 'https://api.leaseweb.com/bareMetals/v2/privateRacks?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE&privateNetworkCapable=SOME_BOOLEAN_VALUE&privateNetworkEnabled=SOME_BOOLEAN_VALUE' \ --header 'x-lsw-auth: REPLACE_KEY_VALUE'
{- "_metadata": {
- "limit": 20,
- "offset": 0,
- "totalCount": 2
}, - "privateRacks": [
- {
- "contract": {
- "customerId": "2738283",
- "deliveryStatus": "ACTIVE",
- "id": "123456",
- "internalReference": "AAAA - Private rack 001",
- "reference": null,
- "salesOrgId": "2000"
}, - "featureAvailability": {
- "powerCycle": false,
- "privateNetwork": false
}, - "id": "123456",
- "location": {
- "rack": "22",
- "site": "AMS-01",
- "suite": "8.24"
}, - "networkInterfaces": {
- "public": {
- "ports": [
- {
- "name": "EVO-BB99-1",
- "port": "0-9"
}
]
}
}
}, - {
- "contract": {
- "customerId": "2738283",
- "deliveryStatus": "ACTIVE",
- "id": "267940",
- "internalReference": "AAAA - Private rack 002",
- "reference": null,
- "salesOrgId": "2000"
}, - "featureAvailability": {
- "powerCycle": false,
- "privateNetwork": false
}, - "id": "267940",
- "location": {
- "rack": "MX66",
- "site": "AMS-01",
- "suite": "Hall3"
}, - "networkInterfaces": {
- "public": {
- "ports": [
- {
- "name": "ce99.ams-01",
- "port": "0-1"
}
]
}
}
}
]
}
Retrieve information about a single private rack.
privateRackId required | string Example: 2314213 Id of the private rack |
The errorDetails
value is an object describing why validation failed.
Authentication is required.
curl --request GET \ --url https://api.leaseweb.com/bareMetals/v2/privateRacks/2314213 \ --header 'x-lsw-auth: REPLACE_KEY_VALUE'
{- "contract": {
- "customerId": "2738283",
- "deliveryStatus": "ACTIVE",
- "endsAt": null,
- "id": "2893829",
- "internalReference": "AAAA - Private rack 002",
- "networkTraffic": {
- "datatrafficLimit": 0,
- "datatrafficUnit": null,
- "trafficType": "CUSTOM",
- "type": "CONNECTIVITY"
}, - "reference": null,
- "salesOrgId": "2000",
- "sla": "Platinum - 24x7x½",
- "startsAt": "2017-08-01T00:00:00"
}, - "featureAvailability": {
- "powerCycle": false,
- "privateNetwork": false
}, - "id": "2893829",
- "location": {
- "rack": "MI15",
- "site": "AMS-01",
- "suite": "Hall3"
}, - "networkInterfaces": {
- "public": {
- "ports": [
- {
- "name": "ce05.ams-01",
- "port": "0-26"
}
]
}
}, - "powerPorts": [ ],
- "units": [
- {
- "unit": "1",
- "status": "FREE",
- "connectedUnits": [
- "1"
]
}, - {
- "unit": "13",
- "status": "OCCUPIED",
- "connectedUnits": [
- "13",
- "14"
]
}
]
}
A reference can be used to uniquely identify a private rack with a name, such as
production
.
privateRackId required | string Example: 2314213 Id of the private rack |
reference required | string The reference for this private rack |
If the reference was successfully set a 204 No Content
is returned
The errorDetails
value is an object describing why validation failed.
Authentication is required.
{- "reference": "production"
}
{- "correlationId": "945bef2e-1caf-4027-bd0a-8976848f3dee",
- "errorCode": 400,
- "errorDetails": { },
- "errorMessage": "Validation Failed"
}
privateRackId required | string Example: 2314213 Id of the private rack |
limit | integer Default: 10 Limit the number of results returned |
offset | integer Default: 0 Return results starting from the given offset |
Authentication is required.
curl --request GET \ --url 'https://api.leaseweb.com/bareMetals/v2/privateRacks/2314213/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"
}
]
}
privateRackId required | string Example: 2314213 Id of the private rack |
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 Default: 10 Limit the number of results returned |
offset | integer Default: 0 Return results starting from the given offset |
Authentication is required.
curl --request GET \ --url 'https://api.leaseweb.com/bareMetals/v2/privateRacks/2314213/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'
{- "_metadata": {
- "limit": 10,
- "offset": 0,
- "totalCount": 2
}, - "ips": [
- {
- "ip": "12.123.123.1/24",
- "gateway": "12.123.123.254",
- "floatingIp": false,
- "version": 4,
- "nullRouted": true,
- "reverseLookup": "domain.example.com",
- "mainIp": true,
- "networkType": "PUBLIC",
- "ddos": {
- "detectionProfile": "ADVANCED_LOW_UDP",
- "protectionType": "ADVANCED"
}
}, - {
- "ip": "2001:db8:85a3::8a2e:370:7334/64",
- "gateway": "2001:db8:85a3::8a2e:370:1",
- "floatingIp": false,
- "version": 6,
- "nullRouted": false,
- "reverseLookup": "domain.example.com",
- "mainIp": false,
- "networkType": "REMOTE_MANAGEMENT",
- "ddos": {
- "detectionProfile": "STANDARD_DEFAULT",
- "protectionType": "STANDARD"
}
}
]
}
ip required | string Example: 192.168.0.1 IP Address |
privateRackId required | string Example: 2314213 Id of the private rack |
The errorDetails
value is an object describing why validation failed.
Authentication is required.