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 dedicated racks.
limit | integer Default: 10 Limit the number of results returned |
offset | integer Default: 0 Return results starting from the given offset |
reference | string Example: reference=my-db Filter the list of dedicated racks by reference. |
privateNetworkCapable | boolean Enum: true false Filter the list of private network capable dedicated racks |
privateNetworkEnabled | boolean Enum: true false Filter the list of private network enabled dedicated racks |
curl --request GET \ --url 'https://api.leaseweb.com/bareMetals/v2/privateRacks?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE&reference=SOME_STRING_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",
- "reference": "AAAA - Private rack 001",
- "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",
- "reference": "AAAA - Private rack 002",
- "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 dedicated rack.
privateRackId required | string Example: 2314213 Id of the dedicated rack |
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",
- "networkTraffic": {
- "datatrafficLimit": 0,
- "datatrafficUnit": null,
- "trafficType": "CUSTOM",
- "type": "CONNECTIVITY"
}, - "reference": "AAAA - Private rack 002",
- "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 dedicated rack with a name, such as
production
.
privateRackId required | string Example: 2314213 Id of the dedicated rack |
reference required | string The reference for this dedicated rack |
{- "reference": "production"
}
{- "correlationId": "945bef2e-1caf-4027-bd0a-8976848f3dee",
- "errorCode": 400,
- "errorDetails": { },
- "errorMessage": "Validation Failed"
}
privateRackId required | string Example: 2314213 Id of the dedicated rack |
limit | integer Default: 10 Limit the number of results returned |
offset | integer Default: 0 Return results starting from the given offset |
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 dedicated 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 |
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 dedicated rack |
curl --request GET \ --url https://api.leaseweb.com/bareMetals/v2/privateRacks/2314213/ips/192.168.0.1 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "ip": "12.123.123.1/24",
- "gateway": "12.123.123.254",
- "floatingIp": false,
- "version": 4,
- "nullRouted": false,
- "reverseLookup": "domain.example.com",
- "mainIp": true,
- "networkType": "PUBLIC",
- "ddos": {
- "detectionProfile": "ADVANCED_LOW_UDP",
- "protectionType": "ADVANCED"
}
}
Update the reverse lookup or DDoS detection profile for the ip address. For more information about DDoS detection profiles click here for our KB related article.
ip required | string Example: 192.168.0.1 IP Address |
privateRackId required | string Example: 2314213 Id of the dedicated rack |
reverseLookup | string The reverse lookup value |
detectionProfile | string Enum: "ADVANCED_DEFAULT" "ADVANCED_LOW_UDP" "ADVANCED_MED_UDP" The detection profile value |
{- "reverseLookup": "domain.example.com",
- "detectionProfile": "ADVANCED_LOW_UDP"
}
{- "ip": "12.123.123.1/24",
- "gateway": "12.123.123.254",
- "floatingIp": false,
- "version": 4,
- "nullRouted": false,
- "reverseLookup": "domain.example.com",
- "mainIp": true,
- "networkType": "PUBLIC",
- "ddos": {
- "detectionProfile": "ADVANCED_LOW_UDP",
- "protectionType": "ADVANCED"
}
}
It might take a few minutes before the null route is propagated across the network.
privateRackId required | string Example: 2314213 Id of the dedicated rack |
ip required | string Example: 192.168.0.1 IP Address |
curl --request POST \ --url https://api.leaseweb.com/bareMetals/v2/privateRacks/2314213/ips/192.168.0.1/null \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "ip": "12.123.123.1/24",
- "gateway": "12.123.123.254",
- "floatingIp": false,
- "version": 4,
- "nullRouted": false,
- "reverseLookup": "domain.example.com",
- "mainIp": true,
- "networkType": "PUBLIC",
- "ddos": {
- "detectionProfile": "ADVANCED_LOW_UDP",
- "protectionType": "ADVANCED"
}
}
It might take a few minutes before the change is propagated across the network.
privateRackId required | string Example: 2314213 Id of the dedicated rack |
ip required | string Example: 192.168.0.1 IP Address |
curl --request POST \ --url https://api.leaseweb.com/bareMetals/v2/privateRacks/2314213/ips/192.168.0.1/unnull \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "ip": "12.123.123.1/24",
- "gateway": "12.123.123.254",
- "floatingIp": false,
- "version": 4,
- "nullRouted": false,
- "reverseLookup": "domain.example.com",
- "mainIp": true,
- "networkType": "PUBLIC",
- "ddos": {
- "detectionProfile": "ADVANCED_LOW_UDP",
- "protectionType": "ADVANCED"
}
}
privateRackId required | string Example: 2314213 Id of the dedicated rack |
limit | integer Default: 10 Limit the number of results returned |
offset | integer Default: 0 Return results starting from the given offset |
curl --request GET \ --url 'https://api.leaseweb.com/bareMetals/v2/privateRacks/2314213/credentials?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "_metadata": {
- "limit": 10,
- "offset": 0,
- "totalCount": 4
}, - "credentials": [
- {
- "type": "REMOTE_MANAGEMENT",
- "username": "admin"
}, - {
- "type": "REMOTE_MANAGEMENT",
- "username": "root"
}, - {
- "type": "OPERATING_SYSTEM",
- "username": "root"
}, - {
- "type": "OPERATING_SYSTEM",
- "username": "user"
}
]
}
privateRackId required | string Example: 2314213 Id of the dedicated rack |
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 |
password required | string The password for the credentials |
{- "type": "OPERATING_SYSTEM",
- "username": "root",
- "password": "my-secret-password"
}
{- "password": "mys3cr3tp@ssw0rd",
- "type": "OPERATING_SYSTEM",
- "username": "root"
}
type required | string |
privateRackId required | string Example: 2314213 Id of the dedicated rack |
limit | integer Default: 10 Limit the number of results returned |
offset | integer Default: 0 Return results starting from the given offset |
curl --request GET \ --url 'https://api.leaseweb.com/bareMetals/v2/privateRacks/2314213/credentials/%7Btype%7D?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "_metadata": {
- "limit": 10,
- "offset": 0,
- "totalCount": 1
}, - "credentials": [
- {
- "type": "OPERATING_SYSTEM",
- "username": "root"
}
]
}
privateRackId required | string Example: 2314213 Id of the dedicated rack |
username required | string |
type required | string |
curl --request GET \ --url https://api.leaseweb.com/bareMetals/v2/privateRacks/2314213/credentials/%7Btype%7D/%7Busername%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "password": "mys3cr3tp@ssw0rd",
- "type": "OPERATING_SYSTEM",
- "username": "root"
}
This action is purely administrative and will only update the password associated with this resource in our database.
privateRackId required | string Example: 2314213 Id of the dedicated rack |
username required | string |
type required | string |
password required | string The password for the credentials |
{- "password": "Y5TurbBQtP5OzvduSH6g"
}
{- "password": "mys3cr3tp@ssw0rd",
- "type": "OPERATING_SYSTEM",
- "username": "root"
}
This action is purely administrative and will only remove the username and password associated with this resource from our database.
privateRackId required | string Example: 2314213 Id of the dedicated rack |
username required | string |
type required | string |
curl --request DELETE \ --url https://api.leaseweb.com/bareMetals/v2/privateRacks/2314213/credentials/%7Btype%7D/%7Busername%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "errorCode": "ACCESS_DENIED",
- "errorMessage": "The access token is expired or invalid."
}
At this moment only bandwidth information for the public interface is supported.
privateRackId required | string Example: 2314213 Id of the dedicated rack |
from | date Start of date interval in ISO-8601 format The returned data will include everything up from - and including - the specified date time. |
to | date 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 | string Value: "SUM" Aggregate each metric using the given aggregation function. |
curl --request GET \ --url 'https://api.leaseweb.com/bareMetals/v2/privateRacks/2314213/metrics/datatraffic?from=SOME_DATE_VALUE&to=SOME_DATE_VALUE&granularity=SOME_STRING_VALUE&aggregation=SOME_STRING_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "_metadata": {
- "from": "2016-10-20T00:00:00Z",
- "to": "2016-10-22T00:00:00Z",
- "granularity": "DAY",
- "aggregation": "SUM"
}, - "metrics": {
- "UP_PUBLIC": {
- "unit": "B",
- "values": [
- {
- "timestamp": "2016-10-20T00:00:00Z",
- "value": 43212393
}, - {
- "timestamp": "2016-10-21T00:00:00Z",
- "value": 12342929
}
]
}, - "DOWN_PUBLIC": {
- "unit": "B",
- "values": [
- {
- "timestamp": "2016-10-20T00:00:00Z",
- "value": 202499
}, - {
- "timestamp": "2016-10-21T00:00:00Z",
- "value": 29900
}
]
}
}
}
At this moment only bandwidth information for the public interface is supported.
privateRackId required | string Example: 2314213 Id of the dedicated rack |
from | date Start of date interval in ISO-8601 format The returned data will include everything up from - and including - the specified date time. |
to | date 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 | 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/privateRacks/2314213/metrics/bandwidth?from=SOME_DATE_VALUE&to=SOME_DATE_VALUE&granularity=SOME_STRING_VALUE&aggregation=SOME_STRING_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "_metadata": {
- "from": "2016-10-20T09:00:00Z",
- "to": "2016-10-20T11:00:00Z",
- "granularity": "HOUR",
- "aggregation": "AVG"
}, - "metrics": {
- "UP_PUBLIC": {
- "unit": "bps",
- "values": [
- {
- "timestamp": "2016-10-20T09:00:00Z",
- "value": 43212393
}, - {
- "timestamp": "2016-10-20T10:00:00Z",
- "value": 12342929
}
]
}, - "DOWN_PUBLIC": {
- "unit": "bps",
- "values": [
- {
- "timestamp": "2016-10-20T09:00:00Z",
- "value": 202499
}, - {
- "timestamp": "2016-10-20T10:00:00Z",
- "value": 29900
}
]
}
}
}
privateRackId required | string Example: 2314213 Id of the dedicated rack |
curl --request GET \ --url https://api.leaseweb.com/bareMetals/v2/privateRacks/2314213/notificationSettings/ddos \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "nulling": "ENABLED",
- "scrubbing": "DISABLED"
}
To configure DDoS notification for this resource, send a PUT request. On
success the response will be a HTTP 204 No Content
.
Notifications will be sent to all technical contact email addresses of the customer.
privateRackId required | string Example: 2314213 Id of the dedicated rack |
scrubbing required | string Enum: "ENABLED" "DISABLED" Enable or disable email notifications for nulling events |
nulling required | string Enum: "ENABLED" "DISABLED" Enable or disable email notifications for nulling events |
{- "scrubbing": "ENABLED",
- "nulling": "DISABLED"
}
{- "correlationId": "945bef2e-1caf-4027-bd0a-8976848f3dee",
- "errorCode": 400,
- "errorDetails": { },
- "errorMessage": "Validation Failed"
}
privateRackId required | string Example: 2314213 Id of the dedicated rack |
limit | integer Default: 10 Limit the number of results returned |
offset | integer Default: 0 Return results starting from the given offset |
curl --request GET \ --url 'https://api.leaseweb.com/bareMetals/v2/privateRacks/2314213/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"
}
]
}
privateRackId required | string Example: 2314213 Id of the dedicated rack |
frequency required | string Enum: "DAILY" "WEEKLY" "MONTHLY" Frequency for the Bandwidth Notification |
unit required | string Enum: "Gbps" "Mbps" Unit for the Bandwidth Notification |
threshold required | string Threshold Value for the Bandwidth Notification |
{- "frequency": "DAILY",
- "unit": "Gbps",
- "threshold": "1"
}
{- "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"
}
Retrieve a single Bandwidth Notification that is associated with the given resource.
A Bandwidth Notification can be updated and deleted.
notificationId required | string |
privateRackId required | string Example: 2314213 Id of the dedicated rack |
limit | integer Default: 10 Limit the number of results returned |
offset | integer Default: 0 Return results starting from the given offset |
curl --request GET \ --url 'https://api.leaseweb.com/bareMetals/v2/privateRacks/2314213/notificationSettings/bandwidth/%7BnotificationId%7D?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \ --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"
}
notificationId required | string |
privateRackId required | string Example: 2314213 Id of the dedicated rack |
frequency required | string Enum: "DAILY" "WEEKLY" "MONTHLY" Frequency for the Bandwidth Notification |
unit required | string Enum: "Gbps" "Mbps" Unit for the Bandwidth Notification |
threshold required | string Threshold Value for the Bandwidth Notification |
{- "frequency": "DAILY",
- "unit": "Gbps",
- "threshold": "1"
}
{- "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"
}
notificationId required | string |
privateRackId required | string Example: 2314213 Id of the dedicated rack |
curl --request DELETE \ --url https://api.leaseweb.com/bareMetals/v2/privateRacks/2314213/notificationSettings/bandwidth/%7BnotificationId%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "errorCode": "ACCESS_DENIED",
- "errorMessage": "The access token is expired or invalid."
}
privateRackId required | string Example: 2314213 Id of the dedicated rack |
limit | integer Default: 10 Limit the number of results returned |
offset | integer Default: 0 Return results starting from the given offset |
curl --request GET \ --url 'https://api.leaseweb.com/bareMetals/v2/privateRacks/2314213/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": [
- {
- "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": "MB"
}, - {
- "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": "GB"
}
]
}
privateRackId required | string Example: 2314213 Id of the dedicated rack |
frequency required | string Enum: "DAILY" "WEEKLY" "MONTHLY" Frequency for the Datatraffic Notification |
unit required | string Enum: "MB" "GB" "TB" Unit for the Datatraffic Notification |
threshold required | string Threshold Value for the Datatraffic Notification |
{- "frequency": "DAILY",
- "unit": "MB",
- "threshold": "1"
}
{- "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"
}
notificationId required | string |
privateRackId required | string Example: 2314213 Id of the dedicated rack |
limit | integer Default: 10 Limit the number of results returned |
offset | integer Default: 0 Return results starting from the given offset |
curl --request GET \ --url 'https://api.leaseweb.com/bareMetals/v2/privateRacks/2314213/notificationSettings/datatraffic/%7BnotificationId%7D?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \ --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"
}
notificationId required | string |
privateRackId required | string Example: 2314213 Id of the dedicated rack |
frequency required | string Enum: "DAILY" "WEEKLY" "MONTHLY" Frequency for the Datatraffic Notification |
unit required | string Enum: "MB" "GB" "TB" Unit for the Datatraffic Notification |
threshold required | string Threshold Value for the Datatraffic Notification |
{- "frequency": "DAILY",
- "unit": "GB",
- "threshold": "1"
}
{- "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"
}
notificationId required | string |
privateRackId required | string Example: 2314213 Id of the dedicated rack |
curl --request DELETE \ --url https://api.leaseweb.com/bareMetals/v2/privateRacks/2314213/notificationSettings/datatraffic/%7BnotificationId%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "errorCode": "ACCESS_DENIED",
- "errorMessage": "The access token is expired or invalid."
}