Developer API
This API provides ways to manage the Leaseweb infrastructure.
The Leaseweb API offers comprehensive tools to effectively manage and interact with the Leaseweb infrastructure. It enables users to automate infrastructure-related tasks, such as provisioning, monitoring, and scaling resources. With its robust functionality, this API simplifies infrastructure management, enhances operational efficiency, and supports seamless integration into your existing workflows.
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.
BETA
Leaseweb Public Cloud is a cloud computing service that provides virtualized infrastructure, allowing businesses and developers to deploy and manage cloud-based resources efficiently. It is designed to offer scalability, flexibility, and high performance at a competitive price.List regions
Authorizations:
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/regions?limit=20&offset=10' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "_metadata": {
- "totalCount": 7,
- "limit": 20,
- "offset": 0
}, - "regions": [
- {
- "name": "eu-west-3",
- "location": "Amsterdam"
}, - {
- "name": "eu-central-1",
- "location": "Frankfurt"
}, - {
- "name": "eu-west-2",
- "location": "London"
}, - {
- "name": "ap-southeast-1",
- "location": "Singapore"
}, - {
- "name": "ca-central-1",
- "location": "Montreal"
}, - {
- "name": "us-east-1",
- "location": "Washington"
}, - {
- "name": "us-west-1",
- "location": "San Francisco"
}
]
}
List instance types
Get instance types
Authorizations:
query Parameters
region required | string (regionName) Enum: "eu-west-3" "us-east-1" "eu-central-1" "ap-southeast-1" "us-west-1" "eu-west-2" "ca-central-1" "ap-northeast-1" Example: region=eu-west-3 region name |
limit | integer >= 0 Default: 50 |
offset | integer >= 0 Default: 0 |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/instanceTypes?region=eu-west-3&limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "instanceTypes": [
- {
- "name": "lsw.c3.large",
- "resources": {
- "cpu": {
- "value": 2,
- "unit": "vCPU"
}, - "memory": {
- "value": 3,
- "unit": "GiB"
}, - "publicNetworkSpeed": {
- "value": 1,
- "unit": "Gbps"
}, - "privateNetworkSpeed": {
- "value": 100,
- "unit": "Mbps"
}
}, - "prices": {
- "currency": "EUR",
- "currencySymbol": "€",
- "compute": {
- "hourlyPrice": "0.0395",
- "monthlyPrice": "26.0200"
}, - "storage": {
- "local": {
- "hourlyPrice": "0.00004",
- "monthlyPrice": "0.03000"
}, - "central": {
- "hourlyPrice": "0.00011",
- "monthlyPrice": "0.08000"
}
}
}, - "storageTypes": [
- "CENTRAL"
]
}, - {
- "name": "lsw.c3.xlarge",
- "resources": {
- "cpu": {
- "value": 4,
- "unit": "vCPU"
}, - "memory": {
- "value": 7,
- "unit": "GiB"
}, - "publicNetworkSpeed": {
- "value": 1,
- "unit": "Gbps"
}, - "privateNetworkSpeed": {
- "value": 100,
- "unit": "Mbps"
}
}, - "prices": {
- "currency": "EUR",
- "currencySymbol": "€",
- "compute": {
- "hourlyPrice": "0.0798",
- "monthlyPrice": "52.5000"
}, - "storage": {
- "local": {
- "hourlyPrice": "0.00004",
- "monthlyPrice": "0.03000"
}, - "central": {
- "hourlyPrice": "0.00011",
- "monthlyPrice": "0.08000"
}
}
}, - "storageTypes": [
- "CENTRAL"
]
}, - {
- "name": "lsw.c3.2xlarge",
- "resources": {
- "cpu": {
- "value": 8,
- "unit": "vCPU"
}, - "memory": {
- "value": 15,
- "unit": "GiB"
}, - "publicNetworkSpeed": {
- "value": 1,
- "unit": "Gbps"
}, - "privateNetworkSpeed": {
- "value": 100,
- "unit": "Mbps"
}
}, - "prices": {
- "currency": "EUR",
- "currencySymbol": "€",
- "compute": {
- "hourlyPrice": "0.1604",
- "monthlyPrice": "105.4500"
}, - "storage": {
- "local": {
- "hourlyPrice": "0.00004",
- "monthlyPrice": "0.03000"
}, - "central": {
- "hourlyPrice": "0.00011",
- "monthlyPrice": "0.08000"
}
}
}, - "storageTypes": [
- "CENTRAL"
]
}, - {
- "name": "lsw.c3.4xlarge",
- "resources": {
- "cpu": {
- "value": 16,
- "unit": "vCPU"
}, - "memory": {
- "value": 30,
- "unit": "GiB"
}, - "publicNetworkSpeed": {
- "value": 1,
- "unit": "Gbps"
}, - "privateNetworkSpeed": {
- "value": 100,
- "unit": "Mbps"
}
}, - "prices": {
- "currency": "EUR",
- "currencySymbol": "€",
- "compute": {
- "hourlyPrice": "0.3203",
- "monthlyPrice": "210.5100"
}, - "storage": {
- "local": {
- "hourlyPrice": "0.00004",
- "monthlyPrice": "0.03000"
}, - "central": {
- "hourlyPrice": "0.00011",
- "monthlyPrice": "0.08000"
}
}
}, - "storageTypes": [
- "CENTRAL"
]
}, - {
- "name": "lsw.m3.large",
- "resources": {
- "cpu": {
- "value": 2,
- "unit": "vCPU"
}, - "memory": {
- "value": 7,
- "unit": "GiB"
}, - "publicNetworkSpeed": {
- "value": 1,
- "unit": "Gbps"
}, - "privateNetworkSpeed": {
- "value": 100,
- "unit": "Mbps"
}
}, - "prices": {
- "currency": "EUR",
- "currencySymbol": "€",
- "compute": {
- "hourlyPrice": "0.0447",
- "monthlyPrice": "29.4400"
}, - "storage": {
- "local": {
- "hourlyPrice": "0.00004",
- "monthlyPrice": "0.03000"
}, - "central": {
- "hourlyPrice": "0.00011",
- "monthlyPrice": "0.08000"
}
}
}, - "storageTypes": [
- "CENTRAL"
]
}, - {
- "name": "lsw.m3.xlarge",
- "resources": {
- "cpu": {
- "value": 4,
- "unit": "vCPU"
}, - "memory": {
- "value": 15,
- "unit": "GiB"
}, - "publicNetworkSpeed": {
- "value": 1,
- "unit": "Gbps"
}, - "privateNetworkSpeed": {
- "value": 100,
- "unit": "Mbps"
}
}, - "prices": {
- "currency": "EUR",
- "currencySymbol": "€",
- "compute": {
- "hourlyPrice": "0.0902",
- "monthlyPrice": "59.3300"
}, - "storage": {
- "local": {
- "hourlyPrice": "0.00004",
- "monthlyPrice": "0.03000"
}, - "central": {
- "hourlyPrice": "0.00011",
- "monthlyPrice": "0.08000"
}
}
}, - "storageTypes": [
- "CENTRAL"
]
}, - {
- "name": "lsw.m3.2xlarge",
- "resources": {
- "cpu": {
- "value": 8,
- "unit": "vCPU"
}, - "memory": {
- "value": 30,
- "unit": "GiB"
}, - "publicNetworkSpeed": {
- "value": 1,
- "unit": "Gbps"
}, - "privateNetworkSpeed": {
- "value": 100,
- "unit": "Mbps"
}
}, - "prices": {
- "currency": "EUR",
- "currencySymbol": "€",
- "compute": {
- "hourlyPrice": "0.1799",
- "monthlyPrice": "118.2700"
}, - "storage": {
- "local": {
- "hourlyPrice": "0.00004",
- "monthlyPrice": "0.03000"
}, - "central": {
- "hourlyPrice": "0.00011",
- "monthlyPrice": "0.08000"
}
}
}, - "storageTypes": [
- "CENTRAL"
]
}, - {
- "name": "lsw.r3.large",
- "resources": {
- "cpu": {
- "value": 2,
- "unit": "vCPU"
}, - "memory": {
- "value": 15.25,
- "unit": "GiB"
}, - "publicNetworkSpeed": {
- "value": 1,
- "unit": "Gbps"
}, - "privateNetworkSpeed": {
- "value": 100,
- "unit": "Mbps"
}
}, - "prices": {
- "currency": "EUR",
- "currencySymbol": "€",
- "compute": {
- "hourlyPrice": "0.0555",
- "monthlyPrice": "36.4900"
}, - "storage": {
- "local": {
- "hourlyPrice": "0.00004",
- "monthlyPrice": "0.03000"
}, - "central": {
- "hourlyPrice": "0.00011",
- "monthlyPrice": "0.08000"
}
}
}, - "storageTypes": [
- "CENTRAL"
]
}, - {
- "name": "lsw.r3.xlarge",
- "resources": {
- "cpu": {
- "value": 4,
- "unit": "vCPU"
}, - "memory": {
- "value": 30.5,
- "unit": "GiB"
}, - "publicNetworkSpeed": {
- "value": 1,
- "unit": "Gbps"
}, - "privateNetworkSpeed": {
- "value": 100,
- "unit": "Mbps"
}
}, - "prices": {
- "currency": "EUR",
- "currencySymbol": "€",
- "compute": {
- "hourlyPrice": "0.1104",
- "monthlyPrice": "72.5700"
}, - "storage": {
- "local": {
- "hourlyPrice": "0.00004",
- "monthlyPrice": "0.03000"
}, - "central": {
- "hourlyPrice": "0.00011",
- "monthlyPrice": "0.08000"
}
}
}, - "storageTypes": [
- "CENTRAL"
]
}, - {
- "name": "lsw.r3.2xlarge",
- "resources": {
- "cpu": {
- "value": 8,
- "unit": "vCPU"
}, - "memory": {
- "value": 61,
- "unit": "GiB"
}, - "publicNetworkSpeed": {
- "value": 1,
- "unit": "Gbps"
}, - "privateNetworkSpeed": {
- "value": 100,
- "unit": "Mbps"
}
}, - "prices": {
- "currency": "EUR",
- "currencySymbol": "€",
- "compute": {
- "hourlyPrice": "0.2202",
- "monthlyPrice": "144.7400"
}, - "storage": {
- "local": {
- "hourlyPrice": "0.00004",
- "monthlyPrice": "0.03000"
}, - "central": {
- "hourlyPrice": "0.00011",
- "monthlyPrice": "0.08000"
}
}
}, - "storageTypes": [
- "CENTRAL"
]
}
], - "_metadata": {
- "totalCount": 10,
- "limit": 50,
- "offset": 0
}
}
Launch instance
Launch a Public Cloud instance.
Available regions can be obtained using /v1/regions
.
Available Images can be obtained using /v1/images
.
Available instance types for your region can be obtained using /v1/instanceTypes
.
Authorizations:
Request Body schema: application/jsonrequired
region required | string (regionName) Enum: "eu-west-3" "us-east-1" "eu-central-1" "ap-southeast-1" "us-west-1" "eu-west-2" "ca-central-1" "ap-northeast-1" region name |
type required | string (typeName) Enum: "lsw.m3.large" "lsw.m3.xlarge" "lsw.m3.2xlarge" "lsw.m4.large" "lsw.m4.xlarge" "lsw.m4.2xlarge" "lsw.m4.4xlarge" "lsw.m5.large" "lsw.m5.xlarge" "lsw.m5.2xlarge" "lsw.m5.4xlarge" "lsw.m5a.large" "lsw.m5a.xlarge" "lsw.m5a.2xlarge" "lsw.m5a.4xlarge" "lsw.m5a.8xlarge" "lsw.m5a.12xlarge" "lsw.m6a.large" "lsw.m6a.xlarge" "lsw.m6a.2xlarge" "lsw.m6a.4xlarge" "lsw.m6a.8xlarge" "lsw.m6a.12xlarge" "lsw.m6a.16xlarge" "lsw.m6a.24xlarge" "lsw.c3.large" "lsw.c3.xlarge" "lsw.c3.2xlarge" "lsw.c3.4xlarge" "lsw.c4.large" "lsw.c4.xlarge" "lsw.c4.2xlarge" "lsw.c4.4xlarge" "lsw.c5.large" "lsw.c5.xlarge" "lsw.c5.2xlarge" "lsw.c5.4xlarge" "lsw.c5a.large" "lsw.c5a.xlarge" "lsw.c5a.2xlarge" "lsw.c5a.4xlarge" "lsw.c5a.9xlarge" "lsw.c5a.12xlarge" "lsw.c6a.large" "lsw.c6a.xlarge" "lsw.c6a.2xlarge" "lsw.c6a.4xlarge" "lsw.c6a.8xlarge" "lsw.c6a.12xlarge" "lsw.c6a.16xlarge" "lsw.c6a.24xlarge" "lsw.r3.large" "lsw.r3.xlarge" "lsw.r3.2xlarge" "lsw.r4.large" "lsw.r4.xlarge" "lsw.r4.2xlarge" "lsw.r5.large" "lsw.r5.xlarge" "lsw.r5.2xlarge" "lsw.r5a.large" "lsw.r5a.xlarge" "lsw.r5a.2xlarge" "lsw.r5a.4xlarge" "lsw.r5a.8xlarge" "lsw.r5a.12xlarge" "lsw.r6a.large" "lsw.r6a.xlarge" "lsw.r6a.2xlarge" "lsw.r6a.4xlarge" "lsw.r6a.8xlarge" "lsw.r6a.12xlarge" "lsw.r6a.16xlarge" "lsw.r6a.24xlarge" Instance/Load balancer type |
imageId required | string (imageId) imageId can be either an Operating System or a UUID in case of a Custom Image |
marketAppId | string Market App ID that must be installed into the instance |
reference | string An identifying name you can refer to the instance |
contractType required | string (contractType) Enum: "HOURLY" "MONTHLY" Select HOURLY for billing based on hourly usage, else MONTHLY for billing per month usage |
contractTerm required | integer (contractTerm) Enum: 0 1 3 6 12 Contract commitment. Used only when contract type is MONTHLY |
billingFrequency required | integer (billingFrequency) Enum: 1 3 6 12 The billing frequency (in months) of the instance. |
rootDiskSize | integer (rootDiskSize) [ 5 .. 1000 ] The root disk's size in GB. Must be at least 5 GB for Linux and FreeBSD instances and 50 GB for Windows instances |
rootDiskStorageType required | string (storageType) Enum: "LOCAL" "CENTRAL" Storage type |
sshKey | string Public SSH key to be installed into the instance. Must be used only on Linux/FreeBSD instances |
userData | string User data to be installed into the instance. Please note that this setting cannot be used in combination with the 'sshKey' setting. Send the user data as plain text, not encoded as base64. |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "billingFrequency": 1,
- "contractTerm": 0,
- "contractType": "HOURLY",
- "imageId": "UBUNTU_20_04_64BIT",
- "reference": "my-webserver",
- "region": "eu-west-3",
- "rootDiskSize": 50,
- "rootDiskStorageType": "CENTRAL",
- "type": "lsw.m3.large",
- "userData": "#cloud-config\n# vim: syntax=yaml\n#\n# This is the configuration syntax that the write_files module\n# will know how to understand. Encoding can be given b64 or gzip or (gz+b64).\n# The content will be decoded accordingly and then written to the path that is\n# provided. \n#\n# Note: Content strings here are truncated for example purposes.\nwrite_files:\n- encoding: b64\n content: TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQsIGNvbnNlY3Rll1cyBtYXhpbXVzLg==\n owner: root:root\n path: /tmp/3.txt\n permissions: '0644'\n"
}
Response samples
- 201
- 400
- 401
- 403
- 500
- 503
{- "autoScalingGroup": null,
- "contract": {
- "billingFrequency": 1,
- "term": 0,
- "type": "HOURLY",
- "endsAt": null,
- "renewalsAt": "2024-04-09T15:28:28+00:00",
- "createdAt": "2024-04-09T15:11:21+00:00",
- "state": "ACTIVE"
}, - "hasPrivateNetwork": false,
- "hasPublicIpV4": true,
- "hasUserData": true,
- "id": "ace712e9-a166-47f1-9065-4af0f7e7fce1",
- "image": {
- "id": "UBUNTU_20_04_64BIT",
- "name": "Ubuntu 20.04 LTS (x86_64)",
- "family": "linux",
- "flavour": "ubuntu",
- "custom": false
}, - "ips": [
- {
- "ip": "10.32.60.12",
- "prefixLength": "27",
- "version": 4,
- "nullRouted": false,
- "reverseLookup": null,
- "mainIp": false,
- "networkType": "INTERNAL"
}
], - "marketAppId": null,
- "productType": "INSTANCE",
- "reference": "my webserver",
- "region": "eu-west-3",
- "resources": {
- "cpu": {
- "value": 2,
- "unit": "vCPU"
}, - "memory": {
- "value": 7,
- "unit": "GiB"
}, - "publicNetworkSpeed": {
- "value": 1,
- "unit": "Gbps"
}, - "privateNetworkSpeed": {
- "value": 100,
- "unit": "Mbps"
}
}, - "rootDiskSize": 5,
- "rootDiskStorageType": "CENTRAL",
- "startedAt": null,
- "state": "RUNNING",
- "type": "lsw.m3.large"
}
Get instance list
List and filter instances
Authorizations:
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
ip | string <ip> Example: ip=10.0.0.1 |
reference | string Example: reference=my-webserver |
id | string <uuid> Example: id=a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11 |
contractType | string Enum: "HOURLY" "MONTHLY" Select HOURLY for billing based on hourly usage, else MONTHLY for billing per month usage |
contractState | string Enum: "ACTIVE" "DELETE_SCHEDULED" |
imageId | string (imageId) Example: imageId=UBUNTU_22_04_64BIT Available Images can be obtained using |
state | string Enum: "CREATING" "DESTROYED" "DESTROYING" "FAILED" "RUNNING" "STARTING" "STOPPED" "STOPPING" "UNKNOWN" The instance's current state(s), separated by commas. |
region | string (regionName) Enum: "eu-west-3" "us-east-1" "eu-central-1" "ap-southeast-1" "us-west-1" "eu-west-2" "ca-central-1" "ap-northeast-1" Example: region=eu-west-3 Available regions can be obtained using |
type | string (typeName) Enum: "lsw.m3.large" "lsw.m3.xlarge" "lsw.m3.2xlarge" "lsw.m4.large" "lsw.m4.xlarge" "lsw.m4.2xlarge" "lsw.m4.4xlarge" "lsw.m5.large" "lsw.m5.xlarge" "lsw.m5.2xlarge" "lsw.m5.4xlarge" "lsw.m5a.large" "lsw.m5a.xlarge" "lsw.m5a.2xlarge" "lsw.m5a.4xlarge" "lsw.m5a.8xlarge" "lsw.m5a.12xlarge" "lsw.m6a.large" "lsw.m6a.xlarge" "lsw.m6a.2xlarge" "lsw.m6a.4xlarge" "lsw.m6a.8xlarge" "lsw.m6a.12xlarge" "lsw.m6a.16xlarge" "lsw.m6a.24xlarge" "lsw.c3.large" "lsw.c3.xlarge" "lsw.c3.2xlarge" "lsw.c3.4xlarge" "lsw.c4.large" "lsw.c4.xlarge" "lsw.c4.2xlarge" "lsw.c4.4xlarge" "lsw.c5.large" "lsw.c5.xlarge" "lsw.c5.2xlarge" "lsw.c5.4xlarge" "lsw.c5a.large" "lsw.c5a.xlarge" "lsw.c5a.2xlarge" "lsw.c5a.4xlarge" "lsw.c5a.9xlarge" "lsw.c5a.12xlarge" "lsw.c6a.large" "lsw.c6a.xlarge" "lsw.c6a.2xlarge" "lsw.c6a.4xlarge" "lsw.c6a.8xlarge" "lsw.c6a.12xlarge" "lsw.c6a.16xlarge" "lsw.c6a.24xlarge" "lsw.r3.large" "lsw.r3.xlarge" "lsw.r3.2xlarge" "lsw.r4.large" "lsw.r4.xlarge" "lsw.r4.2xlarge" "lsw.r5.large" "lsw.r5.xlarge" "lsw.r5.2xlarge" "lsw.r5a.large" "lsw.r5a.xlarge" "lsw.r5a.2xlarge" "lsw.r5a.4xlarge" "lsw.r5a.8xlarge" "lsw.r5a.12xlarge" "lsw.r6a.large" "lsw.r6a.xlarge" "lsw.r6a.2xlarge" "lsw.r6a.4xlarge" "lsw.r6a.8xlarge" "lsw.r6a.12xlarge" "lsw.r6a.16xlarge" "lsw.r6a.24xlarge" Example: type=lsw.c3.xlarge Available instance types for your region can be obtained using |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/instances?limit=20&offset=10&ip=10.0.0.1&reference=my-webserver&id=a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11&contractType=SOME_STRING_VALUE&contractState=SOME_STRING_VALUE&imageId=UBUNTU_22_04_64BIT&state=SOME_STRING_VALUE®ion=eu-west-3&type=lsw.c3.xlarge' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "_metadata": {
- "totalCount": 4,
- "limit": 20,
- "offset": 0
}, - "instances": [
- {
- "marketAppId": null,
- "productType": "INSTANCE",
- "autoScalingGroup": {
- "cooldownTime": null,
- "cpuThreshold": null,
- "createdAt": "2024-04-26T09:22:25+00:00",
- "desiredAmount": 2,
- "endsAt": null,
- "id": "fb769dab-3daa-47e4-89ed-06a4b6499176",
- "maximumAmount": null,
- "minimumAmount": null,
- "reference": "Manual Auto Scaling Group",
- "region": "eu-west-3",
- "startsAt": null,
- "state": "ACTIVE",
- "type": "MANUAL",
- "updatedAt": "2024-04-26T09:22:25+00:00",
- "warmupTime": null
}, - "id": "ace712e9-a166-47f1-9065-4af0f7e7fce1",
- "type": "lsw.m3.large",
- "resources": {
- "cpu": {
- "value": 16,
- "unit": "vCPU"
}, - "memory": {
- "value": 30,
- "unit": "GiB"
}, - "publicNetworkSpeed": {
- "value": 1,
- "unit": "Gbps"
}, - "privateNetworkSpeed": {
- "value": 100,
- "unit": "Mbps"
}
}, - "region": "eu-west-3",
- "reference": "my webserver",
- "image": {
- "id": "UBUNTU_22_04_64BIT",
- "name": "Ubuntu 22.04 LTS (x86_64)",
- "family": "linux",
- "flavour": "ubuntu",
- "custom": false
}, - "state": "STOPPED",
- "hasPublicIpV4": true,
- "hasPrivateNetwork": false,
- "hasUserData": false,
- "rootDiskStorageType": "CENTRAL",
- "rootDiskSize": 10,
- "ips": [
- {
- "ip": "10.32.60.12",
- "prefixLength": "32",
- "version": 4,
- "nullRouted": false,
- "reverseLookup": null,
- "mainIp": false,
- "networkType": "INTERNAL"
}
], - "startedAt": "2024-04-09T15:11:37+00:00",
- "contract": {
- "billingFrequency": 1,
- "term": 0,
- "type": "HOURLY",
- "endsAt": null,
- "renewalsAt": "2024-04-09T15:28:28+00:00",
- "createdAt": "2024-04-09T15:11:21+00:00",
- "state": "ACTIVE"
}
}, - {
- "marketAppId": null,
- "productType": "INSTANCE",
- "autoScalingGroup": {
- "cooldownTime": null,
- "cpuThreshold": null,
- "createdAt": "2024-04-26T09:22:25+00:00",
- "desiredAmount": 2,
- "endsAt": null,
- "id": "fb769dab-3daa-47e4-89ed-06a4b6499176",
- "maximumAmount": null,
- "minimumAmount": null,
- "reference": "Manual Auto Scaling Group",
- "region": "eu-west-3",
- "startsAt": null,
- "state": "ACTIVE",
- "type": "MANUAL",
- "updatedAt": "2024-04-26T09:22:25+00:00",
- "warmupTime": null
}, - "id": "f28ba2af-7508-4594-a63a-aa663db4fb3e",
- "type": "lsw.m3.large",
- "resources": {
- "cpu": {
- "value": 16,
- "unit": "vCPU"
}, - "memory": {
- "value": 30,
- "unit": "GiB"
}, - "publicNetworkSpeed": {
- "value": 1,
- "unit": "Gbps"
}, - "privateNetworkSpeed": {
- "value": 100,
- "unit": "Mbps"
}
}, - "region": "eu-west-3",
- "reference": "my webserver",
- "image": {
- "id": "UBUNTU_22_04_64BIT",
- "name": "Ubuntu 22.04 LTS (x86_64)",
- "family": "linux",
- "flavour": "ubuntu",
- "custom": false
}, - "state": "RUNNING",
- "hasPublicIpV4": true,
- "hasPrivateNetwork": false,
- "hasUserData": false,
- "rootDiskStorageType": "CENTRAL",
- "rootDiskSize": 10,
- "ips": [
- {
- "ip": "10.32.60.12",
- "prefixLength": "32",
- "version": 4,
- "nullRouted": false,
- "reverseLookup": null,
- "mainIp": false,
- "networkType": "INTERNAL"
}
], - "startedAt": "2024-04-09T15:11:37+00:00",
- "contract": {
- "billingFrequency": 1,
- "term": 0,
- "type": "HOURLY",
- "endsAt": null,
- "renewalsAt": "2024-04-09T15:28:28+00:00",
- "createdAt": "2024-04-09T15:11:21+00:00",
- "state": "ACTIVE"
}
}, - {
- "marketAppId": null,
- "productType": "INSTANCE",
- "autoScalingGroup": {
- "cooldownTime": null,
- "cpuThreshold": null,
- "createdAt": "2024-04-26T09:22:25+00:00",
- "desiredAmount": 2,
- "endsAt": null,
- "id": "fb769dab-3daa-47e4-89ed-06a4b6499176",
- "maximumAmount": null,
- "minimumAmount": null,
- "reference": "Manual Auto Scaling Group",
- "region": "eu-west-3",
- "startsAt": null,
- "state": "ACTIVE",
- "type": "MANUAL",
- "updatedAt": "2024-04-26T09:22:25+00:00",
- "warmupTime": null
}, - "id": "6871686d-36c4-44f5-b692-a548e62dcf25",
- "type": "lsw.m3.large",
- "resources": {
- "cpu": {
- "value": 16,
- "unit": "vCPU"
}, - "memory": {
- "value": 30,
- "unit": "GiB"
}, - "publicNetworkSpeed": {
- "value": 1,
- "unit": "Gbps"
}, - "privateNetworkSpeed": {
- "value": 100,
- "unit": "Mbps"
}
}, - "region": "eu-west-3",
- "reference": "my webserver",
- "image": {
- "id": "UBUNTU_22_04_64BIT",
- "name": "Ubuntu 22.04 LTS (x86_64)",
- "family": "linux",
- "flavour": "ubuntu",
- "custom": false
}, - "state": "STOPPED",
- "hasPublicIpV4": true,
- "hasPrivateNetwork": false,
- "hasUserData": false,
- "rootDiskStorageType": "CENTRAL",
- "rootDiskSize": 101,
- "ips": [
- {
- "ip": "10.32.60.12",
- "prefixLength": "32",
- "version": 4,
- "nullRouted": false,
- "reverseLookup": null,
- "mainIp": false,
- "networkType": "INTERNAL"
}
], - "startedAt": "2024-04-09T15:11:37+00:00",
- "contract": {
- "billingFrequency": 1,
- "term": 0,
- "type": "HOURLY",
- "endsAt": null,
- "renewalsAt": "2024-04-09T15:28:28+00:00",
- "createdAt": "2024-04-09T15:11:21+00:00",
- "state": "ACTIVE"
}
}, - {
- "marketAppId": null,
- "productType": "INSTANCE",
- "autoScalingGroup": {
- "cooldownTime": null,
- "cpuThreshold": null,
- "createdAt": "2024-04-26T09:22:25+00:00",
- "desiredAmount": 2,
- "endsAt": null,
- "id": "fb769dab-3daa-47e4-89ed-06a4b6499176",
- "maximumAmount": null,
- "minimumAmount": null,
- "reference": "Manual Auto Scaling Group",
- "region": "eu-west-3",
- "startsAt": null,
- "state": "ACTIVE",
- "type": "MANUAL",
- "updatedAt": "2024-04-26T09:22:25+00:00",
- "warmupTime": null
}, - "id": "9c095e3a-e9e3-403b-8d1b-37bb21b5598e",
- "type": "lsw.m3.large",
- "resources": {
- "cpu": {
- "value": 16,
- "unit": "vCPU"
}, - "memory": {
- "value": 30,
- "unit": "GiB"
}, - "publicNetworkSpeed": {
- "value": 1,
- "unit": "Gbps"
}, - "privateNetworkSpeed": {
- "value": 100,
- "unit": "Mbps"
}
}, - "region": "eu-west-3",
- "reference": "my webserver",
- "image": {
- "id": "UBUNTU_22_04_64BIT",
- "name": "Ubuntu 22.04 LTS (x86_64)",
- "family": "linux",
- "flavour": "windows",
- "custom": false
}, - "state": "STOPPED",
- "hasPublicIpV4": true,
- "hasPrivateNetwork": false,
- "hasUserData": false,
- "rootDiskStorageType": "CENTRAL",
- "rootDiskSize": 10,
- "ips": [
- {
- "ip": "10.32.60.12",
- "prefixLength": "32",
- "version": 4,
- "nullRouted": false,
- "reverseLookup": null,
- "mainIp": false,
- "networkType": "INTERNAL"
}
], - "startedAt": "2024-04-09T15:11:37+00:00",
- "contract": {
- "billingFrequency": 1,
- "term": 0,
- "type": "HOURLY",
- "endsAt": null,
- "renewalsAt": "2024-04-09T15:28:28+00:00",
- "createdAt": "2024-04-09T15:11:21+00:00",
- "state": "ACTIVE"
}
}
]
}
Get instance details
Get details about the instance
Authorizations:
path Parameters
instanceId required | string <uuid> Example: ace712e9-a166-47f1-9065-4af0f7e7fce1 Instance's ID |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/instances/ace712e9-a166-47f1-9065-4af0f7e7fce1 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 404
- 500
- 503
{- "autoScalingGroup": null,
- "contract": {
- "billingFrequency": 1,
- "term": 0,
- "type": "HOURLY",
- "endsAt": null,
- "renewalsAt": "2024-04-09T15:28:28+00:00",
- "createdAt": "2024-04-09T15:11:21+00:00",
- "state": "ACTIVE"
}, - "hasPrivateNetwork": false,
- "hasPublicIpV4": true,
- "hasUserData": false,
- "id": "ace712e9-a166-47f1-9065-4af0f7e7fce1",
- "image": {
- "id": "UBUNTU_20_04_64BIT",
- "name": "Ubuntu 20.04 LTS (x86_64)",
- "family": "linux",
- "flavour": "ubuntu",
- "custom": false
}, - "ips": [
- {
- "ip": "10.32.60.12",
- "prefixLength": "27",
- "version": 4,
- "reverseLookup": null,
- "mainIp": false,
- "networkType": "INTERNAL",
- "nullRouted": false,
- "ddos": {
- "detectionProfile": "STANDARD_DEFAULT",
- "protectionType": "STANDARD"
}
}
], - "iso": {
- "id": "ACRONIS_BOOT_MEDIA",
- "name": "Acronis Boot Media"
}, - "marketAppId": null,
- "privateNetwork": null,
- "productType": "INSTANCE",
- "reference": "my webserver",
- "region": "eu-west-3",
- "resources": {
- "cpu": {
- "value": 1,
- "unit": "vCPU"
}, - "memory": {
- "value": 3,
- "unit": "GiB"
}, - "publicNetworkSpeed": {
- "value": 1,
- "unit": "Gbps"
}, - "privateNetworkSpeed": {
- "value": 100,
- "unit": "Mbps"
}
}, - "rootDiskSize": 5,
- "rootDiskStorageType": "CENTRAL",
- "startedAt": "2024-04-09T15:11:37+00:00",
- "state": "RUNNING",
- "type": "lsw.m3.large"
}
Terminate instance
Terminate Public Cloud instance
Authorizations:
path Parameters
instanceId required | string <uuid> Example: ace712e9-a166-47f1-9065-4af0f7e7fce1 Instance's ID |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request DELETE \ --url https://api.leaseweb.com/publicCloud/v1/instances/ace712e9-a166-47f1-9065-4af0f7e7fce1 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Update instance
Update the instance's reference, type, storage or contract type.
Eligible instance types for update can be obtained using /v1/instances/{instanceId}/instanceTypesUpdate
.
Authorizations:
path Parameters
instanceId required | string <uuid> Example: ace712e9-a166-47f1-9065-4af0f7e7fce1 Instance's ID |
Request Body schema: application/jsonrequired
type | string (typeName) Enum: "lsw.m3.large" "lsw.m3.xlarge" "lsw.m3.2xlarge" "lsw.m4.large" "lsw.m4.xlarge" "lsw.m4.2xlarge" "lsw.m4.4xlarge" "lsw.m5.large" "lsw.m5.xlarge" "lsw.m5.2xlarge" "lsw.m5.4xlarge" "lsw.m5a.large" "lsw.m5a.xlarge" "lsw.m5a.2xlarge" "lsw.m5a.4xlarge" "lsw.m5a.8xlarge" "lsw.m5a.12xlarge" "lsw.m6a.large" "lsw.m6a.xlarge" "lsw.m6a.2xlarge" "lsw.m6a.4xlarge" "lsw.m6a.8xlarge" "lsw.m6a.12xlarge" "lsw.m6a.16xlarge" "lsw.m6a.24xlarge" "lsw.c3.large" "lsw.c3.xlarge" "lsw.c3.2xlarge" "lsw.c3.4xlarge" "lsw.c4.large" "lsw.c4.xlarge" "lsw.c4.2xlarge" "lsw.c4.4xlarge" "lsw.c5.large" "lsw.c5.xlarge" "lsw.c5.2xlarge" "lsw.c5.4xlarge" "lsw.c5a.large" "lsw.c5a.xlarge" "lsw.c5a.2xlarge" "lsw.c5a.4xlarge" "lsw.c5a.9xlarge" "lsw.c5a.12xlarge" "lsw.c6a.large" "lsw.c6a.xlarge" "lsw.c6a.2xlarge" "lsw.c6a.4xlarge" "lsw.c6a.8xlarge" "lsw.c6a.12xlarge" "lsw.c6a.16xlarge" "lsw.c6a.24xlarge" "lsw.r3.large" "lsw.r3.xlarge" "lsw.r3.2xlarge" "lsw.r4.large" "lsw.r4.xlarge" "lsw.r4.2xlarge" "lsw.r5.large" "lsw.r5.xlarge" "lsw.r5.2xlarge" "lsw.r5a.large" "lsw.r5a.xlarge" "lsw.r5a.2xlarge" "lsw.r5a.4xlarge" "lsw.r5a.8xlarge" "lsw.r5a.12xlarge" "lsw.r6a.large" "lsw.r6a.xlarge" "lsw.r6a.2xlarge" "lsw.r6a.4xlarge" "lsw.r6a.8xlarge" "lsw.r6a.12xlarge" "lsw.r6a.16xlarge" "lsw.r6a.24xlarge" Instance/Load balancer type |
reference | string An identifying name you can refer to the instance |
contractType | string (contractType) Enum: "HOURLY" "MONTHLY" Select HOURLY for billing based on hourly usage, else MONTHLY for billing per month usage |
contractTerm | integer (contractTerm) Enum: 0 1 3 6 12 Contract commitment. Used only when contract type is MONTHLY |
billingFrequency | integer (billingFrequency) Enum: 1 3 6 12 The billing frequency (in months) of the instance. |
rootDiskSize | integer (rootDiskSize) [ 5 .. 1000 ] The root disk's size in GB. Must be at least 5 GB for Linux and FreeBSD instances and 50 GB for Windows instances |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "reference": "new-reference"
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "autoScalingGroup": null,
- "contract": {
- "billingFrequency": 1,
- "term": 0,
- "type": "HOURLY",
- "endsAt": null,
- "renewalsAt": "2024-04-09T15:28:28+00:00",
- "createdAt": "2024-04-09T15:11:21+00:00",
- "state": "ACTIVE"
}, - "hasPrivateNetwork": false,
- "hasPublicIpV4": true,
- "hasUserData": false,
- "id": "ace712e9-a166-47f1-9065-4af0f7e7fce1",
- "image": {
- "id": "UBUNTU_20_04_64BIT",
- "name": "Ubuntu 20.04 LTS (x86_64)",
- "family": "linux",
- "flavour": "ubuntu",
- "custom": false
}, - "ips": [
- {
- "ip": "10.32.60.12",
- "prefixLength": "27",
- "version": 4,
- "reverseLookup": null,
- "mainIp": false,
- "networkType": "INTERNAL",
- "nullRouted": false,
- "ddos": {
- "detectionProfile": "STANDARD_DEFAULT",
- "protectionType": "STANDARD"
}
}
], - "iso": {
- "id": "ACRONIS_BOOT_MEDIA",
- "name": "Acronis Boot Media"
}, - "marketAppId": null,
- "privateNetwork": null,
- "productType": "INSTANCE",
- "reference": "my webserver",
- "region": "eu-west-3",
- "resources": {
- "cpu": {
- "value": 1,
- "unit": "vCPU"
}, - "memory": {
- "value": 3,
- "unit": "GiB"
}, - "publicNetworkSpeed": {
- "value": 1,
- "unit": "Gbps"
}, - "privateNetworkSpeed": {
- "value": 100,
- "unit": "Mbps"
}
}, - "rootDiskSize": 5,
- "rootDiskStorageType": "CENTRAL",
- "startedAt": "2024-04-09T15:11:37+00:00",
- "state": "RUNNING",
- "type": "lsw.m3.large"
}
Cancel instance termination
Cancel the termination process of monthly instances. Must be executed prior to the instance's contractEndsAt
.
Authorizations:
path Parameters
instanceId required | string <uuid> Example: ace712e9-a166-47f1-9065-4af0f7e7fce1 Instance's ID |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request POST \ --url https://api.leaseweb.com/publicCloud/v1/instances/ace712e9-a166-47f1-9065-4af0f7e7fce1/cancelTermination \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Start a specific resource Instance
The Instance must be stopped before the execution
Authorizations:
path Parameters
instanceId required | string <uuid> Example: ace712e9-a166-47f1-9065-4af0f7e7fce1 Instance's ID |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request POST \ --url https://api.leaseweb.com/publicCloud/v1/instances/ace712e9-a166-47f1-9065-4af0f7e7fce1/start \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Start a specific resource Load Balancer
The Load Balancer must be stopped before the execution
Authorizations:
path Parameters
loadBalancerId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Load balancer ID |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request POST \ --url https://api.leaseweb.com/publicCloud/v1/loadBalancers/695ddd91-051f-4dd6-9120-938a927a47d0/start \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Stop a specific Instance
The Instance must be running before the execution
Authorizations:
path Parameters
instanceId required | string <uuid> Example: ace712e9-a166-47f1-9065-4af0f7e7fce1 Instance's ID |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request POST \ --url https://api.leaseweb.com/publicCloud/v1/instances/ace712e9-a166-47f1-9065-4af0f7e7fce1/stop \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Stop a specific Load Balancer
The Load Balancer must be running before the execution
Authorizations:
path Parameters
loadBalancerId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Load balancer ID |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request POST \ --url https://api.leaseweb.com/publicCloud/v1/loadBalancers/695ddd91-051f-4dd6-9120-938a927a47d0/stop \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Reboot a specific Instance
The Instance must be running before the execution
Authorizations:
path Parameters
instanceId required | string <uuid> Example: ace712e9-a166-47f1-9065-4af0f7e7fce1 Instance's ID |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request POST \ --url https://api.leaseweb.com/publicCloud/v1/instances/ace712e9-a166-47f1-9065-4af0f7e7fce1/reboot \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Reboot a specific Load Balancer
The Load Balancer must be running before the execution
Authorizations:
path Parameters
loadBalancerId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Load balancer ID |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request POST \ --url https://api.leaseweb.com/publicCloud/v1/loadBalancers/695ddd91-051f-4dd6-9120-938a927a47d0/reboot \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Get console access
Get console access to the instance
Authorizations:
path Parameters
instanceId required | string <uuid> Example: ace712e9-a166-47f1-9065-4af0f7e7fce1 Instance's ID |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/instances/ace712e9-a166-47f1-9065-4af0f7e7fce1/console \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
List available instance types for update
Get available instance types for update
Authorizations:
path Parameters
instanceId required | string <uuid> Example: ace712e9-a166-47f1-9065-4af0f7e7fce1 Instance's ID |
query Parameters
limit | integer >= 0 Default: 50 |
offset | integer >= 0 Default: 0 |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/instances/ace712e9-a166-47f1-9065-4af0f7e7fce1/instanceTypesUpdate?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 404
- 500
- 503
{- "instanceTypes": [
- {
- "name": "lsw.c3.large",
- "resources": {
- "cpu": {
- "value": 2,
- "unit": "vCPU"
}, - "memory": {
- "value": 3,
- "unit": "GiB"
}, - "publicNetworkSpeed": {
- "value": 1,
- "unit": "Gbps"
}, - "privateNetworkSpeed": {
- "value": 100,
- "unit": "Mbps"
}
}, - "prices": {
- "currency": "EUR",
- "currencySymbol": "€",
- "compute": {
- "hourlyPrice": "0.0395",
- "monthlyPrice": "26.0200"
}, - "storage": {
- "local": {
- "hourlyPrice": "0.00004",
- "monthlyPrice": "0.03000"
}, - "central": {
- "hourlyPrice": "0.00011",
- "monthlyPrice": "0.08000"
}
}
}, - "storageTypes": [
- "CENTRAL"
]
}, - {
- "name": "lsw.c3.xlarge",
- "resources": {
- "cpu": {
- "value": 4,
- "unit": "vCPU"
}, - "memory": {
- "value": 7,
- "unit": "GiB"
}, - "publicNetworkSpeed": {
- "value": 1,
- "unit": "Gbps"
}, - "privateNetworkSpeed": {
- "value": 100,
- "unit": "Mbps"
}
}, - "prices": {
- "currency": "EUR",
- "currencySymbol": "€",
- "compute": {
- "hourlyPrice": "0.0798",
- "monthlyPrice": "52.5000"
}, - "storage": {
- "local": {
- "hourlyPrice": "0.00004",
- "monthlyPrice": "0.03000"
}, - "central": {
- "hourlyPrice": "0.00011",
- "monthlyPrice": "0.08000"
}
}
}, - "storageTypes": [
- "CENTRAL"
]
}, - {
- "name": "lsw.c3.2xlarge",
- "resources": {
- "cpu": {
- "value": 8,
- "unit": "vCPU"
}, - "memory": {
- "value": 15,
- "unit": "GiB"
}, - "publicNetworkSpeed": {
- "value": 1,
- "unit": "Gbps"
}, - "privateNetworkSpeed": {
- "value": 100,
- "unit": "Mbps"
}
}, - "prices": {
- "currency": "EUR",
- "currencySymbol": "€",
- "compute": {
- "hourlyPrice": "0.1604",
- "monthlyPrice": "105.4500"
}, - "storage": {
- "local": {
- "hourlyPrice": "0.00004",
- "monthlyPrice": "0.03000"
}, - "central": {
- "hourlyPrice": "0.00011",
- "monthlyPrice": "0.08000"
}
}
}, - "storageTypes": [
- "CENTRAL"
]
}, - {
- "name": "lsw.c3.4xlarge",
- "resources": {
- "cpu": {
- "value": 16,
- "unit": "vCPU"
}, - "memory": {
- "value": 30,
- "unit": "GiB"
}, - "publicNetworkSpeed": {
- "value": 1,
- "unit": "Gbps"
}, - "privateNetworkSpeed": {
- "value": 100,
- "unit": "Mbps"
}
}, - "prices": {
- "currency": "EUR",
- "currencySymbol": "€",
- "compute": {
- "hourlyPrice": "0.3203",
- "monthlyPrice": "210.5100"
}, - "storage": {
- "local": {
- "hourlyPrice": "0.00004",
- "monthlyPrice": "0.03000"
}, - "central": {
- "hourlyPrice": "0.00011",
- "monthlyPrice": "0.08000"
}
}
}, - "storageTypes": [
- "CENTRAL"
]
}, - {
- "name": "lsw.m3.large",
- "resources": {
- "cpu": {
- "value": 2,
- "unit": "vCPU"
}, - "memory": {
- "value": 7,
- "unit": "GiB"
}, - "publicNetworkSpeed": {
- "value": 1,
- "unit": "Gbps"
}, - "privateNetworkSpeed": {
- "value": 100,
- "unit": "Mbps"
}
}, - "prices": {
- "currency": "EUR",
- "currencySymbol": "€",
- "compute": {
- "hourlyPrice": "0.0447",
- "monthlyPrice": "29.4400"
}, - "storage": {
- "local": {
- "hourlyPrice": "0.00004",
- "monthlyPrice": "0.03000"
}, - "central": {
- "hourlyPrice": "0.00011",
- "monthlyPrice": "0.08000"
}
}
}, - "storageTypes": [
- "CENTRAL"
]
}, - {
- "name": "lsw.m3.xlarge",
- "resources": {
- "cpu": {
- "value": 4,
- "unit": "vCPU"
}, - "memory": {
- "value": 15,
- "unit": "GiB"
}, - "publicNetworkSpeed": {
- "value": 1,
- "unit": "Gbps"
}, - "privateNetworkSpeed": {
- "value": 100,
- "unit": "Mbps"
}
}, - "prices": {
- "currency": "EUR",
- "currencySymbol": "€",
- "compute": {
- "hourlyPrice": "0.0902",
- "monthlyPrice": "59.3300"
}, - "storage": {
- "local": {
- "hourlyPrice": "0.00004",
- "monthlyPrice": "0.03000"
}, - "central": {
- "hourlyPrice": "0.00011",
- "monthlyPrice": "0.08000"
}
}
}, - "storageTypes": [
- "CENTRAL"
]
}, - {
- "name": "lsw.m3.2xlarge",
- "resources": {
- "cpu": {
- "value": 8,
- "unit": "vCPU"
}, - "memory": {
- "value": 30,
- "unit": "GiB"
}, - "publicNetworkSpeed": {
- "value": 1,
- "unit": "Gbps"
}, - "privateNetworkSpeed": {
- "value": 100,
- "unit": "Mbps"
}
}, - "prices": {
- "currency": "EUR",
- "currencySymbol": "€",
- "compute": {
- "hourlyPrice": "0.1799",
- "monthlyPrice": "118.2700"
}, - "storage": {
- "local": {
- "hourlyPrice": "0.00004",
- "monthlyPrice": "0.03000"
}, - "central": {
- "hourlyPrice": "0.00011",
- "monthlyPrice": "0.08000"
}
}
}, - "storageTypes": [
- "CENTRAL"
]
}, - {
- "name": "lsw.r3.large",
- "resources": {
- "cpu": {
- "value": 2,
- "unit": "vCPU"
}, - "memory": {
- "value": 15.25,
- "unit": "GiB"
}, - "publicNetworkSpeed": {
- "value": 1,
- "unit": "Gbps"
}, - "privateNetworkSpeed": {
- "value": 100,
- "unit": "Mbps"
}
}, - "prices": {
- "currency": "EUR",
- "currencySymbol": "€",
- "compute": {
- "hourlyPrice": "0.0555",
- "monthlyPrice": "36.4900"
}, - "storage": {
- "local": {
- "hourlyPrice": "0.00004",
- "monthlyPrice": "0.03000"
}, - "central": {
- "hourlyPrice": "0.00011",
- "monthlyPrice": "0.08000"
}
}
}, - "storageTypes": [
- "CENTRAL"
]
}, - {
- "name": "lsw.r3.xlarge",
- "resources": {
- "cpu": {
- "value": 4,
- "unit": "vCPU"
}, - "memory": {
- "value": 30.5,
- "unit": "GiB"
}, - "publicNetworkSpeed": {
- "value": 1,
- "unit": "Gbps"
}, - "privateNetworkSpeed": {
- "value": 100,
- "unit": "Mbps"
}
}, - "prices": {
- "currency": "EUR",
- "currencySymbol": "€",
- "compute": {
- "hourlyPrice": "0.1104",
- "monthlyPrice": "72.5700"
}, - "storage": {
- "local": {
- "hourlyPrice": "0.00004",
- "monthlyPrice": "0.03000"
}, - "central": {
- "hourlyPrice": "0.00011",
- "monthlyPrice": "0.08000"
}
}
}, - "storageTypes": [
- "CENTRAL"
]
}, - {
- "name": "lsw.r3.2xlarge",
- "resources": {
- "cpu": {
- "value": 8,
- "unit": "vCPU"
}, - "memory": {
- "value": 61,
- "unit": "GiB"
}, - "publicNetworkSpeed": {
- "value": 1,
- "unit": "Gbps"
}, - "privateNetworkSpeed": {
- "value": 100,
- "unit": "Mbps"
}
}, - "prices": {
- "currency": "EUR",
- "currencySymbol": "€",
- "compute": {
- "hourlyPrice": "0.2202",
- "monthlyPrice": "144.7400"
}, - "storage": {
- "local": {
- "hourlyPrice": "0.00004",
- "monthlyPrice": "0.03000"
}, - "central": {
- "hourlyPrice": "0.00011",
- "monthlyPrice": "0.08000"
}
}
}, - "storageTypes": [
- "CENTRAL"
]
}
], - "_metadata": {
- "totalCount": 10,
- "limit": 50,
- "offset": 0
}
}
List credentials stored for a specific Instance
Authorizations:
path Parameters
instanceId required | string <uuid> Example: ace712e9-a166-47f1-9065-4af0f7e7fce1 Instance's ID |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/instances/ace712e9-a166-47f1-9065-4af0f7e7fce1/credentials \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 404
- 500
- 503
{- "_metadata": {
- "totalCount": 1,
- "limit": 20,
- "offset": 0
}, - "credentials": [
- {
- "type": "OPERATING_SYSTEM",
- "username": "root"
}
]
}
Store credentials for a specific Instance
Authorizations:
path Parameters
instanceId required | string <uuid> Example: ace712e9-a166-47f1-9065-4af0f7e7fce1 Instance's ID |
Request Body schema: application/jsonrequired
type required | string (credentialType) Enum: "OPERATING_SYSTEM" "CONTROL_PANEL" |
username required | string Can contain only alphanumeric values and characters |
password required | string The password you'd like to store |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "password": "12341234",
- "type": "OPERATING_SYSTEM",
- "username": "root"
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "password": "12341234",
- "type": "OPERATING_SYSTEM",
- "username": "root"
}
Delete all credentials associated with a specific Instance
Authorizations:
path Parameters
instanceId required | string <uuid> Example: ace712e9-a166-47f1-9065-4af0f7e7fce1 Instance's ID |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request DELETE \ --url https://api.leaseweb.com/publicCloud/v1/instances/ace712e9-a166-47f1-9065-4af0f7e7fce1/credentials \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "401",
- "errorMessage": "You are not authorized to view this resource."
}
Get credentials by type for a specific Instance
Authorizations:
path Parameters
instanceId required | string <uuid> Example: ace712e9-a166-47f1-9065-4af0f7e7fce1 Instance's ID |
type required | string (credentialType) Enum: "OPERATING_SYSTEM" "CONTROL_PANEL" Type of credential |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/instances/ace712e9-a166-47f1-9065-4af0f7e7fce1/credentials/%7Btype%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "_metadata": {
- "totalCount": 1,
- "limit": 20,
- "offset": 0
}, - "credentials": [
- {
- "type": "OPERATING_SYSTEM",
- "username": "root"
}
]
}
Get Instance credentials by type and username.
Authorizations:
path Parameters
instanceId required | string <uuid> Example: ace712e9-a166-47f1-9065-4af0f7e7fce1 Instance's ID |
type required | string (credentialType) Enum: "OPERATING_SYSTEM" "CONTROL_PANEL" Type of credential |
username required | string Example: root Username |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/instances/ace712e9-a166-47f1-9065-4af0f7e7fce1/credentials/%7Btype%7D/root \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "password": "12341234",
- "type": "OPERATING_SYSTEM",
- "username": "root"
}
Update credentials for a given type and username
Authorizations:
path Parameters
instanceId required | string <uuid> Example: ace712e9-a166-47f1-9065-4af0f7e7fce1 Instance's ID |
type required | string (credentialType) Enum: "OPERATING_SYSTEM" "CONTROL_PANEL" Type of credential |
username required | string Example: root Username |
Request Body schema: application/jsonrequired
password required | string The new password |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "password": "12341234"
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "password": "12341234",
- "type": "OPERATING_SYSTEM",
- "username": "root"
}
Delete Instance credential for a given type and username
Authorizations:
path Parameters
instanceId required | string <uuid> Example: ace712e9-a166-47f1-9065-4af0f7e7fce1 Instance's ID |
type required | string (credentialType) Enum: "OPERATING_SYSTEM" "CONTROL_PANEL" Type of credential |
username required | string Example: root Username |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request DELETE \ --url https://api.leaseweb.com/publicCloud/v1/instances/ace712e9-a166-47f1-9065-4af0f7e7fce1/credentials/%7Btype%7D/root \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "401",
- "errorMessage": "You are not authorized to view this resource."
}
Reset the password for a specific Instance
The operation may take a few moments to complete.
You can obtain the new credential using the credentials endpoints
Authorizations:
path Parameters
instanceId required | string <uuid> Example: ace712e9-a166-47f1-9065-4af0f7e7fce1 Instance's ID |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request POST \ --url https://api.leaseweb.com/publicCloud/v1/instances/ace712e9-a166-47f1-9065-4af0f7e7fce1/resetPassword \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Get costs for a given month.
Authorizations:
path Parameters
equipmentId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Equipment's UUID |
query Parameters
from required | string <date> Example: from=2023-11-01 Start date of the period to get costs for. It must be the first day of the month |
to | string <date> Example: to=2023-12-01 End date of the period to get costs for. This date needs to be exactly one month after the 'from' date. If this value is not passed, it will be calculated based on 'from' parameter |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/equipments/695ddd91-051f-4dd6-9120-938a927a47d0/expenses?from=2023-11-01&to=2023-12-01' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "billing": {
- "instances": [
- {
- "id": "b778824a-a96e-4f6f-9713-7b7196f09c4f",
- "reference": "test-instance",
- "resources": {
- "cpu": {
- "value": 2,
- "unit": "vCPU"
}, - "memory": {
- "value": 8,
- "unit": "GB"
}, - "publicNetworkSpeed": {
- "value": 5,
- "unit": "Gbps"
}, - "privateNetworkSpeed": {
- "value": 1000,
- "unit": "Mbps"
}
}, - "contract": {
- "billingFrequency": 1,
- "term": 0,
- "type": "HOURLY",
- "endsAt": null,
- "renewalsAt": "2024-04-09T15:28:28+00:00",
- "createdAt": "2024-04-09T15:11:21+00:00",
- "state": "ACTIVE"
}, - "startedAt": "2023-11-30T16:31:46+00:00",
- "endedAt": "2023-11-30T16:40:46+00:00",
- "rootDiskSize": 15,
- "billingType": "POSTPAID",
- "hours": 14,
- "from": "2023-12-01T00:00:00+00:00",
- "to": "2023-12-01T13:18:41+00:00",
- "rootDiskStorageType": "CENTRAL",
- "price": "0.72"
}
], - "traffic": {
- "unit": "GB",
- "values": {
- "tier_0": {
- "usage": 1000,
- "price": 0
}, - "tier_1": {
- "usage": 10000,
- "price": 15.54
}, - "tier_2": {
- "usage": 10000,
- "price": 13.45
}, - "tier_3": {
- "usage": 34.5,
- "price": 2.34
}
}
}
}
}
List available ISOs
List all available ISO images
Authorizations:
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/isos?limit=20&offset=10' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "_metadata": {
- "totalCount": 2,
- "limit": 20,
- "offset": 0
}, - "isos": [
- {
- "id": "GRML",
- "name": "GRML 2022.11"
}, - {
- "id": "ACRONIS_BOOT_MEDIA",
- "name": "Acronis Boot Media"
}
]
}
List all available Images
Authorizations:
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
custom | boolean Filters the list to include only custom images. |
standard | boolean Example: standard=true Filters the list to include only standard images. |
state | string (imageState) Enum: "CREATING" "READY" "DESTROYED" "DESTROYING" "FAILED" Filters the list by the state of custom images. |
marketAppId | string (marketAppId) Enum: "CPANEL_30" "CPANEL_100" "PLESK_WEB_PRO" "PLESK_WEB_ADMIN" Filters the list by the market app of standard images. |
storageType | string Enum: "LOCAL" "CENTRAL" Filters the list by the market app of standard images. |
name | string Example: name=Ubuntu 20.04 LTS (x86_64) Filters the list by the name of images. |
flavour | string (flavour) Enum: "ubuntu" "debian" "freebsd" "centos" "almalinux" "rockylinux" "archlinux" "windows" Filters the list by the flavour of standard images. |
region | string Example: region=eu-west-3 Available regions can be found using the List Regions endpoint. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/images?limit=20&offset=10&custom=SOME_BOOLEAN_VALUE&standard=true&state=SOME_STRING_VALUE&marketAppId=SOME_STRING_VALUE&storageType=SOME_STRING_VALUE&name=Ubuntu%2020.04%20LTS%20(x86_64)&flavour=SOME_STRING_VALUE®ion=eu-west-3' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "images": [
- {
- "id": "UBUNTU_24_04_64BIT",
- "name": "Ubuntu 24.04 LTS (x86_64)",
- "version": "24.04",
- "family": "linux",
- "flavour": "ubuntu",
- "architecture": "x86_64",
- "marketApps": [ ],
- "storageTypes": [
- "LOCAL",
- "CENTRAL"
], - "storageSize": null,
- "state": "READY",
- "stateReason": null,
- "region": "eu-west-3",
- "createdAt": null,
- "updatedAt": null,
- "custom": false,
- "minDiskSize": null
}, - {
- "id": "UBUNTU_22_04_64BIT",
- "name": "Ubuntu 22.04 LTS (x86_64)",
- "version": "22.04",
- "family": "linux",
- "flavour": "ubuntu",
- "architecture": "x86_64",
- "marketApps": [
- "PLESK_WEB_ADMIN"
], - "storageTypes": [
- "LOCAL",
- "CENTRAL"
], - "storageSize": null,
- "state": "READY",
- "stateReason": null,
- "region": "eu-west-3",
- "createdAt": null,
- "updatedAt": null,
- "custom": false,
- "minDiskSize": null
}, - {
- "id": "UBUNTU_20_04_64BIT",
- "name": "Ubuntu 20.04 LTS (x86_64)",
- "version": "20.04",
- "family": "linux",
- "flavour": "ubuntu",
- "architecture": "x86_64",
- "marketApps": [ ],
- "storageTypes": [
- "LOCAL",
- "CENTRAL"
], - "storageSize": null,
- "state": "READY",
- "stateReason": null,
- "region": "eu-west-3",
- "createdAt": null,
- "updatedAt": null,
- "custom": false,
- "minDiskSize": null
}, - {
- "id": "abcc1630-362f-48ba-832f-c496aff24121",
- "name": "Custom image - 01",
- "flavour": "ubuntu",
- "family": "linux",
- "version": null,
- "architecture": null,
- "marketApps": [ ],
- "storageTypes": [ ],
- "storageSize": {
- "size": 2.03,
- "unit": "GB"
}, - "state": "READY",
- "stateReason": null,
- "region": "eu-west-3",
- "createdAt": "2024-07-05T10:44:08+00:00",
- "updatedAt": "2024-07-18T08:52:08+00:00",
- "custom": true,
- "minDiskSize": null
}, - {
- "id": "8600b94b-45b4-4887-86e1-2792b06dbb32",
- "name": "Custom image - 02",
- "flavour": "ubuntu",
- "family": "linux",
- "version": null,
- "architecture": null,
- "marketApps": [ ],
- "storageTypes": [ ],
- "storageSize": {
- "size": 2.03,
- "unit": "GB"
}, - "state": "READY",
- "stateReason": null,
- "region": "eu-west-3",
- "createdAt": "2024-07-05T10:47:01+00:00",
- "updatedAt": "2024-07-17T13:14:01+00:00",
- "custom": true,
- "minDiskSize": null
}, - {
- "id": "ace712e9-a166-47f1-9065-4af0f7e7fce1",
- "name": "Custom image - 03",
- "flavour": "ubuntu",
- "family": "linux",
- "version": null,
- "architecture": null,
- "marketApps": [ ],
- "storageTypes": [ ],
- "storageSize": {
- "size": 2.03,
- "unit": "GB"
}, - "state": "READY",
- "stateReason": null,
- "region": "eu-west-3",
- "createdAt": "2024-07-05T10:54:27+00:00",
- "updatedAt": "2024-07-17T13:14:01+00:00",
- "custom": true,
- "minDiskSize": null
}
], - "_metadata": {
- "totalCount": 6,
- "limit": 6,
- "offset": 0
}
}
Create Custom Image
Create a Custom Image
Authorizations:
Request Body schema: application/jsonrequired
name required | string The name of the custom image to be created. |
instanceId required | string The id of the instance from which the custom image will be created. |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "name": "New custom image",
- "instanceId": "695ddd91-051f-4dd6-9120-938a927a47d0"
}
Response samples
- 201
- 400
- 401
- 403
- 500
- 503
{- "architecture": null,
- "createdAt": "2024-07-05T10:54:27+00:00",
- "custom": true,
- "family": "linux",
- "flavour": "ubuntu",
- "id": "ace712e9-a166-47f1-9065-4af0f7e7fce1",
- "marketApps": [ ],
- "minDiskSize": null,
- "name": "Custom image - 03",
- "region": "eu-west-3",
- "state": "READY",
- "stateReason": null,
- "storageSize": {
- "size": 2.03,
- "unit": "GB"
}, - "storageTypes": [ ],
- "updatedAt": "2024-07-17T13:14:01+00:00",
- "version": null
}
Update Custom Image
Update a Custom Image
Authorizations:
path Parameters
imageId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Image's ID |
Request Body schema: application/jsonrequired
name required | string The name of the custom image to be updated. |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "name": "Custom image"
}
Response samples
- 201
- 400
- 401
- 403
- 500
- 503
{- "architecture": null,
- "createdAt": "2024-07-05T10:54:27+00:00",
- "custom": true,
- "family": "linux",
- "flavour": "ubuntu",
- "id": "ace712e9-a166-47f1-9065-4af0f7e7fce1",
- "marketApps": [ ],
- "minDiskSize": null,
- "name": "Custom image - 03",
- "region": "eu-west-3",
- "state": "READY",
- "stateReason": null,
- "storageSize": {
- "size": 2.03,
- "unit": "GB"
}, - "storageTypes": [ ],
- "updatedAt": "2024-07-17T13:14:01+00:00",
- "version": null
}
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/marketApps \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "_metadata": {
- "totalCount": 1,
- "limit": 20,
- "offset": 0
}, - "marketApps": [
- {
- "id": "LOADBALANCER",
- "name": "Load Balancer",
- "category": "LOAD_BALANCER",
- "version": null,
- "family": "loadbalancer",
- "image": {
- "id": "UBUNTU_22_04_64BIT",
- "name": "Ubuntu 22.04 LTS (x86_64)",
- "family": "linux",
- "flavour": "ubuntu",
- "custom": false
}
}
]
}
Attach ISO to a specific Instance
Instance must not have ISO attached, otherwise, it will return a validation error.
Available ISOs can be obtained using /v1/isos
.
Authorizations:
path Parameters
instanceId required | string <uuid> Example: ace712e9-a166-47f1-9065-4af0f7e7fce1 Instance's ID |
Request Body schema: application/jsonrequired
isoId required | string The ISO ID, obtained using the ISO endpoints |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "isoId": "GRML"
}
Response samples
- 400
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Detach ISO from a specific Instance
Instance must have ISO attached, otherwise, it will return a validation error
Authorizations:
path Parameters
instanceId required | string <uuid> Example: ace712e9-a166-47f1-9065-4af0f7e7fce1 Instance's ID |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request POST \ --url https://api.leaseweb.com/publicCloud/v1/instances/ace712e9-a166-47f1-9065-4af0f7e7fce1/detachIso \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
List images available for reinstall
Authorizations:
path Parameters
instanceId required | string <uuid> Example: ace712e9-a166-47f1-9065-4af0f7e7fce1 Instance's ID |
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
custom | boolean Filters the list to include only custom images. |
standard | boolean Example: standard=true Filters the list to include only standard images. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/instances/ace712e9-a166-47f1-9065-4af0f7e7fce1/reinstall/images?limit=20&offset=10&custom=SOME_BOOLEAN_VALUE&standard=true' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "images": [
- {
- "id": "UBUNTU_24_04_64BIT",
- "name": "Ubuntu 24.04 LTS (x86_64)",
- "version": "24.04",
- "family": "linux",
- "flavour": "ubuntu",
- "architecture": "x86_64",
- "marketApps": [ ],
- "storageTypes": [
- "LOCAL",
- "CENTRAL"
], - "storageSize": null,
- "state": "READY",
- "stateReason": null,
- "region": "eu-west-3",
- "createdAt": null,
- "updatedAt": null,
- "custom": false,
- "minDiskSize": null
}, - {
- "id": "UBUNTU_22_04_64BIT",
- "name": "Ubuntu 22.04 LTS (x86_64)",
- "version": "22.04",
- "family": "linux",
- "flavour": "ubuntu",
- "architecture": "x86_64",
- "marketApps": [
- "PLESK_WEB_ADMIN"
], - "storageTypes": [
- "LOCAL",
- "CENTRAL"
], - "storageSize": null,
- "state": "READY",
- "stateReason": null,
- "region": "eu-west-3",
- "createdAt": null,
- "updatedAt": null,
- "custom": false,
- "minDiskSize": null
}, - {
- "id": "UBUNTU_20_04_64BIT",
- "name": "Ubuntu 20.04 LTS (x86_64)",
- "version": "20.04",
- "family": "linux",
- "flavour": "ubuntu",
- "architecture": "x86_64",
- "marketApps": [ ],
- "storageTypes": [
- "LOCAL",
- "CENTRAL"
], - "storageSize": null,
- "state": "READY",
- "stateReason": null,
- "region": "eu-west-3",
- "createdAt": null,
- "updatedAt": null,
- "custom": false,
- "minDiskSize": null
}, - {
- "id": "abcc1630-362f-48ba-832f-c496aff24121",
- "name": "Custom image - 01",
- "flavour": "ubuntu",
- "family": "linux",
- "version": null,
- "architecture": null,
- "marketApps": [ ],
- "storageTypes": [ ],
- "storageSize": {
- "size": 2.03,
- "unit": "GB"
}, - "state": "READY",
- "stateReason": null,
- "region": "eu-west-3",
- "createdAt": "2024-07-05T10:44:08+00:00",
- "updatedAt": "2024-07-18T08:52:08+00:00",
- "custom": true,
- "minDiskSize": null
}, - {
- "id": "8600b94b-45b4-4887-86e1-2792b06dbb32",
- "name": "Custom image - 02",
- "flavour": "ubuntu",
- "family": "linux",
- "version": null,
- "architecture": null,
- "marketApps": [ ],
- "storageTypes": [ ],
- "storageSize": {
- "size": 2.03,
- "unit": "GB"
}, - "state": "READY",
- "stateReason": null,
- "region": "eu-west-3",
- "createdAt": "2024-07-05T10:47:01+00:00",
- "updatedAt": "2024-07-17T13:14:01+00:00",
- "custom": true,
- "minDiskSize": null
}, - {
- "id": "ace712e9-a166-47f1-9065-4af0f7e7fce1",
- "name": "Custom image - 03",
- "flavour": "ubuntu",
- "family": "linux",
- "version": null,
- "architecture": null,
- "marketApps": [ ],
- "storageTypes": [ ],
- "storageSize": {
- "size": 2.03,
- "unit": "GB"
}, - "state": "READY",
- "stateReason": null,
- "region": "eu-west-3",
- "createdAt": "2024-07-05T10:54:27+00:00",
- "updatedAt": "2024-07-17T13:14:01+00:00",
- "custom": true,
- "minDiskSize": null
}
], - "_metadata": {
- "totalCount": 6,
- "limit": 6,
- "offset": 0
}
}
Reinstall an Instance
Recreates the Instance, with optionally different Image and Marketplace App.
Cannot be performed when the instance has snapshots.
Available Images can be obtained using /v1/{resource}/{instanceId}/reinstall/images
.
Available Marketplace Apps can be obtained using /v1/images/{imageId}/marketApps
.
Authorizations:
path Parameters
instanceId required | string <uuid> Example: ace712e9-a166-47f1-9065-4af0f7e7fce1 Instance's ID |
Request Body schema: application/jsonrequired
imageId required | string The Image ID |
marketAppId | string The Market App to be installed |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "imageId": "UBUNTU_22_04_64BIT"
}
Response samples
- 400
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Launch Load balancer
Launch a Load balancer.
Available regions can be obtained using /v1/regions
.
Available load balancer types for your region can be obtained using /v1/loadBalancerTypes
.
Authorizations:
Request Body schema: application/jsonrequired
region required | string (regionName) Enum: "eu-west-3" "us-east-1" "eu-central-1" "ap-southeast-1" "us-west-1" "eu-west-2" "ca-central-1" "ap-northeast-1" region name |
type required | string (typeName) Enum: "lsw.m3.large" "lsw.m3.xlarge" "lsw.m3.2xlarge" "lsw.m4.large" "lsw.m4.xlarge" "lsw.m4.2xlarge" "lsw.m4.4xlarge" "lsw.m5.large" "lsw.m5.xlarge" "lsw.m5.2xlarge" "lsw.m5.4xlarge" "lsw.m5a.large" "lsw.m5a.xlarge" "lsw.m5a.2xlarge" "lsw.m5a.4xlarge" "lsw.m5a.8xlarge" "lsw.m5a.12xlarge" "lsw.m6a.large" "lsw.m6a.xlarge" "lsw.m6a.2xlarge" "lsw.m6a.4xlarge" "lsw.m6a.8xlarge" "lsw.m6a.12xlarge" "lsw.m6a.16xlarge" "lsw.m6a.24xlarge" "lsw.c3.large" "lsw.c3.xlarge" "lsw.c3.2xlarge" "lsw.c3.4xlarge" "lsw.c4.large" "lsw.c4.xlarge" "lsw.c4.2xlarge" "lsw.c4.4xlarge" "lsw.c5.large" "lsw.c5.xlarge" "lsw.c5.2xlarge" "lsw.c5.4xlarge" "lsw.c5a.large" "lsw.c5a.xlarge" "lsw.c5a.2xlarge" "lsw.c5a.4xlarge" "lsw.c5a.9xlarge" "lsw.c5a.12xlarge" "lsw.c6a.large" "lsw.c6a.xlarge" "lsw.c6a.2xlarge" "lsw.c6a.4xlarge" "lsw.c6a.8xlarge" "lsw.c6a.12xlarge" "lsw.c6a.16xlarge" "lsw.c6a.24xlarge" "lsw.r3.large" "lsw.r3.xlarge" "lsw.r3.2xlarge" "lsw.r4.large" "lsw.r4.xlarge" "lsw.r4.2xlarge" "lsw.r5.large" "lsw.r5.xlarge" "lsw.r5.2xlarge" "lsw.r5a.large" "lsw.r5a.xlarge" "lsw.r5a.2xlarge" "lsw.r5a.4xlarge" "lsw.r5a.8xlarge" "lsw.r5a.12xlarge" "lsw.r6a.large" "lsw.r6a.xlarge" "lsw.r6a.2xlarge" "lsw.r6a.4xlarge" "lsw.r6a.8xlarge" "lsw.r6a.12xlarge" "lsw.r6a.16xlarge" "lsw.r6a.24xlarge" Instance/Load balancer type |
reference | string An identifying name you can refer to the load balancer |
contractType required | string (contractType) Enum: "HOURLY" "MONTHLY" Select HOURLY for billing based on hourly usage, else MONTHLY for billing per month usage |
contractTerm required | integer (contractTerm) Enum: 0 1 3 6 12 Contract commitment. Used only when contract type is MONTHLY |
billingFrequency required | integer (billingFrequency) Enum: 1 3 6 12 The billing frequency (in months) of the instance. |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "billingFrequency": 1,
- "contractTerm": 0,
- "contractType": "HOURLY",
- "reference": "my-loadbalancer-1",
- "region": "eu-west-3",
- "type": "lsw.m3.large"
}
Response samples
- 201
- 400
- 401
- 403
- 500
- 503
{- "privateNetwork": null,
- "id": "32082a93-d1e2-4bc0-8f5e-8fe4312b0844",
- "type": "lsw.m3.large",
- "resources": {
- "cpu": {
- "value": 2,
- "unit": "vCPU"
}, - "memory": {
- "value": 7,
- "unit": "GiB"
}, - "publicNetworkSpeed": {
- "value": 1,
- "unit": "Gbps"
}, - "privateNetworkSpeed": {
- "value": 100,
- "unit": "Mbps"
}
}, - "autoScalingGroup": null,
- "region": "eu-west-3",
- "reference": "my-loadbalancer1",
- "state": "RUNNING",
- "ips": [
- {
- "ip": "85.99.99.99",
- "prefixLength": "28",
- "version": 4,
- "nullRouted": false,
- "reverseLookup": null,
- "mainIp": false,
- "networkType": "PUBLIC",
- "ddos": {
- "detectionProfile": "STANDARD_DEFAULT",
- "protectionType": "STANDARD"
}
}
], - "startedAt": "2024-04-09T15:11:37+00:00",
- "contract": {
- "billingFrequency": 1,
- "term": 0,
- "type": "HOURLY",
- "endsAt": null,
- "renewalsAt": "2024-04-09T15:28:28+00:00",
- "createdAt": "2024-04-09T15:11:21+00:00",
- "state": "ACTIVE"
}, - "configuration": {
- "stickySession": null,
- "balance": "roundrobin",
- "xForwardedFor": false,
- "idleTimeOut": 60
}
}
Get load balancer list
List and filter load balancers
Authorizations:
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
ip | string <ip> Example: ip=10.0.0.1 |
reference | string Example: reference=my-lb |
id | string <uuid> Example: id=a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11 |
contractState | string Enum: "ACTIVE" "DELETE_SCHEDULED" |
contractType | string Enum: "HOURLY" "MONTHLY" Example: contractType=HOURLY |
state | string Enum: "RUNNING" "STARTING" "STOPPED" "STOPPING" "CREATING" "DESTROYED" "DESTROYING" Example: state=RUNNING |
region | string (regionName) Enum: "eu-west-3" "us-east-1" "eu-central-1" "ap-southeast-1" "us-west-1" "eu-west-2" "ca-central-1" "ap-northeast-1" Example: region=eu-west-3 Available regions can be found using the List Regions endpoint. |
type | string Example: type=lsw.c3.xlarge Available load balancer types can be found using the List Load Balancer Types endpoint. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/loadBalancers?limit=20&offset=10&ip=10.0.0.1&reference=my-lb&id=a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11&contractState=SOME_STRING_VALUE&contractType=HOURLY&state=RUNNING®ion=eu-west-3&type=lsw.c3.xlarge' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "_metadata": {
- "totalCount": 1,
- "limit": 20,
- "offset": 0
}, - "loadBalancers": [
- {
- "privateNetwork": null,
- "id": "5fd135a9-3ff6-4794-8b92-8cd8747a3ea3",
- "type": "lsw.c3.4xlarge",
- "resources": {
- "cpu": {
- "value": 16,
- "unit": "vCPU"
}, - "memory": {
- "value": 30,
- "unit": "GiB"
}, - "publicNetworkSpeed": {
- "value": 1,
- "unit": "Gbps"
}, - "privateNetworkSpeed": {
- "value": 100,
- "unit": "Mbps"
}
}, - "region": "eu-west-3",
- "reference": "my-load-balancer",
- "state": "RUNNING",
- "rootDiskSize": 10,
- "ips": [
- {
- "ip": "85.99.99.99",
- "prefixLength": "28",
- "version": 4,
- "nullRouted": false,
- "reverseLookup": null,
- "networkType": "PUBLIC",
- "mainIp": false
}
], - "startedAt": "2024-04-09T15:11:37+00:00",
- "contract": {
- "billingFrequency": 1,
- "term": 0,
- "type": "HOURLY",
- "endsAt": null,
- "renewalsAt": "2024-04-09T15:28:28+00:00",
- "createdAt": "2024-04-09T15:11:21+00:00",
- "state": "ACTIVE"
}, - "configuration": {
- "stickySession": {
- "enabled": true,
- "maxLifeTime": 1000
}, - "balance": "roundrobin",
- "xForwardedFor": false,
- "idleTimeOut": 60
}, - "autoScalingGroup": {
- "id": "8714e190-8ca1-49cf-8594-0d019deff809",
- "type": "MANUAL",
- "state": "ACTIVE",
- "desiredAmount": 1,
- "region": "eu-west-3",
- "reference": "ono",
- "createdAt": "2024-06-14T09:12:08+00:00",
- "updatedAt": "2024-06-14T09:12:08+00:00",
- "startsAt": null,
- "endsAt": null,
- "minimumAmount": null,
- "maximumAmount": null,
- "cpuThreshold": null,
- "warmupTime": null,
- "cooldownTime": null
}
}
]
}
Get load balancer details
Get details about the load balancer
Authorizations:
path Parameters
loadBalancerId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Load balancer ID |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/loadBalancers/695ddd91-051f-4dd6-9120-938a927a47d0 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 404
- 500
- 503
{- "privateNetwork": null,
- "id": "32082a93-d1e2-4bc0-8f5e-8fe4312b0844",
- "type": "lsw.m3.large",
- "resources": {
- "cpu": {
- "value": 2,
- "unit": "vCPU"
}, - "memory": {
- "value": 7,
- "unit": "GiB"
}, - "publicNetworkSpeed": {
- "value": 1,
- "unit": "Gbps"
}, - "privateNetworkSpeed": {
- "value": 100,
- "unit": "Mbps"
}
}, - "autoScalingGroup": null,
- "region": "eu-west-3",
- "reference": "my-loadbalancer1",
- "state": "RUNNING",
- "ips": [
- {
- "ip": "85.99.99.99",
- "prefixLength": "28",
- "version": 4,
- "nullRouted": false,
- "reverseLookup": null,
- "mainIp": false,
- "networkType": "PUBLIC",
- "ddos": {
- "detectionProfile": "STANDARD_DEFAULT",
- "protectionType": "STANDARD"
}
}
], - "startedAt": "2024-04-09T15:11:37+00:00",
- "contract": {
- "billingFrequency": 1,
- "term": 0,
- "type": "HOURLY",
- "endsAt": null,
- "renewalsAt": "2024-04-09T15:28:28+00:00",
- "createdAt": "2024-04-09T15:11:21+00:00",
- "state": "ACTIVE"
}, - "configuration": {
- "stickySession": null,
- "balance": "roundrobin",
- "xForwardedFor": false,
- "idleTimeOut": 60
}
}
Delete load balancer
Terminate a Load balancer
Authorizations:
path Parameters
loadBalancerId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Load balancer ID |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request DELETE \ --url https://api.leaseweb.com/publicCloud/v1/loadBalancers/695ddd91-051f-4dd6-9120-938a927a47d0 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Update load balancer
Update load balancer configurations
Authorizations:
path Parameters
loadBalancerId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Load balancer ID |
Request Body schema: application/jsonrequired
type | string (typeName) Enum: "lsw.m3.large" "lsw.m3.xlarge" "lsw.m3.2xlarge" "lsw.m4.large" "lsw.m4.xlarge" "lsw.m4.2xlarge" "lsw.m4.4xlarge" "lsw.m5.large" "lsw.m5.xlarge" "lsw.m5.2xlarge" "lsw.m5.4xlarge" "lsw.m5a.large" "lsw.m5a.xlarge" "lsw.m5a.2xlarge" "lsw.m5a.4xlarge" "lsw.m5a.8xlarge" "lsw.m5a.12xlarge" "lsw.m6a.large" "lsw.m6a.xlarge" "lsw.m6a.2xlarge" "lsw.m6a.4xlarge" "lsw.m6a.8xlarge" "lsw.m6a.12xlarge" "lsw.m6a.16xlarge" "lsw.m6a.24xlarge" "lsw.c3.large" "lsw.c3.xlarge" "lsw.c3.2xlarge" "lsw.c3.4xlarge" "lsw.c4.large" "lsw.c4.xlarge" "lsw.c4.2xlarge" "lsw.c4.4xlarge" "lsw.c5.large" "lsw.c5.xlarge" "lsw.c5.2xlarge" "lsw.c5.4xlarge" "lsw.c5a.large" "lsw.c5a.xlarge" "lsw.c5a.2xlarge" "lsw.c5a.4xlarge" "lsw.c5a.9xlarge" "lsw.c5a.12xlarge" "lsw.c6a.large" "lsw.c6a.xlarge" "lsw.c6a.2xlarge" "lsw.c6a.4xlarge" "lsw.c6a.8xlarge" "lsw.c6a.12xlarge" "lsw.c6a.16xlarge" "lsw.c6a.24xlarge" "lsw.r3.large" "lsw.r3.xlarge" "lsw.r3.2xlarge" "lsw.r4.large" "lsw.r4.xlarge" "lsw.r4.2xlarge" "lsw.r5.large" "lsw.r5.xlarge" "lsw.r5.2xlarge" "lsw.r5a.large" "lsw.r5a.xlarge" "lsw.r5a.2xlarge" "lsw.r5a.4xlarge" "lsw.r5a.8xlarge" "lsw.r5a.12xlarge" "lsw.r6a.large" "lsw.r6a.xlarge" "lsw.r6a.2xlarge" "lsw.r6a.4xlarge" "lsw.r6a.8xlarge" "lsw.r6a.12xlarge" "lsw.r6a.16xlarge" "lsw.r6a.24xlarge" Instance/Load balancer type |
reference | string An identifying name you can refer to the load balancer |
contractType | string (contractType) Enum: "HOURLY" "MONTHLY" Select HOURLY for billing based on hourly usage, else MONTHLY for billing per month usage |
object or null (stickySession) | |
balance | string (balance) Enum: "roundrobin" "leastconn" "source" Algorithm to be used for load balancer |
xForwardedFor | boolean Is xForwardedFor enabled or not |
idleTimeOut | integer Time to close the connection if load balancer is idle |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "balance": "roundrobin",
- "contractType": "HOURLY",
- "idleTimeOut": 60,
- "reference": "foo",
- "type": "lsw.m3.xlarge",
- "xForwardedFor": false
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "privateNetwork": null,
- "id": "32082a93-d1e2-4bc0-8f5e-8fe4312b0844",
- "type": "lsw.m3.large",
- "resources": {
- "cpu": {
- "value": 2,
- "unit": "vCPU"
}, - "memory": {
- "value": 7,
- "unit": "GiB"
}, - "publicNetworkSpeed": {
- "value": 1,
- "unit": "Gbps"
}, - "privateNetworkSpeed": {
- "value": 100,
- "unit": "Mbps"
}
}, - "autoScalingGroup": null,
- "region": "eu-west-3",
- "reference": "my-loadbalancer1",
- "state": "RUNNING",
- "ips": [
- {
- "ip": "85.99.99.99",
- "prefixLength": "28",
- "version": 4,
- "nullRouted": false,
- "reverseLookup": null,
- "mainIp": false,
- "networkType": "PUBLIC",
- "ddos": {
- "detectionProfile": "STANDARD_DEFAULT",
- "protectionType": "STANDARD"
}
}
], - "startedAt": "2024-04-09T15:11:37+00:00",
- "contract": {
- "billingFrequency": 1,
- "term": 0,
- "type": "HOURLY",
- "endsAt": null,
- "renewalsAt": "2024-04-09T15:28:28+00:00",
- "createdAt": "2024-04-09T15:11:21+00:00",
- "state": "ACTIVE"
}, - "configuration": {
- "stickySession": null,
- "balance": "roundrobin",
- "xForwardedFor": false,
- "idleTimeOut": 60
}
}
Get listener list
List listeners
Authorizations:
path Parameters
loadBalancerId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Load balancer ID |
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/loadBalancers/695ddd91-051f-4dd6-9120-938a927a47d0/listeners?limit=20&offset=10' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 404
- 500
- 503
{- "_metadata": {
- "totalCount": 1,
- "limit": 10,
- "offset": 0
}, - "listeners": [
- {
- "protocol": "HTTPS",
- "port": 443,
- "id": "fac06878-6655-4956-8ea7-124a97f133ab",
- "rules": [
- {
- "id": "b05917e1-96a4-442a-900c-c41f273d95c9",
- "default": true,
- "targetGroupId": "b05917e1-96a4-442a-900c-c41f273d95c9"
}
]
}
]
}
Create listener
Create listener
Authorizations:
path Parameters
loadBalancerId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Load balancer ID |
Request Body schema: application/jsonrequired
protocol required | string (protocol) Enum: "HTTP" "HTTPS" "TCP" |
port required | integer Port that the listener listens to |
object (sslCertificate) | |
required | object (loadBalancerListenerDefaultRule) |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "protocol": "HTTPS",
- "port": 443,
- "defaultRule": {
- "targetGroupId": "b05917e1-96a4-442a-900c-c41f273d95c9"
}, - "certificate": {
- "chain": "-----BEGIN CERTIFICATE-----MIICNDCCAZ2gAwIBAgIUEby6nzM+o7vkKfzcMS/DGA8tgwQwDQYJKoZIhvcNAQELBQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0yNDA0MjUwODE3MjZaFw0yNTA0MjUwODE3MjZaMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMMiux2r1AFLVpIhdZ0bvgIvhiT9XCnfHJlGE7OarGKDKJDQ6XAquCfosLws2XAugGcMJWrsqVWtJEYSu6OMsDLYCJhh39AKqZIW0pktkr8LGlo4VLvzGPqwpHnzWthyCEFsE6p+JJQumDA/izJm2zjZL+xHDocOlNqDTB87AIdrAgMBAAGjITAfMB0GA1UdDgQWBBT3sXUrIR2vcwak0QCXoIsxHa4dDDANBgkqhkiG9w0BAQsFAAOBgQCh/l+5s713J02b8sWicUK2KjTPfyKmZFkoS+Mlo+//B/aM612ZJpGL2tAKGF3v0NDOrRYLZj0t/tlZI55pUNJI9cNj/RExvnfTSSNJIbV+8kQt5AHo50wGxj/apkuEtQre2Fpf4pyovcfIoF6HJvvp1jy96yL14UoEehZypR8FlA==-----END CERTIFICATE-----",
- "certificate": "-----BEGIN CERTIFICATE-----\nMIIGCTCCA/GgAwIBAgIUbgSw+3dtcx8IsHuUN0L/n6xRKjMwDQYJKoZIhvcNAQEL\nBQAwgZMxCzAJBgNVBAYTAk5MMRMwEQYDVQQIDApTb21lLVN0YXRlMRIwEAYDVQQH\nDAlBbXN0ZXJkYW0xFTATBgNVBAoMDExlYXNld2ViIExkYTELMAkGA1UECwwCSVQx\nFTATBgNVBAMMDGxlYXNld2ViLmNvbTEgMB4GCSqGSIb3DQEJARYRdGVzdEBsZWFz\nZXdlYi5jb20wHhcNMjQxMTE5MDg1MDI3WhcNMjUxMTE5MDg1MDI3WjCBkzELMAkG\nA1UEBhMCTkwxEzARBgNVBAgMClNvbWUtU3RhdGUxEjAQBgNVBAcMCUFtc3RlcmRh\nbTEVMBMGA1UECgwMTGVhc2V3ZWIgTGRhMQswCQYDVQQLDAJJVDEVMBMGA1UEAwwM\nbGVhc2V3ZWIuY29tMSAwHgYJKoZIhvcNAQkBFhF0ZXN0QGxlYXNld2ViLmNvbTCC\nAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAJqDbIUyZ34g8BvPmtsQxdrf\nteHbvH+27kVFjTKFVVtsKqMpUJ1OL4S4WvzcdGCp1051Qs2ePA6Xmh94yAUrwcsF\n1HZyXlguVs9lc25F0fVaL7kiSBYKbjVDb1muPmlzOEPb3c6jvOoERB4gtMSaGsd/\nC5HRIrXtA2aHDoLDSPeDlPO/zFYWRmT6QAgM8m6IsfmYH5071m8XtNPWWXr6By74\nPv9cjtjuHXNNyaKTrH/ak1OUNq1+BcRk30Mq0WRlpJ0bKk0NpBvVoaccFaYbNoBg\ngorofLVJZDAeachCovepGw6Bhi0Re4W0YNHghPJpUyd9+2JutRzSSqX5FKlceHUy\nu719B3eJ2D8YxMYw4r+CUx+bFbJxxa+8QVOQzCW8rM9BzcP5ia4sQy7yboqxl5Xx\npZK9VLp1SmhRewFJUm59pZLxfq/yKON0O6Xt1ROwca4T8C+TyeLGAFXjOTopa26I\nHMV/HMr2jeX15h3vMQw1VBFtUzIfaQEDlf0NUXAMbJuFWCC9gfYQhsWWVry98teD\n/wEyD1OHGVpo4ZBK852/PSYBozOSrg5VEdRGv7pcrYVj13EJariW4aWFYGnVHEDy\ncPg3yLS2B0+EfCKaaIPWG/H3x8BlrfUq/Nw7VXRZbFCCHQ5s40aJbMgxlsn+peJy\nxI3f4RIn6TBz04KZsUFdAgMBAAGjUzBRMB0GA1UdDgQWBBSQUaWTlJw4MUG916ds\nHL7eaKvh9TAfBgNVHSMEGDAWgBSQUaWTlJw4MUG916dsHL7eaKvh9TAPBgNVHRMB\nAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4ICAQBOU+aAsHw5cgpE/C1ZcXs1ofGp\n6OeoE3e1GRxyJMKB+iG5oG9RlbYgGG9Y4CRmxDKpeEVr/L2udCtFlBUonG2dHzbk\nxe0FdSAeTXgAfUbZypwCgu7Vdu0lT6WOsormoU2i1t+zoyZjT5S2fsfllaSa3rhy\nevVxY4V8p1KS9t123hb/Ic6J4bTCnKniRYyACqb+/36W8NxPU9EoP8t1pgNGLBnV\nDofoL/Z5kTjXTULQ2opXjbtCRrxoBl3NjIfxVQqIoFuo8uEisHIPDzfzP30hBNpr\n+4I5VHY1ERKZoPQ13PhQ63MhaXu2Dpb6e7WXrajbn2sulxaYbyJliN8Qcgh66TE7\nkpEjaTOFc3XUTIzYnI5CkVnp9evGyE68YCzuHsUrpTqCcCQ+fTNvEyskavHa+HnS\n5q06AQaP5aTXXhE/wxR3+X9k5G7dM/gmvdM+PvH+Bl8oPbclRNJ0X7J7K5toXFN6\ngqtcNiWrOHwiWthoSL9cB1pqQqynhfh9YbrcMG1thZtZxBpsOznJBVnh+fD9WZ5c\nuDMDnYBuL9DwsbPYHe8+5XUtX/aO07ea0LlNie56N3t5JgYZQJA3q0DiRrPjfI4C\nHogUG60UcBk51FyrnF3UQAbwhCnldKLGp0F69r2+qbByJudMTeBUIak+RXkicbWA\nFdk6z55BF6MzAC6iXA==\n-----END CERTIFICATE-----\n",
- "privateKey": "-----BEGIN PRIVATE KEY-----\nMIIJQQIBADANBgkqhkiG9w0BAQEFAASCCSswggknAgEAAoICAQCag2yFMmd+IPAb\nz5rbEMXa37Xh27x/tu5FRY0yhVVbbCqjKVCdTi+EuFr83HRgqddOdULNnjwOl5of\neMgFK8HLBdR2cl5YLlbPZXNuRdH1Wi+5IkgWCm41Q29Zrj5pczhD293Oo7zqBEQe\nILTEmhrHfwuR0SK17QNmhw6Cw0j3g5Tzv8xWFkZk+kAIDPJuiLH5mB+dO9ZvF7TT\n1ll6+gcu+D7/XI7Y7h1zTcmik6x/2pNTlDatfgXEZN9DKtFkZaSdGypNDaQb1aGn\nHBWmGzaAYIKK6Hy1SWQwHmnIQqL3qRsOgYYtEXuFtGDR4ITyaVMnfftibrUc0kql\n+RSpXHh1Mru9fQd3idg/GMTGMOK/glMfmxWyccWvvEFTkMwlvKzPQc3D+YmuLEMu\n8m6KsZeV8aWSvVS6dUpoUXsBSVJufaWS8X6v8ijjdDul7dUTsHGuE/Avk8nixgBV\n4zk6KWtuiBzFfxzK9o3l9eYd7zEMNVQRbVMyH2kBA5X9DVFwDGybhVggvYH2EIbF\nlla8vfLXg/8BMg9ThxlaaOGQSvOdvz0mAaMzkq4OVRHURr+6XK2FY9dxCWq4luGl\nhWBp1RxA8nD4N8i0tgdPhHwimmiD1hvx98fAZa31KvzcO1V0WWxQgh0ObONGiWzI\nMZbJ/qXicsSN3+ESJ+kwc9OCmbFBXQIDAQABAoICABqhMe/W2w1a4eb5JchBoMfz\nLGart1YPkgswTIB7iFWEU+jg8vrZgckO+OeBmzEZtHjaLtQ/RDyDllV8PITfoLu7\n2n07gtURz3ZZFsbXk7MEgxsWNHRQAeR+Jc+//xOvfu/7EcROZf2zFIZYvq7vnFPr\nqnPMJn5SRfbCqhaRT58Q93f3A2GG30UB+E0q5hF0z6+jrzcrG+7zl/+2fp96Pgiz\nUjAypI/wofTAYFL7vowegKuz7KSEBrxtYikyVPpHplJJX0X+Zt1BOWYSqgyBvifr\n+jO0k+Gur2y3oSWZjnq+k2Ixoo1b6P0HNHSXjHI3AtTYmp3BVMeN2r22KwBxZnUP\n5inbLkF28QezyzrhtR9PDZiqb3X0xKn+WhUYuO6VL6qUbbibbWM5bM/AdW4DC0Ig\nop4nQLebMEJ8fyjC7jfdJJ6EahCNKHUR5RgV4YXXfi+fanLsdMZJWUMt7hCPBFXg\nKXviSItVpnh5iPwDporAwUQMtwtDv7a1Dgyn04bMje+TEbiBj0hc2CcE8YEdpnJz\nPsKeBUET1vKah5GZLWSatuxRRfydd54vOkU1EGyTPxN+Shvg0pJpnq40NAYTHGUh\n0OmyXAOlfPe7WJsdLREZp9c9kfptGJ9frmjgWVnxi50qsi5/QQvgSucr2UBnWSVy\nd5Kw1rjM/ilEUwvR8FtlAoIBAQDHjUYZvsAKXN2XD51iTwN/Gh7zbL9zIBPBzjCO\nF1fKQVXL4Vm/yp99d1cpLf9WVaFJIzu5TfNsDOUiqKbig/pup0X/jwBfM4Sr0Nvn\nQm6zBljgbw1mzZ6oOLvP2Fi9rzqdnFAZnDx6u6uHklAKdxAXkwGK85kztW9wTuNX\nxU/ybccqNRzFpbg7eU9Qc0vRPos4AJoIFxqfTq/p5D7xHmQNxR46/7J0WbusT3sd\nq5ZbXlAGWnp4IuOHI+uq1wnSjRN1fKvo26zMISdWEnvgGuxZW/zPEXpy1GZOVxcl\nvBEn5X4dv+I945ye3dl2zMdWeTM7YQgv/QlIkDjt0O74dnQ3AoIBAQDGOKYAcJ1z\nmCaU+W70yj49uRDKptUeAEY2yDAdhKhGdKLpnvfa6qCO7bkRr11zBujlxzNd5U38\nKmnNwYepTkPuzFrWf6GhTh7tidz5XjoUSZrWNs6/lruxitkUal22mYcnJRhoXvQE\nm7dh5YbwHUVFk3EplZu2k05hDs6w8TglrIH4D9P1JTObhHSvLXxph5+NTyk/mEeR\nR3i2j1hE+z1FmDyJDSAUa2dVRihPXje7JZQ1oS2IC7g6NoisaIzK85983NQKzUEt\nLV11mHGg+3h3IVnfXQqn0/L9EDEK8QansFPqNwXwIvkCUO78De5tHro9ggC/hSrm\nIAyoqFguHFULAoIBAA0/jNrith86ASApUjqXolTK6CkjHCbJh2ZDiSe11wc/hTGu\n+WVpT2NmC+xY+G3D65xOcYWg7jtLM980MTgyqOq1wkjwNocbhYBesmrNF0pdboMf\n/FTJ6/GhKp7m7yVQv+R83ziEDePcF8w9Y4D+XJwkD2MpPw+WyRo8so0+NUuUDDf6\nJLnegbe5GxHtRahTrax/JbrJxeOztqwhkigx61SatKIYHcHpvzL2Z+cVYDsarNdv\nJFhbgJ2VPe0ur6FB6nvPVh50jylSPilRutWrE+vu1n7s2yNKhKxIzemcbcsnSlMx\nTRTsypYlhm2DtOxByav0ijWdaANgR9dKGsN2IcsCggEAahiMEZQ1UlfP3tEbaH6P\nje3uZOmjDGnNKyk/R61nfD6VrEHgHBaVVas78ZFRjW3XXpWektVXRm9VLkI14JL5\nnWlX/ZNW6cWsnCu8UOT0ZUN4UswHIVkGoWLWCi1cd435XyRlygd4yLaoEwgNj5u7\nJiBi44UmUTTLMPwB+YdDLDcHYcTnCEGfO9BLvC+2da2X4sTKKTXSqJn+rIhREKsB\nAq0XSavyzbsnFed1T/X4En1stL/OZREQzGfAA7f6E+8OIID6JcXy6sFrUrQDrcyr\nj+gT+JAOUgIJ/xWZimezzjF82NIWpY+yhGDZaaPzSAi4Wo+o4tneOkpRPDzO5e9Y\nPQKCAQApI1xb8+x7ye2OU06flFnpOP1UGo5OQnlBU1xdc+TeyKebmBsODxVNQbk6\nqmQm1pheNhNQ3fSy1wDVsa1pzLMhLHhez/q3Qd9fD4EfDptzhA58T0+JD8udZZDi\n9SCej498NV3u0W9G5Os2D5dVpY9TV+ji9mW07RYx4mzb6RECDzBxACVy+NnZpQrb\nF3oMitM/6gGltiR2fQiPmnsvP0Ww2YDvP3LG/Zi3xVqDH9IsVYPCLXov4EiVal9O\nxID6vIb5sesjKCvivG0gOVE+nmpkqCSRezXzy1Tjl68sfK9Mt5U5/LNgk/no/ugg\nm+plMlI71CJsCRJtYctOeGAYm/6V\n-----END PRIVATE KEY-----\n"
}
}
Response samples
- 201
- 400
- 401
- 403
- 500
- 503
{- "protocol": "HTTPS",
- "port": 443,
- "id": "fac06878-6655-4956-8ea7-124a97f133ab",
- "rules": [
- {
- "id": "b05917e1-96a4-442a-900c-c41f273d95c9",
- "default": true,
- "targetGroupId": "b05917e1-96a4-442a-900c-c41f273d95c9"
}
]
}
Get listener details
Get details about a listener
Authorizations:
path Parameters
loadBalancerId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Load balancer ID |
listenerId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Listener ID |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/loadBalancers/695ddd91-051f-4dd6-9120-938a927a47d0/listeners/695ddd91-051f-4dd6-9120-938a927a47d0 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 404
- 500
- 503
{- "protocol": "HTTPS",
- "port": 443,
- "id": "fac06878-6655-4956-8ea7-124a97f133ab",
- "rules": [
- {
- "id": "b05917e1-96a4-442a-900c-c41f273d95c9",
- "default": true,
- "targetGroupId": "b05917e1-96a4-442a-900c-c41f273d95c9"
}
], - "sslCertificates": [
- {
- "chain": "-----BEGIN CERTIFICATE-----MIICNDCCAZ2gAwIBAgIUEby6nzM+o7vkKfzcMS/DGA8tgwQwDQYJKoZIhvcNAQELBQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0yNDA0MjUwODE3MjZaFw0yNTA0MjUwODE3MjZaMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMMiux2r1AFLVpIhdZ0bvgIvhiT9XCnfHJlGE7OarGKDKJDQ6XAquCfosLws2XAugGcMJWrsqVWtJEYSu6OMsDLYCJhh39AKqZIW0pktkr8LGlo4VLvzGPqwpHnzWthyCEFsE6p+JJQumDA/izJm2zjZL+xHDocOlNqDTB87AIdrAgMBAAGjITAfMB0GA1UdDgQWBBT3sXUrIR2vcwak0QCXoIsxHa4dDDANBgkqhkiG9w0BAQsFAAOBgQCh/l+5s713J02b8sWicUK2KjTPfyKmZFkoS+Mlo+//B/aM612ZJpGL2tAKGF3v0NDOrRYLZj0t/tlZI55pUNJI9cNj/RExvnfTSSNJIbV+8kQt5AHo50wGxj/apkuEtQre2Fpf4pyovcfIoF6HJvvp1jy96yL14UoEehZypR8FlA==-----END CERTIFICATE-----",
- "certificate": "-----BEGIN CERTIFICATE-----MIIBhDCB7gIBADBFMQswCQYDVQQGEwJBVTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCtWdKNbZxvkXKAADjJMJ7VTJz6uFoMD403C+gMIF8hwqIsHggzCao6iXrW9sZoyZtUBVBiiq5RumHbbpwvOdMmXrShEB4sTJkWRMDy7yD4D91WCU1fc10E/zBJMwssAvmHZo5kGW1Pj1N9ktb+O/TMsEc6yd5suvdQj6aaJbQlTQIDAQABoAAwDQYJKoZIhvcNAQELBQADgYEAWOQ2CJLRo8MQgJgvhdoSIkHITnrbjB5hS3f/dx0lIcnyI6Q9nOyuQHXkCgkdBaV8lz7l+IbqcGc3CaIRP2ZIVFvo2252n630tOOSsqoqJS1tYIoIKsohi3T3d8T1i/s0BWbTJi8Xgd186wyUn/jHwXROKx2rq6yYsAO6fISDKw8=-----END CERTIFICATE-----",
- "privateKey": "-----BEGIN EC PRIVATE KEY-----MIHcAgEBBEIBVlC0IObonfQZIQ81l/WILKfWT5Fv96eNnYmQZ7uleu73igfiVESVuPfNlbW9oNEK1XcXli4YNZMxWMkKuzC3w8CgBwYFK4EEACOhgYkDgYYABAHvOqz9d2xeSpm1FNdw0NR5j/q6PMd6whZFsTPNYNj0/PsTpsHk78ZB4MYnJUXwHJjpj+gnKkLNc02f4w/vSF8VXADX4l40XU/w82TAOCftQwoxO5o0jZcwEUIYzl02Zd7uNxhjtKJQnYFi9x8WI8L8zQ6GZB/fJKYwoHaUr0I1h/5LzQ==-----END EC PRIVATE KEY-----"
}
]
}
Update a listener
Authorizations:
path Parameters
loadBalancerId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Load balancer ID |
listenerId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Listener ID |
Request Body schema: application/jsonrequired
protocol | string (protocol) Enum: "HTTP" "HTTPS" "TCP" |
port | integer Port that the listener listens to |
object (sslCertificate) | |
object (loadBalancerListenerDefaultRule) |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "protocol": "HTTPS",
- "port": 443,
- "defaultRule": {
- "targetGroupId": "b05917e1-96a4-442a-900c-c41f273d95c9"
}, - "certificate": {
- "chain": "-----BEGIN CERTIFICATE-----MIICNDCCAZ2gAwIBAgIUEby6nzM+o7vkKfzcMS/DGA8tgwQwDQYJKoZIhvcNAQELBQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0yNDA0MjUwODE3MjZaFw0yNTA0MjUwODE3MjZaMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMMiux2r1AFLVpIhdZ0bvgIvhiT9XCnfHJlGE7OarGKDKJDQ6XAquCfosLws2XAugGcMJWrsqVWtJEYSu6OMsDLYCJhh39AKqZIW0pktkr8LGlo4VLvzGPqwpHnzWthyCEFsE6p+JJQumDA/izJm2zjZL+xHDocOlNqDTB87AIdrAgMBAAGjITAfMB0GA1UdDgQWBBT3sXUrIR2vcwak0QCXoIsxHa4dDDANBgkqhkiG9w0BAQsFAAOBgQCh/l+5s713J02b8sWicUK2KjTPfyKmZFkoS+Mlo+//B/aM612ZJpGL2tAKGF3v0NDOrRYLZj0t/tlZI55pUNJI9cNj/RExvnfTSSNJIbV+8kQt5AHo50wGxj/apkuEtQre2Fpf4pyovcfIoF6HJvvp1jy96yL14UoEehZypR8FlA==-----END CERTIFICATE-----",
- "certificate": "-----BEGIN CERTIFICATE-----\nMIIGCTCCA/GgAwIBAgIUbgSw+3dtcx8IsHuUN0L/n6xRKjMwDQYJKoZIhvcNAQEL\nBQAwgZMxCzAJBgNVBAYTAk5MMRMwEQYDVQQIDApTb21lLVN0YXRlMRIwEAYDVQQH\nDAlBbXN0ZXJkYW0xFTATBgNVBAoMDExlYXNld2ViIExkYTELMAkGA1UECwwCSVQx\nFTATBgNVBAMMDGxlYXNld2ViLmNvbTEgMB4GCSqGSIb3DQEJARYRdGVzdEBsZWFz\nZXdlYi5jb20wHhcNMjQxMTE5MDg1MDI3WhcNMjUxMTE5MDg1MDI3WjCBkzELMAkG\nA1UEBhMCTkwxEzARBgNVBAgMClNvbWUtU3RhdGUxEjAQBgNVBAcMCUFtc3RlcmRh\nbTEVMBMGA1UECgwMTGVhc2V3ZWIgTGRhMQswCQYDVQQLDAJJVDEVMBMGA1UEAwwM\nbGVhc2V3ZWIuY29tMSAwHgYJKoZIhvcNAQkBFhF0ZXN0QGxlYXNld2ViLmNvbTCC\nAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAJqDbIUyZ34g8BvPmtsQxdrf\nteHbvH+27kVFjTKFVVtsKqMpUJ1OL4S4WvzcdGCp1051Qs2ePA6Xmh94yAUrwcsF\n1HZyXlguVs9lc25F0fVaL7kiSBYKbjVDb1muPmlzOEPb3c6jvOoERB4gtMSaGsd/\nC5HRIrXtA2aHDoLDSPeDlPO/zFYWRmT6QAgM8m6IsfmYH5071m8XtNPWWXr6By74\nPv9cjtjuHXNNyaKTrH/ak1OUNq1+BcRk30Mq0WRlpJ0bKk0NpBvVoaccFaYbNoBg\ngorofLVJZDAeachCovepGw6Bhi0Re4W0YNHghPJpUyd9+2JutRzSSqX5FKlceHUy\nu719B3eJ2D8YxMYw4r+CUx+bFbJxxa+8QVOQzCW8rM9BzcP5ia4sQy7yboqxl5Xx\npZK9VLp1SmhRewFJUm59pZLxfq/yKON0O6Xt1ROwca4T8C+TyeLGAFXjOTopa26I\nHMV/HMr2jeX15h3vMQw1VBFtUzIfaQEDlf0NUXAMbJuFWCC9gfYQhsWWVry98teD\n/wEyD1OHGVpo4ZBK852/PSYBozOSrg5VEdRGv7pcrYVj13EJariW4aWFYGnVHEDy\ncPg3yLS2B0+EfCKaaIPWG/H3x8BlrfUq/Nw7VXRZbFCCHQ5s40aJbMgxlsn+peJy\nxI3f4RIn6TBz04KZsUFdAgMBAAGjUzBRMB0GA1UdDgQWBBSQUaWTlJw4MUG916ds\nHL7eaKvh9TAfBgNVHSMEGDAWgBSQUaWTlJw4MUG916dsHL7eaKvh9TAPBgNVHRMB\nAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4ICAQBOU+aAsHw5cgpE/C1ZcXs1ofGp\n6OeoE3e1GRxyJMKB+iG5oG9RlbYgGG9Y4CRmxDKpeEVr/L2udCtFlBUonG2dHzbk\nxe0FdSAeTXgAfUbZypwCgu7Vdu0lT6WOsormoU2i1t+zoyZjT5S2fsfllaSa3rhy\nevVxY4V8p1KS9t123hb/Ic6J4bTCnKniRYyACqb+/36W8NxPU9EoP8t1pgNGLBnV\nDofoL/Z5kTjXTULQ2opXjbtCRrxoBl3NjIfxVQqIoFuo8uEisHIPDzfzP30hBNpr\n+4I5VHY1ERKZoPQ13PhQ63MhaXu2Dpb6e7WXrajbn2sulxaYbyJliN8Qcgh66TE7\nkpEjaTOFc3XUTIzYnI5CkVnp9evGyE68YCzuHsUrpTqCcCQ+fTNvEyskavHa+HnS\n5q06AQaP5aTXXhE/wxR3+X9k5G7dM/gmvdM+PvH+Bl8oPbclRNJ0X7J7K5toXFN6\ngqtcNiWrOHwiWthoSL9cB1pqQqynhfh9YbrcMG1thZtZxBpsOznJBVnh+fD9WZ5c\nuDMDnYBuL9DwsbPYHe8+5XUtX/aO07ea0LlNie56N3t5JgYZQJA3q0DiRrPjfI4C\nHogUG60UcBk51FyrnF3UQAbwhCnldKLGp0F69r2+qbByJudMTeBUIak+RXkicbWA\nFdk6z55BF6MzAC6iXA==\n-----END CERTIFICATE-----\n",
- "privateKey": "-----BEGIN PRIVATE KEY-----\nMIIJQQIBADANBgkqhkiG9w0BAQEFAASCCSswggknAgEAAoICAQCag2yFMmd+IPAb\nz5rbEMXa37Xh27x/tu5FRY0yhVVbbCqjKVCdTi+EuFr83HRgqddOdULNnjwOl5of\neMgFK8HLBdR2cl5YLlbPZXNuRdH1Wi+5IkgWCm41Q29Zrj5pczhD293Oo7zqBEQe\nILTEmhrHfwuR0SK17QNmhw6Cw0j3g5Tzv8xWFkZk+kAIDPJuiLH5mB+dO9ZvF7TT\n1ll6+gcu+D7/XI7Y7h1zTcmik6x/2pNTlDatfgXEZN9DKtFkZaSdGypNDaQb1aGn\nHBWmGzaAYIKK6Hy1SWQwHmnIQqL3qRsOgYYtEXuFtGDR4ITyaVMnfftibrUc0kql\n+RSpXHh1Mru9fQd3idg/GMTGMOK/glMfmxWyccWvvEFTkMwlvKzPQc3D+YmuLEMu\n8m6KsZeV8aWSvVS6dUpoUXsBSVJufaWS8X6v8ijjdDul7dUTsHGuE/Avk8nixgBV\n4zk6KWtuiBzFfxzK9o3l9eYd7zEMNVQRbVMyH2kBA5X9DVFwDGybhVggvYH2EIbF\nlla8vfLXg/8BMg9ThxlaaOGQSvOdvz0mAaMzkq4OVRHURr+6XK2FY9dxCWq4luGl\nhWBp1RxA8nD4N8i0tgdPhHwimmiD1hvx98fAZa31KvzcO1V0WWxQgh0ObONGiWzI\nMZbJ/qXicsSN3+ESJ+kwc9OCmbFBXQIDAQABAoICABqhMe/W2w1a4eb5JchBoMfz\nLGart1YPkgswTIB7iFWEU+jg8vrZgckO+OeBmzEZtHjaLtQ/RDyDllV8PITfoLu7\n2n07gtURz3ZZFsbXk7MEgxsWNHRQAeR+Jc+//xOvfu/7EcROZf2zFIZYvq7vnFPr\nqnPMJn5SRfbCqhaRT58Q93f3A2GG30UB+E0q5hF0z6+jrzcrG+7zl/+2fp96Pgiz\nUjAypI/wofTAYFL7vowegKuz7KSEBrxtYikyVPpHplJJX0X+Zt1BOWYSqgyBvifr\n+jO0k+Gur2y3oSWZjnq+k2Ixoo1b6P0HNHSXjHI3AtTYmp3BVMeN2r22KwBxZnUP\n5inbLkF28QezyzrhtR9PDZiqb3X0xKn+WhUYuO6VL6qUbbibbWM5bM/AdW4DC0Ig\nop4nQLebMEJ8fyjC7jfdJJ6EahCNKHUR5RgV4YXXfi+fanLsdMZJWUMt7hCPBFXg\nKXviSItVpnh5iPwDporAwUQMtwtDv7a1Dgyn04bMje+TEbiBj0hc2CcE8YEdpnJz\nPsKeBUET1vKah5GZLWSatuxRRfydd54vOkU1EGyTPxN+Shvg0pJpnq40NAYTHGUh\n0OmyXAOlfPe7WJsdLREZp9c9kfptGJ9frmjgWVnxi50qsi5/QQvgSucr2UBnWSVy\nd5Kw1rjM/ilEUwvR8FtlAoIBAQDHjUYZvsAKXN2XD51iTwN/Gh7zbL9zIBPBzjCO\nF1fKQVXL4Vm/yp99d1cpLf9WVaFJIzu5TfNsDOUiqKbig/pup0X/jwBfM4Sr0Nvn\nQm6zBljgbw1mzZ6oOLvP2Fi9rzqdnFAZnDx6u6uHklAKdxAXkwGK85kztW9wTuNX\nxU/ybccqNRzFpbg7eU9Qc0vRPos4AJoIFxqfTq/p5D7xHmQNxR46/7J0WbusT3sd\nq5ZbXlAGWnp4IuOHI+uq1wnSjRN1fKvo26zMISdWEnvgGuxZW/zPEXpy1GZOVxcl\nvBEn5X4dv+I945ye3dl2zMdWeTM7YQgv/QlIkDjt0O74dnQ3AoIBAQDGOKYAcJ1z\nmCaU+W70yj49uRDKptUeAEY2yDAdhKhGdKLpnvfa6qCO7bkRr11zBujlxzNd5U38\nKmnNwYepTkPuzFrWf6GhTh7tidz5XjoUSZrWNs6/lruxitkUal22mYcnJRhoXvQE\nm7dh5YbwHUVFk3EplZu2k05hDs6w8TglrIH4D9P1JTObhHSvLXxph5+NTyk/mEeR\nR3i2j1hE+z1FmDyJDSAUa2dVRihPXje7JZQ1oS2IC7g6NoisaIzK85983NQKzUEt\nLV11mHGg+3h3IVnfXQqn0/L9EDEK8QansFPqNwXwIvkCUO78De5tHro9ggC/hSrm\nIAyoqFguHFULAoIBAA0/jNrith86ASApUjqXolTK6CkjHCbJh2ZDiSe11wc/hTGu\n+WVpT2NmC+xY+G3D65xOcYWg7jtLM980MTgyqOq1wkjwNocbhYBesmrNF0pdboMf\n/FTJ6/GhKp7m7yVQv+R83ziEDePcF8w9Y4D+XJwkD2MpPw+WyRo8so0+NUuUDDf6\nJLnegbe5GxHtRahTrax/JbrJxeOztqwhkigx61SatKIYHcHpvzL2Z+cVYDsarNdv\nJFhbgJ2VPe0ur6FB6nvPVh50jylSPilRutWrE+vu1n7s2yNKhKxIzemcbcsnSlMx\nTRTsypYlhm2DtOxByav0ijWdaANgR9dKGsN2IcsCggEAahiMEZQ1UlfP3tEbaH6P\nje3uZOmjDGnNKyk/R61nfD6VrEHgHBaVVas78ZFRjW3XXpWektVXRm9VLkI14JL5\nnWlX/ZNW6cWsnCu8UOT0ZUN4UswHIVkGoWLWCi1cd435XyRlygd4yLaoEwgNj5u7\nJiBi44UmUTTLMPwB+YdDLDcHYcTnCEGfO9BLvC+2da2X4sTKKTXSqJn+rIhREKsB\nAq0XSavyzbsnFed1T/X4En1stL/OZREQzGfAA7f6E+8OIID6JcXy6sFrUrQDrcyr\nj+gT+JAOUgIJ/xWZimezzjF82NIWpY+yhGDZaaPzSAi4Wo+o4tneOkpRPDzO5e9Y\nPQKCAQApI1xb8+x7ye2OU06flFnpOP1UGo5OQnlBU1xdc+TeyKebmBsODxVNQbk6\nqmQm1pheNhNQ3fSy1wDVsa1pzLMhLHhez/q3Qd9fD4EfDptzhA58T0+JD8udZZDi\n9SCej498NV3u0W9G5Os2D5dVpY9TV+ji9mW07RYx4mzb6RECDzBxACVy+NnZpQrb\nF3oMitM/6gGltiR2fQiPmnsvP0Ww2YDvP3LG/Zi3xVqDH9IsVYPCLXov4EiVal9O\nxID6vIb5sesjKCvivG0gOVE+nmpkqCSRezXzy1Tjl68sfK9Mt5U5/LNgk/no/ugg\nm+plMlI71CJsCRJtYctOeGAYm/6V\n-----END PRIVATE KEY-----\n"
}
}
Response samples
- 200
- 400
- 401
- 403
- 500
- 503
{- "protocol": "HTTPS",
- "port": 443,
- "id": "fac06878-6655-4956-8ea7-124a97f133ab",
- "rules": [
- {
- "id": "b05917e1-96a4-442a-900c-c41f273d95c9",
- "default": true,
- "targetGroupId": "b05917e1-96a4-442a-900c-c41f273d95c9"
}
]
}
Delete load balancer listener
Delete a listener
Authorizations:
path Parameters
loadBalancerId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Load balancer ID |
listenerId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Listener ID |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request DELETE \ --url https://api.leaseweb.com/publicCloud/v1/loadBalancers/695ddd91-051f-4dd6-9120-938a927a47d0/listeners/695ddd91-051f-4dd6-9120-938a927a47d0 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
List IP addresses associated with a specific Instance
List the Instance's IPs
Authorizations:
path Parameters
instanceId required | string <uuid> Example: ace712e9-a166-47f1-9065-4af0f7e7fce1 Instance's ID |
query Parameters
version | integer Enum: 4 6 Ip version |
nullRouted | boolean |
ips | string A list of IPs separated by |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/instances/ace712e9-a166-47f1-9065-4af0f7e7fce1/ips?version=SOME_INTEGER_VALUE&nullRouted=SOME_BOOLEAN_VALUE&ips=SOME_STRING_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 404
- 500
- 503
{- "_metadata": {
- "totalCount": 1,
- "limit": 20,
- "offset": 0
}, - "ips": [
- {
- "ip": "10.0.0.1",
- "prefixLength": "28",
- "version": 4,
- "reverseLookup": null,
- "mainIp": false,
- "nullRouted": false,
- "networkType": "INTERNAL",
- "ddos": {
- "detectionProfile": "STANDARD_DEFAULT",
- "protectionType": "STANDARD"
}
}
]
}
List IP addresses associated with a specific Load Balancer
List the Load Balancers IPs
Authorizations:
path Parameters
loadBalancerId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Load balancer ID |
query Parameters
version | integer Enum: 4 6 Ip version |
nullRouted | boolean |
ips | string A list of IPs separated by |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/loadBalancers/695ddd91-051f-4dd6-9120-938a927a47d0/ips?version=SOME_INTEGER_VALUE&nullRouted=SOME_BOOLEAN_VALUE&ips=SOME_STRING_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 404
- 500
- 503
{- "_metadata": {
- "totalCount": 1,
- "limit": 20,
- "offset": 0
}, - "ips": [
- {
- "ip": "10.0.0.1",
- "prefixLength": "28",
- "version": 4,
- "reverseLookup": null,
- "mainIp": false,
- "nullRouted": false,
- "networkType": "INTERNAL",
- "ddos": {
- "detectionProfile": "STANDARD_DEFAULT",
- "protectionType": "STANDARD"
}
}
]
}
Get IP details for a specific Instance
Authorizations:
path Parameters
instanceId required | string <uuid> Example: ace712e9-a166-47f1-9065-4af0f7e7fce1 Instance's ID |
ip required | string <ip> Example: 10.0.0.1 |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/instances/ace712e9-a166-47f1-9065-4af0f7e7fce1/ips/10.0.0.1 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 404
- 500
- 503
{- "ip": "10.0.0.1",
- "prefixLength": "28",
- "version": 4,
- "reverseLookup": "a-valid-domain.xpto",
- "mainIp": false,
- "networkType": "INTERNAL",
- "nullRouted": true,
- "ddos": {
- "detectionProfile": "STANDARD_DEFAULT",
- "protectionType": "STANDARD"
}
}
Update the IP address for a specific Instance
Allows you to set the reverse lookup for the IP
Authorizations:
path Parameters
instanceId required | string <uuid> Example: ace712e9-a166-47f1-9065-4af0f7e7fce1 Instance's ID |
ip required | string <ip> Example: 10.0.0.1 |
Request Body schema: application/jsonrequired
reverseLookup required | string |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "reverseLookup": "a-valid-domain.xpto"
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "ip": "10.0.0.1",
- "prefixLength": "28",
- "version": 4,
- "reverseLookup": "a-valid-domain.xpto",
- "mainIp": false,
- "networkType": "INTERNAL",
- "nullRouted": true,
- "ddos": {
- "detectionProfile": "STANDARD_DEFAULT",
- "protectionType": "STANDARD"
}
}
Get IP details for a specific Load Balancer
Authorizations:
path Parameters
loadBalancerId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Load balancer ID |
ip required | string <ip> Example: 10.0.0.1 |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/loadBalancers/695ddd91-051f-4dd6-9120-938a927a47d0/ips/10.0.0.1 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 404
- 500
- 503
{- "ip": "10.0.0.1",
- "prefixLength": "28",
- "version": 4,
- "reverseLookup": "a-valid-domain.xpto",
- "mainIp": false,
- "networkType": "INTERNAL",
- "nullRouted": true,
- "ddos": {
- "detectionProfile": "STANDARD_DEFAULT",
- "protectionType": "STANDARD"
}
}
Update the IP address for a specific Load Balancer
Allows you to set the reverse lookup for the IP
Authorizations:
path Parameters
loadBalancerId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Load balancer ID |
ip required | string <ip> Example: 10.0.0.1 |
Request Body schema: application/jsonrequired
reverseLookup required | string |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "reverseLookup": "a-valid-domain.xpto"
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "ip": "10.0.0.1",
- "prefixLength": "28",
- "version": 4,
- "reverseLookup": "a-valid-domain.xpto",
- "mainIp": false,
- "networkType": "INTERNAL",
- "nullRouted": true,
- "ddos": {
- "detectionProfile": "STANDARD_DEFAULT",
- "protectionType": "STANDARD"
}
}
Null route IP address for a specific resource Instance
Null route an IP. It may take a few minutes before the change is propagated across the network.
Only works for IPv4.
Authorizations:
path Parameters
instanceId required | string <uuid> Example: ace712e9-a166-47f1-9065-4af0f7e7fce1 Instance's ID |
ip required | string <ip> Example: 10.0.0.1 |
Request Body schema: application/jsonoptional
comment | string The reason why the IP is being null-routed |
automatedUnnulingAt | integer [ 1 .. 17520 ] If provided, reverts the operation automatically in the specified value, in hours |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "automatedUnnulingAt": 2,
- "comment": "Getting DDoS"
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "ip": "10.0.0.1",
- "prefixLength": "28",
- "version": 4,
- "reverseLookup": "a-valid-domain.xpto",
- "mainIp": false,
- "networkType": "INTERNAL",
- "nullRouted": true,
- "ddos": {
- "detectionProfile": "STANDARD_DEFAULT",
- "protectionType": "STANDARD"
}
}
Null route IP address for a specific resource Load Balancer
Null route an IP. It may take a few minutes before the change is propagated across the network.
Only works for IPv4.
Authorizations:
path Parameters
loadBalancerId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Load balancer ID |
ip required | string <ip> Example: 10.0.0.1 |
Request Body schema: application/jsonoptional
comment | string The reason why the IP is being null-routed |
automatedUnnulingAt | integer [ 1 .. 17520 ] If provided, reverts the operation automatically in the specified value, in hours |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "automatedUnnulingAt": 2,
- "comment": "Getting DDoS"
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "ip": "10.0.0.1",
- "prefixLength": "28",
- "version": 4,
- "reverseLookup": "a-valid-domain.xpto",
- "mainIp": false,
- "networkType": "INTERNAL",
- "nullRouted": true,
- "ddos": {
- "detectionProfile": "STANDARD_DEFAULT",
- "protectionType": "STANDARD"
}
}
Remove an IP null route for a specific Instance
Remove an IP null route. It may take a few minutes before the change is propagated across the network
Authorizations:
path Parameters
instanceId required | string <uuid> Example: ace712e9-a166-47f1-9065-4af0f7e7fce1 Instance's ID |
ip required | string <ip> Example: 10.0.0.1 |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request POST \ --url https://api.leaseweb.com/publicCloud/v1/instances/ace712e9-a166-47f1-9065-4af0f7e7fce1/ips/10.0.0.1/unnull \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "ip": "10.0.0.1",
- "prefixLength": "28",
- "version": 4,
- "reverseLookup": "a-valid-domain.xpto",
- "mainIp": false,
- "networkType": "INTERNAL",
- "nullRouted": true,
- "ddos": {
- "detectionProfile": "STANDARD_DEFAULT",
- "protectionType": "STANDARD"
}
}
Remove an IP null route for a specific Load Balancer
Remove an IP null route. It may take a few minutes before the change is propagated across the network
Authorizations:
path Parameters
loadBalancerId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Load balancer ID |
ip required | string <ip> Example: 10.0.0.1 |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request POST \ --url https://api.leaseweb.com/publicCloud/v1/loadBalancers/695ddd91-051f-4dd6-9120-938a927a47d0/ips/10.0.0.1/unnull \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "ip": "10.0.0.1",
- "prefixLength": "28",
- "version": 4,
- "reverseLookup": "a-valid-domain.xpto",
- "mainIp": false,
- "networkType": "INTERNAL",
- "nullRouted": true,
- "ddos": {
- "detectionProfile": "STANDARD_DEFAULT",
- "protectionType": "STANDARD"
}
}
Get data traffic metrics for a specific Instance
Authorizations:
path Parameters
instanceId required | string <uuid> Example: ace712e9-a166-47f1-9065-4af0f7e7fce1 Instance's ID |
query Parameters
from | string <date> Example: from=2025-01-28 The start of the interval to get the metric |
to | string <date> Example: to=2025-01-28 The end of the interval to get the metric. Must be greater than the date provided in |
granularity | string Value: "DAY" How the metrics are grouped by |
aggregation | string Value: "SUM" How the metrics are aggregated |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/instances/ace712e9-a166-47f1-9065-4af0f7e7fce1/metrics/datatraffic?from=2025-01-28&to=2025-01-28&granularity=SOME_STRING_VALUE&aggregation=SOME_STRING_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "_metadata": {
- "from": "2023-10-01T00:00:00+00:00",
- "to": "2023-10-31T00:00:00+00:00",
- "granularity": "DAY",
- "aggregation": "SUM",
- "unit": "B",
- "summary": {
- "downPublic": {
- "average": 340733979,
- "expected": 10222019370,
- "total": 1022201937,
- "peak": {
- "value": 896116855,
- "timestamp": "2023-10-28T00:00:00+00:00"
}
}, - "upPublic": {
- "average": 59920023.67,
- "expected": 1797600710.1,
- "total": 179760071,
- "peak": {
- "value": 85089279,
- "timestamp": "2023-10-28T00:00:00+00:00"
}
}
}
}, - "metrics": {
- "downPublic": {
- "values": [
- {
- "value": 461323,
- "timestamp": "2023-10-27T00:00:00+00:00"
}, - {
- "value": 1249243,
- "timestamp": "2023-10-28T00:00:00+00:00"
}
], - "unit": "B"
}, - "upPublic": {
- "values": [
- {
- "value": 437565,
- "timestamp": "2023-10-27T00:00:00+00:00"
}, - {
- "value": 6938590,
- "timestamp": "2023-10-28T00:00:00+00:00"
}
], - "unit": "B"
}
}
}
Get data traffic metrics for a specific Load Balancer
Authorizations:
path Parameters
loadBalancerId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Load balancer ID |
query Parameters
from | string <date> Example: from=2025-01-28 The start of the interval to get the metric |
to | string <date> Example: to=2025-01-28 The end of the interval to get the metric. Must be greater than the date provided in |
granularity | string Value: "DAY" How the metrics are grouped by |
aggregation | string Value: "SUM" How the metrics are aggregated |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/loadBalancers/695ddd91-051f-4dd6-9120-938a927a47d0/metrics/datatraffic?from=2025-01-28&to=2025-01-28&granularity=SOME_STRING_VALUE&aggregation=SOME_STRING_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "_metadata": {
- "from": "2023-10-01T00:00:00+00:00",
- "to": "2023-10-31T00:00:00+00:00",
- "granularity": "DAY",
- "aggregation": "SUM",
- "unit": "B",
- "summary": {
- "downPublic": {
- "average": 340733979,
- "expected": 10222019370,
- "total": 1022201937,
- "peak": {
- "value": 896116855,
- "timestamp": "2023-10-28T00:00:00+00:00"
}
}, - "upPublic": {
- "average": 59920023.67,
- "expected": 1797600710.1,
- "total": 179760071,
- "peak": {
- "value": 85089279,
- "timestamp": "2023-10-28T00:00:00+00:00"
}
}
}
}, - "metrics": {
- "downPublic": {
- "values": [
- {
- "value": 461323,
- "timestamp": "2023-10-27T00:00:00+00:00"
}, - {
- "value": 1249243,
- "timestamp": "2023-10-28T00:00:00+00:00"
}
], - "unit": "B"
}, - "upPublic": {
- "values": [
- {
- "value": 437565,
- "timestamp": "2023-10-27T00:00:00+00:00"
}, - {
- "value": 6938590,
- "timestamp": "2023-10-28T00:00:00+00:00"
}
], - "unit": "B"
}
}
}
Get instance CPU metrics
Authorizations:
path Parameters
instanceId required | string <uuid> Example: ace712e9-a166-47f1-9065-4af0f7e7fce1 Instance's ID |
query Parameters
from | string <date> Example: from=2025-01-28 The start of the interval to get the metric |
to | string <date> Example: to=2025-01-28 The end of the interval to get the metric. Must be greater than the date provided in |
granularity | string Enum: "5m" "10m" "30m" "60m" The interval for each metric |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/instances/ace712e9-a166-47f1-9065-4af0f7e7fce1/metrics/cpu?from=2025-01-28&to=2025-01-28&granularity=SOME_STRING_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "_metadata": {
- "from": "2023-10-27T08:00:00+00:00",
- "to": "2023-10-28T08:00:00+00:00",
- "granularity": "5m",
- "unit": "%",
- "summary": {
- "cpuMetrics": {
- "average": 8.13,
- "expected": 8.13,
- "peak": {
- "value": 9.98,
- "timestamp": "2023-10-27T08:10:24+00:00"
}
}
}
}, - "metrics": {
- "cpuMetrics": {
- "values": [
- {
- "value": 5.45,
- "timestamp": "2023-10-27T08:00:00+00:00"
}, - {
- "value": 8.98,
- "timestamp": "2023-10-27T08:05:32+00:00"
}, - {
- "value": 9.98,
- "timestamp": "2023-10-27T08:10:24+00:00"
}
], - "unit": "%"
}
}
}
Get load balancer requests metrics
Authorizations:
path Parameters
loadBalancerId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Load balancer ID |
query Parameters
from | string <datetime> Example: from=2025-01-28T10:34:01+00:00 The start of the interval to get the metric, in ISO 8601 format |
to | string <datetime> Example: to=2025-01-28T11:44:01+00:00 The end of the interval to get the metric in format ISO 8601. Must be greater than the date provided in |
granularity | string Enum: "5m" "10m" "30m" "1h" "1d" "1w" The interval for each metric |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/loadBalancers/695ddd91-051f-4dd6-9120-938a927a47d0/metrics/requests?from=2025-01-28T10%3A34%3A01%2B00%3A00&to=2025-01-28T11%3A44%3A01%2B00%3A00&granularity=SOME_STRING_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "_metadata": {
- "from": "2024-09-14T00:00:00+00:00",
- "to": "2024-09-15T00:00:00+00:00",
- "granularity": "1h",
- "aggregation": "SUM"
}, - "metrics": {
- "values": [
- {
- "value": 0,
- "timestamp": "2024-09-20T14:25:00+00:00"
}, - {
- "value": 1,
- "timestamp": "2024-09-20T14:30:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-20T14:35:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-22T14:20:00+00:00"
}, - {
- "value": 1,
- "timestamp": "2024-09-22T14:25:00+00:00"
}
], - "unit": "requests"
}
}
Get load balancer requests per second metrics
Authorizations:
path Parameters
loadBalancerId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Load balancer ID |
query Parameters
from | string <datetime> Example: from=2025-01-28T10:34:01+00:00 The start of the interval to get the metric, in ISO 8601 format |
to | string <datetime> Example: to=2025-01-28T11:44:01+00:00 The end of the interval to get the metric in format ISO 8601. Must be greater than the date provided in |
granularity | string Enum: "5m" "10m" "30m" "1h" "1d" "1w" The interval for each metric |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/loadBalancers/695ddd91-051f-4dd6-9120-938a927a47d0/metrics/requestsPerSecond?from=2025-01-28T10%3A34%3A01%2B00%3A00&to=2025-01-28T11%3A44%3A01%2B00%3A00&granularity=SOME_STRING_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "_metadata": {
- "from": "2024-08-20T00:00:00+00:00",
- "to": "2024-09-24T12:10:00+00:00",
- "granularity": "60m",
- "aggregation": "SUM"
}, - "metrics": {
- "values": [
- {
- "value": 0.0038027332144979203,
- "timestamp": "2024-09-18T00:00:00+00:00"
}, - {
- "value": 0.005555555555555556,
- "timestamp": "2024-09-19T00:00:00+00:00"
}, - {
- "value": 0.0021064814814814813,
- "timestamp": "2024-09-23T00:00:00+00:00"
}, - {
- "value": 0.003321759259259259,
- "timestamp": "2024-09-24T00:00:00+00:00"
}
], - "unit": "requests/sec"
}
}
Get load balancer data transferred metrics
Authorizations:
path Parameters
loadBalancerId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Load balancer ID |
query Parameters
from | string <datetime> Example: from=2025-01-28T10:34:01+00:00 The start of the interval to get the metric, in ISO 8601 format |
to | string <datetime> Example: to=2025-01-28T11:44:01+00:00 The end of the interval to get the metric in format ISO 8601. Must be greater than the date provided in |
granularity | string Enum: "5m" "10m" "30m" "1h" "1d" "1w" The interval for each metric |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/loadBalancers/695ddd91-051f-4dd6-9120-938a927a47d0/metrics/dataTransferred?from=2025-01-28T10%3A34%3A01%2B00%3A00&to=2025-01-28T11%3A44%3A01%2B00%3A00&granularity=SOME_STRING_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "_metadata": {
- "from": "2024-09-14T00:00:00+00:00",
- "to": "2024-09-17T23:59:59+00:00",
- "granularity": "60m",
- "aggregation": "SUM"
}, - "metrics": {
- "dataIn": {
- "values": [
- {
- "value": 1491,
- "timestamp": "2024-09-14T00:00:00+00:00"
}, - {
- "value": 1566,
- "timestamp": "2024-09-14T01:00:00+00:00"
}, - {
- "value": 2643,
- "timestamp": "2024-09-14T02:00:00+00:00"
}, - {
- "value": 2047,
- "timestamp": "2024-09-14T03:00:00+00:00"
}
], - "unit": "B"
}, - "dataOut": {
- "values": [
- {
- "value": 3255,
- "timestamp": "2024-09-14T00:00:00+00:00"
}, - {
- "value": 3472,
- "timestamp": "2024-09-14T01:00:00+00:00"
}, - {
- "value": 2170,
- "timestamp": "2024-09-14T02:00:00+00:00"
}, - {
- "value": 2821,
- "timestamp": "2024-09-14T03:00:00+00:00"
}
], - "unit": "B"
}
}
}
Get load balancer data transferred per second metrics
Authorizations:
path Parameters
loadBalancerId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Load balancer ID |
query Parameters
from | string <datetime> Example: from=2025-01-28T10:34:01+00:00 The start of the interval to get the metric, in ISO 8601 format |
to | string <datetime> Example: to=2025-01-28T11:44:01+00:00 The end of the interval to get the metric in format ISO 8601. Must be greater than the date provided in |
granularity | string Enum: "5m" "10m" "30m" "1h" "1d" "1w" The interval for each metric |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/loadBalancers/695ddd91-051f-4dd6-9120-938a927a47d0/metrics/dataTransferredPerSecond?from=2025-01-28T10%3A34%3A01%2B00%3A00&to=2025-01-28T11%3A44%3A01%2B00%3A00&granularity=SOME_STRING_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "_metadata": {
- "from": "2024-09-14T00:00:00+00:00",
- "to": "2024-09-15T09:00:00+00:00",
- "granularity": "60m",
- "aggregation": "SUM"
}, - "metrics": {
- "dataIn": {
- "values": [
- {
- "value": 3.3133333333333335,
- "timestamp": "2024-09-14T00:00:00+00:00"
}, - {
- "value": 3.48,
- "timestamp": "2024-09-14T01:00:00+00:00"
}, - {
- "value": 5.873333333333333,
- "timestamp": "2024-09-14T02:00:00+00:00"
}, - {
- "value": 4.5488888888888885,
- "timestamp": "2024-09-14T03:00:00+00:00"
}
], - "unit": "b/s"
}, - "dataOut": {
- "values": [
- {
- "value": 7.2333333333333325,
- "timestamp": "2024-09-14T00:00:00+00:00"
}, - {
- "value": 7.7155555555555555,
- "timestamp": "2024-09-14T01:00:00+00:00"
}, - {
- "value": 4.822222222222222,
- "timestamp": "2024-09-14T02:00:00+00:00"
}, - {
- "value": 6.268888888888888,
- "timestamp": "2024-09-14T03:00:00+00:00"
}
], - "unit": "b/s"
}
}
}
Get connections metrics
Authorizations:
path Parameters
loadBalancerId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Load balancer ID |
query Parameters
from | string <datetime> Example: from=2025-01-28T10:34:01+00:00 The start of the interval to get the metric, in ISO 8601 format |
to | string <datetime> Example: to=2025-01-28T11:44:01+00:00 The end of the interval to get the metric in format ISO 8601. Must be greater than the date provided in |
granularity | string Enum: "5m" "10m" "30m" "1h" "1d" "1w" The interval for each metric |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/loadBalancers/695ddd91-051f-4dd6-9120-938a927a47d0/metrics/connections?from=2025-01-28T10%3A34%3A01%2B00%3A00&to=2025-01-28T11%3A44%3A01%2B00%3A00&granularity=SOME_STRING_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "_metadata": {
- "from": "2024-09-14T00:00:00+00:00",
- "to": "2024-09-15T00:00:00+00:00",
- "granularity": "1h",
- "aggregation": "SUM"
}, - "metrics": {
- "values": [
- {
- "value": 17,
- "timestamp": "2024-09-14T00:00:00+00:00"
}, - {
- "value": 18,
- "timestamp": "2024-09-14T01:00:00+00:00"
}, - {
- "value": 8,
- "timestamp": "2024-09-14T02:00:00+00:00"
}, - {
- "value": 13,
- "timestamp": "2024-09-14T03:00:00+00:00"
}, - {
- "value": 4,
- "timestamp": "2024-09-14T04:00:00+00:00"
}, - {
- "value": 6,
- "timestamp": "2024-09-14T05:00:00+00:00"
}, - {
- "value": 20,
- "timestamp": "2024-09-14T06:00:00+00:00"
}, - {
- "value": 16,
- "timestamp": "2024-09-14T07:00:00+00:00"
}, - {
- "value": 16,
- "timestamp": "2024-09-14T08:00:00+00:00"
}, - {
- "value": 27,
- "timestamp": "2024-09-14T09:00:00+00:00"
}, - {
- "value": 13,
- "timestamp": "2024-09-14T10:00:00+00:00"
}, - {
- "value": 20,
- "timestamp": "2024-09-14T11:00:00+00:00"
}, - {
- "value": 6,
- "timestamp": "2024-09-14T12:00:00+00:00"
}, - {
- "value": 21,
- "timestamp": "2024-09-14T13:00:00+00:00"
}, - {
- "value": 11,
- "timestamp": "2024-09-14T14:00:00+00:00"
}, - {
- "value": 7,
- "timestamp": "2024-09-14T15:00:00+00:00"
}, - {
- "value": 15,
- "timestamp": "2024-09-14T16:00:00+00:00"
}, - {
- "value": 6,
- "timestamp": "2024-09-14T17:00:00+00:00"
}, - {
- "value": 18,
- "timestamp": "2024-09-14T18:00:00+00:00"
}, - {
- "value": 7,
- "timestamp": "2024-09-14T19:00:00+00:00"
}, - {
- "value": 39,
- "timestamp": "2024-09-14T20:00:00+00:00"
}, - {
- "value": 12,
- "timestamp": "2024-09-14T21:00:00+00:00"
}, - {
- "value": 19,
- "timestamp": "2024-09-14T22:00:00+00:00"
}, - {
- "value": 3,
- "timestamp": "2024-09-14T23:00:00+00:00"
}, - {
- "value": 57,
- "timestamp": "2024-09-15T00:00:00+00:00"
}
], - "unit": "connections"
}
}
Get connections per second metrics
Authorizations:
path Parameters
loadBalancerId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Load balancer ID |
query Parameters
from | string <datetime> Example: from=2025-01-28T10:34:01+00:00 The start of the interval to get the metric, in ISO 8601 format |
to | string <datetime> Example: to=2025-01-28T11:44:01+00:00 The end of the interval to get the metric in format ISO 8601. Must be greater than the date provided in |
granularity | string Enum: "5m" "10m" "30m" "1h" "1d" "1w" The interval for each metric |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/loadBalancers/695ddd91-051f-4dd6-9120-938a927a47d0/metrics/connectionsPerSecond?from=2025-01-28T10%3A34%3A01%2B00%3A00&to=2025-01-28T11%3A44%3A01%2B00%3A00&granularity=SOME_STRING_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "_metadata": {
- "from": "2024-09-14T00:00:00+00:00",
- "to": "2024-09-15T00:00:00+00:00",
- "granularity": "1h",
- "aggregation": "SUM"
}, - "metrics": {
- "values": [
- {
- "value": 0.004722222222222222,
- "timestamp": "2024-09-14T00:00:00+00:00"
}, - {
- "value": 0.005,
- "timestamp": "2024-09-14T01:00:00+00:00"
}, - {
- "value": 0.0022222222222222222,
- "timestamp": "2024-09-14T02:00:00+00:00"
}, - {
- "value": 0.003611111111111111,
- "timestamp": "2024-09-14T03:00:00+00:00"
}, - {
- "value": 0.0011111111111111111,
- "timestamp": "2024-09-14T04:00:00+00:00"
}, - {
- "value": 0.0016666666666666668,
- "timestamp": "2024-09-14T05:00:00+00:00"
}, - {
- "value": 0.005555555555555556,
- "timestamp": "2024-09-14T06:00:00+00:00"
}, - {
- "value": 0.0044444444444444444,
- "timestamp": "2024-09-14T07:00:00+00:00"
}, - {
- "value": 0.0044444444444444444,
- "timestamp": "2024-09-14T08:00:00+00:00"
}, - {
- "value": 0.0075,
- "timestamp": "2024-09-14T09:00:00+00:00"
}, - {
- "value": 0.003611111111111111,
- "timestamp": "2024-09-14T10:00:00+00:00"
}, - {
- "value": 0.005555555555555556,
- "timestamp": "2024-09-14T11:00:00+00:00"
}, - {
- "value": 0.0016666666666666668,
- "timestamp": "2024-09-14T12:00:00+00:00"
}, - {
- "value": 0.005833333333333334,
- "timestamp": "2024-09-14T13:00:00+00:00"
}, - {
- "value": 0.0030555555555555557,
- "timestamp": "2024-09-14T14:00:00+00:00"
}, - {
- "value": 0.0019444444444444444,
- "timestamp": "2024-09-14T15:00:00+00:00"
}, - {
- "value": 0.004166666666666667,
- "timestamp": "2024-09-14T16:00:00+00:00"
}, - {
- "value": 0.0016666666666666666,
- "timestamp": "2024-09-14T17:00:00+00:00"
}, - {
- "value": 0.005,
- "timestamp": "2024-09-14T18:00:00+00:00"
}, - {
- "value": 0.0019444444444444444,
- "timestamp": "2024-09-14T19:00:00+00:00"
}, - {
- "value": 0.010833333333333334,
- "timestamp": "2024-09-14T20:00:00+00:00"
}, - {
- "value": 0.003333333333333333,
- "timestamp": "2024-09-14T21:00:00+00:00"
}, - {
- "value": 0.005277777777777778,
- "timestamp": "2024-09-14T22:00:00+00:00"
}, - {
- "value": 0.0008333333333333334,
- "timestamp": "2024-09-14T23:00:00+00:00"
}, - {
- "value": 0.01583333333333333,
- "timestamp": "2024-09-15T00:00:00+00:00"
}
], - "unit": "connections/s"
}
}
Get response codes metrics
Authorizations:
path Parameters
loadBalancerId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Load balancer ID |
query Parameters
from | string <datetime> Example: from=2025-01-28T10:34:01+00:00 The start of the interval to get the metric, in ISO 8601 format |
to | string <datetime> Example: to=2025-01-28T11:44:01+00:00 The end of the interval to get the metric in format ISO 8601. Must be greater than the date provided in |
granularity | string Enum: "5m" "10m" "30m" "1h" "1d" "1w" The interval for each metric |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/loadBalancers/695ddd91-051f-4dd6-9120-938a927a47d0/metrics/responseCodes?from=2025-01-28T10%3A34%3A01%2B00%3A00&to=2025-01-28T11%3A44%3A01%2B00%3A00&granularity=SOME_STRING_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "_metadata": {
- "from": "2024-09-14T00:00:00+00:00",
- "to": "2024-09-15T00:00:00+00:00",
- "granularity": "1h",
- "aggregation": "SUM"
}, - "metrics": {
- "2xx": {
- "values": [
- {
- "value": 0,
- "timestamp": "2024-09-14T00:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T01:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T02:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T03:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T04:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T05:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T06:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T07:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T08:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T09:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T10:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T11:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T12:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T13:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T14:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T15:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T16:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T17:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T18:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T19:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T20:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T21:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T22:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T23:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-15T00:00:00+00:00"
}
], - "unit": "responses"
}, - "3xx": {
- "values": [
- {
- "value": 0,
- "timestamp": "2024-09-14T00:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T01:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T02:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T03:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T04:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T05:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T06:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T07:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T08:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T09:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T10:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T11:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T12:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T13:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T14:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T15:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T16:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T17:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T18:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T19:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T20:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T21:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T22:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T23:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-15T00:00:00+00:00"
}
], - "unit": "responses"
}, - "4xx": {
- "values": [
- {
- "value": 2,
- "timestamp": "2024-09-14T00:00:00+00:00"
}, - {
- "value": 2,
- "timestamp": "2024-09-14T01:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T02:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T03:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T04:00:00+00:00"
}, - {
- "value": 1,
- "timestamp": "2024-09-14T05:00:00+00:00"
}, - {
- "value": 1,
- "timestamp": "2024-09-14T06:00:00+00:00"
}, - {
- "value": 5,
- "timestamp": "2024-09-14T07:00:00+00:00"
}, - {
- "value": 1,
- "timestamp": "2024-09-14T08:00:00+00:00"
}, - {
- "value": 12,
- "timestamp": "2024-09-14T09:00:00+00:00"
}, - {
- "value": 1,
- "timestamp": "2024-09-14T10:00:00+00:00"
}, - {
- "value": 2,
- "timestamp": "2024-09-14T11:00:00+00:00"
}, - {
- "value": 1,
- "timestamp": "2024-09-14T12:00:00+00:00"
}, - {
- "value": 4,
- "timestamp": "2024-09-14T13:00:00+00:00"
}, - {
- "value": 1,
- "timestamp": "2024-09-14T14:00:00+00:00"
}, - {
- "value": 3,
- "timestamp": "2024-09-14T15:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T16:00:00+00:00"
}, - {
- "value": 1,
- "timestamp": "2024-09-14T17:00:00+00:00"
}, - {
- "value": 4,
- "timestamp": "2024-09-14T18:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T19:00:00+00:00"
}, - {
- "value": 18,
- "timestamp": "2024-09-14T20:00:00+00:00"
}, - {
- "value": 1,
- "timestamp": "2024-09-14T21:00:00+00:00"
}, - {
- "value": 2,
- "timestamp": "2024-09-14T22:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T23:00:00+00:00"
}, - {
- "value": 5,
- "timestamp": "2024-09-15T00:00:00+00:00"
}
], - "unit": "responses"
}, - "5xx": {
- "values": [
- {
- "value": 15,
- "timestamp": "2024-09-14T00:00:00+00:00"
}, - {
- "value": 16,
- "timestamp": "2024-09-14T01:00:00+00:00"
}, - {
- "value": 10,
- "timestamp": "2024-09-14T02:00:00+00:00"
}, - {
- "value": 13,
- "timestamp": "2024-09-14T03:00:00+00:00"
}, - {
- "value": 4,
- "timestamp": "2024-09-14T04:00:00+00:00"
}, - {
- "value": 5,
- "timestamp": "2024-09-14T05:00:00+00:00"
}, - {
- "value": 19,
- "timestamp": "2024-09-14T06:00:00+00:00"
}, - {
- "value": 11,
- "timestamp": "2024-09-14T07:00:00+00:00"
}, - {
- "value": 15,
- "timestamp": "2024-09-14T08:00:00+00:00"
}, - {
- "value": 15,
- "timestamp": "2024-09-14T09:00:00+00:00"
}, - {
- "value": 12,
- "timestamp": "2024-09-14T10:00:00+00:00"
}, - {
- "value": 18,
- "timestamp": "2024-09-14T11:00:00+00:00"
}, - {
- "value": 5,
- "timestamp": "2024-09-14T12:00:00+00:00"
}, - {
- "value": 17,
- "timestamp": "2024-09-14T13:00:00+00:00"
}, - {
- "value": 10,
- "timestamp": "2024-09-14T14:00:00+00:00"
}, - {
- "value": 4,
- "timestamp": "2024-09-14T15:00:00+00:00"
}, - {
- "value": 15,
- "timestamp": "2024-09-14T16:00:00+00:00"
}, - {
- "value": 5,
- "timestamp": "2024-09-14T17:00:00+00:00"
}, - {
- "value": 14,
- "timestamp": "2024-09-14T18:00:00+00:00"
}, - {
- "value": 7,
- "timestamp": "2024-09-14T19:00:00+00:00"
}, - {
- "value": 20,
- "timestamp": "2024-09-14T20:00:00+00:00"
}, - {
- "value": 12,
- "timestamp": "2024-09-14T21:00:00+00:00"
}, - {
- "value": 17,
- "timestamp": "2024-09-14T22:00:00+00:00"
}, - {
- "value": 3,
- "timestamp": "2024-09-14T23:00:00+00:00"
}, - {
- "value": 52,
- "timestamp": "2024-09-15T00:00:00+00:00"
}
], - "unit": "responses"
}
}
}
Get response codes per second metrics
Authorizations:
path Parameters
loadBalancerId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Load balancer ID |
query Parameters
from | string <datetime> Example: from=2025-01-28T10:34:01+00:00 The start of the interval to get the metric, in ISO 8601 format |
to | string <datetime> Example: to=2025-01-28T11:44:01+00:00 The end of the interval to get the metric in format ISO 8601. Must be greater than the date provided in |
granularity | string Enum: "5m" "10m" "30m" "1h" "1d" "1w" The interval for each metric |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/loadBalancers/695ddd91-051f-4dd6-9120-938a927a47d0/metrics/responseCodesPerSecond?from=2025-01-28T10%3A34%3A01%2B00%3A00&to=2025-01-28T11%3A44%3A01%2B00%3A00&granularity=SOME_STRING_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "_metadata": {
- "from": "2024-09-14T00:00:00+00:00",
- "to": "2024-09-15T00:00:00+00:00",
- "granularity": "1h",
- "aggregation": "SUM"
}, - "metrics": {
- "2xx": {
- "values": [
- {
- "value": 0,
- "timestamp": "2024-09-14T00:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T01:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T02:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T03:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T04:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T05:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T06:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T07:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T08:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T09:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T10:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T11:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T12:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T13:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T14:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T15:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T16:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T17:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T18:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T19:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T20:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T21:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T22:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T23:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-15T00:00:00+00:00"
}
], - "unit": "responses/s"
}, - "3xx": {
- "values": [
- {
- "value": 0,
- "timestamp": "2024-09-14T00:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T01:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T02:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T03:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T04:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T05:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T06:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T07:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T08:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T09:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T10:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T11:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T12:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T13:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T14:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T15:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T16:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T17:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T18:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T19:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T20:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T21:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T22:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T23:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-15T00:00:00+00:00"
}
], - "unit": "responses/s"
}, - "4xx": {
- "values": [
- {
- "value": 0.0005555555555555556,
- "timestamp": "2024-09-14T00:00:00+00:00"
}, - {
- "value": 0.0005555555555555556,
- "timestamp": "2024-09-14T01:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T02:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T03:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T04:00:00+00:00"
}, - {
- "value": 0.0002777777777777778,
- "timestamp": "2024-09-14T05:00:00+00:00"
}, - {
- "value": 0.0002777777777777778,
- "timestamp": "2024-09-14T06:00:00+00:00"
}, - {
- "value": 0.001388888888888889,
- "timestamp": "2024-09-14T07:00:00+00:00"
}, - {
- "value": 0.0002777777777777778,
- "timestamp": "2024-09-14T08:00:00+00:00"
}, - {
- "value": 0.0033333333333333335,
- "timestamp": "2024-09-14T09:00:00+00:00"
}, - {
- "value": 0.0002777777777777778,
- "timestamp": "2024-09-14T10:00:00+00:00"
}, - {
- "value": 0.0005555555555555556,
- "timestamp": "2024-09-14T11:00:00+00:00"
}, - {
- "value": 0.0002777777777777778,
- "timestamp": "2024-09-14T12:00:00+00:00"
}, - {
- "value": 0.0011111111111111111,
- "timestamp": "2024-09-14T13:00:00+00:00"
}, - {
- "value": 0.0002777777777777778,
- "timestamp": "2024-09-14T14:00:00+00:00"
}, - {
- "value": 0.0008333333333333334,
- "timestamp": "2024-09-14T15:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T16:00:00+00:00"
}, - {
- "value": 0.0002777777777777778,
- "timestamp": "2024-09-14T17:00:00+00:00"
}, - {
- "value": 0.0011111111111111111,
- "timestamp": "2024-09-14T18:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T19:00:00+00:00"
}, - {
- "value": 0.005,
- "timestamp": "2024-09-14T20:00:00+00:00"
}, - {
- "value": 0.0002777777777777778,
- "timestamp": "2024-09-14T21:00:00+00:00"
}, - {
- "value": 0.0005555555555555556,
- "timestamp": "2024-09-14T22:00:00+00:00"
}, - {
- "value": 0,
- "timestamp": "2024-09-14T23:00:00+00:00"
}, - {
- "value": 0.001388888888888889,
- "timestamp": "2024-09-15T00:00:00+00:00"
}
], - "unit": "responses/s"
}, - "5xx": {
- "values": [
- {
- "value": 0.004166666666666667,
- "timestamp": "2024-09-14T00:00:00+00:00"
}, - {
- "value": 0.0044444444444444444,
- "timestamp": "2024-09-14T01:00:00+00:00"
}, - {
- "value": 0.002777777777777778,
- "timestamp": "2024-09-14T02:00:00+00:00"
}, - {
- "value": 0.003611111111111111,
- "timestamp": "2024-09-14T03:00:00+00:00"
}, - {
- "value": 0.0011111111111111111,
- "timestamp": "2024-09-14T04:00:00+00:00"
}, - {
- "value": 0.001388888888888889,
- "timestamp": "2024-09-14T05:00:00+00:00"
}, - {
- "value": 0.005277777777777778,
- "timestamp": "2024-09-14T06:00:00+00:00"
}, - {
- "value": 0.0030555555555555557,
- "timestamp": "2024-09-14T07:00:00+00:00"
}, - {
- "value": 0.004166666666666667,
- "timestamp": "2024-09-14T08:00:00+00:00"
}, - {
- "value": 0.004166666666666667,
- "timestamp": "2024-09-14T09:00:00+00:00"
}, - {
- "value": 0.003333333333333333,
- "timestamp": "2024-09-14T10:00:00+00:00"
}, - {
- "value": 0.005,
- "timestamp": "2024-09-14T11:00:00+00:00"
}, - {
- "value": 0.001388888888888889,
- "timestamp": "2024-09-14T12:00:00+00:00"
}, - {
- "value": 0.004722222222222222,
- "timestamp": "2024-09-14T13:00:00+00:00"
}, - {
- "value": 0.002777777777777778,
- "timestamp": "2024-09-14T14:00:00+00:00"
}, - {
- "value": 0.0011111111111111111,
- "timestamp": "2024-09-14T15:00:00+00:00"
}, - {
- "value": 0.004166666666666667,
- "timestamp": "2024-09-14T16:00:00+00:00"
}, - {
- "value": 0.001388888888888889,
- "timestamp": "2024-09-14T17:00:00+00:00"
}, - {
- "value": 0.0038888888888888888,
- "timestamp": "2024-09-14T18:00:00+00:00"
}, - {
- "value": 0.0019444444444444444,
- "timestamp": "2024-09-14T19:00:00+00:00"
}, - {
- "value": 0.005555555555555556,
- "timestamp": "2024-09-14T20:00:00+00:00"
}, - {
- "value": 0.003333333333333333,
- "timestamp": "2024-09-14T21:00:00+00:00"
}, - {
- "value": 0.004722222222222222,
- "timestamp": "2024-09-14T22:00:00+00:00"
}, - {
- "value": 0.0008333333333333334,
- "timestamp": "2024-09-14T23:00:00+00:00"
}, - {
- "value": 0.014444444444444444,
- "timestamp": "2024-09-15T00:00:00+00:00"
}
], - "unit": "responses/s"
}
}
}
Add instance to Private Network
Add instance to Private Network.
Cannot be performed when the instance has snapshots.
Authorizations:
path Parameters
instanceId required | string <uuid> Example: ace712e9-a166-47f1-9065-4af0f7e7fce1 Instance's ID |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request PUT \ --url https://api.leaseweb.com/publicCloud/v1/instances/ace712e9-a166-47f1-9065-4af0f7e7fce1/addToPrivateNetwork \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Remove instance from Private Network
Remove instance from Private Network.
Cannot be performed when the instance has snapshots.
Authorizations:
path Parameters
instanceId required | string <uuid> Example: ace712e9-a166-47f1-9065-4af0f7e7fce1 Instance's ID |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request DELETE \ --url https://api.leaseweb.com/publicCloud/v1/instances/ace712e9-a166-47f1-9065-4af0f7e7fce1/removeFromPrivateNetwork \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
List snapshots
List instance snapshots
Authorizations:
path Parameters
instanceId required | string <uuid> Example: ace712e9-a166-47f1-9065-4af0f7e7fce1 Instance's ID |
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/instances/ace712e9-a166-47f1-9065-4af0f7e7fce1/snapshots?limit=20&offset=10' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 404
- 500
- 503
{- "_metadata": {
- "totalCount": 1,
- "limit": 20,
- "offset": 0
}, - "snapshots": [
- {
- "id": "624c53c3-48e9-41d1-833f-90a9abf5fd95",
- "displayName": "snapshot 1",
- "state": "READY",
- "created": "2023-11-02T07:31:28+0000"
}
]
}
Create instance snapshot
The instance must be running before the execution.
The time taken to create the snapshot depends on several factors, including memory size and usage.
Allowed only one snapshot per instance.
Authorizations:
path Parameters
instanceId required | string <uuid> Example: ace712e9-a166-47f1-9065-4af0f7e7fce1 Instance's ID |
Request Body schema: application/jsonrequired
name required | string A name to identify your snapshot |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "name": "my snapshot"
}
Response samples
- 400
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Get snapshot detail
Authorizations:
path Parameters
instanceId required | string <uuid> Example: ace712e9-a166-47f1-9065-4af0f7e7fce1 Instance's ID |
snapshotId required | string <uuid> |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/instances/ace712e9-a166-47f1-9065-4af0f7e7fce1/snapshots/%7BsnapshotId%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 404
- 500
- 503
{- "created": "2023-11-02T07:31:28+0000",
- "displayName": "snapshot 1",
- "id": "ef73e9e2-95cd-49ef-940f-a24e6ad6c4a0",
- "state": "READY"
}
Restore instance snapshot
Authorizations:
path Parameters
instanceId required | string <uuid> Example: ace712e9-a166-47f1-9065-4af0f7e7fce1 Instance's ID |
snapshotId required | string <uuid> |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request PUT \ --url https://api.leaseweb.com/publicCloud/v1/instances/ace712e9-a166-47f1-9065-4af0f7e7fce1/snapshots/%7BsnapshotId%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Delete instance snapshot
Authorizations:
path Parameters
instanceId required | string <uuid> Example: ace712e9-a166-47f1-9065-4af0f7e7fce1 Instance's ID |
snapshotId required | string <uuid> |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request DELETE \ --url https://api.leaseweb.com/publicCloud/v1/instances/ace712e9-a166-47f1-9065-4af0f7e7fce1/snapshots/%7BsnapshotId%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Create Auto Scaling Group
Create an Auto Scaling Group.
Authorizations:
Request Body schema: application/jsonrequired
desiredAmount | integer >= 1 Required for "MANUAL" and "SCHEDULED" auto scaling group. Number of instances to be launched |
minimumAmount | integer >= 1 Required for "CPU_BASED". The minimum number of instances that should be running |
maximumAmount | integer >= 1 Required for "CPU_BASED" auto scaling group. The maximum number of instances that can be running |
cpuThreshold | integer [ 1 .. 100 ] Required for "CPU_BASED" auto scaling group. The target average CPU utilization for scaling |
warmupTime | integer [ 60 .. 900 ] Required for "CPU_BASED" auto scaling group. Warm-up time in seconds for new instances |
cooldownTime | integer [ 300 .. 900 ] Required for "CPU_BASED" auto scaling group. Cool-down time in seconds for new instances |
instanceId required | string <uuid> The instance on which instances will be based on. This instance needs to be either Running or Stopped |
reference required | string <= 255 characters The identifying name set to the auto scaling group |
type required | string Enum: "MANUAL" "SCHEDULED" "CPU_BASED" |
startsAt | string <date-time> Required for "SCHEDULED" auto scaling group. Date and time (UTC) that the instances need to be launched |
endsAt | string <date-time> Required for "SCHEDULED" auto scaling group. Date and time (UTC) that the instances need to be terminated |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "reference": "Manual scaling",
- "type": "MANUAL",
- "desiredAmount": 2,
- "instanceId": "6762182e-7ae9-4d0b-b3b7-bea5a49b3f94"
}
Response samples
- 201
- 400
- 401
- 403
- 500
- 503
{- "cooldownTime": null,
- "cpuThreshold": null,
- "createdAt": "2024-05-28T11:03:31+00:00",
- "desiredAmount": 2,
- "endsAt": null,
- "id": "4c3e9d29-9232-48af-93a7-7ec42b8c0f6d",
- "maximumAmount": null,
- "minimumAmount": null,
- "reference": "Manual Auto Scaling Group",
- "region": "eu-west-3",
- "startsAt": null,
- "state": "CREATING",
- "targetGroups": [ ],
- "type": "MANUAL",
- "updatedAt": "2024-05-28T11:03:31+00:00",
- "warmupTime": null
}
Get Auto Scaling Group list
List and filter Auto Scaling Groups
Authorizations:
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
id | string <uuid> Example: id=a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11 |
instanceId | string <uuid> Example: instanceId=6762182e-7ae9-4d0b-b3b7-bea5a49b3f94 |
type | string Enum: "MANUAL" "SCHEDULED" "CPU_BASED" The Auto Scaling Group's type |
region | string (regionName) Enum: "eu-west-3" "us-east-1" "eu-central-1" "ap-southeast-1" "us-west-1" "eu-west-2" "ca-central-1" "ap-northeast-1" Example: region=eu-west-3 The region in which the Auto Scaling Group was created |
reference | string The reference used to identify identifies the Auto Scaling Group |
state | string Enum: "ACTIVE" "CREATING" "CREATED" "DESTROYED" "DESTROYING" "SCALING" "UPDATING" The Auto Scaling Group's current state |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/autoScalingGroups?limit=20&offset=10&id=a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11&instanceId=6762182e-7ae9-4d0b-b3b7-bea5a49b3f94&type=SOME_STRING_VALUE®ion=eu-west-3&reference=SOME_STRING_VALUE&state=SOME_STRING_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 500
- 503
{- "_metadata": {
- "totalCount": 3,
- "limit": 10,
- "offset": 0
}, - "autoScalingGroups": [
- {
- "id": "fb769dab-3daa-47e4-89ed-06a4b6499176",
- "type": "MANUAL",
- "state": "ACTIVE",
- "desiredAmount": 2,
- "minimumAmount": null,
- "maximumAmount": null,
- "cpuThreshold": null,
- "warmupTime": null,
- "cooldownTime": null,
- "region": "eu-west-3",
- "reference": "Manual Auto Scaling Group",
- "createdAt": "2024-04-26T09:22:25+00:00",
- "updatedAt": "2024-04-26T09:22:25+00:00",
- "startsAt": null,
- "endsAt": null
}, - {
- "id": "aa0f2138-3a83-46fe-bdcf-1ad231f94a26",
- "type": "SCHEDULED",
- "state": "SCALING",
- "desiredAmount": 2,
- "minimumAmount": null,
- "maximumAmount": null,
- "cpuThreshold": null,
- "cooldownTime": null,
- "warmupTime": null,
- "region": "eu-west-3",
- "reference": "Scheduled Auto Scaling Group",
- "createdAt": "2024-05-13T15:49:52+00:00",
- "updatedAt": "2024-05-13T15:49:52+00:00",
- "startsAt": "2024-05-01T08:00:00+00:00",
- "endsAt": "2024-05-01T12:00:00+00:00"
}, - {
- "id": "49e28a6c-3f2a-442e-b3b1-981856d21677",
- "type": "CPU_BASED",
- "state": "CREATING",
- "desiredAmount": 1,
- "minimumAmount": 1,
- "maximumAmount": 3,
- "cpuThreshold": 50,
- "warmupTime": 300,
- "cooldownTime": 300,
- "region": "eu-west-3",
- "reference": "CPU Based Auto Scaling Group",
- "createdAt": "2024-05-13T15:49:52+00:00",
- "updatedAt": "2024-05-13T15:49:52+00:00",
- "startsAt": null,
- "endsAt": null
}
]
}
Delete Auto Scaling Group
Delete an Auto Scaling Group.
Authorizations:
path Parameters
autoScalingGroupId required | string <uuid> Example: fb769dab-3daa-47e4-89ed-06a4b6499176 Auto Scaling Group ID |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request DELETE \ --url https://api.leaseweb.com/publicCloud/v1/autoScalingGroups/fb769dab-3daa-47e4-89ed-06a4b6499176 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Update Auto Scaling Group
Update an Auto Scaling Group.
Authorizations:
path Parameters
autoScalingGroupId required | string <uuid> Example: fb769dab-3daa-47e4-89ed-06a4b6499176 Auto Scaling Group ID |
Request Body schema: application/jsonrequired
desiredAmount | integer >= 1 When "SCHEDULED", the number of instances that need to be running at the specified date and time. |
minimumAmount | integer >= 1 The minimum number of instances that should be running |
maximumAmount | integer >= 1 Only for "CPU_BASED" auto scaling group. The maximum number of instances that can be running |
cpuThreshold | integer [ 1 .. 100 ] Only for "CPU_BASED" auto scaling group. The target average CPU utilization for scaling |
warmupTime | integer [ 60 .. 900 ] Only for "CPU_BASED" auto scaling group. Warm-up time in seconds for new instances |
cooldownTime | integer [ 300 .. 900 ] Only for "CPU_BASED" auto scaling group. Cool-down time in seconds for new instances |
reference | string <= 255 characters The identifying name set to the auto scaling group |
startsAt | string <date-time> Only for "SCHEDULED" auto scaling group. Date and time (UTC) that the instances need to be launched. Must be changed along with "endsAt" |
endsAt | string <date-time> Only for "SCHEDULED" auto scaling group. Date and time (UTC) that the instances need to be terminated. Must be changed along with "startsAt" |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "reference": "Changed reference",
- "desiredAmount": 4
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "cooldownTime": null,
- "cpuThreshold": null,
- "createdAt": "2024-04-26T09:22:25+00:00",
- "desiredAmount": 2,
- "endsAt": null,
- "id": "fb769dab-3daa-47e4-89ed-06a4b6499176",
- "maximumAmount": null,
- "minimumAmount": null,
- "reference": "Manual Auto Scaling Group",
- "region": "eu-west-3",
- "startsAt": null,
- "state": "ACTIVE",
- "targetGroups": [
- {
- "id": "c737e9e2-a1b7-4f06-af77-92fc62c0e4bd",
- "name": "foo",
- "protocol": "HTTP",
- "port": 80,
- "healthCheck": null,
- "region": "eu-west-3"
}
], - "type": "MANUAL",
- "updatedAt": "2024-04-26T09:22:25+00:00",
- "warmupTime": null
}
Get Auto Scaling Group details
Get details about Auto Scaling Group.
Authorizations:
path Parameters
autoScalingGroupId required | string <uuid> Example: fb769dab-3daa-47e4-89ed-06a4b6499176 Auto Scaling Group ID |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/autoScalingGroups/fb769dab-3daa-47e4-89ed-06a4b6499176 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "cooldownTime": null,
- "cpuThreshold": null,
- "createdAt": "2024-04-26T09:22:25+00:00",
- "desiredAmount": 2,
- "endsAt": null,
- "id": "fb769dab-3daa-47e4-89ed-06a4b6499176",
- "maximumAmount": null,
- "minimumAmount": null,
- "reference": "Manual Auto Scaling Group",
- "region": "eu-west-3",
- "startsAt": null,
- "state": "ACTIVE",
- "targetGroups": [
- {
- "id": "c737e9e2-a1b7-4f06-af77-92fc62c0e4bd",
- "name": "foo",
- "protocol": "HTTP",
- "port": 80,
- "healthCheck": null,
- "region": "eu-west-3"
}
], - "type": "MANUAL",
- "updatedAt": "2024-04-26T09:22:25+00:00",
- "warmupTime": null
}
Get list of instances belonging to an Auto Scaling Group
List instances belonging to an Auto Scaling Group
Authorizations:
path Parameters
autoScalingGroupId required | string <uuid> Example: fb769dab-3daa-47e4-89ed-06a4b6499176 Auto Scaling Group ID |
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/autoScalingGroups/fb769dab-3daa-47e4-89ed-06a4b6499176/instances?limit=20&offset=10' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "_metadata": {
- "totalCount": 1,
- "limit": 10,
- "offset": 0
}, - "instances": [
- {
- "id": "59bc4aa1-7e14-42cd-848f-7de2921ffdc0",
- "type": "lsw.m3.large",
- "resources": {
- "cpu": {
- "value": 2,
- "unit": "vCPU"
}, - "memory": {
- "value": 7,
- "unit": "GiB"
}, - "publicNetworkSpeed": {
- "value": 1,
- "unit": "Gbps"
}, - "privateNetworkSpeed": {
- "value": 100,
- "unit": "Mbps"
}
}, - "region": "eu-west-3",
- "reference": "My web server",
- "state": "RUNNING",
- "productType": "INSTANCE",
- "ips": [
- {
- "ip": "0.0.0.0",
- "prefixLength": "32",
- "version": 4,
- "reverseLookup": "www.example.com",
- "mainIp": true,
- "networkType": "PUBLIC",
- "nullRouted": false,
- "ddos": null
}
], - "hasPrivateNetwork": false
}
]
}
Register Target Group
Associates an auto scaling group with a target group.
Authorizations:
path Parameters
autoScalingGroupId required | string <uuid> Example: fb769dab-3daa-47e4-89ed-06a4b6499176 Auto Scaling Group ID |
Request Body schema: application/jsonrequired
targetGroupId required | string <uuid> The target group unique identifier |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "targetGroupId": "b05917e1-96a4-442a-900c-c41f273d95c9"
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "cooldownTime": null,
- "cpuThreshold": null,
- "createdAt": "2024-04-26T09:22:25+00:00",
- "desiredAmount": 2,
- "endsAt": null,
- "id": "fb769dab-3daa-47e4-89ed-06a4b6499176",
- "maximumAmount": null,
- "minimumAmount": null,
- "reference": "Manual Auto Scaling Group",
- "region": "eu-west-3",
- "startsAt": null,
- "state": "ACTIVE",
- "targetGroups": [
- {
- "id": "c737e9e2-a1b7-4f06-af77-92fc62c0e4bd",
- "name": "foo",
- "protocol": "HTTP",
- "port": 80,
- "healthCheck": null,
- "region": "eu-west-3"
}
], - "type": "MANUAL",
- "updatedAt": "2024-04-26T09:22:25+00:00",
- "warmupTime": null
}
Deregister Target Group
Disassociate a target group from an Auto Scaling Group
Authorizations:
path Parameters
autoScalingGroupId required | string <uuid> Example: fb769dab-3daa-47e4-89ed-06a4b6499176 Auto Scaling Group ID |
Request Body schema: application/jsonrequired
targetGroupId required | string <uuid> The target group unique identifier |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "targetGroupId": "b05917e1-96a4-442a-900c-c41f273d95c9"
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "cooldownTime": null,
- "cpuThreshold": null,
- "createdAt": "2024-04-26T09:22:25+00:00",
- "desiredAmount": 2,
- "endsAt": null,
- "id": "fb769dab-3daa-47e4-89ed-06a4b6499176",
- "maximumAmount": null,
- "minimumAmount": null,
- "reference": "Manual Auto Scaling Group",
- "region": "eu-west-3",
- "startsAt": null,
- "state": "ACTIVE",
- "targetGroups": [
- {
- "id": "c737e9e2-a1b7-4f06-af77-92fc62c0e4bd",
- "name": "foo",
- "protocol": "HTTP",
- "port": 80,
- "healthCheck": null,
- "region": "eu-west-3"
}
], - "type": "MANUAL",
- "updatedAt": "2024-04-26T09:22:25+00:00",
- "warmupTime": null
}
Get Target Group list
List and filter Target Groups
Authorizations:
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
id | string <uuid> Example: id=a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11 |
name | string Example: name=Foo bar |
protocol | string Enum: "HTTP" "HTTPS" "TCP" Example: protocol=HTTP |
port | integer Example: port=80 |
region | string (regionName) Enum: "eu-west-3" "us-east-1" "eu-central-1" "ap-southeast-1" "us-west-1" "eu-west-2" "ca-central-1" "ap-northeast-1" region name |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/targetGroups?limit=20&offset=10&id=a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11&name=Foo%20bar&protocol=HTTP&port=80®ion=SOME_STRING_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 500
- 503
{- "_metadata": {
- "totalCount": 1,
- "limit": 10,
- "offset": 0
}, - "targetGroups": [
- {
- "id": "7e59b33d-05f3-4078-b251-c7831ae8fe14",
- "name": "Target group name",
- "protocol": "HTTP",
- "port": 80,
- "region": "eu-west-2",
- "healthCheck": {
- "protocol": "HTTP",
- "method": "GET",
- "uri": "/",
- "host": "my-host",
- "port": 80
}
}
]
}
Create Target Group
Create a Target Group
Authorizations:
Request Body schema: application/jsonrequired
name required | string The name of the target group |
protocol required | string (protocol) Enum: "HTTP" "HTTPS" "TCP" |
port required | integer The port of the target group |
region required | string (regionName) Enum: "eu-west-3" "us-east-1" "eu-central-1" "ap-southeast-1" "us-west-1" "eu-west-2" "ca-central-1" "ap-northeast-1" region name |
object (healthCheckOpts) |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "name": "Target group name",
- "protocol": "HTTP",
- "port": 80,
- "region": "eu-west-2",
- "healthCheck": {
- "protocol": "HTTP",
- "method": "GET",
- "uri": "/",
- "host": "example.com",
- "port": 80
}
}
Response samples
- 201
- 400
- 401
- 403
- 500
- 503
{- "id": "7e59b33d-05f3-4078-b251-c7831ae8fe14",
- "name": "Target group name",
- "protocol": "HTTP",
- "port": 80,
- "region": "eu-west-2",
- "healthCheck": {
- "protocol": "HTTP",
- "method": "GET",
- "uri": "/",
- "host": "example.com",
- "port": 80
}
}
Get Target Group details
Get Target Group details.
Authorizations:
path Parameters
targetGroupId required | string <uuid> Example: fb769dab-3daa-47e4-89ed-06a4b6499176 Target Group ID |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/targetGroups/fb769dab-3daa-47e4-89ed-06a4b6499176 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "id": "7e59b33d-05f3-4078-b251-c7831ae8fe14",
- "name": "Target group name",
- "protocol": "HTTP",
- "port": 80,
- "region": "eu-west-2",
- "healthCheck": {
- "protocol": "HTTP",
- "method": "GET",
- "uri": "/",
- "host": "example.com",
- "port": 80
}
}
Update Target Group
Update a Target Group
Authorizations:
path Parameters
targetGroupId required | string <uuid> Example: fb769dab-3daa-47e4-89ed-06a4b6499176 Target Group ID |
Request Body schema: application/jsonrequired
name | string The name of the target group |
port | integer The port of the target group |
object (healthCheckOpts) |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "name": "Target group name",
- "port": 80,
- "healthCheck": {
- "protocol": "HTTP",
- "method": "GET",
- "uri": "/",
- "host": "example.com",
- "port": 80
}
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "id": "7e59b33d-05f3-4078-b251-c7831ae8fe14",
- "name": "Target group name",
- "protocol": "HTTP",
- "port": 80,
- "region": "eu-west-2",
- "healthCheck": {
- "protocol": "HTTP",
- "method": "GET",
- "uri": "/",
- "host": "example.com",
- "port": 80
}
}
Delete Target Group
Delete a Target Group.
Authorizations:
path Parameters
targetGroupId required | string <uuid> Example: fb769dab-3daa-47e4-89ed-06a4b6499176 Target Group ID |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request DELETE \ --url https://api.leaseweb.com/publicCloud/v1/targetGroups/fb769dab-3daa-47e4-89ed-06a4b6499176 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Get Targets
Get targets in a Target Group
Authorizations:
path Parameters
targetGroupId required | string <uuid> Example: fb769dab-3daa-47e4-89ed-06a4b6499176 Target Group ID |
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/targetGroups/fb769dab-3daa-47e4-89ed-06a4b6499176/targets?limit=20&offset=10' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "_metadata": {
- "totalCount": 1,
- "limit": 10,
- "offset": 0
}, - "targets": [
- {
- "id": "8be7f8c6-e8c0-4321-a01e-ac754e2f6872",
- "reference": "Target reference",
- "image": {
- "id": "9be7f8c6-e8c0-4321-a01e-ac754e2f6873",
- "name": "Custom image",
- "family": "linux",
- "flavour": "ubuntu",
- "custom": true
}, - "state": "RUNNING",
- "ips": [
- {
- "ip": "10.0.0.1",
- "prefixLength": "28",
- "version": 4,
- "reverseLookup": "a-valid-domain.xpto",
- "mainIp": false,
- "networkType": "INTERNAL",
- "nullRouted": true
}
], - "healthCheck": {
- "state": "HEALTHY",
- "description": "HTTP check passed"
}
}
]
}
Register Targets
Register Targets in a Target Group
Authorizations:
path Parameters
targetGroupId required | string <uuid> Example: fb769dab-3daa-47e4-89ed-06a4b6499176 Target Group ID |
Request Body schema: application/jsonrequired
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
[- "695ddd91-051f-4dd6-9120-938a927a47d0"
]
Response samples
- 400
- 401
- 403
- 404
- 423
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Deregister Targets
Deregister Targets in a Target Group
Authorizations:
path Parameters
targetGroupId required | string <uuid> Example: fb769dab-3daa-47e4-89ed-06a4b6499176 Target Group ID |
Request Body schema: application/jsonrequired
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
[- "695ddd91-051f-4dd6-9120-938a927a47d0"
]
Response samples
- 400
- 401
- 403
- 404
- 423
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
BETA
Leaseweb VPS (Virtual Private Server) is a hosting solution that provides dedicated virtualized resources within a physical server. It offers a balance between shared hosting and dedicated servers, making it a cost-effective option for businesses, developers, and enterprises that need more control, scalability, and performance.Start a specific VPS
The VPS must be stopped before the execution
Authorizations:
path Parameters
vpsId required | string Example: 999999999 VPS ID |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request POST \ --url https://api.leaseweb.com/publicCloud/v1/vps/999999999/start \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Stop a specific VPS
The VPS must be running before the execution
Authorizations:
path Parameters
vpsId required | string Example: 999999999 VPS ID |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request POST \ --url https://api.leaseweb.com/publicCloud/v1/vps/999999999/stop \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Reboot a specific VPS
The VPS must be running before the execution
Authorizations:
path Parameters
vpsId required | string Example: 999999999 VPS ID |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request POST \ --url https://api.leaseweb.com/publicCloud/v1/vps/999999999/reboot \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Get console access
Get console access to the VPS
Authorizations:
path Parameters
vpsId required | string Example: 999999999 VPS ID |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/vps/999999999/console \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
List credentials stored for a specific VPS
Authorizations:
path Parameters
vpsId required | string Example: 999999999 VPS ID |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/vps/999999999/credentials \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 404
- 500
- 503
{- "_metadata": {
- "totalCount": 1,
- "limit": 20,
- "offset": 0
}, - "credentials": [
- {
- "type": "OPERATING_SYSTEM",
- "username": "root"
}
]
}
Store credentials for a specific VPS
Authorizations:
path Parameters
vpsId required | string Example: 999999999 VPS ID |
Request Body schema: application/jsonrequired
type required | string (credentialType) Enum: "OPERATING_SYSTEM" "CONTROL_PANEL" |
username required | string Can contain only alphanumeric values and characters |
password required | string The password you'd like to store |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "password": "12341234",
- "type": "OPERATING_SYSTEM",
- "username": "root"
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "password": "12341234",
- "type": "OPERATING_SYSTEM",
- "username": "root"
}
Delete all credentials associated with a specific VPS
Delete all credentials stored for a given VPS.
Authorizations:
path Parameters
vpsId required | string Example: 999999999 VPS ID |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request DELETE \ --url https://api.leaseweb.com/publicCloud/v1/vps/999999999/credentials \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "401",
- "errorMessage": "You are not authorized to view this resource."
}
Get credentials by type for a specific VPS
Authorizations:
path Parameters
vpsId required | string Example: 999999999 VPS ID |
type required | string (credentialType) Enum: "OPERATING_SYSTEM" "CONTROL_PANEL" Type of credential |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/vps/999999999/credentials/%7Btype%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "_metadata": {
- "totalCount": 1,
- "limit": 20,
- "offset": 0
}, - "credentials": [
- {
- "type": "OPERATING_SYSTEM",
- "username": "root"
}
]
}
Get VPS credential by type and username.
Authorizations:
path Parameters
vpsId required | string Example: 999999999 VPS ID |
type required | string (credentialType) Enum: "OPERATING_SYSTEM" "CONTROL_PANEL" Type of credential |
username required | string Example: root Username |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/vps/999999999/credentials/%7Btype%7D/root \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "password": "12341234",
- "type": "OPERATING_SYSTEM",
- "username": "root"
}
Update credentials for a given type and username
Authorizations:
path Parameters
vpsId required | string Example: 999999999 VPS ID |
type required | string (credentialType) Enum: "OPERATING_SYSTEM" "CONTROL_PANEL" Type of credential |
username required | string Example: root Username |
Request Body schema: application/jsonrequired
password required | string The new password |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "password": "12341234"
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "password": "12341234",
- "type": "OPERATING_SYSTEM",
- "username": "root"
}
Delete VPS credential
Authorizations:
path Parameters
vpsId required | string Example: 999999999 VPS ID |
type required | string (credentialType) Enum: "OPERATING_SYSTEM" "CONTROL_PANEL" Type of credential |
username required | string Example: root Username |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request DELETE \ --url https://api.leaseweb.com/publicCloud/v1/vps/999999999/credentials/%7Btype%7D/root \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "401",
- "errorMessage": "You are not authorized to view this resource."
}
Reset the password for a specific VPS
The operation may take a few moments to complete.
You can obtain the new credential using the credentials endpoints
Authorizations:
path Parameters
vpsId required | string Example: 999999999 VPS ID |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request POST \ --url https://api.leaseweb.com/publicCloud/v1/vps/999999999/resetPassword \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Attach ISO to a specific VPS
VPS must not have ISO attached, otherwise, it will return a validation error.
Available ISOs can be obtained using /v1/isos
.
Authorizations:
path Parameters
vpsId required | string Example: 999999999 VPS ID |
Request Body schema: application/jsonrequired
isoId required | string The ISO ID, obtained using the ISO endpoints |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "isoId": "GRML"
}
Response samples
- 400
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Detach ISO from a specific VPS
VPS must have ISO attached, otherwise, it will return a validation error
Authorizations:
path Parameters
vpsId required | string Example: 999999999 VPS ID |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request POST \ --url https://api.leaseweb.com/publicCloud/v1/vps/999999999/detachIso \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
List images available for reinstall
Authorizations:
path Parameters
vpsId required | string Example: 999999999 VPS ID |
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
standard | boolean Example: standard=true Filters the list to include only standard images. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/vps/999999999/reinstall/images?limit=20&offset=10&standard=true' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "images": [
- {
- "id": "UBUNTU_24_04_64BIT",
- "name": "Ubuntu 24.04 LTS (x86_64)",
- "version": "24.04",
- "family": "linux",
- "flavour": "ubuntu",
- "architecture": "x86_64",
- "marketApps": [ ],
- "storageTypes": [
- "LOCAL",
- "CENTRAL"
], - "storageSize": null,
- "state": "READY",
- "stateReason": null,
- "region": "eu-west-3",
- "createdAt": null,
- "updatedAt": null,
- "custom": false,
- "minDiskSize": null
}, - {
- "id": "UBUNTU_22_04_64BIT",
- "name": "Ubuntu 22.04 LTS (x86_64)",
- "version": "22.04",
- "family": "linux",
- "flavour": "ubuntu",
- "architecture": "x86_64",
- "marketApps": [
- "PLESK_WEB_ADMIN"
], - "storageTypes": [
- "LOCAL",
- "CENTRAL"
], - "storageSize": null,
- "state": "READY",
- "stateReason": null,
- "region": "eu-west-3",
- "createdAt": null,
- "updatedAt": null,
- "custom": false,
- "minDiskSize": null
}, - {
- "id": "UBUNTU_20_04_64BIT",
- "name": "Ubuntu 20.04 LTS (x86_64)",
- "version": "20.04",
- "family": "linux",
- "flavour": "ubuntu",
- "architecture": "x86_64",
- "marketApps": [ ],
- "storageTypes": [
- "LOCAL",
- "CENTRAL"
], - "storageSize": null,
- "state": "READY",
- "stateReason": null,
- "region": "eu-west-3",
- "createdAt": null,
- "updatedAt": null,
- "custom": false,
- "minDiskSize": null
}, - {
- "id": "abcc1630-362f-48ba-832f-c496aff24121",
- "name": "Custom image - 01",
- "flavour": "ubuntu",
- "family": "linux",
- "version": null,
- "architecture": null,
- "marketApps": [ ],
- "storageTypes": [ ],
- "storageSize": {
- "size": 2.03,
- "unit": "GB"
}, - "state": "READY",
- "stateReason": null,
- "region": "eu-west-3",
- "createdAt": "2024-07-05T10:44:08+00:00",
- "updatedAt": "2024-07-18T08:52:08+00:00",
- "custom": true,
- "minDiskSize": null
}, - {
- "id": "8600b94b-45b4-4887-86e1-2792b06dbb32",
- "name": "Custom image - 02",
- "flavour": "ubuntu",
- "family": "linux",
- "version": null,
- "architecture": null,
- "marketApps": [ ],
- "storageTypes": [ ],
- "storageSize": {
- "size": 2.03,
- "unit": "GB"
}, - "state": "READY",
- "stateReason": null,
- "region": "eu-west-3",
- "createdAt": "2024-07-05T10:47:01+00:00",
- "updatedAt": "2024-07-17T13:14:01+00:00",
- "custom": true,
- "minDiskSize": null
}, - {
- "id": "ace712e9-a166-47f1-9065-4af0f7e7fce1",
- "name": "Custom image - 03",
- "flavour": "ubuntu",
- "family": "linux",
- "version": null,
- "architecture": null,
- "marketApps": [ ],
- "storageTypes": [ ],
- "storageSize": {
- "size": 2.03,
- "unit": "GB"
}, - "state": "READY",
- "stateReason": null,
- "region": "eu-west-3",
- "createdAt": "2024-07-05T10:54:27+00:00",
- "updatedAt": "2024-07-17T13:14:01+00:00",
- "custom": true,
- "minDiskSize": null
}
], - "_metadata": {
- "totalCount": 6,
- "limit": 6,
- "offset": 0
}
}
Reinstall a VPS
Recreates the VPS, with optionally different Image and Marketplace App.
Cannot be performed when the VPS has snapshots.
Available Images can be obtained using /v1/{resource}/{instanceId}/reinstall/images
.
Available Marketplace Apps can be obtained using /v1/images/{imageId}/marketApps
.
Authorizations:
path Parameters
vpsId required | string Example: 999999999 VPS ID |
Request Body schema: application/jsonrequired
imageId required | string The Image ID |
marketAppId | string The Market App to be installed |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "imageId": "UBUNTU_22_04_64BIT"
}
Response samples
- 400
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
List IP addresses associated with a specific VPS
List the VPS's IPs
Authorizations:
path Parameters
vpsId required | string Example: 999999999 VPS ID |
query Parameters
version | integer Enum: 4 6 Ip version |
nullRouted | boolean |
ips | string A list of IPs separated by |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/vps/999999999/ips?version=SOME_INTEGER_VALUE&nullRouted=SOME_BOOLEAN_VALUE&ips=SOME_STRING_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 404
- 500
- 503
{- "_metadata": {
- "totalCount": 1,
- "limit": 20,
- "offset": 0
}, - "ips": [
- {
- "ip": "10.0.0.1",
- "prefixLength": "28",
- "version": 4,
- "reverseLookup": null,
- "mainIp": false,
- "nullRouted": false,
- "networkType": "INTERNAL",
- "ddos": {
- "detectionProfile": "STANDARD_DEFAULT",
- "protectionType": "STANDARD"
}
}
]
}
Get IP details for a specific VPS
Authorizations:
path Parameters
vpsId required | string Example: 999999999 VPS ID |
ip required | string <ip> Example: 10.0.0.1 |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/vps/999999999/ips/10.0.0.1 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 404
- 500
- 503
{- "ip": "10.0.0.1",
- "prefixLength": "28",
- "version": 4,
- "reverseLookup": "a-valid-domain.xpto",
- "mainIp": false,
- "networkType": "INTERNAL",
- "nullRouted": true,
- "ddos": {
- "detectionProfile": "STANDARD_DEFAULT",
- "protectionType": "STANDARD"
}
}
Update the IP address for a specific VPS
Allows you to set the reverse lookup for the IP
Authorizations:
path Parameters
vpsId required | string Example: 999999999 VPS ID |
ip required | string <ip> Example: 10.0.0.1 |
Request Body schema: application/jsonrequired
reverseLookup required | string |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "reverseLookup": "a-valid-domain.xpto"
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "ip": "10.0.0.1",
- "prefixLength": "28",
- "version": 4,
- "reverseLookup": "a-valid-domain.xpto",
- "mainIp": false,
- "networkType": "INTERNAL",
- "nullRouted": true,
- "ddos": {
- "detectionProfile": "STANDARD_DEFAULT",
- "protectionType": "STANDARD"
}
}
Null route IP address for a specific resource VPS
Null route an IP. It may take a few minutes before the change is propagated across the network.
Only works for IPv4.
Authorizations:
path Parameters
vpsId required | string Example: 999999999 VPS ID |
ip required | string <ip> Example: 10.0.0.1 |
Request Body schema: application/jsonoptional
comment | string The reason why the IP is being null-routed |
automatedUnnulingAt | integer [ 1 .. 17520 ] If provided, reverts the operation automatically in the specified value, in hours |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "automatedUnnulingAt": 2,
- "comment": "Getting DDoS"
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "ip": "10.0.0.1",
- "prefixLength": "28",
- "version": 4,
- "reverseLookup": "a-valid-domain.xpto",
- "mainIp": false,
- "networkType": "INTERNAL",
- "nullRouted": true,
- "ddos": {
- "detectionProfile": "STANDARD_DEFAULT",
- "protectionType": "STANDARD"
}
}
Remove an IP null route for a specific VPS
Remove an IP null route. It may take a few minutes before the change is propagated across the network
Authorizations:
path Parameters
vpsId required | string Example: 999999999 VPS ID |
ip required | string <ip> Example: 10.0.0.1 |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request POST \ --url https://api.leaseweb.com/publicCloud/v1/vps/999999999/ips/10.0.0.1/unnull \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "ip": "10.0.0.1",
- "prefixLength": "28",
- "version": 4,
- "reverseLookup": "a-valid-domain.xpto",
- "mainIp": false,
- "networkType": "INTERNAL",
- "nullRouted": true,
- "ddos": {
- "detectionProfile": "STANDARD_DEFAULT",
- "protectionType": "STANDARD"
}
}
Get data traffic metrics for a specific VPS
Authorizations:
path Parameters
vpsId required | string Example: 999999999 VPS ID |
query Parameters
from | string <date> Example: from=2025-01-28 The start of the interval to get the metric |
to | string <date> Example: to=2025-01-28 The end of the interval to get the metric. Must be greater than the date provided in |
granularity | string Value: "DAY" How the metrics are grouped by |
aggregation | string Value: "SUM" How the metrics are aggregated |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/vps/999999999/metrics/datatraffic?from=2025-01-28&to=2025-01-28&granularity=SOME_STRING_VALUE&aggregation=SOME_STRING_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "_metadata": {
- "from": "2023-10-01T00:00:00+00:00",
- "to": "2023-10-31T00:00:00+00:00",
- "granularity": "DAY",
- "aggregation": "SUM",
- "unit": "B",
- "summary": {
- "downPublic": {
- "average": 340733979,
- "expected": 10222019370,
- "total": 1022201937,
- "peak": {
- "value": 896116855,
- "timestamp": "2023-10-28T00:00:00+00:00"
}
}, - "upPublic": {
- "average": 59920023.67,
- "expected": 1797600710.1,
- "total": 179760071,
- "peak": {
- "value": 85089279,
- "timestamp": "2023-10-28T00:00:00+00:00"
}
}
}
}, - "metrics": {
- "downPublic": {
- "values": [
- {
- "value": 461323,
- "timestamp": "2023-10-27T00:00:00+00:00"
}, - {
- "value": 1249243,
- "timestamp": "2023-10-28T00:00:00+00:00"
}
], - "unit": "B"
}, - "upPublic": {
- "values": [
- {
- "value": 437565,
- "timestamp": "2023-10-27T00:00:00+00:00"
}, - {
- "value": 6938590,
- "timestamp": "2023-10-28T00:00:00+00:00"
}
], - "unit": "B"
}
}
}
List snapshots
List VPS snapshots
Authorizations:
path Parameters
vpsId required | string Example: 999999999 VPS ID |
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/vps/999999999/snapshots?limit=20&offset=10' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 404
- 500
- 503
{- "_metadata": {
- "totalCount": 1,
- "limit": 20,
- "offset": 0
}, - "snapshots": [
- {
- "id": "624c53c3-48e9-41d1-833f-90a9abf5fd95",
- "displayName": "snapshot 1",
- "state": "READY",
- "created": "2023-11-02T07:31:28+0000"
}
]
}
Create VPS snapshot
The VPS must be running before the execution.
The time taken to create the snapshot depends on several factors, including memory size and usage.
Allowed only one snapshot per VPS.
Authorizations:
path Parameters
vpsId required | string Example: 999999999 VPS ID |
Request Body schema: application/jsonrequired
name required | string A name to identify your snapshot |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "name": "my snapshot"
}
Response samples
- 400
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Get snapshot detail
Authorizations:
path Parameters
vpsId required | string Example: 999999999 VPS ID |
snapshotId required | string <uuid> |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/vps/999999999/snapshots/%7BsnapshotId%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 404
- 500
- 503
{- "created": "2023-11-02T07:31:28+0000",
- "displayName": "snapshot 1",
- "id": "ef73e9e2-95cd-49ef-940f-a24e6ad6c4a0",
- "state": "READY"
}
Restore VPS snapshot
Authorizations:
path Parameters
vpsId required | string Example: 999999999 VPS ID |
snapshotId required | string <uuid> |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request PUT \ --url https://api.leaseweb.com/publicCloud/v1/vps/999999999/snapshots/%7BsnapshotId%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Delete VPS snapshot
Authorizations:
path Parameters
vpsId required | string Example: 999999999 VPS ID |
snapshotId required | string <uuid> |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request DELETE \ --url https://api.leaseweb.com/publicCloud/v1/vps/999999999/snapshots/%7BsnapshotId%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Get VPS list
List and filter VPS
Authorizations:
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
id | string Example: id=999999999 VPS Equipment Id |
reference | string Example: reference=Foo bar |
ip | string <ip> Example: ip=10.0.0.1 |
state | string Enum: "RUNNING" "STARTING" "STOPPED" "STOPPING" The current state |
pack | string Enum: "Leaseweb VPS 1" "Leaseweb VPS 2" "Leaseweb VPS 3" "Leaseweb VPS 4" "Leaseweb VPS 5" "Leaseweb VPS 6" Vps package type |
region | string (regionName) Enum: "eu-west-3" "us-east-1" "eu-central-1" "ap-southeast-1" "us-west-1" "eu-west-2" "ca-central-1" "ap-northeast-1" region name |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/vps/?limit=20&offset=10&id=999999999&reference=Foo%20bar&ip=10.0.0.1&state=SOME_STRING_VALUE&pack=SOME_STRING_VALUE®ion=SOME_STRING_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 500
- 503
{- "_metadata": {
- "totalCount": 1,
- "limit": 10,
- "offset": 0
}, - "vps": [
- {
- "id": "123581321",
- "pack": "Leaseweb VPS 2",
- "region": "eu-central-1",
- "datacenter": "FRA-01",
- "reference": "testing",
- "image": {
- "id": "UBUNTU_22_04_64BIT",
- "name": "Ubuntu 22.04 LTS (x86_64)",
- "family": "linux",
- "flavour": "ubuntu",
- "custom": false
}, - "marketAppId": null,
- "state": "RUNNING",
- "hasPublicIpV4": true,
- "rootDiskSize": 50,
- "ips": [
- {
- "ip": "88.17.128.0",
- "prefixLength": "16",
- "version": 4,
- "nullRouted": false,
- "reverseLookup": "",
- "mainIp": true,
- "networkType": "PUBLIC"
}
], - "startedAt": "2024-10-24T21:13:25+00:00"
}
]
}
Get VPS details
Get VPS details.
Authorizations:
path Parameters
vpsId required | string Example: 999999999 VPS ID |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/vps/999999999 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 500
- 503
{- "contract": {
- "id": "41228459000100",
- "billingFrequency": 1,
- "term": 12,
- "type": "MONTHLY",
- "state": "ACTIVE",
- "endsAt": "2024-10-24T21:13:25+00:00",
- "createdAt": "2024-10-24T21:13:25+00:00",
- "sla": "Basic",
- "controlPanel": "cPanel Admin 5",
- "inModification": false,
- "dataTraffic": {
- "value": 30,
- "unit": "TB"
}
}, - "datacenter": "FRA-01",
- "hasPublicIpV4": true,
- "id": "123581321",
- "image": {
- "id": "UBUNTU_22_04_64BIT",
- "name": "Ubuntu 22.04 LTS (x86_64)",
- "family": "linux",
- "flavour": "ubuntu",
- "custom": false
}, - "ips": [
- {
- "ip": "88.17.128.0",
- "prefixLength": "16",
- "version": 4,
- "nullRouted": false,
- "reverseLookup": "",
- "mainIp": true,
- "networkType": "PUBLIC",
- "ddos": {
- "detectionProfile": "STANDARD_DEFAULT",
- "protectionType": "STANDARD"
}
}
], - "iso": null,
- "marketAppId": null,
- "pack": "Leaseweb VPS 2",
- "reference": "testing",
- "region": "eu-central-1",
- "resources": {
- "cpu": {
- "value": 4,
- "unit": "vCPU"
}, - "memory": {
- "value": 6,
- "unit": "GiB"
}, - "publicNetworkSpeed": {
- "value": 10000,
- "unit": "Mbps"
}
}, - "rootDiskSize": 50,
- "startedAt": "2024-10-24T21:13:25+00:00",
- "state": "RUNNING"
}
Update VPS details
Authorizations:
path Parameters
vpsId required | string Example: 999999999 VPS ID |
Request Body schema: application/jsonrequired
reference | string An identifying name you can refer to the VPS |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "reference": "updated reference"
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "contract": {
- "id": "41228459000100",
- "billingFrequency": 1,
- "term": 12,
- "type": "MONTHLY",
- "state": "ACTIVE",
- "endsAt": "2024-10-24T21:13:25+00:00",
- "createdAt": "2024-10-24T21:13:25+00:00",
- "sla": "Basic",
- "controlPanel": "cPanel Admin 5",
- "inModification": false,
- "dataTraffic": {
- "value": 30,
- "unit": "TB"
}
}, - "datacenter": "FRA-01",
- "hasPublicIpV4": true,
- "id": "123581321",
- "image": {
- "id": "UBUNTU_22_04_64BIT",
- "name": "Ubuntu 22.04 LTS (x86_64)",
- "family": "linux",
- "flavour": "ubuntu",
- "custom": false
}, - "ips": [
- {
- "ip": "88.17.128.0",
- "prefixLength": "16",
- "version": 4,
- "nullRouted": false,
- "reverseLookup": "",
- "mainIp": true,
- "networkType": "PUBLIC",
- "ddos": {
- "detectionProfile": "STANDARD_DEFAULT",
- "protectionType": "STANDARD"
}
}
], - "iso": null,
- "marketAppId": null,
- "pack": "Leaseweb VPS 2",
- "reference": "testing",
- "region": "eu-central-1",
- "resources": {
- "cpu": {
- "value": 4,
- "unit": "vCPU"
}, - "memory": {
- "value": 6,
- "unit": "GiB"
}, - "publicNetworkSpeed": {
- "value": 10000,
- "unit": "Mbps"
}
}, - "rootDiskSize": 50,
- "startedAt": "2024-10-24T21:13:25+00:00",
- "state": "RUNNING"
}
List all available Images
Authorizations:
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
custom | boolean Filters the list to include only custom images. |
standard | boolean Example: standard=true Filters the list to include only standard images. |
state | string (imageState) Enum: "CREATING" "READY" "DESTROYED" "DESTROYING" "FAILED" Filters the list by the state of custom images. |
marketAppId | string (marketAppId) Enum: "CPANEL_30" "CPANEL_100" "PLESK_WEB_PRO" "PLESK_WEB_ADMIN" Filters the list by the market app of standard images. |
storageType | string Enum: "LOCAL" "CENTRAL" Filters the list by the market app of standard images. |
name | string Example: name=Ubuntu 20.04 LTS (x86_64) Filters the list by the name of images. |
flavour | string (flavour) Enum: "ubuntu" "debian" "freebsd" "centos" "almalinux" "rockylinux" "archlinux" "windows" Filters the list by the flavour of standard images. |
region | string Example: region=eu-west-3 Available regions can be found using the List Regions endpoint. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/vps/images?limit=20&offset=10&custom=SOME_BOOLEAN_VALUE&standard=true&state=SOME_STRING_VALUE&marketAppId=SOME_STRING_VALUE&storageType=SOME_STRING_VALUE&name=Ubuntu%2020.04%20LTS%20(x86_64)&flavour=SOME_STRING_VALUE®ion=eu-west-3' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "images": [
- {
- "id": "UBUNTU_24_04_64BIT",
- "name": "Ubuntu 24.04 LTS (x86_64)",
- "version": "24.04",
- "family": "linux",
- "flavour": "ubuntu",
- "architecture": "x86_64",
- "marketApps": [ ],
- "storageTypes": [
- "LOCAL",
- "CENTRAL"
], - "storageSize": null,
- "state": "READY",
- "stateReason": null,
- "region": "eu-west-3",
- "createdAt": null,
- "updatedAt": null,
- "custom": false,
- "minDiskSize": null
}, - {
- "id": "UBUNTU_22_04_64BIT",
- "name": "Ubuntu 22.04 LTS (x86_64)",
- "version": "22.04",
- "family": "linux",
- "flavour": "ubuntu",
- "architecture": "x86_64",
- "marketApps": [
- "PLESK_WEB_ADMIN"
], - "storageTypes": [
- "LOCAL",
- "CENTRAL"
], - "storageSize": null,
- "state": "READY",
- "stateReason": null,
- "region": "eu-west-3",
- "createdAt": null,
- "updatedAt": null,
- "custom": false,
- "minDiskSize": null
}, - {
- "id": "UBUNTU_20_04_64BIT",
- "name": "Ubuntu 20.04 LTS (x86_64)",
- "version": "20.04",
- "family": "linux",
- "flavour": "ubuntu",
- "architecture": "x86_64",
- "marketApps": [ ],
- "storageTypes": [
- "LOCAL",
- "CENTRAL"
], - "storageSize": null,
- "state": "READY",
- "stateReason": null,
- "region": "eu-west-3",
- "createdAt": null,
- "updatedAt": null,
- "custom": false,
- "minDiskSize": null
}, - {
- "id": "abcc1630-362f-48ba-832f-c496aff24121",
- "name": "Custom image - 01",
- "flavour": "ubuntu",
- "family": "linux",
- "version": null,
- "architecture": null,
- "marketApps": [ ],
- "storageTypes": [ ],
- "storageSize": {
- "size": 2.03,
- "unit": "GB"
}, - "state": "READY",
- "stateReason": null,
- "region": "eu-west-3",
- "createdAt": "2024-07-05T10:44:08+00:00",
- "updatedAt": "2024-07-18T08:52:08+00:00",
- "custom": true,
- "minDiskSize": null
}, - {
- "id": "8600b94b-45b4-4887-86e1-2792b06dbb32",
- "name": "Custom image - 02",
- "flavour": "ubuntu",
- "family": "linux",
- "version": null,
- "architecture": null,
- "marketApps": [ ],
- "storageTypes": [ ],
- "storageSize": {
- "size": 2.03,
- "unit": "GB"
}, - "state": "READY",
- "stateReason": null,
- "region": "eu-west-3",
- "createdAt": "2024-07-05T10:47:01+00:00",
- "updatedAt": "2024-07-17T13:14:01+00:00",
- "custom": true,
- "minDiskSize": null
}, - {
- "id": "ace712e9-a166-47f1-9065-4af0f7e7fce1",
- "name": "Custom image - 03",
- "flavour": "ubuntu",
- "family": "linux",
- "version": null,
- "architecture": null,
- "marketApps": [ ],
- "storageTypes": [ ],
- "storageSize": {
- "size": 2.03,
- "unit": "GB"
}, - "state": "READY",
- "stateReason": null,
- "region": "eu-west-3",
- "createdAt": "2024-07-05T10:54:27+00:00",
- "updatedAt": "2024-07-17T13:14:01+00:00",
- "custom": true,
- "minDiskSize": null
}
], - "_metadata": {
- "totalCount": 6,
- "limit": 6,
- "offset": 0
}
}
List available ISOs
List all available ISO images
Authorizations:
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/vps/isos?limit=20&offset=10' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "_metadata": {
- "totalCount": 2,
- "limit": 20,
- "offset": 0
}, - "isos": [
- {
- "id": "GRML",
- "name": "GRML 2022.11"
}, - {
- "id": "ACRONIS_BOOT_MEDIA",
- "name": "Acronis Boot Media"
}
]
}
Leaseweb Private Cloud is a dedicated cloud solution that provides a secure, high-performance, and customizable cloud environment for businesses. Unlike public cloud services, a private cloud ensures that all resources are dedicated to a single organization, enhancing security, performance, and compliance.
List private clouds
Authorizations:
query Parameters
limit | integer Default: 10 Example: limit=10 Limit the number of results returned |
offset | integer Default: 0 Return results starting from the given offset |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/cloud/v2/privateClouds?limit=10&offset=0' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 403
- 500
- 503
{- "privateClouds": [
- {
- "id": "218030",
- "customerId": "1301178860",
- "dataCenter": "AMS-01",
- "serviceOffering": "FLAT_FEE",
- "sla": "Bronze",
- "contract": {
- "id": "30000775",
- "startsAt": "2015-11-01T00:00:00+02:00",
- "endsAt": "2016-12-30T10:39:27+01:00",
- "billingCycle": 12,
- "billingFrequency": "MONTH",
- "pricePerFrequency": 0,
- "currency": "EUR"
}, - "hardware": {
- "cpu": {
- "cores": 25
}, - "memory": {
- "unit": "GB",
- "amount": 50
}, - "storage": {
- "unit": "GB",
- "amount": 1
}
}, - "ips": [
- {
- "ip": "10.12.144.32",
- "version": 4,
- "type": "PUBLIC"
}, - {
- "ip": "10.12.144.33",
- "version": 4,
- "type": "PUBLIC"
}
], - "networkTraffic": {
- "type": "DATATRAFFIC",
- "trafficType": "PREMIUM|VOLUME",
- "datatrafficUnit": "TB",
- "datatrafficLimit": 6
}
}, - {
- "id": "218031",
- "customerId": "1301178860",
- "dataCenter": "AMS-01",
- "serviceOffering": "FLAT_FEE",
- "sla": "Bronze",
- "contract": {
- "id": "30000775",
- "startsAt": "2015-11-01T00:00:00+02:00",
- "endsAt": "2016-12-30T10:39:27+01:00",
- "billingCycle": 12,
- "billingFrequency": "MONTH",
- "pricePerFrequency": 0,
- "currency": "EUR"
}, - "hardware": {
- "cpu": {
- "cores": 10
}, - "memory": {
- "unit": "GB",
- "amount": 30
}, - "storage": {
- "unit": "TB",
- "amount": 1
}
}, - "ips": [
- {
- "ip": "10.12.144.63",
- "version": 4,
- "type": "PUBLIC"
}, - {
- "ip": "10.12.144.64",
- "version": 4,
- "type": "PUBLIC"
}
], - "networkTraffic": {
- "type": "DATATRAFFIC",
- "trafficType": "PREMIUM|VOLUME",
- "datatrafficUnit": "TB",
- "datatrafficLimit": 6
}
}
], - "_metadata": {
- "totalCount": 2,
- "offset": 0,
- "limit": 10
}
}
Inspect a private cloud
Authorizations:
path Parameters
privateCloudId required | string Example: 123242 Id of the private cloud |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/cloud/v2/privateClouds/123242 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 403
- 404
- 500
- 503
{- "id": "218030",
- "customerId": "1301178860",
- "dataCenter": "AMS-01",
- "serviceOffering": "FLAT_FEE",
- "sla": "Bronze",
- "contract": {
- "id": "30000775",
- "startsAt": "2015-11-01T00:00:00+02:00",
- "endsAt": "2016-12-30T10:39:27+01:00",
- "billingCycle": 12,
- "billingFrequency": "MONTH",
- "pricePerFrequency": 0,
- "currency": "EUR"
}, - "hardware": {
- "cpu": {
- "cores": 25
}, - "memory": {
- "unit": "GB",
- "amount": 50
}, - "storage": {
- "unit": "GB",
- "amount": 1
}
}, - "ips": [
- {
- "ip": "10.12.144.32",
- "version": 4,
- "type": "PUBLIC"
}, - {
- "ip": "10.12.144.33",
- "version": 4,
- "type": "PUBLIC"
}
], - "networkTraffic": {
- "type": "DATATRAFFIC",
- "trafficType": "PREMIUM|VOLUME",
- "datatrafficUnit": "TB",
- "datatrafficLimit": 6
}
}
List credentials
Please note that this feature is only available for CloudStack Private Clouds.
Also note that you will only be able to retrieve the last password that we configured in your remote management tool. If you changed it, the information retrieved by this API call will not work.
Name | Type | Description |
---|---|---|
type | string | Type of credential pair. Possible values are REMOTE_MANAGEMENT . |
username | string | Name of the user in the remote management tool. |
domain | string | Domain name to log in to the remote management tool. |
Please note that the password is not returned in this call, you must use the endpoint to get a credential by the username to retrieve it.
The _metadata
object contains the following attributes:
Name | Type | Description |
---|---|---|
totalCount | integer | Total amount of credentials that were found. |
limit | integer | Maximum amount of credentials that will be included in the credentials array. |
offset | integer | Offset of the request. |
Authorizations:
path Parameters
credentialType required | string Value: "REMOTE_MANAGEMENT" Type of credential pair |
privateCloudId required | string Example: 123242 Id of the private cloud |
query Parameters
limit | integer Default: 10 Example: limit=10 Limit the number of results returned |
offset | integer Default: 0 Return results starting from the given offset |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/cloud/v2/privateClouds/123242/credentials/%7BcredentialType%7D?limit=10&offset=0' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 403
- 404
- 500
- 503
{- "credentials": [
- {
- "type": "REMOTE_MANAGEMENT",
- "username": "root",
- "domain": "123456"
}
], - "_metadata": {
- "totalCount": 1,
- "offset": 0,
- "limit": 10
}
}
Inspect user credentials
Please note that this feature is only available for CloudStack Private Clouds.
Also note that you will only be able to retrieve the last password that we configured in your server or control panel. If you changed it, the information retrieved by this API call will not work.
Authorizations:
path Parameters
credentialType required | string Value: "REMOTE_MANAGEMENT" Type of credential pair |
username required | string Name of the user in the remote management tool |
privateCloudId required | string Example: 123242 Id of the private cloud |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/cloud/v2/privateClouds/123242/credentials/%7BcredentialType%7D/%7Busername%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 403
- 404
- 500
- 503
{- "type": "REMOTE_MANAGEMENT",
- "username": "root",
- "password": "password123",
- "domain": "123456"
}
Inspect datatraffic metrics
Authorizations:
path Parameters
privateCloudId required | string Example: 123242 Id of the private cloud |
query Parameters
granularity | string Enum: "NONE" "5MIN" "HOUR" "DAY" "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. |
from | date Start of date interval in RFC3339 format. The returned data will include everything up from - and including - the specified date time. |
to | date End of date interval in RFC3339 format. The returned data will include everything up until - but not including - the specified date time. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/cloud/v2/privateClouds/%7B[privateCloudId%7D/metrics/datatraffic?granularity=SOME_STRING_VALUE&aggregation=SOME_STRING_VALUE&from=SOME_DATE_VALUE&to=SOME_DATE_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 403
- 404
- 500
- 503
{- "_metadata": {
- "from": "2017-07-01T00:00:00+00:00",
- "to": "2017-07-01T00:00:00+00:00",
- "granularity": "MONTH",
- "aggregation": "SUM"
}, - "metrics": {
- "DATATRAFFIC_UP": {
- "unit": "GB",
- "values": [
- {
- "timestamp": "2017-07-01T00:00:00+00:00",
- "value": 900
}, - {
- "timestamp": "2017-07-02T00:00:00+00:00",
- "value": 2500
}
]
}, - "DATATRAFFIC_DOWN": {
- "unit": "GB",
- "values": [
- {
- "timestamp": "2017-07-01T00:00:00+00:00",
- "value": 90
}, - {
- "timestamp": "2017-07-02T00:00:00+00:00",
- "value": 250
}
]
}
}
}
Inspect bandwidth metrics
Authorizations:
path Parameters
privateCloudId required | string Example: 123242 Id of the private cloud |
query Parameters
granularity | string Enum: "NONE" "5MIN" "HOUR" "DAY" "MONTH" "YEAR" Specify the preferred interval for each metric. If granularity is omitted from the request, only one metric is returned. |
aggregation | string Value: "AVG" Aggregate each metric using the given aggregation function. |
from | date Start of date interval in RFC3339 format. The returned data will include everything up from - and including - the specified date time. |
to | date End of date interval in RFC3339 format. The returned data will include everything up until - but not including - the specified date time. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/cloud/v2/privateClouds/123242/metrics/bandwidth?granularity=SOME_STRING_VALUE&aggregation=SOME_STRING_VALUE&from=SOME_DATE_VALUE&to=SOME_DATE_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 403
- 404
- 500
- 503
{- "_metadata": {
- "from": "2017-07-01T00:00:00+00:00",
- "to": "2017-08-01T00:00:00+00:00",
- "granularity": "MONTH",
- "aggregation": "AVG"
}, - "metrics": {
- "DOWN_PUBLIC": {
- "unit": "bps",
- "values": [
- {
- "timestamp": "2017-07-01T00:00:00+00:00",
- "value": 28202557
}
]
}, - "UP_PUBLIC": {
- "unit": "bps",
- "values": [
- {
- "timestamp": "2017-07-01T00:00:00+00:00",
- "value": 158317519
}
]
}
}
}
Inspect CPU metrics
Authorizations:
path Parameters
privateCloudId required | string |
query Parameters
granularity | string Enum: "NONE" "5MIN" "HOUR" "DAY" "MONTH" "YEAR" Specify the preferred interval for each metric. If granularity is omitted from the request, only one metric is returned. |
aggregation | string Value: "AVG" Aggregate each metric using the given aggregation function. |
from | date Start of date interval in RFC3339 format. The returned data will include everything up from - and including - the specified date time. |
to | date End of date interval in RFC3339 format. The returned data will include everything up until - but not including - the specified date time. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/cloud/v2/privateClouds/%7BprivateCloudId%7D/metrics/cpu?granularity=SOME_STRING_VALUE&aggregation=SOME_STRING_VALUE&from=SOME_DATE_VALUE&to=SOME_DATE_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 403
- 404
- 500
- 503
{- "_metadata": {
- "from": "2017-07-01T00:00:00+00:00",
- "to": "2017-07-02T00:00:00+00:00",
- "granularity": "MONTH",
- "aggregation": "MAX"
}, - "metrics": {
- "CPU": {
- "unit": "CORES",
- "values": [
- {
- "timestamp": "2017-07-01T00:00:00+00:00",
- "value": 24
}, - {
- "timestamp": "2017-07-02T00:00:00+00:00",
- "value": 24
}
]
}
}
}
Inspect memory metrics
Authorizations:
path Parameters
privateCloudId required | string Example: 123242 Id of the private cloud |
query Parameters
granularity | string Enum: "NONE" "5MIN" "HOUR" "DAY" "MONTH" "YEAR" Specify the preferred interval for each metric. If granularity is omitted from the request, only one metric is returned. |
aggregation | string Value: "AVG" Aggregate each metric using the given aggregation function. |
from | date Start of date interval in RFC3339 format. The returned data will include everything up from - and including - the specified date time. |
to | date End of date interval in RFC3339 format. The returned data will include everything up until - but not including - the specified date time. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/cloud/v2/privateClouds/123242/metrics/memory?granularity=SOME_STRING_VALUE&aggregation=SOME_STRING_VALUE&from=SOME_DATE_VALUE&to=SOME_DATE_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 403
- 404
- 500
- 503
{- "_metadata": {
- "from": "2017-07-01T00:00:00+00:00",
- "to": "2017-07-02T00:00:00+00:00",
- "granularity": "MONTH",
- "aggregation": "MAX"
}, - "metrics": {
- "MEMORY": {
- "unit": "GB",
- "values": [
- {
- "timestamp": "2017-07-01T00:00:00+00:00",
- "value": 8
}, - {
- "timestamp": "2017-07-02T00:00:00+00:00",
- "value": 16
}
]
}
}
}
Inspect storage metrics
Authorizations:
path Parameters
privateCloudId required | string Example: 123242 Id of the private cloud |
query Parameters
granularity | string Enum: "NONE" "5MIN" "HOUR" "DAY" "MONTH" "YEAR" Specify the preferred interval for each metric. If granularity is omitted from the request, only one metric is returned. |
aggregation | string Value: "MAX" Aggregate each metric using the given aggregation function. |
from | date Start of date interval in RFC3339 format. The returned data will include everything up from - and including - the specified date time. |
to | date End of date interval in RFC3339 format. The returned data will include everything up until - but not including - the specified date time. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/cloud/v2/privateClouds/123242/metrics/storage?granularity=SOME_STRING_VALUE&aggregation=SOME_STRING_VALUE&from=SOME_DATE_VALUE&to=SOME_DATE_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 403
- 404
- 500
- 503
{- "_metadata": {
- "from": "2017-07-01T00:00:00+00:00",
- "to": "2017-07-02T00:00:00+00:00",
- "granularity": "MONTH",
- "aggregation": "MAX"
}, - "metrics": {
- "STORAGE": {
- "unit": "GB",
- "values": [
- {
- "timestamp": "2017-07-01T00:00:00+00:00",
- "value": 900
}, - {
- "timestamp": "2017-07-02T00:00:00+00:00",
- "value": 2500
}
]
}
}
}
BETA LIMITED ACCESS
Leaseweb Storage is a storage solution that provides scalable and reliable storage for businesses. It offers a range of storage options, including block storage, object storage, and file storage, to meet different storage needs and requirements.List storages
Show all storages for the given customer.
Authorizations:
query Parameters
limit | integer Default: 10 Limit the number of results returned. |
offset | integer Default: 0 Return results starting from the given offset. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/storage/v1/storages?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 403
- 500
- 503
{- "_metadata": {
- "limit": 10,
- "offset": 0,
- "totalCount": 3
}, - "storages": [
- {
- "id": "10812374",
- "quantity": {
- "value": 70000,
- "unit": "GB"
}, - "type": "SANS"
}, - {
- "id": "10812375",
- "quantity": {
- "value": 350000,
- "unit": "GB"
}, - "type": "SANS"
}, - {
- "id": "10938904",
- "quantity": {
- "value": 65000,
- "unit": "GB"
}, - "type": "SANS"
}
]
}
List StorageVMs
Show all StorageVMs for the given customer.
Authorizations:
query Parameters
limit | integer Default: 10 Limit the number of results returned. |
offset | integer Default: 0 Return results starting from the given offset. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/storage/v1/storageVMs?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 403
- 500
- 503
{- "_metadata": {
- "limit": 10,
- "offset": 0,
- "totalCount": 1
}, - "storageVMs": [
- {
- "id": "1575dd1c-dddf-11ed-af62-000c299d72cd"
}
]
}
List volumes
Show all the volumes in a StorageVM.
Authorizations:
path Parameters
storageVMId required | string Example: 1575dd1c-dddf-11ed-af62-000c299d72cd UUID of the Storage VM. |
query Parameters
limit | integer Default: 10 Limit the number of results returned. |
offset | integer Default: 0 Return results starting from the given offset. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/storage/v1/storageVMs/1575dd1c-dddf-11ed-af62-000c299d72cd/volumes?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 403
- 404
- 500
- 503
{- "_metadata": {
- "limit": 10,
- "offset": 0,
- "totalCount": 2
}, - "volumes": [
- {
- "id": "15ca9bf3-dddf-11ed-af62-000c299d72cd",
- "name": "volume1",
- "space": {
- "size": {
- "value": 0.021,
- "unit": "GB"
}, - "available": {
- "value": 0.018,
- "unit": "GB"
}, - "used": {
- "value": 0.002,
- "unit": "GB"
}
}
}, - {
- "id": "75a7e5ed-dde1-11ed-af62-000c299d72cd",
- "name": "volume2",
- "space": {
- "size": {
- "value": 5.369,
- "unit": "GB"
}, - "available": {
- "value": 5.368,
- "unit": "GB"
}, - "used": {
- "value": 0,
- "unit": "GB"
}
}
}
]
}
Grow volume
Grow the size of a volume in StorageVM.
Authorizations:
path Parameters
storageVMId required | string Example: 1575dd1c-dddf-11ed-af62-000c299d72cd UUID of the Storage VM. |
volumeId required | string Example: 1575dd1c-dddf-11ed-af62-000c299d72cd UUID of a storage volume. |
Request Body schema: application/json
growSize required | integer The amount by which the volume will be grown in GB. |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "growSize": 5
}
Response samples
- 202
- 400
- 403
- 404
- 500
- 503
{- "id": "d385ae54-3763-11ee-af62-000c299d72cd",
- "status": "PENDING"
}
Show a job
Gets status details about a job running in the specified storage VM.
Authorizations:
path Parameters
storageVMId required | string Example: 1575dd1c-dddf-11ed-af62-000c299d72cd UUID of the Storage VM. |
jobId required | string Example: d385ae54-3763-11ee-af62-000c299d72cd UUID of a queue job. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/storage/v1/storageVMs/1575dd1c-dddf-11ed-af62-000c299d72cd/jobs/d385ae54-3763-11ee-af62-000c299d72cd \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 403
- 404
- 500
- 503
{- "id": "d385ae54-3763-11ee-af62-000c299d72cd",
- "status": "COMPLETED",
- "startedAt": "2023-07-31T12:39:23+00:00",
- "completedAt": "2023-07-31T12:39:24+00:00"
}
Leaseweb Dedicated Servers are physical servers that are dedicated to a single customer, providing high performance, scalability, and security. They are ideal for businesses that require a dedicated environment for their critical applications.
List servers
List your Dedicated Servers. This api call supports pagination. Use the
limit
and offset
query string parameters to paginate through all your
dedicated servers.
Every server
object in the json response lists a few properties of a server.
Use the single resource api call to get more details for a single server.
Authorizations:
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
reference | string Example: reference=my-db Filter the list of servers by reference. |
ip | string <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 |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/bareMetals/v2/servers?limit=20&offset=10&reference=my-db&ip=127.0.0.4&macAddress=aa%3Abb%3Acc%3Add%3Aee%3Aff&site=FRA-10&privateRackId=123&privateNetworkCapable=SOME_STRING_VALUE&privateNetworkEnabled=SOME_STRING_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "_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"
}
}
]
}
Get server
Use this API to get information about a single server.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 404
- 500
- 503
{- "assetId": "1234561882",
- "contract": {
- "id": "12123412312",
- "customerId": "1235458",
- "salesOrgId": "2200",
- "deliveryStatus": "ACTIVE",
- "reference": "this is ref",
- "privateNetworkPortSpeed": 10000,
- "subnets": [ ],
- "status": "ACTIVE",
- "startsAt": "2024-04-01T00:00:00Z",
- "endsAt": null,
- "sla": "Bronze",
- "contractTerm": 36,
- "contractType": "NORMAL",
- "billingCycle": 1,
- "billingFrequency": "MONTH",
- "pricePerFrequency": "12.5",
- "currency": "EUR",
- "networkTraffic": {
- "type": "90TH",
- "connectivityType": "CONNECTED_AGGREGATION_POOL",
- "trafficType": "VOLUME",
- "datatrafficLimit": null,
- "datatrafficUnit": null
}, - "softwareLicenses": [
- {
- "name": "No Control Panel",
- "price": null,
- "currency": "EUR",
- "type": "CONTROL_PANEL"
}
], - "managedServices": [ ],
- "aggregationPackId": "127648",
- "ipv4Quantity": 1
}, - "featureAvailability": {
- "automation": true,
- "powerCycle": true,
- "ipmiReboot": false,
- "privateNetwork": true,
- "remoteManagement": true
}, - "id": "123456",
- "isPrivateNetworkCapable": true,
- "isPrivateNetworkEnabled": true,
- "isRedundantPrivateNetworkCapable": false,
- "location": {
- "site": "AMS-02",
- "suite": "HALL1",
- "rack": "LK18",
- "unit": "12"
}, - "networkInterfaces": {
- "public": {
- "mac": "macmacmac",
- "ip": "127.0.0.1",
- "nullRouted": false,
- "gateway": "127.0.0.1",
- "ports": [
- {
- "name": "AMS-01-PUB-SW01231",
- "port": "0-0-21"
}
], - "locationId": "274912387"
}, - "internal": {
- "mac": "macmacmac",
- "ip": null,
- "nullRouted": null,
- "gateway": null,
- "ports": [
- {
- "name": "AMS-02-INT-SW0123441",
- "port": "0-0-21"
}
], - "locationId": null
}, - "remoteManagement": {
- "mac": "macmacmac",
- "ip": "127.0.0.1",
- "gateway": "127.0.0.1",
- "ports": [
- {
- "name": "AMS-02-INT-SW0123441",
- "port": "0-0-21"
}
], - "locationId": "1238427449"
}
}, - "powerPorts": [
- {
- "name": "AMS-02-INT-SW0123441",
- "port": "14"
}, - {
- "name": "AMS-02-INT-SW0123441222",
- "port": "11"
}
], - "privateNetworks": [
- {
- "id": "1238793",
- "linkSpeed": 10000,
- "status": "CONFIGURED",
- "dhcp": "DISABLED",
- "subnet": "24",
- "vlanId": "1912639"
}
], - "rack": {
- "id": "5162",
- "type": "SHARED_100GE",
- "capacity": "12G"
}, - "serialNumber": "HN2XGHSD02H04",
- "specs": {
- "brand": "HP",
- "chassis": "Dell R7612121 (8xSF/2NVMe)",
- "hardwareRaidCapable": false,
- "cpu": {
- "type": "AMD INT AMD",
- "quantity": 2
}, - "ram": {
- "size": 64,
- "unit": "GB"
}, - "hdd": [
- {
- "id": "SSDDD480GB",
- "size": 480,
- "unit": "GB",
- "amount": 1,
- "type": "SSD",
- "performanceType": "WRITE_INTENSIVE"
}
], - "pciCards": [ ]
}
}
Update server
Update the reference for a server.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
Request Body schema: application/jsonrequired
reference required | string The reference for this server |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "reference": "database-server"
}
Response samples
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "401",
- "errorMessage": "You are not authorized to view this resource."
}
List IPs
List all IP Addresses associated with this server. Optionally filtered.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
query Parameters
networkType | string 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. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
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=20&offset=10' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "_metadata": {
- "limit": 10,
- "offset": 0,
- "totalCount": 2
}, - "ips": [
- {
- "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": true,
- "reverseLookup": "domain.example.com",
- "version": 4
}, - {
- "ddos": {
- "detectionProfile": "STANDARD_DEFAULT",
- "protectionType": "STANDARD"
}, - "floatingIp": false,
- "gateway": "2001:db8:85a3::8a2e:370:1",
- "ip": "2001:db8:85a3::8a2e:370:7334/64",
- "mainIp": false,
- "networkType": "REMOTE_MANAGEMENT",
- "nullRouted": false,
- "reverseLookup": "domain.example.com",
- "version": 6
}
]
}
Show a server IP
Get a single IP address associated with this server.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
ip required | string Example: 127.0.0.6 The IP Address |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/ips/127.0.0.6 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 500
- 503
{- "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 an IP
Update the reverse lookup or DDoS detection profile for the ip address.
DDoS detection profiles can only be changed if the IP address is protected using Advanced DDoS protection.
For more information about DDoS detection profiles click here for our KB related article.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
ip required | string Example: 127.0.0.6 The IP Address |
Request Body schema: application/json
detectionProfile | string Enum: "ADVANCED_DEFAULT" "ADVANCED_LOW_UDP" "ADVANCED_MED_UDP" The detection profile value |
reverseLookup | string The reverse lookup value |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "detectionProfile": "ADVANCED_LOW_UDP",
- "reverseLookup": "domain.example.com"
}
Response samples
- 200
- 400
- 401
- 403
- 500
- 503
{- "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 route an IP
Null the given IP address. It might take a few minutes before the change is propagated across the network.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
ip required | string Example: 127.0.0.6 The IP Address |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request POST \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/ips/127.0.0.6/null \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 202
- 400
- 401
- 403
- 500
- 503
{- "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 a null route
Remove an existing null route for the given IP address. It might take a few minutes before the change is propagated across the network.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
ip required | string Example: 127.0.0.6 The IP Address |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request POST \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/ips/127.0.0.6/unnull \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 202
- 400
- 401
- 403
- 500
- 503
{- "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 null route history
Show all null route history for any ips associated with this server.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/bareMetals/v2/servers/12345/nullRouteHistory?limit=20&offset=10' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "_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"
}
]
}
Delete a server from a private network
This API call will remove the dedicated server from the private network.
It takes a few minutes before the server has been removed from the private network.
To get the current status of the server you can call
/bareMetals/v2/servers/{serverId}
.
While the server is being removed the status changes to REMOVING
.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
privateNetworkId required | string Example: 892 The ID of a Private Network |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request DELETE \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/privateNetworks/892 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "f8d84555-9822-49fb-919a-d4945b201fe3",
- "errorCode": "400",
- "errorMessage": "Equipment 27072 is not part of private network 3943"
}
Add a server to private network
It takes a few minutes before the server has access to the private network.
To get the current status of the server you can call
/bareMetals/v2/servers/{serverId}
.
Once the server is added to the private network the status changes from
CONFIGURING
to CONFIGURED
.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
privateNetworkId required | string Example: 892 The ID of a Private Network |
Request Body schema: application/json
linkSpeed required | integer (linkSpeed) Enum: 100 1000 10000 25000 40000 100000 The port speed in Mbps |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "linkSpeed": 100
}
Response samples
- 400
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "f8d84555-9822-49fb-919a-d4945b201fe3",
- "errorCode": "400",
- "errorMessage": "Equipment 27072 is not part of private network 3943"
}
List network interfaces
List all network interfaces for this server, including their current status.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/networkInterfaces \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "_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
Close all network interfaces for this server.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request POST \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/networkInterfaces/close \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 401
- 403
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "401",
- "errorMessage": "You are not authorized to view this resource."
}
Open all network interfaces
Open all network interfaces of this server.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request POST \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/networkInterfaces/open \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 401
- 403
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "401",
- "errorMessage": "You are not authorized to view this resource."
}
Show a network interface
Show the network interface of the given type of this server, including its status.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
networkTypeURL required | string Enum: "internal" "public" "remoteManagement" Example: internal Type of network |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/networkInterfaces/internal \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "linkSpeed": "100Mbps",
- "operStatus": "OPEN",
- "status": "OPEN",
- "switchInterface": "33",
- "switchName": "EVO-JV12-1",
- "type": "PUBLIC"
}
Close network interface
Close the network interface of this type of this server.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
networkTypeURL required | string Enum: "internal" "public" "remoteManagement" Example: internal Type of network |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request POST \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/networkInterfaces/internal/close \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 401
- 403
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "401",
- "errorMessage": "You are not authorized to view this resource."
}
Open network interface
Open all network interfaces of the given type for this server.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
networkTypeURL required | string Enum: "internal" "public" "remoteManagement" Example: internal Type of network |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request POST \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/networkInterfaces/internal/open \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 401
- 403
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "401",
- "errorMessage": "You are not authorized to view this resource."
}
Inspect DDoS notification settings
Show all DDoS Protection related notification settings for this server. These settings control if you want to be notified via email in case a DDoS was mitigated.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/notificationSettings/ddos \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 500
- 503
{- "nulling": "ENABLED",
- "scrubbing": "DISABLED"
}
Update DDoS notification settings
Update your DDoS notification settings for this server.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
Request Body schema: application/json
nulling | string Enum: "ENABLED" "DISABLED" Enable or disable email notifications for nulling events |
scrubbing | string Enum: "ENABLED" "DISABLED" Enable or disable email notifications for nulling events |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "nulling": "DISABLED",
- "scrubbing": "ENABLED"
}
Response samples
- 400
- 401
- 403
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Show bandwidth metrics
At this moment only bandwidth information for the public interface is supported.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
query Parameters
from required | string <date-time> Example: from=2019-06-01T00:00:00Z Start of date interval in ISO-8601 format. The returned data will include everything up from - and including - the specified date time. |
to required | string <date-time> Example: to=2019-06-05T00:00:00Z End of date interval in ISO-8601 format. The returned data will include everything up until - but not including - the specified date time. |
granularity | string Enum: "5MIN" "HOUR" "DAY" "WEEK" "MONTH" "YEAR" Specify the preferred interval for each metric. If granularity is omitted from the request, only one metric is returned. |
aggregation required | string Enum: "AVG" "95TH" Aggregate each metric using the given aggregation function. When the aggregation type |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/bareMetals/v2/servers/12345/metrics/bandwidth?from=2019-06-01T00%3A00%3A00Z&to=2019-06-05T00%3A00%3A00Z&granularity=SOME_STRING_VALUE&aggregation=SOME_STRING_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 500
- 503
{- "_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
}
]
}
}
}
Show datatraffic metrics
At this moment only bandwidth information for the public interface is supported.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
query Parameters
from required | string <date-time> Example: from=2019-06-01T00:00:00Z Start of date interval in ISO-8601 format. The returned data will include everything up from - and including - the specified date time. |
to required | string <date-time> Example: to=2019-06-05T00:00:00Z End of date interval in ISO-8601 format. The returned data will include everything up until - but not including - the specified date time. |
granularity | string Enum: "DAY" "WEEK" "MONTH" "YEAR" Specify the preferred interval for each metric. If granularity is omitted from the request, only one metric is returned. |
aggregation required | string Value: "SUM" Aggregate each metric using the given aggregation function. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/bareMetals/v2/servers/12345/metrics/datatraffic?from=2019-06-01T00%3A00%3A00Z&to=2019-06-05T00%3A00%3A00Z&granularity=SOME_STRING_VALUE&aggregation=SOME_STRING_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 500
- 503
{- "_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 bandwidth notification settings
List all bandwidth notification settings for this server.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/bareMetals/v2/servers/12345/notificationSettings/bandwidth?limit=20&offset=10' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "_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 bandwidth notification setting
Create a new bandwidth notification setting for this server.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
Request Body schema: application/json
frequency required | string Enum: "DAILY" "WEEKLY" "MONTHLY" Frequency for the Bandwidth Notification |
threshold required | string Threshold Value for the Bandwidth Notification |
unit required | string Enum: "Gbps" "Mbps" Unit for the Bandwidth Notification |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "frequency": "DAILY",
- "threshold": "1",
- "unit": "Gbps"
}
Response samples
- 201
- 400
- 401
- 403
- 500
- 503
{- "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"
}
Delete a bandwidth notification setting
Remove a Bandwidth Notification setting for this server.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
notificationSettingId required | string Example: 839111 The ID of a notification setting |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request DELETE \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/notificationSettings/bandwidth/839111 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 401
- 403
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "401",
- "errorMessage": "You are not authorized to view this resource."
}
Show a bandwidth notification setting
Get a bandwidth notification setting for this server.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
notificationSettingId required | string Example: 839111 The ID of a notification setting |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/notificationSettings/bandwidth/839111 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "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 a bandwidth notification setting
Update an existing bandwidth notification setting for this server.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
notificationSettingId required | string Example: 839111 The ID of a notification setting |
Request Body schema: application/json
frequency required | string Enum: "DAILY" "WEEKLY" "MONTHLY" Frequency for the Bandwidth Notification |
threshold required | string Threshold Value for the Bandwidth Notification |
unit required | string Enum: "Gbps" "Mbps" Unit for the Bandwidth Notification |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "frequency": "DAILY",
- "threshold": "1",
- "unit": "Gbps"
}
Response samples
- 200
- 401
- 403
- 500
- 503
{- "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 data traffic notification settings
List all datatraffic notification settings for this server.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/bareMetals/v2/servers/12345/notificationSettings/datatraffic?limit=20&offset=10' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "_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 data traffic notification setting
Create a new data traffic notification setting for this server.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
Request Body schema: application/json
frequency required | string Enum: "DAILY" "WEEKLY" "MONTHLY" Frequency for the 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 |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "frequency": "DAILY",
- "threshold": "1",
- "unit": "MB"
}
Response samples
- 201
- 400
- 401
- 403
- 500
- 503
{- "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 a data traffic notification setting
Delete the given data traffic notification setting for this server.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
notificationSettingId required | string Example: 839111 The ID of a notification setting |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request DELETE \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/notificationSettings/datatraffic/839111 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 401
- 403
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "401",
- "errorMessage": "You are not authorized to view this resource."
}
Show a data traffic notification setting
Get a datatraffic notification setting for this server.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
notificationSettingId required | string Example: 839111 The ID of a notification setting |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/notificationSettings/datatraffic/839111 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "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 a data traffic notification setting
Update an existing data traffic notification setting for this server.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
notificationSettingId required | string Example: 839111 The ID of a notification setting |
Request Body schema: application/json
frequency required | string Enum: "DAILY" "WEEKLY" "MONTHLY" Frequency for the 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 |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "frequency": "DAILY",
- "threshold": "1",
- "unit": "GB"
}
Response samples
- 200
- 401
- 403
- 500
- 503
{- "frequency": "DAILY",
- "threshold": "1",
- "unit": "MB"
}
Show hardware information
This information is generated when running a hardware scan for your server. A hardware scan collects hardware information about your system.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/hardwareInfo \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 500
- 503
{- "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": 95,
- "when_failed": "-",
- "worst": 95
}, - "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 control panels
An id
of a control panel can be supplied when (re)installing a dedicated
server (for more information on how to install dedicated servers via the API
refer to the API documentation).
Authorizations:
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/bareMetals/v2/controlPanels?limit=20&offset=10' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "_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"
}
]
}
List Operating Systems
An id
of a operating system can be supplied when (re)installing a dedicated
server (for more information on how to install dedicated servers via the API
refer to the API documentation).
Authorizations:
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
controlPanelId | string Filter operating systems by control panel id |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/bareMetals/v2/operatingSystems?limit=20&offset=10&controlPanelId=SOME_STRING_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "_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)"
}
]
}
Show an operating system
This detailed information shows default options when installing the given operating system on a dedicated server.
For some operating systems these defaults can be adjusted when making the
POST
request to /install
. If the configurable
parameter is true
these
defaults can be adjusted by the client.
Authorizations:
path Parameters
operatingSystemId required | string Example: UBUNTU_22_04_64BIT Operating system ID |
query Parameters
controlPanelId required | string The Control Panel ID |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/bareMetals/v2/operatingSystems/UBUNTU_22_04_64BIT?controlPanelId=SOME_STRING_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "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"
}
List control panels by Operating System
An id
of a control panel can be supplied when (re)installing a dedicated
server (for more information on how to install dedicated servers via the API
refer to the API documentation).
Not all operating systems support all control panels. Some operating systems
do not allow for installation of a control panel. To filter the list of
control panels which are supported for an operating system use the
operatingSystemId
query string parameter to filter this list.
Authorizations:
path Parameters
operatingSystemId required | string Example: UBUNTU_22_04_64BIT Operating system ID |
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
operatingSystemId | string Filter control panels by operating system id |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/bareMetals/v2/operatingSystems/UBUNTU_22_04_64BIT/controlPanels?limit=20&offset=10&operatingSystemId=SOME_STRING_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "_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"
}
]
}
Rescue Images
Lists all Rescue Images which are available for launching a dedicated server into rescue mode.
A rescueImageId
can be supplied to the POST /rescueMode
API call and will
reboot your server into rescue mode.
Launching rescue mode for a server is often used to troubleshoot an existing installation.
Note that launching rescue mode does not modify any data on the disks of your server. It will require your server to be rebooted.
Authorizations:
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/bareMetals/v2/rescueImages?limit=20&offset=10' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "_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)"
}
]
}
Cancel active job
Canceling an active job will trigger the onfail
flow of the current job
often resulting in a server reboot. If you do not want the server state to
change expire
the active job instead.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request POST \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/cancelActiveJob \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "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"
}
List server credentials
The credentials API allows you to store usernames and passwords securely.
During (re)installations, rescue modes and ipmi resets the newly generated passwords are stored and can be retrieved using this API.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/bareMetals/v2/servers/12345/credentials?limit=20&offset=10' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "_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"
}
]
}
Create new server credentials
Password will NOT be updated on the server. The ability to update credentials is for convenience only. It provides a secure way to communicate passwords with Leaseweb engineers in case support is required.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
Request Body schema: application/json
password required | string The password for the credentials |
type required | string (credentialType2) 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 |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "password": "mys3cr3tp@ssw0rd",
- "type": "OPERATING_SYSTEM",
- "username": "root"
}
Response samples
- 200
- 401
- 403
- 500
- 503
{- "password": "mys3cr3tp@ssw0rd",
- "type": "OPERATING_SYSTEM",
- "username": "root"
}
List server credentials by type
List all the credentials filtered by the specified type that are associated with this server.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
type required | string 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. |
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/bareMetals/v2/servers/12345/credentials/%7Btype%7D?limit=20&offset=10' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "_metadata": {
- "limit": 20,
- "offset": 0,
- "totalCount": 2
}, - "credentials": [
- {
- "type": "OPERATING_SYSTEM",
- "username": "root"
}, - {
- "type": "OPERATING_SYSTEM",
- "username": "user"
}
]
}
Delete server credentials
This action is purely administrative and will only remove the username and password associated with this resource from our database.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
type required | string 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 |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request DELETE \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/credentials/%7Btype%7D/root \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 401
- 403
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "401",
- "errorMessage": "You are not authorized to view this resource."
}
Show server credentials
View the password for the given credential, identified by type
and
username
. Auto generated credentials (during a re-install, rescue mode or
ipmi reset can be found here).
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
type required | string 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 |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/credentials/%7Btype%7D/root \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "password": "mys3cr3tp@ssw0rd",
- "type": "OPERATING_SYSTEM",
- "username": "root"
}
Update server credentials
The usernames or types cannot be changed. In order to change those remove this credentials and create a new one.
This action is purely administrative and will only update the password associated with this resource in our database.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
type required | string 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 |
Request Body schema: application/json
password required | string The password for the credentials |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "password": "mys3cr3tp@ssw0rd"
}
Response samples
- 200
- 400
- 401
- 403
- 500
- 503
{- "password": "mys3cr3tp@ssw0rd",
- "type": "OPERATING_SYSTEM",
- "username": "root"
}
Expire active job
Expiring an active job will not have any influence on the current state of the server and is merely an administrative action.
Often you want to cancel
the job, resulting in a server reboot. In that
case\nuse the /cancelActiveJob
API call instead.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request POST \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/expireActiveJob \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "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"
}
Launch hardware scan
A hardware scan collects hardware related information from your server.
A hardware scan will require a reboot of your server. The contents of your hard drive won't be altered in any way. After a successful hardware scan your server is booted back into the original operating system.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
Request Body schema: application/json
callbackUrl | string <uri> Url which will receive callbacks |
powerCycle | boolean Default: true If set to |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "powerCycle": false
}
Response samples
- 202
- 400
- 401
- 403
- 500
- 503
{- "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"
}
Launch installation
Install your server with an Operating System and optional Control Panel.
To retrieve a list of available operating systems use the
/v2/operatingSystems
endpoint.
To retrieve a list of available control panels use the /v2/controlPanels
endpoint.
The default device / partitions to be used are operating system depended and
can be retrieved via the /v2/operatingSystems/{operatingSystemId}
endpoint.
You are now able to target a specific diskset, like SATA1TB, SATA2TB, SSD256GB,
etc. To see which disksets are available in your server check the /v2/servers/{serverId}
endpoint and look for the corresponding diskset id from the hdd array.
For more information about Dedicated Server installation, click here for our related Knowledge Base article.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
Request Body schema: application/json
callbackUrl | string <uri> Url which will receive callbacks when the installation is finished or failed |
controlPanelId | string Control panel identifier |
device | string Block devices in a disk set in which the partitions will be installed. Supported values are any disk set id, SATA_SAS or NVME |
hostname | string Hostname to be used in your installation |
operatingSystemId required | string Operating system identifier |
Array of objects (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 |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "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"
}
Response samples
- 202
- 400
- 401
- 403
- 500
- 503
{- "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"
}
Launch IPMI reset
A reset makes sure that your IPMI interface of your server is compatible with Leaseweb automation.
An IPMI reset will require a reboot of your server. The contents of your hard drive won't be altered in any way. After a successful IPMI reset your server is booted back into the original operating system.",
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
Request Body schema: application/json
callbackUrl | string <uri> Url which will receive callbacks |
powerCycle | boolean Default: true If set to |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{
}
Response samples
- 202
- 400
- 401
- 403
- 500
- 503
{- "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 jobs
List all jobs for this server.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
type | string Example: type=install Filter the list of jobs by type. |
status | string Example: status=CANCELED Filter the list of jobs by status. |
isRunning | string Enum: "true" "false" Example: isRunning=true Filter the list for running jobs |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/bareMetals/v2/servers/12345/jobs?limit=20&offset=10&type=install&status=CANCELED&isRunning=true' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "_metadata": {
- "limit": 10,
- "offset": 0,
- "totalCount": 1
}, - "jobs": [
- {
- "createdAt": "2018-01-09T10:38:12+00:00",
- "flow": "tasks",
- "isRunning": true,
- "node": "80:18:44:E0:AF:C4!JGNTQ92",
- "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": 1,
- "waiting": 0
}, - "serverId": "99944",
- "status": "FINISHED",
- "type": "install",
- "updatedAt": "2018-01-09T10:38:12+00:00",
- "uuid": "bcf2bedf-8450-4b22-86a8-f30aeb3a38f9"
}
]
}
Show a job
Get a single job for this server.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
jobId required | string Example: 3a867358-5b4b-44ee-88ac-4274603ef641 The ID of a Job |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/jobs/3a867358-5b4b-44ee-88ac-4274603ef641 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "createdAt": "2021-01-09T10:38:12+00:00",
- "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": "FINISHED",
- "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+00:00",
- "uuid": "3a867358-5b4b-44ee-88ac-4274603ef641"
}
Retry a job
Retry a job for a specific server.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
jobId required | string Example: 3a867358-5b4b-44ee-88ac-4274603ef641 The ID of a Job |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request POST \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/jobs/3a867358-5b4b-44ee-88ac-4274603ef641/retry \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "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"
}
Delete a DHCP reservation
Delete a DHCP reservation for this server.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request DELETE \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/leases \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 401
- 403
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "401",
- "errorMessage": "You are not authorized to view this resource."
}
List DHCP reservations
Please note that this will only show reservations for the public network interface.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/leases \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "_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"
}
]
}
Create a DHCP reservation
After rebooting your server it will acquire this DHCP reservation and boot
from the specified bootfile
url.
Please note that this API call will not reboot or power cycle your server.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
Request Body schema: application/json
bootfile required | string The URL of PXE boot you want your server to boot from |
hostname | string The hostname for the server |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "hostname": "my-server"
}
Response samples
- 400
- 401
- 403
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Power cycle a server
Powercyle the server.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request POST \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/powerCycle \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 401
- 403
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Show power status
The server can either be ON
or OFF
. Servers can be powered on or off by
using the respective /powerOn
and /powerOff
API calls. In addition servers
can also be rebooted using the /powerCycle
API call.
The pdu
object describes the power status from the power distribution unit
(PDU) point of view. If your server is connected to multiple PDU ports the
status
property will report on
if at least one PDU port has power.
The ipmi
object describes the power status by quering the remote management
interface of your server.
Note that pdu.status
can report on
but your server can still be powered
off if it was shutdown via IPMI
for example.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/powerInfo \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 500
- 503
{- "ipmi": {
- "status": "off"
}, - "pdu": {
- "status": "on"
}
}
Power off server
Power off the given server.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request POST \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/powerOff \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 401
- 403
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Power on server
Power on the given server.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request POST \ --url https://api.leaseweb.com/bareMetals/v2/servers/12345/powerOn \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 401
- 403
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Launch rescue mode
Rescue mode allows you to trouble shoot your server in case your installed operating system is no longer reachable.
You can supply a postInstallScript
key in the body of the request which
should contain a base64 encoded string with a valid script. This script will
be executed as soon as rescue mode is launched and can be used to further
automate the process. A requirement for the post install script is that it
starts with a shebang line like #!/usr/bin/env bash
.
After a rescue mode is launched you can manually reboot the server. After this reboot the server will boot into the existing operating system.
To get a list of available rescue images, you could do so by sending a GET
request to /bareMetals/v2/rescueImages
.
Authorizations:
path Parameters
serverId required | string Example: 12345 The ID of a server |
Request Body schema: application/json
callbackUrl | string <uri> Url which will receive callbacks |
password | string non-empty Rescue mode password. If not provided, it would be automatically generated |
postInstallScript | string Base64 Encoded string containing a valid bash script to be run right after rescue mode is launched |
powerCycle | boolean Default: true If set to |
rescueImageId required | string Default: "GRML" Rescue image identifier |
sshKeys | string User ssh keys |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "powerCycle": true,
- "rescueImageId": "GRML",
- "sshKeys": "ssh-rsa AAAAB3NzaC1y... user@domain.com"
}
Response samples
- 202
- 400
- 401
- 403
- 500
- 503
{- "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"
}
Leaseweb Dedicated Network Equipments are network devices that are dedicated to a single customer, providing high performance, scalability, and security. They are ideal for businesses that require a dedicated environment for their critical applications.
List network equipment
List your Dedicated Network Equipment. This api call supports pagination. Use
the limit
and offset
query string parameters to paginate through all your
dedicated network equipment.
Every network equipment
object in the json response lists a few properties
of a network equipment. Use the single resource api call to get more details
for a single network equipment.
Authorizations:
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
reference | string Example: reference=my-switch Filter the list of network equipment by reference. |
ip | string <ipv4> Example: ip=127.0.0.4 Filter the list of network equipment 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 network equipment by mac address. |
site | string Example: site=FRA-10 Filter the list of network equipment by site (location). |
privateRackId | string Example: privateRackId=123 Filter the list of network equipment by dedicated rack id. |
privateNetworkCapable | string Enum: "true" "false" Filter the list for private network capable network equipment |
privateNetworkEnabled | string Enum: "true" "false" Filter the list for private network enabled network equipment |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/bareMetals/v2/networkEquipments?limit=20&offset=10&reference=my-switch&ip=127.0.0.4&macAddress=aa%3Abb%3Acc%3Add%3Aee%3Aff&site=FRA-10&privateRackId=123&privateNetworkCapable=SOME_STRING_VALUE&privateNetworkEnabled=SOME_STRING_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "_metadata": {
- "limit": 20,
- "offset": 0,
- "totalCount": 2
}, - "networkEquipments": [
- {
- "contract": {
- "customerId": "10085996",
- "deliveryStatus": "ACTIVE",
- "id": "49031391001170",
- "reference": "My Private Switch",
- "salesOrgId": "2000"
}, - "featureAvailability": {
- "automation": true,
- "ipmiReboot": false,
- "powerCycle": true,
- "privateNetwork": false,
- "remoteManagement": false
}, - "id": "12345",
- "location": {
- "rack": "YY11",
- "site": "AMS-01",
- "suite": "HALL3",
- "unit": "21"
}, - "networkInterfaces": {
- "internal": {
- "gateway": null,
- "ip": null,
- "ports": [ ]
}, - "public": {
- "gateway": "127.0.2.254",
- "ip": "127.0.2.1/24",
- "locationId": "",
- "nullRouted": false,
- "ports": [ ]
}, - "remoteManagement": {
- "gateway": null,
- "ip": null,
- "locationId": null,
- "ports": [ ]
}
}, - "type": "SWITCH"
}, - {
- "contract": {
- "customerId": "10085996",
- "deliveryStatus": "ACTIVE",
- "id": "49031513001110",
- "reference": "My Other Private Switch",
- "salesOrgId": "2000"
}, - "featureAvailability": {
- "automation": false,
- "ipmiReboot": false,
- "powerCycle": false,
- "privateNetwork": false,
- "remoteManagement": false
}, - "id": "45678",
- "location": {
- "rack": "XX00",
- "site": "AMS-01",
- "suite": "HALL3",
- "unit": "21"
}, - "networkInterfaces": {
- "internal": {
- "gateway": null,
- "ip": null,
- "ports": [ ]
}, - "public": {
- "gateway": "127.1.1.254",
- "ip": "127.1.1.68/24",
- "locationId": "",
- "nullRouted": false,
- "ports": [ ]
}, - "remoteManagement": {
- "gateway": null,
- "ip": null,
- "locationId": null,
- "ports": [ ]
}
}, - "type": "SWITCH"
}
]
}
Get network equipment
Use this API to get information about a single network equipment.
Authorizations:
path Parameters
networkEquipmentId required | string Example: 12345 The ID of a dedicated network equipment |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/bareMetals/v2/networkEquipments/12345 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 404
- 500
- 503
{- "contract": {
- "aggregationPackId": null,
- "billingCycle": 1,
- "billingFrequency": "MONTH",
- "contractTerm": 12,
- "contractType": "NORMAL",
- "currency": "EUR",
- "customerId": "10085996",
- "deliveryStatus": "ACTIVE",
- "endsAt": null,
- "id": "49031391001170",
- "networkTraffic": {
- "connectivityType": "INTERCONNECTED",
- "datatrafficLimit": null,
- "datatrafficUnit": null,
- "trafficType": null,
- "type": null
}, - "pricePerFrequency": "0.00",
- "reference": "My Switch",
- "salesOrgId": "2000",
- "sla": "Platinum",
- "startsAt": "2017-08-01T00:00:00Z",
- "status": "ACTIVE",
- "subnets": [ ]
}, - "featureAvailability": {
- "automation": true,
- "ipmiReboot": false,
- "powerCycle": true,
- "privateNetwork": false,
- "remoteManagement": false
}, - "id": "12345",
- "location": {
- "rack": "YY11",
- "site": "AMS-01",
- "suite": "HALL3",
- "unit": "21"
}, - "name": "ABC-DE-001",
- "networkInterfaces": {
- "internal": {
- "gateway": null,
- "ip": null,
- "ports": [ ]
}, - "public": {
- "gateway": "127.0.0..254",
- "ip": "127.0.0..124/24",
- "locationId": "",
- "nullRouted": false,
- "ports": [ ]
}, - "remoteManagement": {
- "gateway": null,
- "ip": null,
- "locationId": null,
- "ports": [ ]
}
}, - "powerPorts": [
- {
- "name": "AMS-01-HALL3-YY11-PDU01",
- "port": "7"
}
], - "rack": {
- "capacity": "",
- "id": "11111"
}, - "serialNumber": "XN51FPD0QX",
- "specs": {
- "brand": "HP",
- "model": "PC 2530-48 J9781A"
}, - "type": "SWITCH"
}
Update network equipment
Update the reference for a network equipment.
Authorizations:
path Parameters
networkEquipmentId required | string Example: 12345 The ID of a dedicated network equipment |
Request Body schema: application/jsonrequired
reference required | string The reference for this network equipment |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "reference": "my-private-switch"
}
Response samples
- 401
- 403
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "401",
- "errorMessage": "You are not authorized to view this resource."
}
List IPs
List all IP Addresses associated with this network equipment. Optionally filtered.
Authorizations:
path Parameters
networkEquipmentId required | string Example: 12345 The ID of a dedicated network equipment |
query Parameters
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. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/bareMetals/v2/networkEquipments/12345/ips?networkType=INTERNAL&version=SOME_STRING_VALUE&nullRouted=SOME_STRING_VALUE&ips=SOME_STRING_VALUE&limit=20&offset=10' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "_metadata": {
- "limit": 10,
- "offset": 0,
- "totalCount": 2
}, - "ips": [
- {
- "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": true,
- "reverseLookup": "domain.example.com",
- "version": 4
}, - {
- "ddos": {
- "detectionProfile": "STANDARD_DEFAULT",
- "protectionType": "STANDARD"
}, - "floatingIp": false,
- "gateway": "2001:db8:85a3::8a2e:370:1",
- "ip": "2001:db8:85a3::8a2e:370:7334/64",
- "mainIp": false,
- "networkType": "REMOTE_MANAGEMENT",
- "nullRouted": false,
- "reverseLookup": "domain.example.com",
- "version": 6
}
]
}
Show a network equipment IP
Get a single IP address associated with this network equipment.
Authorizations:
path Parameters
networkEquipmentId required | string Example: 12345 The ID of a dedicated network equipment |
ip required | string Example: 127.0.0.6 The IP Address |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/bareMetals/v2/networkEquipments/12345/ips/127.0.0.6 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 500
- 503
{- "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 an IP
Update the reverse lookup or DDoS detection profile for the ip address.
DDoS detection profiles can only be changed if the IP address is protected using Advanced DDoS protection.
For more information about DDoS detection profiles click here for our KB related article.
Authorizations:
path Parameters
networkEquipmentId required | string Example: 12345 The ID of a dedicated network equipment |
ip required | string Example: 127.0.0.6 The IP Address |
Request Body schema: application/json
detectionProfile | string Enum: "ADVANCED_DEFAULT" "ADVANCED_LOW_UDP" "ADVANCED_MED_UDP" The detection profile value |
reverseLookup | string The reverse lookup value |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "detectionProfile": "ADVANCED_LOW_UDP",
- "reverseLookup": "domain.example.com"
}
Response samples
- 200
- 400
- 401
- 403
- 500
- 503
{- "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 route an IP
Null the given IP address. It might take a few minutes before the change is propagated across the network.
Authorizations:
path Parameters
networkEquipmentId required | string Example: 12345 The ID of a dedicated network equipment |
ip required | string Example: 127.0.0.6 The IP Address |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request POST \ --url https://api.leaseweb.com/bareMetals/v2/networkEquipments/12345/ips/127.0.0.6/null \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 202
- 400
- 401
- 403
- 500
- 503
{- "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 a null route
Remove an existing null route for the given IP address. It might take a few minutes before the change is propagated across the network.
Authorizations:
path Parameters
networkEquipmentId required | string Example: 12345 The ID of a dedicated network equipment |
ip required | string Example: 127.0.0.6 The IP Address |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request POST \ --url https://api.leaseweb.com/bareMetals/v2/networkEquipments/12345/ips/127.0.0.6/unnull \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 202
- 400
- 401
- 403
- 500
- 503
{- "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 null route history
Show all null route history for any ips associated with this a network equipment.
Authorizations:
path Parameters
networkEquipmentId required | string Example: 12345 The ID of a dedicated network equipment |
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/bareMetals/v2/networkEquipments/12345/nullRouteHistory?limit=20&offset=10' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "_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 network equipment credentials
The credentials API allows you to store usernames and passwords securely.
Authorizations:
path Parameters
networkEquipmentId required | string Example: 12345 The ID of a dedicated network equipment |
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/bareMetals/v2/networkEquipments/12345/credentials?limit=20&offset=10' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "_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"
}
]
}
Create new network equipment credentials
Password will NOT be updated on the network equipment. The ability to update credentials is for convenience only. It provides a secure way to communicate passwords with Leaseweb engineers in case support is required.
Authorizations:
path Parameters
networkEquipmentId required | string Example: 12345 The ID of a dedicated network equipment |
Request Body schema: application/json
password required | string The password for the credentials |
type required | string (credentialType2) 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 |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "password": "mys3cr3tp@ssw0rd",
- "type": "OPERATING_SYSTEM",
- "username": "root"
}
Response samples
- 200
- 401
- 403
- 500
- 503
{- "password": "mys3cr3tp@ssw0rd",
- "type": "OPERATING_SYSTEM",
- "username": "root"
}
List network equipment credentials by type
List all the credentials filtered by the specified type that are associated with this network equipment.
Authorizations:
path Parameters
networkEquipmentId required | string Example: 12345 The ID of a dedicated network equipment |
type required | string 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. |
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/bareMetals/v2/networkEquipments/12345/credentials/%7Btype%7D?limit=20&offset=10' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "_metadata": {
- "limit": 20,
- "offset": 0,
- "totalCount": 2
}, - "credentials": [
- {
- "type": "OPERATING_SYSTEM",
- "username": "root"
}, - {
- "type": "OPERATING_SYSTEM",
- "username": "user"
}
]
}
Delete network equipment credentials
This action is purely administrative and will only remove the username and password associated with this resource from our database.
Authorizations:
path Parameters
networkEquipmentId required | string Example: 12345 The ID of a dedicated network equipment |
type required | string 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 |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request DELETE \ --url https://api.leaseweb.com/bareMetals/v2/networkEquipments/12345/credentials/%7Btype%7D/root \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 401
- 403
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "401",
- "errorMessage": "You are not authorized to view this resource."
}
Show network equipment credentials
View the password for the given credential, identified by type
and
username
.
Authorizations:
path Parameters
networkEquipmentId required | string Example: 12345 The ID of a dedicated network equipment |
type required | string 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 |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/bareMetals/v2/networkEquipments/12345/credentials/%7Btype%7D/root \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "password": "mys3cr3tp@ssw0rd",
- "type": "OPERATING_SYSTEM",
- "username": "root"
}
Update network equipment credentials
The usernames or types cannot be changed. In order to change those remove this credentials and create a new one.
This action is purely administrative and will only update the password associated with this resource in our database.
Authorizations:
path Parameters
networkEquipmentId required | string Example: 12345 The ID of a dedicated network equipment |
type required | string 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 |
Request Body schema: application/json
password required | string The password for the credentials |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "password": "mys3cr3tp@ssw0rd"
}
Response samples
- 200
- 400
- 401
- 403
- 500
- 503
{- "password": "mys3cr3tp@ssw0rd",
- "type": "OPERATING_SYSTEM",
- "username": "root"
}
Power cycle a network equipment
Powercyle the network equipment.
Authorizations:
path Parameters
networkEquipmentId required | string Example: 12345 The ID of a dedicated network equipment |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request POST \ --url https://api.leaseweb.com/bareMetals/v2/networkEquipments/12345/powerCycle \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 401
- 403
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Show power status
The network equipment can either be ON
or OFF
. Network Equipment can be
powered on or off by using the respective /powerOn
and /powerOff
API
calls. In addition network equipment 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 network equipment is connected to multiple PDU
ports the status
property will report on
if at least one PDU port has
power.
Authorizations:
path Parameters
networkEquipmentId required | string Example: 12345 The ID of a dedicated network equipment |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/bareMetals/v2/networkEquipments/12345/powerInfo \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 500
- 503
{- "pdu": {
- "status": "on"
}
}
Power off network equipment
Power off the given network equipment.
Authorizations:
path Parameters
networkEquipmentId required | string Example: 12345 The ID of a dedicated network equipment |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request POST \ --url https://api.leaseweb.com/bareMetals/v2/networkEquipments/12345/powerOff \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 401
- 403
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Power on network equipment
Power on the given network equipment.
Authorizations:
path Parameters
networkEquipmentId required | string Example: 12345 The ID of a dedicated network equipment |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request POST \ --url https://api.leaseweb.com/bareMetals/v2/networkEquipments/12345/powerOn \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 401
- 403
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Leaseweb Dedicated Racks are physical racks that are dedicated to a single customer, providing high performance, scalability, and security. They are ideal for businesses that require a dedicated environment for their critical applications.
List dedicated racks
This API returns a paginated list of all dedicated racks.
Authorizations:
query Parameters
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 |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/bareMetals/v2/privateRacks?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE&reference=my-db&privateNetworkCapable=SOME_BOOLEAN_VALUE&privateNetworkEnabled=SOME_BOOLEAN_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 403
- 500
- 503
{- "_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"
}
]
}
}
}
]
}
Inspect a dedicated rack
Retrieve information about a single dedicated rack.
Authorizations:
path Parameters
privateRackId required | string Example: 2314213 Id of the dedicated rack |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/bareMetals/v2/privateRacks/2314213 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 403
- 404
- 500
- 503
{- "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"
]
}
]
}
Update a dedicated rack
A reference can be used to uniquely identify a dedicated rack with a name, such as
production
.
Authorizations:
path Parameters
privateRackId required | string Example: 2314213 Id of the dedicated rack |
Request Body schema: application/json
reference required | string The reference for this dedicated rack |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "reference": "production"
}
Response samples
- 400
- 403
- 404
- 500
- 503
{- "correlationId": "945bef2e-1caf-4027-bd0a-8976848f3dee",
- "errorCode": 400,
- "errorDetails": { },
- "errorMessage": "Validation Failed"
}
Inspect null route history
Authorizations:
path Parameters
privateRackId required | string Example: 2314213 Id of the dedicated rack |
query Parameters
limit | integer Default: 10 Limit the number of results returned |
offset | integer Default: 0 Return results starting from the given offset |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
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'
Response samples
- 200
- 403
{- "_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 IPs
Authorizations:
path Parameters
privateRackId required | string Example: 2314213 Id of the dedicated rack |
query Parameters
networkType | string Filter the collection of ip addresses by network type |
version | string Filter the collection by ip version |
nullRouted | string Filter Ips by Nulled-Status |
ips | string Filter the collection of Ips for the comma separated list of Ips |
limit | integer Default: 10 Limit the number of results returned |
offset | integer Default: 0 Return results starting from the given offset |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
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'
Response samples
- 200
- 403
- 404
- 500
- 503
{- "_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"
}
}
]
}
Inspect an IP
Authorizations:
path Parameters
ip required | string Example: 192.168.0.1 IP Address |
privateRackId required | string Example: 2314213 Id of the dedicated rack |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/bareMetals/v2/privateRacks/2314213/ips/192.168.0.1 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 403
- 404
- 500
- 503
{- "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 an IP
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.
Authorizations:
path Parameters
ip required | string Example: 192.168.0.1 IP Address |
privateRackId required | string Example: 2314213 Id of the dedicated rack |
Request Body schema: application/json
reverseLookup | string The reverse lookup value |
detectionProfile | string Enum: "ADVANCED_DEFAULT" "ADVANCED_LOW_UDP" "ADVANCED_MED_UDP" The detection profile value |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "reverseLookup": "domain.example.com",
- "detectionProfile": "ADVANCED_LOW_UDP"
}
Response samples
- 200
- 400
- 403
- 404
- 500
- 503
{- "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"
}
}
Null route an IP
It might take a few minutes before the null route is propagated across the network.
Authorizations:
path Parameters
privateRackId required | string Example: 2314213 Id of the dedicated rack |
ip required | string Example: 192.168.0.1 IP Address |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
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'
Response samples
- 202
- 400
- 403
- 404
- 500
- 503
{- "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"
}
}
Remove a null route
It might take a few minutes before the change is propagated across the network.
Authorizations:
path Parameters
privateRackId required | string Example: 2314213 Id of the dedicated rack |
ip required | string Example: 192.168.0.1 IP Address |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
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'
Response samples
- 202
- 400
- 403
- 404
- 500
- 503
{- "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"
}
}
List credentials
Authorizations:
path Parameters
privateRackId required | string Example: 2314213 Id of the dedicated rack |
query Parameters
limit | integer Default: 10 Limit the number of results returned |
offset | integer Default: 0 Return results starting from the given offset |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
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'
Response samples
- 200
- 403
- 404
{- "_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"
}
]
}
Create new credentials
Authorizations:
path Parameters
privateRackId required | string Example: 2314213 Id of the dedicated rack |
Request Body schema: application/json
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 |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "type": "OPERATING_SYSTEM",
- "username": "root",
- "password": "my-secret-password"
}
Response samples
- 200
- 400
- 403
- 404
{- "password": "mys3cr3tp@ssw0rd",
- "type": "OPERATING_SYSTEM",
- "username": "root"
}
List credentials by type
Authorizations:
path Parameters
type required | string |
privateRackId required | string Example: 2314213 Id of the dedicated rack |
query Parameters
limit | integer Default: 10 Limit the number of results returned |
offset | integer Default: 0 Return results starting from the given offset |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
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'
Response samples
- 200
- 403
- 404
{- "_metadata": {
- "limit": 10,
- "offset": 0,
- "totalCount": 1
}, - "credentials": [
- {
- "type": "OPERATING_SYSTEM",
- "username": "root"
}
]
}
Inspect user credentials
Authorizations:
path Parameters
privateRackId required | string Example: 2314213 Id of the dedicated rack |
username required | string |
type required | string |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/bareMetals/v2/privateRacks/2314213/credentials/%7Btype%7D/%7Busername%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 403
- 404
{- "password": "mys3cr3tp@ssw0rd",
- "type": "OPERATING_SYSTEM",
- "username": "root"
}
Update user credentials
This action is purely administrative and will only update the password associated with this resource in our database.
Authorizations:
path Parameters
privateRackId required | string Example: 2314213 Id of the dedicated rack |
username required | string |
type required | string |
Request Body schema: application/json
password required | string The password for the credentials |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "password": "Y5TurbBQtP5OzvduSH6g"
}
Response samples
- 200
- 403
{- "password": "mys3cr3tp@ssw0rd",
- "type": "OPERATING_SYSTEM",
- "username": "root"
}
Delete user credentials
This action is purely administrative and will only remove the username and password associated with this resource from our database.
Authorizations:
path Parameters
privateRackId required | string Example: 2314213 Id of the dedicated rack |
username required | string |
type required | string |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request DELETE \ --url https://api.leaseweb.com/bareMetals/v2/privateRacks/2314213/credentials/%7Btype%7D/%7Busername%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 403
{- "errorCode": "ACCESS_DENIED",
- "errorMessage": "The access token is expired or invalid."
}
Inspect datatraffic metrics
At this moment only bandwidth information for the public interface is supported.
Authorizations:
path Parameters
privateRackId required | string Example: 2314213 Id of the dedicated rack |
query Parameters
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. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
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'
Response samples
- 200
- 400
- 403
- 404
- 500
- 503
{- "_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
}
]
}
}
}
Inspect bandwidth metrics
At this moment only bandwidth information for the public interface is supported.
Authorizations:
path Parameters
privateRackId required | string Example: 2314213 Id of the dedicated rack |
query Parameters
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 |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
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'
Response samples
- 200
- 400
- 403
- 404
- 500
- 503
{- "_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
}
]
}
}
}
Inspect DDos notification settings
Authorizations:
path Parameters
privateRackId required | string Example: 2314213 Id of the dedicated rack |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/bareMetals/v2/privateRacks/2314213/notificationSettings/ddos \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 403
- 404
- 500
- 503
{- "nulling": "ENABLED",
- "scrubbing": "DISABLED"
}
Update DDos notification settings
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.
Authorizations:
path Parameters
privateRackId required | string Example: 2314213 Id of the dedicated rack |
Request Body schema: application/json
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 |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "scrubbing": "ENABLED",
- "nulling": "DISABLED"
}
Response samples
- 400
- 403
- 404
- 500
- 503
{- "correlationId": "945bef2e-1caf-4027-bd0a-8976848f3dee",
- "errorCode": 400,
- "errorDetails": { },
- "errorMessage": "Validation Failed"
}
List bandwidth notification settings
Authorizations:
path Parameters
privateRackId required | string Example: 2314213 Id of the dedicated rack |
query Parameters
limit | integer Default: 10 Limit the number of results returned |
offset | integer Default: 0 Return results starting from the given offset |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
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'
Response samples
- 200
- 403
- 404
{- "_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 new bandwidth notification setting
Authorizations:
path Parameters
privateRackId required | string Example: 2314213 Id of the dedicated rack |
Request Body schema: application/json
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 |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "frequency": "DAILY",
- "unit": "Gbps",
- "threshold": "1"
}
Response samples
- 201
- 400
- 403
- 404
{- "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"
}
Inspect bandwidth notification settings
Retrieve a single Bandwidth Notification that is associated with the given resource.
A Bandwidth Notification can be updated and deleted.
Authorizations:
path Parameters
notificationId required | string |
privateRackId required | string Example: 2314213 Id of the dedicated rack |
query Parameters
limit | integer Default: 10 Limit the number of results returned |
offset | integer Default: 0 Return results starting from the given offset |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
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'
Response samples
- 200
- 403
- 404
{- "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 bandwidth notification settings
Authorizations:
path Parameters
notificationId required | string |
privateRackId required | string Example: 2314213 Id of the dedicated rack |
Request Body schema: application/json
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 |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "frequency": "DAILY",
- "unit": "Gbps",
- "threshold": "1"
}
Response samples
- 200
- 403
{- "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"
}
Delete bandwidth notification settings
Authorizations:
path Parameters
notificationId required | string |
privateRackId required | string Example: 2314213 Id of the dedicated rack |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request DELETE \ --url https://api.leaseweb.com/bareMetals/v2/privateRacks/2314213/notificationSettings/bandwidth/%7BnotificationId%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 403
{- "errorCode": "ACCESS_DENIED",
- "errorMessage": "The access token is expired or invalid."
}
List datatraffic notification settings
Authorizations:
path Parameters
privateRackId required | string Example: 2314213 Id of the dedicated rack |
query Parameters
limit | integer Default: 10 Limit the number of results returned |
offset | integer Default: 0 Return results starting from the given offset |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
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'
Response samples
- 200
- 403
- 404
{- "_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"
}
]
}
Create datatraffic notification settings
Authorizations:
path Parameters
privateRackId required | string Example: 2314213 Id of the dedicated rack |
Request Body schema: application/json
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 |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "frequency": "DAILY",
- "unit": "MB",
- "threshold": "1"
}
Response samples
- 201
- 400
- 403
- 404
{- "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"
}
Inspect datatraffic notification settings
Authorizations:
path Parameters
notificationId required | string |
privateRackId required | string Example: 2314213 Id of the dedicated rack |
query Parameters
limit | integer Default: 10 Limit the number of results returned |
offset | integer Default: 0 Return results starting from the given offset |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
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'
Response samples
- 200
- 403
- 404
{- "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 datatraffic notification settings
Authorizations:
path Parameters
notificationId required | string |
privateRackId required | string Example: 2314213 Id of the dedicated rack |
Request Body schema: application/json
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 |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "frequency": "DAILY",
- "unit": "GB",
- "threshold": "1"
}
Response samples
- 200
- 403
{- "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 datatraffic notification settings
Authorizations:
path Parameters
notificationId required | string |
privateRackId required | string Example: 2314213 Id of the dedicated rack |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request DELETE \ --url https://api.leaseweb.com/bareMetals/v2/privateRacks/2314213/notificationSettings/datatraffic/%7BnotificationId%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 403
{- "errorCode": "ACCESS_DENIED",
- "errorMessage": "The access token is expired or invalid."
}
Leaseweb IP management is a service that allows businesses to manage their IP addresses efficiently. It offers a range of IP management options, including IP address allocation, IP address management, and IP address monitoring, to meet different IP management needs and requirements.
List IPs
Authorizations:
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
subnetId | string Filter by subnet |
version | integer Enum: 4 6 Filter by protocol version |
type | string Enum: "NORMAL_IP" "NETWORK" "BROADCAST" "GATEWAY" "ROUTER1" "ROUTER2" "IPMI" Filter by IP type |
nullRouted | boolean Filter by whether or not the IP has an active null route (true or false) |
primary | boolean Filter by whether or not the IP is primary (true or false) |
fromIp | string Return only IPs greater or equal to the specified address |
toIp | string Return only IPs lower or equal to the specified address |
ips | string Return only IPs specified as a comma-separated list |
equipmentIds | string Return only IPs assigned to equipment items specified as a comma-separated list of IDs |
assignedContractIds | string Return only IPs assigned to contracts specified as a comma-separated list of IDs |
sort | string Comma-separated list of sort field names. Prepend the field name with '-' for descending order. E.g. |
reverseLookup | string Example: reverseLookup=mydomain1.example.com Filter by reverse lookup. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/ipMgmt/v2/ips?limit=20&offset=10&subnetId=SOME_STRING_VALUE&version=SOME_INTEGER_VALUE&type=SOME_STRING_VALUE&nullRouted=SOME_BOOLEAN_VALUE&primary=SOME_BOOLEAN_VALUE&fromIp=SOME_STRING_VALUE&toIp=SOME_STRING_VALUE&ips=SOME_STRING_VALUE&equipmentIds=SOME_STRING_VALUE&assignedContractIds=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&reverseLookup=mydomain1.example.com' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "_metadata": {
- "totalCount": 2,
- "offset": 0,
- "limit": 50
}, - "ips": [
- {
- "ip": "192.0.2.1",
- "version": 4,
- "type": "NORMAL_IP",
- "prefixLength": 32,
- "primary": true,
- "reverseLookup": "mydomain1.example.com",
- "nullRouted": false,
- "nullLevel": null,
- "unnullingAllowed": false,
- "equipmentId": "1234",
- "assignedContract": {
- "id": "5643634"
}, - "subnet": {
- "id": "192.0.2.0_24",
- "networkIp": "192.0.2.0",
- "prefixLength": 24,
- "gateway": "192.0.2.254"
}
}, - {
- "ip": "192.0.2.2",
- "version": 4,
- "type": "NORMAL_IP",
- "prefixLength": 32,
- "primary": false,
- "reverseLookup": "mydomain2.example.com",
- "nullRouted": false,
- "nullLevel": null,
- "unnullingAllowed": false,
- "equipmentId": "1235",
- "assignedContract": {
- "id": "4363465"
}, - "subnet": {
- "id": "192.0.2.0_24",
- "networkIp": "192.0.2.0",
- "prefixLength": 24,
- "gateway": "192.0.2.254"
}
}
]
}
Inspect an IP
Authorizations:
path Parameters
ip required | string Example: 192.0.2.1 IP address or IP address with prefixLength {ip}_{prefix}. If prefixLength is not given, then we assume 32 (for IPv4) or 128 (for IPv6). PrefixLength is mandatory for IP range, for example, the IPv6 address range with prefixLength = 112 |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/ipMgmt/v2/ips/192.0.2.1 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "ip": "192.0.2.1",
- "version": 4,
- "type": "NORMAL_IP",
- "prefixLength": 32,
- "primary": true,
- "reverseLookup": "mydomain1.example.com",
- "nullRouted": false,
- "nullLevel": null,
- "unnullingAllowed": false,
- "equipmentId": "1234",
- "assignedContract": {
- "id": "5643634"
}, - "subnet": {
- "id": "192.0.2.0_24",
- "networkIp": "192.0.2.0",
- "prefixLength": 24,
- "gateway": "192.0.2.254"
}
}
Update an IP
Use this operation to set reverse lookup for IPv4 IP addresses.
Authorizations:
path Parameters
ip required | string <ipv4> IP address or IP address with prefixLength {ip}_{prefix}. If prefixLength is not given, then we assume 32 |
Request Body schema: application/json
reverseLookup required | string |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "reverseLookup": "mydomain1.example.com"
}
Response samples
- 200
- 401
- 403
- 500
- 503
{- "ip": "192.0.2.1",
- "version": 4,
- "type": "NORMAL_IP",
- "prefixLength": 32,
- "primary": true,
- "reverseLookup": "mydomain1.example.com",
- "nullRouted": false,
- "nullLevel": null,
- "unnullingAllowed": false,
- "equipmentId": "1234",
- "assignedContract": {
- "id": "5643634"
}, - "subnet": {
- "id": "192.0.2.0_24",
- "networkIp": "192.0.2.0",
- "prefixLength": 24,
- "gateway": "192.0.2.254"
}
}
List reverse lookup records for an IPv6 range
Get reverse lookup values set for IPs in the specified range
Authorizations:
path Parameters
ip required | string Example: 192.0.2.1 IP address or IP address with prefixLength {ip}_{prefix}. If prefixLength is not given, then we assume 32 (for IPv4) or 128 (for IPv6). PrefixLength is mandatory for IP range, for example, the IPv6 address range with prefixLength = 112 |
query Parameters
ip | string Filter the list by IP address |
reverseLookup | string Example: reverseLookup=mydomain1.example.com Filter by reverse lookup. |
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/ipMgmt/v2/ips/192.0.2.1/reverseLookup?ip=SOME_STRING_VALUE&reverseLookup=mydomain1.example.com&limit=20&offset=10' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "_metadata": {
- "totalCount": 3,
- "offset": 0,
- "limit": 2
}, - "reverseLookups": [
- {
- "ip": "2001:db8::0",
- "reverseLookup": "name1.example.com"
}, - {
- "ip": "2001:db8::1",
- "reverseLookup": "name2.example.com"
}
]
}
Set or remove reverse lookup records for an IPv6 range
This endpoint allows to set or unset reverse lookup for multiple IPv6 IPs in a specific IP range. To remove reverse lookup for an IP address set it to null
or ""
.
Reverse lookup values of IPs not listed in the request body will not be affected.
You can set up to 20 records in a single request.
Authorizations:
path Parameters
ip required | string Example: 192.0.2.1 IP address or IP address with prefixLength {ip}_{prefix}. If prefixLength is not given, then we assume 32 (for IPv4) or 128 (for IPv6). PrefixLength is mandatory for IP range, for example, the IPv6 address range with prefixLength = 112 |
Request Body schema: application/json
required | Array of objects (reverseLookup) |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "reverseLookups": [
- {
- "ip": "2001:db8::0",
- "reverseLookup": "name1.example.com"
}, - {
- "ip": "2001:db8::1",
- "reverseLookup": "name2.example.com"
}
]
}
Response samples
- 200
- 400
- 401
- 403
- 500
- 503
{- "reverseLookups": [
- {
- "ip": "2001:db8::0",
- "reverseLookup": "name1.example.com"
}, - {
- "ip": "2001:db8::1",
- "reverseLookup": "name2.example.com"
}
]
}
Null route an IP
Authorizations:
path Parameters
ip required | string Example: 192.0.2.1 IP address or IP address with prefixLength {ip}_{prefix}. If prefixLength is not given, then we assume 32 (for IPv4) or 128 (for IPv6). PrefixLength is mandatory for IP range, for example, the IPv6 address range with prefixLength = 112 |
Request Body schema: application/json
automatedUnnullingAt | string <date-time> The date and time when the null route is to be deactivated. The date and time should be specified using the format yyyy-mm-ddThh:mm:ss±hh:mm (with time zone designator) or yyyy-mm-ddThh:mm:ssZ (UTC). If this field is not present then the null route will not be automatically removed. |
comment | string A comment to be stored with the null route (e.g. null route reason) |
ticketId | string A reference to be stored with the null route |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "automatedUnnullingAt": "2015-06-25T11:13:00Z",
- "comment": "This IP is evil",
- "ticketId": "188612"
}
Response samples
- 201
- 401
- 403
- 500
- 503
{- "assignedContract": {
- "id": "123456"
}, - "automatedUnnullingAt": "2015-06-25T11:13:00Z",
- "comment": "This IP is evil",
- "equipmentId": "456",
- "id": "4534536",
- "ip": "192.0.2.1",
- "nullLevel": 1,
- "nulledAt": "2015-06-28T12:00:00Z",
- "nulledBy": "john.doe@example.com",
- "ticketId": "188612",
- "unnulledAt": null,
- "unnulledBy": null
}
Remove a null route
Authorizations:
path Parameters
ip required | string Example: 192.0.2.1 IP address or IP address with prefixLength {ip}_{prefix}. If prefixLength is not given, then we assume 32 (for IPv4) or 128 (for IPv6). PrefixLength is mandatory for IP range, for example, the IPv6 address range with prefixLength = 112 |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request DELETE \ --url https://api.leaseweb.com/ipMgmt/v2/ips/192.0.2.1/nullRoute \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 401
- 403
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "401",
- "errorMessage": "You are not authorized to view this resource."
}
Inspect null route history
Authorizations:
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
fromIp | string Return only IPs greater or equal to the specified address |
toIp | string Return only IPs lower or equal to the specified address |
fromDate | string <date> Return only null routes active after the specified date and time |
toDate | string <date> Return only null routes active before the specified date and time |
nulledBy | string Filter by the email address of the user who created the null route |
unnulledBy | string Filter by the email address of the user who removed the null route |
ticketId | string Filter by the reference stored with the null route |
contractId | string Filter by ID of the contract assigned to the IP at the time of null route creation |
equipmentId | string Filter by ID of the server assigned to the IP at the time of null route creation |
sort | string Comma-separated list of sort field names. Prepend the field name with '-' for descending order. E.g. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/ipMgmt/v2/nullRoutes?limit=20&offset=10&fromIp=SOME_STRING_VALUE&toIp=SOME_STRING_VALUE&fromDate=SOME_STRING_VALUE&toDate=SOME_STRING_VALUE&nulledBy=SOME_STRING_VALUE&unnulledBy=SOME_STRING_VALUE&ticketId=SOME_STRING_VALUE&contractId=SOME_STRING_VALUE&equipmentId=SOME_STRING_VALUE&sort=SOME_STRING_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "_metadata": {
- "totalCount": 2,
- "offset": 0,
- "limit": 50
}, - "nullroutes": [
- {
- "id": "4534536",
- "ip": "192.0.2.1",
- "nulledAt": "2015-06-28T12:00:00Z",
- "nulledBy": "john.doe@example.com",
- "nullLevel": 1,
- "automatedUnnullingAt": "2015-06-28T13:00:00Z",
- "unnulledAt": null,
- "unnulledBy": null,
- "ticketId": "188612",
- "comment": "This IP is evil",
- "equipmentId": "456",
- "assignedContract": {
- "id": "123456"
}
}, - {
- "id": "4534535",
- "ip": "192.0.2.1",
- "nulledAt": "2015-06-27T12:00:00Z",
- "nulledBy": "john.doe@example.com",
- "nullLevel": 1,
- "automatedUnnullingAt": "2015-06-27T13:00:00Z",
- "unnulledAt": "2015-06-27T13:00:05Z",
- "unnulledBy": "UnnullRunner",
- "ticketId": "188612",
- "comment": "This IP is evil",
- "equipmentId": "456",
- "assignedContract": {
- "id": "123456"
}
}
]
}
Inspect null route history
Authorizations:
path Parameters
id required | string Example: 23234 Null route ID |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/ipMgmt/v2/nullRoutes/23234 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "assignedContract": {
- "id": "123456"
}, - "automatedUnnullingAt": "2015-06-25T11:13:00Z",
- "comment": "This IP is evil",
- "equipmentId": "456",
- "id": "4534536",
- "ip": "192.0.2.1",
- "nullLevel": 1,
- "nulledAt": "2015-06-28T12:00:00Z",
- "nulledBy": "john.doe@example.com",
- "ticketId": "188612",
- "unnulledAt": null,
- "unnulledBy": null
}
Update a null route
Authorizations:
path Parameters
id required | string Example: 23234 Null route ID |
Request Body schema: application/json
automatedUnnullingAt | string <date-time> The date and time when the null route is to be deactivated. The date and time should be specified using the format yyyy-mm-ddThh:mm:ss±hh:mm (with time zone designator) or yyyy-mm-ddThh:mm:ssZ (UTC). If this field is not present then the null route will not be automatically removed. |
comment | string A comment to be stored with the null route (e.g. null route reason) |
ticketId | string A reference to be stored with the null route |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "automatedUnnullingAt": "2015-06-25T11:13:00Z",
- "comment": "This IP is evil",
- "ticketId": "188612"
}
Response samples
- 200
- 401
- 403
- 500
- 503
{- "assignedContract": {
- "id": "123456"
}, - "automatedUnnullingAt": "2015-06-25T11:13:00Z",
- "comment": "This IP is evil",
- "equipmentId": "456",
- "id": "4534536",
- "ip": "192.0.2.1",
- "nullLevel": 1,
- "nulledAt": "2015-06-28T12:00:00Z",
- "nulledBy": "john.doe@example.com",
- "ticketId": "188612",
- "unnulledAt": null,
- "unnulledBy": null
}
Leaseweb Floating IPs are IP addresses that are dedicated to a single customer, providing high performance, scalability, and security. They are ideal for businesses that require a dedicated environment for their critical applications.
List ranges
A Floating IP range is bound to a particular site or metro.
If you have services in multiple data centers and want to use the Floating IP feature in each of those locations you will need to order a range per site or metro.
Authorizations:
query Parameters
limit | integer Default: 10 Limit the number of results returned |
offset | integer Default: 0 Return results starting from the given offset |
type | string Enum: "SITE" "METRO" Filter ranges by range type |
location | string Filter ranges by range location |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/floatingIps/v2/ranges?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE&type=SOME_STRING_VALUE&location=SOME_STRING_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 403
- 500
- 503
{- "ranges": [
- {
- "id": "88.17.0.0_17",
- "range": "88.17.0.0/17",
- "customerId": "10001234",
- "salesOrgId": "2000",
- "location": "AMS-01",
- "type": "SITE"
}, - {
- "id": "85.17.0.0_17",
- "range": "85.17.0.0/17",
- "customerId": "10001234",
- "salesOrgId": "2000",
- "location": "AMS-01",
- "type": "SITE"
}, - {
- "id": "86.17.0.0_17",
- "range": "86.17.0.0/17",
- "customerId": "10001234",
- "salesOrgId": "2000",
- "location": "AMS",
- "type": "METRO"
}
], - "_metadata": {
- "limit": 20,
- "offset": 0,
- "totalCount": 3
}
}
Inspect a range
A Floating IP range is identified by is network IP and the prefix length, separated by a underscore; for example 10.0.0.0_29
.
Be aware that every IP address of a Floating IP range is usable and routable. A Floating IP range does not have a network IP, broadcast IP or gateway IP.
So for every IP in the range you can create a Floating IP Definition.
Authorizations:
path Parameters
rangeId required | string Example: 10.0.0.0_29 ID of a Floating IP Range, consisting of network IP and prefix length (separated by an underscore) |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/floatingIps/v2/ranges/10.0.0.0_29 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 403
- 404
- 500
- 503
{- "id": "88.17.0.0_17",
- "range": "88.17.0.0/17",
- "customerId": "10001234",
- "salesOrgId": "2000",
- "location": "AMS-01",
- "type": "SITE"
}
List range definitions
A Floating IP definition describes a mapping between one or more Floating IPs (a.k.a Floating IP) to an anchor IP. Traffic destined for all the Floating IPs will be rerouted to the anchor IP.
The anchor IP is an ip address that belongs to a service you have with Leaseweb. At this moment only dedicated servers, dedicated racks and colocations are supported.
Authorizations:
path Parameters
rangeId required | string Example: 10.0.0.0_29 ID of a Floating IP Range, consisting of network IP and prefix length (separated by an underscore) |
query Parameters
limit | integer Default: 10 Limit the number of results returned |
offset | integer Default: 0 Return results starting from the given offset |
location | string Filter range definations by range location |
type | string Enum: "SITE" "METRO" Filter range definations by range type |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/floatingIps/v2/ranges/10.0.0.0_29/floatingIpDefinitions?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE&location=SOME_STRING_VALUE&type=SOME_STRING_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 403
- 500
- 503
{- "floatingIpDefinitions": [
- {
- "id": "88.17.34.108_32",
- "rangeId": "88.17.0.0_17",
- "location": "AMS-01",
- "type": "SITE",
- "customerId": "10001234",
- "salesOrgId": "2000",
- "floatingIp": "88.17.34.108/32",
- "anchorIp": "95.10.126.1",
- "passiveAnchorIp": "95.10.126.2",
- "status": "ACTIVE",
- "createdAt": "2019-03-13T09:10:02+0000",
- "updatedAt": "2019-03-13T09:10:02+0000"
}, - {
- "id": "88.17.34.109_32",
- "rangeId": "88.17.0.0_17",
- "location": "AMS-01",
- "type": "SITE",
- "customerId": "10001234",
- "salesOrgId": "2000",
- "floatingIp": "88.17.34.109/32",
- "anchorIp": "95.10.126.12",
- "passiveAnchorIp": "95.10.126.13",
- "status": "ACTIVE",
- "createdAt": "2019-03-13T09:10:02+0000",
- "updatedAt": "2019-03-13T09:10:02+0000"
}, - {
- "id": "88.17.34.110_32",
- "rangeId": "88.17.0.0_17",
- "location": "AMS",
- "type": "METRO",
- "customerId": "10001234",
- "salesOrgId": "2000",
- "floatingIp": "88.17.34.110/32",
- "anchorIp": "95.10.126.11",
- "passiveAnchorIp": "95.10.126.12",
- "status": "ACTIVE",
- "createdAt": "2019-03-13T09:10:02+0000",
- "updatedAt": "2019-03-13T09:10:02+0000"
}
], - "_metadata": {
- "limit": 20,
- "offset": 0,
- "totalCount": 3
}
}
Create a range definition
When a Floating IP definition is created, the Floating IP address is then made to route all traffic to the anchor IP address, Hence all services on the server become reachable via the Floating IP. This works in the background by maintaining BGP sessions in each site which announce the Floating IP routes through the border routers.
Floating IP addresses which do not have an anchor IP address have no route, and are thus effectively nullrouted.
How to configure Floating IPs on a server
On the server, Floating IPs should be setup like any other additional IP address. However, the same Floating IP will have to be setup on all servers that you want to be able to route it to.
Note: Currently, Floating IPs does not work on VPS or Cloud servers.
Authorizations:
path Parameters
rangeId required | string Example: 10.0.0.0_29 ID of a Floating IP Range, consisting of network IP and prefix length (separated by an underscore) |
Request Body schema: application/json
floatingIp required | string The Floating IP address |
anchorIp required | string The Anchor IP address |
passiveAnchorIp | string The Passive anchor IP address used for Anchor IP toggling |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "floatingIp": "88.17.0.5/32",
- "anchorIp": "95.10.126.1",
- "passiveAnchorIp": "95.10.126.2"
}
Response samples
- 200
- 400
- 403
- 500
- 503
{- "id": "88.17.34.108_32",
- "rangeId": "88.17.0.0_17",
- "location": "AMS-01",
- "type": "SITE",
- "customerId": "10001234",
- "salesOrgId": "2000",
- "floatingIp": "88.17.34.108/32",
- "anchorIp": "95.10.126.1",
- "passiveAnchorIp": "95.10.126.2",
- "status": "ACTIVE",
- "createdAt": "2019-03-13T09:10:02+0000",
- "updatedAt": "2019-03-13T09:10:02+0000"
}
Inspect a range definition
Authorizations:
path Parameters
rangeId required | string Example: 10.0.0.0_29 ID of a Floating IP Range, consisting of network IP and prefix length (separated by an underscore) |
floatingIpDefinitionId required | string ID of a Floating IP Definition, consisting of network IP and prefix length (separated by an underscore) |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/floatingIps/v2/ranges/10.0.0.0_29/floatingIpDefinitions/%7BfloatingIpDefinitionId%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 403
- 404
- 500
- 503
{- "id": "88.17.34.108_32",
- "rangeId": "88.17.0.0_17",
- "location": "AMS-01",
- "type": "SITE",
- "customerId": "10001234",
- "salesOrgId": "2000",
- "floatingIp": "88.17.34.108/32",
- "anchorIp": "95.10.126.1",
- "passiveAnchorIp": "95.10.126.2",
- "status": "ACTIVE",
- "createdAt": "2019-03-13T09:10:02+0000",
- "updatedAt": "2019-03-13T09:10:02+0000"
}
Update a range definition
Imagine you have 2 dedicated servers in AMS-01, in different racks. And you have a Floating IP definition for Floating IP 10.0.0.0_32. You have configured the ip address 10.0.0.0/32 on both dedicated servers.
If the anchor IP in the Floating IP definition is pointing to your first server,
all traffic goes to that server. With this PUT
request you can change the
Anchor IP address to point to, for example, your second server. Within a
matter of seconds all the traffic destined for the Floating IP will now end up
at the new Anchor IP. In the above example, your second server.
Authorizations:
path Parameters
rangeId required | string Example: 10.0.0.0_29 ID of a Floating IP Range, consisting of network IP and prefix length (separated by an underscore) |
floatingIpDefinitionId required | string ID of a Floating IP Definition, consisting of network IP and prefix length (separated by an underscore) |
Request Body schema: application/json
anchorIp required | string The Anchor IP address |
passiveAnchorIp | string The Passive anchor IP address used for Anchor IP toggling |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "anchorIp": "95.10.126.1"
}
Response samples
- 200
- 400
- 403
- 404
- 500
- 503
{- "id": "88.17.34.108_32",
- "rangeId": "88.17.0.0_17",
- "location": "AMS-01",
- "type": "SITE",
- "customerId": "10001234",
- "salesOrgId": "2000",
- "floatingIp": "88.17.34.108/32",
- "anchorIp": "95.10.126.1",
- "passiveAnchorIp": "95.10.126.2",
- "status": "ACTIVE",
- "createdAt": "2019-03-13T09:10:02+0000",
- "updatedAt": "2019-03-13T09:10:02+0000"
}
Remove a range definition
Authorizations:
path Parameters
rangeId required | string Example: 10.0.0.0_29 ID of a Floating IP Range, consisting of network IP and prefix length (separated by an underscore) |
floatingIpDefinitionId required | string ID of a Floating IP Definition, consisting of network IP and prefix length (separated by an underscore) |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request DELETE \ --url https://api.leaseweb.com/floatingIps/v2/ranges/10.0.0.0_29/floatingIpDefinitions/%7BfloatingIpDefinitionId%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 202
- 403
- 404
- 500
- 503
{- "id": "88.17.34.108_32",
- "rangeId": "88.17.0.0_17",
- "location": "AMS-01",
- "type": "SITE",
- "customerId": "10001234",
- "salesOrgId": "2000",
- "floatingIp": "88.17.34.108/32",
- "anchorIp": "95.10.126.1",
- "passiveAnchorIp": "95.10.126.2",
- "status": "ACTIVE",
- "createdAt": "2019-03-13T09:10:02+0000",
- "updatedAt": "2019-03-13T09:10:02+0000"
}
Toggle the anchor IP with the passive anchor IP
Imagine you have 2 dedicated servers in AMS-01, in different racks. And you have a Floating IP definition for Floating IP 10.0.0.0_32. You have configured the ip address 10.0.0.0/32 on both dedicated servers.
If the Anchor IP in the Floating IP definition is pointing to your first server,
all traffic goes to that server. With this PUT
request you can toggle the
Anchor IP address to point to, for example, your second server, or any other server registered as the Passive Anchor IP. Within a
matter of seconds the Anchor IP and the Passive Anchor IP will switch places and all the traffic destined for the Floating IP will now end up
at the new Anchor IP. In the above example, your second server.
Authorizations:
path Parameters
rangeId required | string Example: 10.0.0.0_29 ID of a Floating IP Range, consisting of network IP and prefix length (separated by an underscore) |
floatingIpDefinitionId required | string ID of a Floating IP Definition, consisting of network IP and prefix length (separated by an underscore) |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request POST \ --url https://api.leaseweb.com/floatingIps/v2/ranges/10.0.0.0_29/floatingIpDefinitions/%7BfloatingIpDefinitionId%7D/toggleAnchorIp \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 403
- 404
- 500
- 503
{- "id": "88.17.34.108_32",
- "rangeId": "88.17.0.0_17",
- "location": "AMS-01",
- "type": "SITE",
- "customerId": "10001234",
- "salesOrgId": "2000",
- "floatingIp": "88.17.34.108/32",
- "anchorIp": "95.10.126.2",
- "passiveAnchorIp": "95.10.126.1",
- "status": "ACTIVE",
- "createdAt": "2019-03-13T09:10:02+0000",
- "updatedAt": "2019-03-13T09:10:02+0000"
}
Leaseweb Private Networks is a service that allows customers to connect multiple servers and cloud instances within a secure, isolated, and high-speed private network. This eliminates the need to use public internet connections for internal communications, improving security, reducing latency, and enhancing data transfer efficiency.
List private networks
Authorizations:
query Parameters
limit | integer Default: 10 Limit the number of results returned |
offset | integer Default: 0 Return results starting from the given offset |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/bareMetals/v2/privateNetworks?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 403
- 500
- 503
{- "_metadata": {
- "totalCount": 1,
- "limit": 10,
- "offset": 0
}, - "privateNetworks": [
- {
- "equipmentCount": 4,
- "id": "811",
- "name": "default",
- "createdAt": "2015-07-16T13:06:45+0200",
- "updatedAt": "2015-07-16T13:06:45+0200"
}
]
}
Create a private network
Currently only one Private Network is allowed per customer.
Optionally you can give your Private Network a name by supplying the name
parameter in the request.
Once a Private Network is created you can add dedicated servers to this private network.
Authorizations:
Request Body schema: application/json
name | string A name to describe this private network |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "name": "production"
}
Response samples
- 201
- 403
- 500
- 503
{- "id": "12345",
- "name": "default",
- "createdAt": "2015-01-21T14:34:12+0000",
- "updatedAt": "2015-01-21T14:34:12+0000",
- "equipmentCount": 0,
- "servers": [ ]
}
Inspect a private network
Every dedicated server in your private network contains a status
key
explaining the current state of your server in your private network.
Possible state values are:
CONFIGURING
Your server is currently being added to the private network (can take ~5 minute)REMOVING
Your server is currently being removed from the private network (can take ~5 minute)CONFIGURED
Your server is part of the private network.
Authorizations:
path Parameters
privateNetworkId required | string Id of the privateNetwork |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/bareMetals/v2/privateNetworks/%7BprivateNetworkId%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 403
- 404
- 500
- 503
{- "id": "12345",
- "name": "default",
- "createdAt": "2015-01-21T14:34:12+0000",
- "updatedAt": "2015-01-21T14:34:12+0000"
}
Update a private network
Authorizations:
path Parameters
privateNetworkId required | string Id of the privateNetwork |
Request Body schema: application/json
name | string A name to describe this private network |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "name": "production"
}
Response samples
- 200
- 400
- 403
- 404
- 500
- 503
{- "id": "12345",
- "name": "default",
- "createdAt": "2015-01-21T14:34:12+0000",
- "updatedAt": "2015-01-21T14:34:12+0000",
- "servers": [ ]
}
Delete a private network
You can only delete a private network if it has no equipments attached to it anymore.
Authorizations:
path Parameters
privateNetworkId required | string Id of the privateNetwork |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request DELETE \ --url https://api.leaseweb.com/bareMetals/v2/privateNetworks/%7BprivateNetworkId%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 403
- 404
- 500
- 503
{- "correlationId": "36ddff0b-0fc5-4bc5-cb4f-4a16a3895204",
- "errorCode": 400,
- "errorMessage": "You can only delete a private network if all equipments are removed from it."
}
Get DHCP reservations
Use this API to get DHCP the reservations of a private network.
Authorizations:
path Parameters
privateNetworkId required | string Example: 892 The ID of a Private Network |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/bareMetals/v2/privateNetworks/892/reservations \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 404
- 500
- 503
{- "_metadata": {
- "limit": 20,
- "offset": 0,
- "totalCount": 1
}, - "reservations": [
- {
- "ip": "127.0.0.1",
- "mac": "d8:87:03:52:0a:0f",
- "sticky": true
}
]
}
Create a DHCP reservation
Create a DHCP reservation for a private network.
Authorizations:
path Parameters
privateNetworkId required | string Example: 892 The ID of a Private Network |
Request Body schema: application/jsonrequired
ip required | string The IP address for this DHCP reservation |
mac required | string The Mac address for this DHCP reservation |
sticky required | boolean If false, this DHCP reservation will be automatically removed if not used for a longer period |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "ip": "127.0.0.1",
- "mac": "D8:87:03:52:0A:0F",
- "sticky": true
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "ip": "127.0.0.1",
- "mac": "d8:87:03:52:0a:0f",
- "sticky": true
}
Delete a DHCP reservation
This API call will delete a DHCP reservation from a private network.
Authorizations:
path Parameters
privateNetworkId required | string Example: 892 The ID of a Private Network |
ip required | string Example: 127.0.0.6 The IP Address |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request DELETE \ --url https://api.leaseweb.com/bareMetals/v2/privateNetworks/892/reservations/127.0.0.6 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "Validation Failed."
}
Leaseweb Remote Management is a service that allows businesses to manage their servers remotely. It offers a range of remote management options, including remote management, remote monitoring, and remote management, to meet different remote management needs and requirements.
Change OpenVPN credentials
Users can change their OpenVPN credentials. These credentials are stored using one way encryption so the user is responsible for storing and/or remembering this password.
If the password is lost a new one can be generated using this API call. If a new password is generated it will replace the old password.
Authorizations:
Request Body schema: application/json
password | string >= 8 characters The password should be at least 8 characters and consisting of uppercase, lowercase, digits and special characters |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "password": "mys3cretp@ssw0rd"
}
Response samples
- 403
- 500
- 503
{- "errorCode": "ACCESS_DENIED",
- "errorMessage": "The access token is expired or invalid."
}
List OpenVPN profiles
These profiles are used to establish a OpenVPN connection to a data center which will give you access to the IPMI interface of your dedicated server. Access to this interface allows a user to remotely administer the server in case it is not reachable.
Authorizations:
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/bareMetals/v2/remoteManagement/profiles \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 403
- 500
- 503
{- "_metadata": {
- "limit": 10,
- "offset": 0,
- "totalCount": 1
}, - "profiles": [
- {
- "datacenter": "AMS-01",
- "satelliteDatacenters": [
- "AMS-10",
- "AMS-11",
- "AMS-12"
],
}
]
}
Inspect an OpenVPN profile
Retrieve a OpenVPN profile for the given data center.
On success the response will be a pop specific OpenVPN profile containing a certificate and configuration.
This file can be used with OpenVPN clients to initiate a connection to Leaseweb Remote Management network.
Authorizations:
path Parameters
datacenter required | string Datacenter location |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/bareMetals/v2/remoteManagement/profiles/lsw-rmvpn-%7Bdatacenter%7D.ovpn \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 403
- 404
- 500
- 503
client proto udp port 1194 dev tun remote-random remote keepalive 10 60 remote-cert-tls server resolv-retry infinite comp-lzo auth-user-pass auth-retry interact explicit-exit-notify 2 <ca> -----BEGIN CERTIFICATE----- AAAAAAAAAAAAAA................. -----END CERTIFICATE----- </ca>
Leaseweb Aggregation Packs are a service that allows businesses to manage their servers remotely. It offers a range of aggregation packs options, including aggregation packs, aggregation packs monitoring, and aggregation packs management, to meet different aggregation packs needs and requirements.
List aggregation packs
List your Aggregation Packs. This api call supports pagination. Use the
limit
and offset
query string parameters to paginate through all your
aggregation packs.
Every aggregation pack
object in the json response lists a few properties of a aggregation pack.
Use the single resource api call to get more details for a single aggregation pack.
Authorizations:
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/bareMetals/v2/aggregationPacks?limit=20&offset=10' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "_metadata": {
- "limit": 2,
- "offset": 0,
- "totalCount": 10
}, - "connectContractItems": [
- {
- "id": "123456",
- "customerId": "1234",
- "salesOrgId": "2000",
- "contractStartDate": "2022-07-01T00:00:00Z",
- "billingType": "95TH",
- "connectivityType": "BANDWIDTH_POOL",
- "contractTerm": 36,
- "dataTrafficCommit": 20000,
- "dataTrafficCommitUnit": "Mbps",
- "networkPerformanceType": "VOLUME",
- "aggregationType": "Hybrid"
}, - {
- "id": "1234567",
- "customerId": "1234",
- "salesOrgId": "2000",
- "contractStartDate": "2021-07-01T00:00:00Z",
- "billingType": "95TH",
- "connectivityType": "BANDWIDTH_POOL",
- "contractTerm": 36,
- "dataTrafficCommit": 30000,
- "dataTrafficCommitUnit": "Mbps",
- "networkPerformanceType": "VOLUME",
- "aggregationType": "Hybrid"
}
]
}
Get aggregation pack
Use this API to get information about a single aggregation pack.
Authorizations:
path Parameters
aggregationPackId required | string The ID of aggregation pack |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/bareMetals/v2/aggregationPacks/%7BaggregationPackId%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 404
- 500
- 503
{- "aggregationType": "Hybrid",
- "billingType": "95TH",
- "connectivityType": "BANDWIDTH_POOL",
- "contractStartDate": "2022-07-01T00:00:00Z",
- "contractTerm": 36,
- "customerId": "1234",
- "dataTrafficCommit": 20000,
- "dataTrafficCommitUnit": "Mbps",
- "id": "123456",
- "networkPerformanceType": "VOLUME",
- "salesOrgId": "2000"
}
Leaseweb CDN is a service that allows businesses to manage their servers remotely. It offers a range of CDN options, including CDN, CDN monitoring, and CDN management, to meet different CDN needs and requirements.
Create Origin
Create origin resouces to be used within distributions.
There are 2 types of origins:
- Simple Origin
- Advanced Origin
Authorizations:
Request Body schema: application/jsonrequired
resourceType required | string Enum: "SIMPLE_ORIGIN" "ADVANCED_ORIGIN" |
required | Array of items |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "resourceType": "SIMPLE_ORIGIN",
- "data": [
- {
- "key": "host",
- "value": "backend.leaseweb.com"
}, - {
- "key": "description",
- "value": "Leaseweb Backend"
}, - {
- "key": "enabled",
- "value": true
}
]
}
Response samples
- 201
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "resourceType": "SIMPLE_ORIGIN",
- "data": [
- {
- "key": "id",
- "value": "or-4njkb2g"
}, - {
- "key": "customerId",
- "value": "cu-sndj3j24"
}, - {
- "key": "created",
- "value": "2024-07-12T12:55:54"
}, - {
- "key": "updated",
- "value": "2024-07-12T12:55:54"
}, - {
- "key": "host",
- "value": "backend.leaseweb.com"
}, - {
- "key": "description",
- "value": "Leaseweb Backend"
}, - {
- "key": "enabled",
- "value": true
}
]
}
Get All Origins
Get the list of origins including all of the origin types. Types are specified in each record.
Authorizations:
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/cdn/v2/origins?limit=20&offset=10' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "origins": [
- {
- "resourceType": "SIMPLE_ORIGIN",
- "data": [
- {
- "key": "id",
- "value": "or-5dfg51fr"
}, - {
- "key": "customerId",
- "value": "cu-sndj3j24"
}, - {
- "key": "created",
- "value": "2024-07-12T12:55:54"
}, - {
- "key": "updated",
- "value": "2024-07-12T12:55:54"
}, - {
- "key": "host",
- "value": "backend.leaseweb.com"
}, - {
- "key": "description",
- "value": "Leaseweb Backend"
}, - {
- "key": "enabled",
- "value": true
}
]
}, - {
- "resourceType": "ADVANCED_ORIGIN",
- "data": [
- {
- "key": "id",
- "value": "or-y71sg45"
}, - {
- "key": "customerId",
- "value": "cu-sndj3j24"
}, - {
- "key": "created",
- "value": "2020-12-10T07:07:35"
}, - {
- "key": "updated",
- "value": "2021-12-08T12:20:25"
}, - {
- "key": "host",
- "value": "backend.leaseweb.com"
}, - {
- "key": "description",
- "value": "LSW Custom Backend"
}, - {
- "key": "enabled",
- "value": true
}, - {
- "key": "path",
- "value": "/test"
}, - {
- "key": "httpPort",
- "value": 8080
}, - {
- "key": "httpsPort",
- "value": 8081
}
]
}
], - "_metadata": {
- "totalCount": 2,
- "limit": 20,
- "offset": 0
}
}
Get Origin By Id
Get an origin by its ID.
Authorizations:
path Parameters
origin_id required | string (Origin Id) |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/cdn/v2/origins/%7Borigin_id%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "resourceType": "SIMPLE_ORIGIN",
- "data": [
- {
- "key": "id",
- "value": "or-5dfg51fr"
}, - {
- "key": "customerId",
- "value": "cu-sndj3j24"
}, - {
- "key": "created",
- "value": "2024-07-12T12:55:54"
}, - {
- "key": "updated",
- "value": "2024-07-12T12:55:54"
}, - {
- "key": "host",
- "value": "backend.leaseweb.com"
}, - {
- "key": "description",
- "value": "Leaseweb Backend"
}, - {
- "key": "enabled",
- "value": true
}
]
}
Update Origin By Id
Update the options available in an origin.
Note: Type of the origin can't be changed since it's considered a different type of entity.
Authorizations:
path Parameters
origin_id required | string (Origin Id) |
Request Body schema: application/jsonrequired
resourceType required | string (Resourcetype) |
required | Array of objects (Data) |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "resourceType": "SIMPLE_ORIGIN",
- "data": [
- {
- "key": "host",
- "value": "backend.leaseweb.com"
}, - {
- "key": "description",
- "value": "Leaseweb Backend 2"
}, - {
- "key": "enabled",
- "value": true
}
]
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "resourceType": "SIMPLE_ORIGIN",
- "data": [
- {
- "key": "id",
- "value": "or-5dfg51fr"
}, - {
- "key": "customerId",
- "value": "cu-sndj3j24"
}, - {
- "key": "created",
- "value": "2024-07-12T12:55:54"
}, - {
- "key": "updated",
- "value": "2024-07-12T12:55:54"
}, - {
- "key": "host",
- "value": "backend.leaseweb.com"
}, - {
- "key": "description",
- "value": "Leaseweb Backend 2"
}, - {
- "key": "enabled",
- "value": true
}
]
}
Delete Origin By Id
Authorizations:
path Parameters
origin_id required | string (Origin Id) |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request DELETE \ --url https://api.leaseweb.com/cdn/v2/origins/%7Borigin_id%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Create Origin Group
Using origin groups you can define loadbalancers on top of your origins.
Available loadbalancing methods:
- ROUNDROBIN
- CONSISTENT
- STICKY
- FAILOVER
Authorizations:
Request Body schema: application/jsonrequired
resourceType required | string (Resourcetype) |
required | Array of objects (Data) |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "resourceType": "ORIGIN_GROUP",
- "data": [
- {
- "key": "balancingMethod",
- "value": "CONSISTENT"
}, - {
- "key": "description",
- "value": "LSW Origin Group"
}, - {
- "key": "failTimeOut",
- "value": 8
}, - {
- "key": "keepAlive",
- "value": true
}, - {
- "key": "keepAliveSeconds",
- "value": 27
}, - {
- "key": "enabled",
- "value": true
}
]
}
Response samples
- 201
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "resourceType": "ORIGIN_GROUP",
- "data": [
- {
- "key": "balancingMethod",
- "value": "CONSISTENT"
}, - {
- "key": "description",
- "value": "LSW Origin Group"
}, - {
- "key": "failTimeOut",
- "value": 8
}, - {
- "key": "keepAlive",
- "value": true
}, - {
- "key": "keepAliveSeconds",
- "value": 27
}, - {
- "key": "enabled",
- "value": true
}, - {
- "key": "id",
- "value": "og-3h47bjs"
}, - {
- "key": "customerId",
- "value": "cu-47dbh4n2"
}, - {
- "key": "created",
- "value": "2024-08-07T10:38:49"
}, - {
- "key": "updated",
- "value": null
}
]
}
Get All Origin Groups
Get the list of your origin groups.
Authorizations:
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/cdn/v2/originGroups?limit=20&offset=10' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "originGroups": [
- {
- "resourceType": "ORIGIN_GROUP",
- "data": [
- {
- "key": "balancingMethod",
- "value": "ROUNDROBIN"
}, - {
- "key": "description",
- "value": "Origin Group 1"
}, - {
- "key": "failTimeOut",
- "value": 1
}, - {
- "key": "keepAlive",
- "value": true
}, - {
- "key": "keepAliveSeconds",
- "value": 30
}, - {
- "key": "enabled",
- "value": true
}, - {
- "key": "id",
- "value": "og-84ynk6g"
}, - {
- "key": "customerId",
- "value": "cu-4kb3vb64"
}, - {
- "key": "created",
- "value": "2020-12-14T11:52:17"
}, - {
- "key": "updated",
- "value": "2024-07-05T11:38:45"
}
]
}, - {
- "resourceType": "ORIGIN_GROUP",
- "data": [
- {
- "key": "balancingMethod",
- "value": "CONSISTENT"
}, - {
- "key": "description",
- "value": "origin group 1"
}, - {
- "key": "failTimeOut",
- "value": 15
}, - {
- "key": "keepAlive",
- "value": true
}, - {
- "key": "keepAliveSeconds",
- "value": 30
}, - {
- "key": "enabled",
- "value": true
}, - {
- "key": "id",
- "value": "og-dg9enj3"
}, - {
- "key": "customerId",
- "value": "cu-4kb3vb64"
}, - {
- "key": "created",
- "value": "2020-12-17T14:02:37"
}, - {
- "key": "updated",
- "value": "2021-11-29T11:27:03"
}
]
}
], - "_metadata": {
- "totalCount": 2,
- "limit": 25,
- "offset": 0
}
}
Get Origin Group By Id
Get the details of an origin group by its ID.
Authorizations:
path Parameters
origin_group_id required | string (Origin Group Id) |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/cdn/v2/originGroups/%7Borigin_group_id%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "resourceType": "ORIGIN_GROUP",
- "data": [
- {
- "key": "balancingMethod",
- "value": "CONSISTENT"
}, - {
- "key": "description",
- "value": "LSW Origin Group"
}, - {
- "key": "failTimeOut",
- "value": 8
}, - {
- "key": "keepAlive",
- "value": true
}, - {
- "key": "keepAliveSeconds",
- "value": 27
}, - {
- "key": "enabled",
- "value": true
}, - {
- "key": "id",
- "value": "og-3h47bjs"
}, - {
- "key": "customerId",
- "value": "cu-47dbh4n2"
}, - {
- "key": "created",
- "value": "2024-08-07T10:38:49"
}, - {
- "key": "updated",
- "value": null
}
]
}
Update Origin Group By Id
Update the parameters in an origin group.
Note: members are managed by another endpoint.
Authorizations:
path Parameters
origin_group_id required | string (Origin Group Id) |
Request Body schema: application/jsonrequired
resourceType required | string (Resourcetype) |
required | Array of objects (Data) |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "resourceType": "ORIGIN_GROUP",
- "data": [
- {
- "key": "balancingMethod",
- "value": "CONSISTENT"
}, - {
- "key": "description",
- "value": "LSW Origin Group 2"
}, - {
- "key": "failTimeOut",
- "value": 8
}, - {
- "key": "keepAlive",
- "value": true
}, - {
- "key": "keepAliveSeconds",
- "value": 27
}, - {
- "key": "enabled",
- "value": true
}
]
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "resourceType": "ORIGIN_GROUP",
- "data": [
- {
- "key": "balancingMethod",
- "value": "CONSISTENT"
}, - {
- "key": "description",
- "value": "LSW Origin Group 2"
}, - {
- "key": "failTimeOut",
- "value": 8
}, - {
- "key": "keepAlive",
- "value": true
}, - {
- "key": "keepAliveSeconds",
- "value": 27
}, - {
- "key": "enabled",
- "value": true
}, - {
- "key": "id",
- "value": "og-3h47bjs"
}, - {
- "key": "customerId",
- "value": "cu-47dbh4n2"
}, - {
- "key": "created",
- "value": "2024-08-07T10:38:49"
}, - {
- "key": "updated",
- "value": null
}
]
}
Delete Origin Group By Id
Delete an origin group by its ID.
Authorizations:
path Parameters
origin_group_id required | string (Origin Group Id) |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request DELETE \ --url https://api.leaseweb.com/cdn/v2/originGroups/%7Borigin_group_id%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Create Origin Group Member
Add members (origins) to your origin group.
These are the backend servers that are going to be used within the loadbalancer.
Authorizations:
path Parameters
origin_group_id required | string (Origin Group Id) |
Request Body schema: application/jsonrequired
resourceType required | string (Resourcetype) |
required | Array of objects (Data) |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "resourceType": "ORIGIN_GROUP_MEMBER",
- "data": [
- {
- "key": "originId",
- "value": "or-du7n2vo8"
}, - {
- "key": "status",
- "value": "active"
}
]
}
Response samples
- 201
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "resourceType": "ORIGIN_GROUP_MEMBER",
- "data": [
- {
- "key": "originId",
- "value": "or-du7n2vo8"
}, - {
- "key": "status",
- "value": "active"
}, - {
- "key": "id",
- "value": "or-6j2vgb3"
}, - {
- "key": "originHost",
- "value": "origin.leaseweb.com"
}
]
}
Get All Origin Group Members
Get all of the members belonging to an origin group.
Authorizations:
path Parameters
origin_group_id required | string (Origin Group Id) |
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/cdn/v2/originGroups/%7Borigin_group_id%7D/members?limit=20&offset=10' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "originGroupMembers": [
- {
- "resourceType": "ORIGIN_GROUP_MEMBER",
- "data": [
- {
- "key": "originId",
- "value": "or-du7n2vo8"
}, - {
- "key": "status",
- "value": "active"
}, - {
- "key": "id",
- "value": "or-g2n6l2v5"
}, - {
- "key": "originHost",
- "value": "origin1.leaseweb.com"
}
]
}, - {
- "resourceType": "ORIGIN_GROUP_MEMBER",
- "data": [
- {
- "key": "originId",
- "value": "or-du7n2vo8"
}, - {
- "key": "status",
- "value": "backup"
}, - {
- "key": "id",
- "value": "or-kn6l2bb5"
}, - {
- "key": "originHost",
- "value": "origin2.leaseweb.com"
}
]
}
], - "_metadata": {
- "totalCount": 2,
- "limit": 25,
- "offset": 0
}
}
Get Origin Group Member By Id
Get the details of an origin group member by its ID.
Authorizations:
path Parameters
origin_group_id required | string (Origin Group Id) |
origin_group_member_id required | string (Origin Group Member Id) |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/cdn/v2/originGroups/%7Borigin_group_id%7D/members/%7Borigin_group_member_id%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "resourceType": "ORIGIN_GROUP_MEMBER",
- "data": [
- {
- "key": "originId",
- "value": "or-du7n2vo8"
}, - {
- "key": "status",
- "value": "active"
}, - {
- "key": "id",
- "value": "or-6j2vgb3"
}, - {
- "key": "originHost",
- "value": "origin.leaseweb.com"
}
]
}
Update Origin Group Member By Id
Update the parameters in an origin group member.
Authorizations:
path Parameters
origin_group_id required | string (Origin Group Id) |
origin_group_member_id required | string (Origin Group Member Id) |
Request Body schema: application/jsonrequired
resourceType required | string (Resourcetype) |
required | Array of objects (Data) |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "resourceType": "ORIGIN_GROUP_MEMBER",
- "data": [
- {
- "key": "originId",
- "value": "or-du7n2vo8"
}, - {
- "key": "status",
- "value": "inactive"
}
]
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "resourceType": "ORIGIN_GROUP_MEMBER",
- "data": [
- {
- "key": "originId",
- "value": "or-du7n2vo8"
}, - {
- "key": "status",
- "value": "inactive"
}, - {
- "key": "id",
- "value": "or-6j2vgb3"
}, - {
- "key": "originHost",
- "value": "origin.leaseweb.com"
}
]
}
Delete Origin Group Member By Id
Authorizations:
path Parameters
origin_group_id required | string (Origin Group Id) |
origin_group_member_id required | string (Origin Group Member Id) |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request DELETE \ --url https://api.leaseweb.com/cdn/v2/originGroups/%7Borigin_group_id%7D/members/%7Borigin_group_member_id%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Debug Url
You can use this endpoint to debug your distributions on each CDN provider independently. All of the returned headers per provider are included in the response.
Note: Use the specific domain you want to debug since each distribution can have multiple custom domains.
Authorizations:
Request Body schema: application/jsonrequired
url required | string <uri> (Url) [ 1 .. 2083 ] characters |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
Response samples
- 201
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "success": true,
- "providerResponses": [
- {
- "providerType": "gcore",
- "success": true,
- "ip": "93.123.17.254",
- "statusCode": 301,
- "message": null,
- "headers": [
- {
- "name": "connection",
- "value": "keep-alive"
}, - {
- "name": "content-length",
- "value": "0"
}, - {
- "name": "date",
- "value": "Thu, 05 Aug 2024 11:34:36 GMT"
},
]
}, - {
- "providerType": "edgio",
- "success": true,
- "ip": "41.63.96.130",
- "statusCode": 301,
- "message": null,
- "headers": [
- {
- "name": "connection",
- "value": "keep-alive"
}, - {
- "name": "content-length",
- "value": "0"
}, - {
- "name": "date",
- "value": "Thu, 05 Aug 2024 11:34:36 GMT"
},
]
}
]
}
Do Invalidation
You can submit multiple URLs to be invalidated and purged on all of the CDN PoPs. The time to finish the purge depends on the CDN providers and the number of cached files.
Authorizations:
Request Body schema: application/jsonrequired
files | Array of strings (Files) |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{
}
Response samples
- 201
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "type": "INVALIDATION",
- "resource": {
- "invalidation_id": "in-f141ghed5",
- "status": "PENDING",
- "url_status": [
- {
- "distribution_group_id": "",
- "status": "PENDING",
- "message": ""
}
], - "submitted": "2024-07-11T12:14:41",
- "completed": ""
}, - "status": "PENDING",
- "id": "0533396e-e5c6-4de2-bd08-06dfa91a3ab6",
- "customerId": "47927462",
- "created": "2024-07-11T12:14:43Z",
- "updated": ""
}
Create Certificate
Using this endpoint, you can upload your custom TLS certificates to be used in your distributions.
Note: some CDN providers need more time to apply your new certificate to your newly created distribution. Please be aware and always try to upload your certificates as soon as possible.
Authorizations:
Request Body schema: application/jsonrequired
Description (string) or Description (null) (Description) | |
certificate required | string (Certificate) |
privateKey required | string (Privatekey) |
caBundle required | string (Cabundle) |
validation | boolean (Validation) Default: true |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "description": "Main LSW Certificate 2024",
- "certificate": "-----BEGIN CERTIFICATE----- {***} -----END CERTIFICATE-----",
- "privateKey": "-----BEGIN PRIVATE KEY----- {***} -----END PRIVATE KEY-----",
- "caBundle": "-----BEGIN CERTIFICATE----- {***} -----END CERTIFICATE-----",
- "validation": true
}
Response samples
- 201
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "description": "Main LSW Certificate 2024",
- "certificate": "Hidden for security reasons",
- "privateKey": "Hidden for security reasons",
- "caBundle": "Hidden for security reasons",
- "validation": true,
- "id": "ce-5g8wbh25",
- "commonName": "c1",
- "issuer": "c1",
- "valid": true,
- "trusted": true,
- "daysLeft": 364,
- "validFrom": 1723118047,
- "validUntil": 1754646847,
- "created": "2024-03-19T08:15:23",
- "updated": "2024-03-19T08:15:23"
}
Get All Certificates
Get the list of your certificates.
Authorizations:
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/cdn/v2/certificates?limit=20&offset=10' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "certificates": [
- {
- "description": "Main LSW Certificate 2024",
- "certificate": "Hidden for security reasons",
- "privateKey": "Hidden for security reasons",
- "caBundle": "Hidden for security reasons",
- "validation": true,
- "id": "ce-5g8wbh25",
- "commonName": "c1",
- "issuer": "c1",
- "valid": true,
- "trusted": true,
- "daysLeft": 364,
- "validFrom": 1723118047,
- "validUntil": 1754646847,
- "created": "2024-03-19T08:15:23",
- "updated": "2024-03-19T08:15:23"
}
], - "_metadata": {
- "totalCount": 1,
- "limit": -1,
- "offset": 0
}
}
Get Certificate By Id
Get the details of a certificate by its ID
Authorizations:
path Parameters
certificate_id required | string (Certificate Id) |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/cdn/v2/certificates/%7Bcertificate_id%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "description": "Main LSW Certificate 2024",
- "certificate": "Hidden for security reasons",
- "privateKey": "Hidden for security reasons",
- "caBundle": "Hidden for security reasons",
- "validation": true,
- "id": "ce-5g8wbh25",
- "commonName": "c1",
- "issuer": "c1",
- "valid": true,
- "trusted": true,
- "daysLeft": 364,
- "validFrom": 1723118047,
- "validUntil": 1754646847,
- "created": "2024-03-19T08:15:23",
- "updated": "2024-03-19T08:15:23"
}
Delete Certificate By Id
Authorizations:
path Parameters
certificate_id required | string (Certificate Id) |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request DELETE \ --url https://api.leaseweb.com/cdn/v2/certificates/%7Bcertificate_id%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Get All Actions
Get the list of all of the actions to monitor the progress of your background jobs.
Authorizations:
query Parameters
filters | Array of strings (Filters) Items Enum: "INVALIDATION" "CREATE_DIST" "UPDATE_DIST" "DELETE_DIST" |
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/cdn/v2/actions?filters=SOME_ARRAY_VALUE&limit=20&offset=10' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "actions": [
- {
- "type": "INVALIDATION",
- "resource": {
- "invalidation_id": "in-gt7m1s5",
- "status": "FINISHED",
- "url_status": [
- {
- "distribution_group_id": "",
- "status": "SUCCESS",
- "message": ""
}
], - "submitted": "2024-07-10T13:10:14",
- "completed": null
}, - "status": "FINISHED",
- "id": "dac57900-0109-4615-b808-003f2c07cb40",
- "customerId": "59841258",
- "created": "2024-07-10T13:10:15Z",
- "updated": "2024-08-08T12:52:09Z"
}, - {
- "type": "INVALIDATION",
- "resource": {
- "invalidation_id": "in-80ot20ls",
- "status": "FINISHED",
- "url_status": [
- {
- "distribution_group_id": "",
- "status": "SUCCESS",
- "message": ""
}
], - "submitted": "2024-07-10T13:11:12",
- "completed": null
}, - "status": "FINISHED",
- "id": "755ad32d-264d-4ace-bd4c-c30399c71675",
- "customerId": "59841258",
- "created": "2024-07-10T13:11:13Z",
- "updated": "2024-08-08T12:52:09Z"
}
], - "_metadata": {
- "totalCount": 2,
- "limit": -1,
- "offset": 0
}
}
Get Action By Id
Get an action by ID to monitor the progress.
Authorizations:
path Parameters
action_id required | string <uuid> (Action Id) |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/cdn/v2/actions/%7Baction_id%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "type": "INVALIDATION",
- "status": "PENDING",
- "id": "50ea5204-4827-41d2-a940-cb5afdfb2426",
- "customerId": "215468472",
- "created": "2019-08-24T14:15:22Z",
- "updated": "2019-08-24T14:15:22Z"
}
Create Distribution
Create any kind of distribution using this endpoint.
Available distribution types:
- DISTRIBUTION_VOLUME
- DISTRIBUTION_PREMIUM
- SHIELD_CDN
Authorizations:
Request Body schema: application/jsonrequired
resourceType required | string (Resourcetype) |
required | Array of objects (Data) |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "resourceType": "DISTRIBUTION_VOLUME",
- "data": [
- {
- "key": "description",
- "value": "Test Volume Distribution"
}, - {
- "key": "enabled",
- "value": true
}, - {
- "key": "tls",
- "value": false
}
]
}
Response samples
- 201
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "resourceType": "DISTRIBUTION_VOLUME",
- "data": [
- {
- "key": "description",
- "value": "Test Volume Distribution"
}, - {
- "key": "enabled",
- "value": true
}, - {
- "key": "ipv6",
- "value": false
}, - {
- "key": "tls",
- "value": false
}, - {
- "key": "tlsType",
- "value": null
}, - {
- "key": "certificateId",
- "value": null
}, - {
- "key": "logging",
- "value": false
}, - {
- "key": "id",
- "value": "di-6wnk5n2b"
}, - {
- "key": "customerId",
- "value": "cu-27h4kb2v"
}, - {
- "key": "created",
- "value": "2024-08-07T10:25:00"
}, - {
- "key": "updated",
- "value": null
}
]
}
Get All Distributions
Get the list of your distributions.
Authorizations:
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/cdn/v2/distributions?limit=20&offset=10' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "distributions": [
- {
- "resourceType": "DISTRIBUTION_VOLUME",
- "data": [
- {
- "key": "description",
- "value": "Test Distribution"
}, - {
- "key": "enabled",
- "value": true
}, - {
- "key": "ipv6",
- "value": true
}, - {
- "key": "tls",
- "value": false
}, - {
- "key": "tlsType",
- "value": null
}, - {
- "key": "certificateId",
- "value": null
}, - {
- "key": "logging",
- "value": true
}, - {
- "key": "id",
- "value": "di-dkn3lb5vc"
}, - {
- "key": "customerId",
- "value": "cu-8smmd9n"
}, - {
- "key": "created",
- "value": "2020-11-03T12:04:43"
}, - {
- "key": "updated",
- "value": "2024-02-22T20:29:14"
}
]
}
], - "_metadata": {
- "totalCount": 1,
- "limit": 25,
- "offset": 0
}
}
Get Distribution By Id
Get the general details of a distribution by its ID.
Authorizations:
path Parameters
distribution_id required | string (Distribution Id) |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/cdn/v2/distributions/%7Bdistribution_id%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "resourceType": "DISTRIBUTION_VOLUME",
- "data": [
- {
- "key": "description",
- "value": "Test Volume Distribution"
}, - {
- "key": "enabled",
- "value": true
}, - {
- "key": "ipv6",
- "value": false
}, - {
- "key": "tls",
- "value": false
}, - {
- "key": "tlsType",
- "value": null
}, - {
- "key": "certificateId",
- "value": null
}, - {
- "key": "logging",
- "value": false
}, - {
- "key": "id",
- "value": "di-6wnk5n2b"
}, - {
- "key": "customerId",
- "value": "cu-27h4kb2v"
}, - {
- "key": "created",
- "value": "2024-08-07T10:25:00"
}, - {
- "key": "updated",
- "value": null
}
]
}
Update Distribution By Id
Authorizations:
path Parameters
distribution_id required | string (Distribution Id) |
Request Body schema: application/jsonrequired
resourceType required | string (Resourcetype) |
required | Array of objects (Data) |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "resourceType": "DISTRIBUTION_VOLUME",
- "data": [
- {
- "key": "description",
- "value": "Test Volume Distribution 2"
}, - {
- "key": "enabled",
- "value": true
}, - {
- "key": "ipv6",
- "value": false
}, - {
- "key": "tls",
- "value": false
}, - {
- "key": "tlsType",
- "value": null
}, - {
- "key": "certificateId",
- "value": null
}, - {
- "key": "logging",
- "value": false
}
]
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "resourceType": "DISTRIBUTION_VOLUME",
- "data": [
- {
- "key": "description",
- "value": "Test Volume Distribution 2"
}, - {
- "key": "enabled",
- "value": true
}, - {
- "key": "ipv6",
- "value": false
}, - {
- "key": "tls",
- "value": false
}, - {
- "key": "tlsType",
- "value": null
}, - {
- "key": "certificateId",
- "value": null
}, - {
- "key": "logging",
- "value": false
}, - {
- "key": "id",
- "value": "di-6wnk5n2b"
}, - {
- "key": "customerId",
- "value": "cu-27h4kb2v"
}, - {
- "key": "created",
- "value": "2024-08-07T10:25:00"
}, - {
- "key": "updated",
- "value": "2024-08-07T10:25:00"
}
]
}
Delete Distribution By Id
Authorizations:
path Parameters
distribution_id required | string (Distribution Id) |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request DELETE \ --url https://api.leaseweb.com/cdn/v2/distributions/%7Bdistribution_id%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Create Domain
Add custom domains to a distribution.
Authorizations:
path Parameters
distribution_id required | string (Distribution Id) |
Request Body schema: application/jsonrequired
domain required | string (Domain) |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "domain": "test2.com"
}
Response samples
- 201
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "domain": "test2.com",
- "id": "test2.com",
- "distributionId": "di-yt84vrj",
- "created": "2024-07-31T02:15:32",
- "updated": "2024-08-04T23:24:29"
}
Get All Domains
Get the list of custom domains attached to a distribution.
Authorizations:
path Parameters
distribution_id required | string (Distribution Id) |
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/cdn/v2/distributions/%7Bdistribution_id%7D/domains?limit=20&offset=10' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "domains": [
- {
- "domain": "test2.com",
- "id": "test2.com",
- "distributionId": "di-y8n5spi",
- "created": "2024-07-31T02:15:32",
- "updated": "2024-08-04T23:24:29"
}
], - "_metadata": {
- "totalCount": 1,
- "limit": 10,
- "offset": 0
}
}
Get Domain By Id
Get the details of a custom domain attached to a dsitribution.
Authorizations:
path Parameters
distribution_id required | string (Distribution Id) |
domain_id required | string (Domain Id) |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/cdn/v2/distributions/%7Bdistribution_id%7D/domains/%7Bdomain_id%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "domain": "test2.com",
- "id": "test2.com",
- "distributionId": "di-yt84vrj",
- "created": "2024-07-31T02:15:32",
- "updated": "2024-08-04T23:24:29"
}
Delete Domain By Id
Authorizations:
path Parameters
distribution_id required | string (Distribution Id) |
domain_id required | string (Domain Id) |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request DELETE \ --url https://api.leaseweb.com/cdn/v2/distributions/%7Bdistribution_id%7D/domains/%7Bdomain_id%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Create Policy
Apply custom configurations using policies.
Note: Policies only exist for Volume and Shield distributions and only one policy can be added for volume distributions.
Authorizations:
path Parameters
distribution_id required | string (Distribution Id) |
Request Body schema: application/jsonrequired
securityToken | boolean (Securitytoken) Default: false |
"LEASEWEB" (any) or Securitytokenvendor (null) (Securitytokenvendor) | |
securityTokenMethod | string or null (Securitytokenmethod) Enum: "SIMPLE" "ENCRYPTED" |
securityTokenSecret | string or null (Securitytokensecret) <= 125 characters |
securityTokenAesKey | string or null (Securitytokenaeskey) |
securityTokenShaKey | string or null (Securitytokenshakey) |
securityTokenClientIp | boolean (Securitytokenclientip) Default: false |
securityTokenExpirationParam | string or null (Securitytokenexpirationparam) |
securityTokenParam | string or null (Securitytokenparam) |
securityTokenNumberOfPathComponents | integer (Securitytokennumberofpathcomponents) [ -1 .. 10 ] Default: -1 |
securityTokenEmbedIntoPath | boolean (Securitytokenembedintopath) Default: false |
securityGeoAcl | boolean (Securitygeoacl) Default: false |
Securitygeoacldefault (string) or Securitygeoacldefault (null) (Securitygeoacldefault) | |
securityIpAcl | boolean (Securityipacl) Default: false |
Securityipacldefault (string) or Securityipacldefault (null) (Securityipacldefault) | |
securityReferrerAcl | boolean (Securityreferreracl) Default: false |
Securityreferreracldefault (string) or Securityreferreracldefault (null) (Securityreferreracldefault) | |
originPullProtocol | string (Originpullprotocol) Default: "HTTP" Enum: "HTTP" "HTTPS" |
Originpullcompressed (boolean) or Originpullcompressed (null) (Originpullcompressed) | |
Originpullhostheader (string) or Originpullhostheader (null) (Originpullhostheader) | |
Originpullid (string) or Originpullid (null) (Originpullid) | |
Originpullgroupid (string) or Originpullgroupid (null) (Originpullgroupid) | |
Originpullshieldid (string) or Originpullshieldid (null) (Originpullshieldid) | |
originPullXff | boolean (Originpullxff) Default: false |
originPullPassCookie | boolean (Originpullpasscookie) Default: false |
originPullPassVary | boolean (Originpullpassvary) Default: false |
cacheQueryString | boolean (Cachequerystring) Default: false |
Cachedefaultttl (integer) or Cachedefaultttl (null) (Cachedefaultttl) | |
cacheHonorOriginTtl | boolean (Cachehonororiginttl) Default: false |
cacheStale | boolean (Cachestale) Default: false |
cacheByPass | boolean (Cachebypass) Default: false |
cacheSegmented | boolean (Cachesegmented) Default: true |
deliveryTtlInherit | boolean (Deliveryttlinherit) Default: false |
deliveryTtlOverride | integer (Deliveryttloverride) Default: 0 |
deliveryCompress | boolean (Deliverycompress) Default: false |
deliveryRateLimit | boolean (Deliveryratelimit) Default: false |
Deliverytransferrate (integer) or Deliverytransferrate (null) (Deliverytransferrate) | |
Deliveryburstsize (integer) or Deliveryburstsize (null) (Deliveryburstsize) | |
deliveryForceHttps | boolean (Deliveryforcehttps) Default: false |
deliveryPassThroughAllHeaders | boolean (Deliverypassthroughallheaders) Default: false |
description | string (Description) |
Allowedmethods (string) or Allowedmethods (null) (Allowedmethods) Default: "GET,HEAD" | |
path | string (Path) Default: "/" |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "description": "test-policy-1",
- "allowedMethods": "GET,POST,HEAD,PUT,OPTIONS",
- "securityGeoAcl": false,
- "securityIpAcl": false,
- "securityReferrerAcl": false,
- "originPullProtocol": "HTTP",
- "originPullCompressed": false,
- "originPullHostHeader": "test.invalid",
- "originPullId": "or-r81jws",
- "originPullGroupId": null,
- "originPullXff": false,
- "cacheQueryString": false,
- "cacheDefaultTtl": 86400,
- "cacheHonorOriginTtl": false,
- "cacheStale": false,
- "deliveryTtlInherit": false,
- "deliveryTtlOverride": 0,
- "deliveryCompress": false,
- "deliveryForceHttps": false
}
Response samples
- 201
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "securityToken": false,
- "securityTokenVendor": null,
- "securityTokenMethod": null,
- "securityTokenSecret": null,
- "securityTokenAesKey": null,
- "securityTokenShaKey": null,
- "securityTokenClientIp": false,
- "securityTokenExpirationParam": null,
- "securityTokenParam": null,
- "securityTokenNumberOfPathComponents": -1,
- "securityTokenEmbedIntoPath": false,
- "securityGeoAcl": false,
- "securityGeoAclDefault": null,
- "securityIpAcl": true,
- "securityIpAclDefault": null,
- "securityReferrerAcl": false,
- "securityReferrerAclDefault": null,
- "originPullProtocol": "HTTP",
- "originPullCompressed": false,
- "originPullHostHeader": "test.invalid",
- "originPullId": "or-r8n157f",
- "originPullGroupId": null,
- "originPullShieldId": null,
- "originPullXff": false,
- "originPullPassCookie": false,
- "originPullPassVary": false,
- "cacheQueryString": false,
- "cacheDefaultTtl": 86400,
- "cacheHonorOriginTtl": false,
- "cacheStale": false,
- "cacheByPass": false,
- "cacheSegmented": true,
- "deliveryTtlInherit": false,
- "deliveryTtlOverride": 0,
- "deliveryCompress": false,
- "deliveryRateLimit": false,
- "deliveryTransferRate": null,
- "deliveryBurstSize": null,
- "deliveryForceHttps": false,
- "deliveryPassThroughAllHeaders": false,
- "description": "test-policy-4",
- "allowedMethods": "GET,POST,HEAD,PUT,OPTIONS",
- "path": "/",
- "id": "po-48nwon",
- "customerId": "cu-a4c79393",
- "created": "2024-08-06T08:55:37",
- "updated": "2024-08-07T23:31:44"
}
Get All Policies
Get the list of policies for a distribution.
Note: Policies only exist for Volume and Shield distributions.
Authorizations:
path Parameters
distribution_id required | string (Distribution Id) |
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/cdn/v2/distributions/%7Bdistribution_id%7D/policies?limit=20&offset=10' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "policies": [
- {
- "securityToken": false,
- "securityTokenVendor": null,
- "securityTokenMethod": null,
- "securityTokenSecret": null,
- "securityTokenAesKey": null,
- "securityTokenShaKey": null,
- "securityTokenClientIp": false,
- "securityTokenExpirationParam": null,
- "securityTokenParam": null,
- "securityTokenNumberOfPathComponents": -1,
- "securityTokenEmbedIntoPath": false,
- "securityGeoAcl": false,
- "securityGeoAclDefault": null,
- "securityIpAcl": true,
- "securityIpAclDefault": null,
- "securityReferrerAcl": false,
- "securityReferrerAclDefault": null,
- "originPullProtocol": "HTTP",
- "originPullCompressed": false,
- "originPullHostHeader": "test.invalid",
- "originPullId": "or-8g51win",
- "originPullGroupId": null,
- "originPullShieldId": null,
- "originPullXff": false,
- "originPullPassCookie": false,
- "originPullPassVary": false,
- "cacheQueryString": false,
- "cacheDefaultTtl": 86400,
- "cacheHonorOriginTtl": false,
- "cacheStale": false,
- "cacheByPass": false,
- "cacheSegmented": true,
- "deliveryTtlInherit": false,
- "deliveryTtlOverride": 0,
- "deliveryCompress": false,
- "deliveryRateLimit": false,
- "deliveryTransferRate": null,
- "deliveryBurstSize": null,
- "deliveryForceHttps": false,
- "deliveryPassThroughAllHeaders": false,
- "description": "test-policy-4",
- "allowedMethods": "GET,POST,HEAD,PUT,OPTIONS",
- "path": "/",
- "id": "po-br8i1mf",
- "customerId": "cu-g89u1nem",
- "created": "2024-08-06T08:55:37",
- "updated": "2024-08-07T23:31:44"
}
], - "_metadata": {
- "totalCount": 1,
- "limit": 10,
- "offset": 0
}
}
Get Policy By Id
Get the details of a policy using its ID.
Authorizations:
path Parameters
distribution_id required | string (Distribution Id) |
policy_id required | string (Policy Id) |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/cdn/v2/distributions/%7Bdistribution_id%7D/policies/%7Bpolicy_id%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "securityToken": false,
- "securityTokenVendor": null,
- "securityTokenMethod": null,
- "securityTokenSecret": null,
- "securityTokenAesKey": null,
- "securityTokenShaKey": null,
- "securityTokenClientIp": false,
- "securityTokenExpirationParam": null,
- "securityTokenParam": null,
- "securityTokenNumberOfPathComponents": -1,
- "securityTokenEmbedIntoPath": false,
- "securityGeoAcl": false,
- "securityGeoAclDefault": null,
- "securityIpAcl": true,
- "securityIpAclDefault": null,
- "securityReferrerAcl": false,
- "securityReferrerAclDefault": null,
- "originPullProtocol": "HTTP",
- "originPullCompressed": false,
- "originPullHostHeader": "test.invalid",
- "originPullId": "or-r8n157f",
- "originPullGroupId": null,
- "originPullShieldId": null,
- "originPullXff": false,
- "originPullPassCookie": false,
- "originPullPassVary": false,
- "cacheQueryString": false,
- "cacheDefaultTtl": 86400,
- "cacheHonorOriginTtl": false,
- "cacheStale": false,
- "cacheByPass": false,
- "cacheSegmented": true,
- "deliveryTtlInherit": false,
- "deliveryTtlOverride": 0,
- "deliveryCompress": false,
- "deliveryRateLimit": false,
- "deliveryTransferRate": null,
- "deliveryBurstSize": null,
- "deliveryForceHttps": false,
- "deliveryPassThroughAllHeaders": false,
- "description": "test-policy-4",
- "allowedMethods": "GET,POST,HEAD,PUT,OPTIONS",
- "path": "/",
- "id": "po-48nwon",
- "customerId": "cu-a4c79393",
- "created": "2024-08-06T08:55:37",
- "updated": "2024-08-07T23:31:44"
}
Update Policy By Id
Authorizations:
path Parameters
distribution_id required | string (Distribution Id) |
policy_id required | string (Policy Id) |
Request Body schema: application/jsonrequired
Update the options available in each policy.
securityToken | boolean (Securitytoken) Default: false |
"LEASEWEB" (any) or Securitytokenvendor (null) (Securitytokenvendor) | |
securityTokenMethod | string or null (Securitytokenmethod) Enum: "SIMPLE" "ENCRYPTED" |
securityTokenSecret | string or null (Securitytokensecret) <= 125 characters |
securityTokenAesKey | string or null (Securitytokenaeskey) |
securityTokenShaKey | string or null (Securitytokenshakey) |
securityTokenClientIp | boolean (Securitytokenclientip) Default: false |
securityTokenExpirationParam | string or null (Securitytokenexpirationparam) |
securityTokenParam | string or null (Securitytokenparam) |
securityTokenNumberOfPathComponents | integer (Securitytokennumberofpathcomponents) [ -1 .. 10 ] Default: -1 |
securityTokenEmbedIntoPath | boolean (Securitytokenembedintopath) Default: false |
securityGeoAcl | boolean (Securitygeoacl) Default: false |
Securitygeoacldefault (string) or Securitygeoacldefault (null) (Securitygeoacldefault) | |
securityIpAcl | boolean (Securityipacl) Default: false |
Securityipacldefault (string) or Securityipacldefault (null) (Securityipacldefault) | |
securityReferrerAcl | boolean (Securityreferreracl) Default: false |
Securityreferreracldefault (string) or Securityreferreracldefault (null) (Securityreferreracldefault) | |
originPullProtocol | string (Originpullprotocol) Default: "HTTP" Enum: "HTTP" "HTTPS" |
Originpullcompressed (boolean) or Originpullcompressed (null) (Originpullcompressed) | |
Originpullhostheader (string) or Originpullhostheader (null) (Originpullhostheader) | |
Originpullid (string) or Originpullid (null) (Originpullid) | |
Originpullgroupid (string) or Originpullgroupid (null) (Originpullgroupid) | |
Originpullshieldid (string) or Originpullshieldid (null) (Originpullshieldid) | |
originPullXff | boolean (Originpullxff) Default: false |
originPullPassCookie | boolean (Originpullpasscookie) Default: false |
originPullPassVary | boolean (Originpullpassvary) Default: false |
cacheQueryString | boolean (Cachequerystring) Default: false |
Cachedefaultttl (integer) or Cachedefaultttl (null) (Cachedefaultttl) | |
cacheHonorOriginTtl | boolean (Cachehonororiginttl) Default: false |
cacheStale | boolean (Cachestale) Default: false |
cacheByPass | boolean (Cachebypass) Default: false |
cacheSegmented | boolean (Cachesegmented) Default: true |
deliveryTtlInherit | boolean (Deliveryttlinherit) Default: false |
deliveryTtlOverride | integer (Deliveryttloverride) Default: 0 |
deliveryCompress | boolean (Deliverycompress) Default: false |
deliveryRateLimit | boolean (Deliveryratelimit) Default: false |
Deliverytransferrate (integer) or Deliverytransferrate (null) (Deliverytransferrate) | |
Deliveryburstsize (integer) or Deliveryburstsize (null) (Deliveryburstsize) | |
deliveryForceHttps | boolean (Deliveryforcehttps) Default: false |
deliveryPassThroughAllHeaders | boolean (Deliverypassthroughallheaders) Default: false |
description | string (Description) |
Allowedmethods (string) or Allowedmethods (null) (Allowedmethods) Default: "GET,HEAD" | |
path | string (Path) Default: "/" |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "securityToken": false,
- "securityTokenVendor": null,
- "securityTokenMethod": null,
- "securityTokenSecret": null,
- "securityTokenAesKey": null,
- "securityTokenShaKey": null,
- "securityTokenClientIp": false,
- "securityTokenExpirationParam": null,
- "securityTokenParam": null,
- "securityTokenNumberOfPathComponents": -1,
- "securityTokenEmbedIntoPath": false,
- "securityGeoAcl": false,
- "securityGeoAclDefault": null,
- "securityIpAcl": true,
- "securityIpAclDefault": null,
- "securityReferrerAcl": false,
- "securityReferrerAclDefault": null,
- "originPullProtocol": "HTTP",
- "originPullCompressed": false,
- "originPullHostHeader": "test.invalid",
- "originPullId": "or-r8n157f",
- "originPullGroupId": null,
- "originPullShieldId": null,
- "originPullXff": false,
- "originPullPassCookie": false,
- "originPullPassVary": false,
- "cacheQueryString": false,
- "cacheDefaultTtl": 86400,
- "cacheHonorOriginTtl": false,
- "cacheStale": false,
- "cacheByPass": false,
- "cacheSegmented": true,
- "deliveryTtlInherit": false,
- "deliveryTtlOverride": 0,
- "deliveryCompress": false,
- "deliveryRateLimit": false,
- "deliveryTransferRate": null,
- "deliveryBurstSize": null,
- "deliveryForceHttps": false,
- "deliveryPassThroughAllHeaders": false,
- "description": "test-policy-4-upated",
- "allowedMethods": "GET,POST,HEAD,PUT",
- "path": "/"
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "securityToken": false,
- "securityTokenVendor": null,
- "securityTokenMethod": null,
- "securityTokenSecret": null,
- "securityTokenAesKey": null,
- "securityTokenShaKey": null,
- "securityTokenClientIp": false,
- "securityTokenExpirationParam": null,
- "securityTokenParam": null,
- "securityTokenNumberOfPathComponents": -1,
- "securityTokenEmbedIntoPath": false,
- "securityGeoAcl": false,
- "securityGeoAclDefault": null,
- "securityIpAcl": true,
- "securityIpAclDefault": null,
- "securityReferrerAcl": false,
- "securityReferrerAclDefault": null,
- "originPullProtocol": "HTTP",
- "originPullCompressed": false,
- "originPullHostHeader": "test.invalid",
- "originPullId": "or-r8n157f",
- "originPullGroupId": null,
- "originPullShieldId": null,
- "originPullXff": false,
- "originPullPassCookie": false,
- "originPullPassVary": false,
- "cacheQueryString": false,
- "cacheDefaultTtl": 86400,
- "cacheHonorOriginTtl": false,
- "cacheStale": false,
- "cacheByPass": false,
- "cacheSegmented": true,
- "deliveryTtlInherit": false,
- "deliveryTtlOverride": 0,
- "deliveryCompress": false,
- "deliveryRateLimit": false,
- "deliveryTransferRate": null,
- "deliveryBurstSize": null,
- "deliveryForceHttps": false,
- "deliveryPassThroughAllHeaders": false,
- "description": "test-policy-4-updated",
- "allowedMethods": "GET,POST,HEAD,PUT",
- "path": "/",
- "id": "po-48nwon",
- "customerId": "cu-a4c79393",
- "created": "2024-08-06T08:55:37",
- "updated": "2024-08-07T23:31:44"
}
Delete Policy By Id
Authorizations:
path Parameters
distribution_id required | string (Distribution Id) |
policy_id required | string (Policy Id) |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request DELETE \ --url https://api.leaseweb.com/cdn/v2/distributions/%7Bdistribution_id%7D/policies/%7Bpolicy_id%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Create Acl
Create an ACL to control the traffic to a policy.
There are 3 types of ACLs:
- IP_ACL: Reject or allow certain IP subnets.
- GEO_ACL: Reject or allow certain countries.
- REFERRER_ACL: Reject or allow certain referrers.
Authorizations:
path Parameters
distribution_id required | string (Distribution Id) |
policy_id required | string (Policy Id) |
Request Body schema: application/jsonrequired
action | string (Action) Default: "REJECT" Enum: "REJECT" "ALLOW" |
value required | string (Value) |
type required | string (Type) Enum: "IP_ACL" "GEO_ACL" "REFERRER_ACL" |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "action": "REJECT",
- "value": "1.1.1.5/32",
- "type": "IP_ACL"
}
Response samples
- 201
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "action": "REJECT",
- "value": "1.1.1.5/32",
- "type": "IP_ACL",
- "id": "iacl-2",
- "policyId": "po-wk0ksi0x",
- "created": "2024-08-06T08:55:37",
- "updated": "2024-08-07T23:31:44"
}
Get All Acls
Get the list of active ACLs in a policy.
Authorizations:
path Parameters
distribution_id required | string (Distribution Id) |
policy_id required | string (Policy Id) |
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/cdn/v2/distributions/%7Bdistribution_id%7D/policies/%7Bpolicy_id%7D/acls?limit=20&offset=10' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "acls": [
- {
- "action": "REJECT",
- "value": "1.1.1.2/32",
- "type": "IP_ACL",
- "id": "iacl-0",
- "policyId": "po-wk0ksi0x",
- "created": "2024-08-06T08:55:37",
- "updated": "2024-08-07T23:31:44"
}, - {
- "action": "REJECT",
- "value": "1.1.1.3/32",
- "type": "IP_ACL",
- "id": "iacl-1",
- "policyId": "po-wk0ksi0x",
- "created": "2024-08-06T08:55:37",
- "updated": "2024-08-07T23:31:44"
}, - {
- "action": "REJECT",
- "value": "1.1.1.5/32",
- "type": "IP_ACL",
- "id": "iacl-2",
- "policyId": "po-wk0ksi0x",
- "created": "2024-08-06T08:55:37",
- "updated": "2024-08-07T23:31:44"
}
], - "_metadata": {
- "totalCount": 3,
- "limit": 10,
- "offset": 0
}
}
Get Acl By Id
Get an ACL by its ID.
Authorizations:
path Parameters
distribution_id required | string (Distribution Id) |
policy_id required | string (Policy Id) |
acl_id required | string (Acl Id) |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/cdn/v2/distributions/%7Bdistribution_id%7D/policies/%7Bpolicy_id%7D/acls/%7Bacl_id%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "action": "REJECT",
- "value": "1.1.1.5/32",
- "type": "IP_ACL",
- "id": "iacl-2",
- "policyId": "po-wk0ksi0x",
- "created": "2024-08-06T08:55:37",
- "updated": "2024-08-07T23:31:44"
}
Delete Acl By Id
Authorizations:
path Parameters
distribution_id required | string (Distribution Id) |
policy_id required | string (Policy Id) |
acl_id required | string (Acl Id) |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request DELETE \ --url https://api.leaseweb.com/cdn/v2/distributions/%7Bdistribution_id%7D/policies/%7Bpolicy_id%7D/acls/%7Bacl_id%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Get Statistics For Reseller Customer
Query statistics for reseller customer This endpoint is intended to be used for getting various statistics from the reporting backend
It currently supports DATATRANSFER, BANDWIDTH, REQUESTS, STATUS_2XX, STATUS_4XX, STATUS_5XX, CACHEHIT and 95TH as a metric.
DATATRANSFER: used to get the consumed amount of traffic (in bytes) in the queried period.
BANDWIDTH: used to get the mean amount of bits per second in the queried period.
STATUS_2XX/4XX/5XX: used to get a percentage of the amount of response codes in the queried period.
CACHEHIT: used to get the mean cache-hit ratio in the queried period.
REQUESTS: used to get the total amount of serviced requests in the queried period.
95TH: used to get the 95th percentile in bits per second for the queried period.
The fromDt and toDt must use the format YYYY-MM-ddTHH:mm:ss eg.. 2024-07-14T13:40:00.
Using the 'groupBy' parameter will allow you to group results together. Supported groupings are PROVIDER, DISTRIBUTION, CUSTOMER and REGION.
By specifying the distributionId as an additional filter the query will run just for the specified distribution. The granularity of the data can be specified in 5MIN (5 minutes), 15MIN (15 minutes), HOUR (1 hour), DAY (1 day) and WEEK (1 Week).
Authorizations:
query Parameters
fromDt required | string <date-time> (fromDt) |
toDt required | string <date-time> (toDt) |
metric required | string (metric) Enum: "DATATRANSFER" "BANDWIDTH" "REQUESTS" "STATUS_2XX" "STATUS_4XX" "STATUS_5XX" "CACHEHIT" "95TH" |
distributionId | string (distributionId) |
groupBy | string (groupBy) Enum: "PROVIDER" "DISTRIBUTION" "CUSTOMER" "REGION" |
granularity | string (granularity) Default: "5MIN" Enum: "5MIN" "15MIN" "HOUR" "DAY" "WEEK" |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/cdn/v2/statistics/reseller?fromDt=SOME_STRING_VALUE&toDt=SOME_STRING_VALUE&metric=SOME_STRING_VALUE&distributionId=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE&granularity=SOME_STRING_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "fromTs": "2024-07-13T14:45:00",
- "toTs": "2024-07-13T14:55:00",
- "service": "cdn",
- "granularity": "5MIN",
- "groupBy": null,
- "distributionId": null,
- "series": [
- {
- "all": [
- {
- "2024-07-13T14:45:00Z": 38091909.25333333
}, - {
- "2024-07-13T14:50:00Z": 68605244.58666667
}, - {
- "2024-07-13T14:55:00Z": 116197768.13333331
}
]
}
]
}
Get Total Statistics For Reseller Customer
Query total statistics for reseller customer This endpoint is intended to be used for getting the summed (total) statistics from the reporting backend
It currently supports DATATRANSFER, BANDWIDTH, REQUESTS, STATUS_2XX, STATUS_4XX, STATUS_5XX, CACHEHIT and 95TH as a metric.
DATATRANSFER: used to get the consumed amount of traffic (in bytes) in the queried period.
BANDWIDTH: used to get the mean amount of bits per second in the queried period.
STATUS_2XX/4XX/5XX: used to get a percentage of the amount of response codes in the queried period.
CACHEHIT: used to get the mean cache-hit ratio in the queried period.
REQUESTS: used to get the total amount of serviced requests in the queried period.
95TH: used to get the 95th percentile in bits per second for the queried period.
The fromDt and toDt must use the format YYYY-MM-ddTHH:mm:ss eg.. 2024-07-14T13:40:00.
Using the 'groupBy' parameter will allow you to group results together. Supported groupings are PROVIDER, DISTRIBUTION, CUSTOMER and REGION. By specifying the distributionId as an additional filter the query will run just for the specified distribution.
Authorizations:
query Parameters
fromDt required | string <date-time> (fromDt) |
toDt required | string <date-time> (toDt) |
metric required | string (metric) Enum: "DATATRANSFER" "BANDWIDTH" "REQUESTS" "STATUS_2XX" "STATUS_4XX" "STATUS_5XX" "CACHEHIT" "95TH" |
distributionId | string (distributionId) |
groupBy | string (groupBy) Enum: "PROVIDER" "DISTRIBUTION" "CUSTOMER" "REGION" |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/cdn/v2/statistics/reseller/totals?fromDt=SOME_STRING_VALUE&toDt=SOME_STRING_VALUE&metric=SOME_STRING_VALUE&distributionId=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "fromTs": "2024-07-13T14:45:00",
- "toTs": "2024-07-13T14:55:00",
- "service": "cdn",
- "granularity": "5MIN",
- "groupBy": "PROVIDER",
- "distributionId": null,
- "series": [
- {
- "edgio": [
- {
- "total": 237047731.04000002
}
]
}, - {
- "gcore": [
- {
- "total": 29610955.653333336
}
]
}
]
}
Get Statistics For Customer
Query statistics for customer This endpoint is intended to be used for getting various statistics from the reporting backend
It currently supports DATATRANSFER, BANDWIDTH, REQUESTS, STATUS_2XX, STATUS_4XX, STATUS_5XX, CACHEHIT and 95TH as a metric.
DATATRANSFER: used to get the consumed amount of traffic (in bytes) in the queried period.
BANDWIDTH: used to get the mean amount of bits per second in the queried period.
STATUS_2XX/4XX/5XX: used to get a percentage of the amount of response codes in the queried period.
CACHEHIT: used to get the mean cache-hit ratio in the queried period.
REQUESTS: used to get the total amount of serviced requests in the queried period.
95TH: used to get the 95th percentile in bits per second for the queried period.
The fromDt and toDt must use the format YYYY-MM-ddTHH:mm:ss eg.. 2024-07-14T13:40:00.
Using the 'groupBy' parameter will allow you to group results together. Supported groupings are PROVIDER, DISTRIBUTION, CUSTOMER and REGION.
By specifying the distributionId as an additional filter the query will run just for the specified distribution. The granularity of the data can be specified in 5MIN (5 minutes), 15MIN (15 minutes), HOUR (1 hour), DAY (1 day) and WEEK (1 Week).
Authorizations:
query Parameters
fromDt required | string <date-time> (fromDt) |
toDt required | string <date-time> (toDt) |
metric required | string (metric) Enum: "DATATRANSFER" "BANDWIDTH" "REQUESTS" "STATUS_2XX" "STATUS_4XX" "STATUS_5XX" "CACHEHIT" "95TH" |
distributionId | string (distributionId) |
groupBy | string (groupBy) Enum: "PROVIDER" "DISTRIBUTION" "CUSTOMER" "REGION" |
granularity | string (granularity) Default: "5MIN" Enum: "5MIN" "15MIN" "HOUR" "DAY" "WEEK" |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/cdn/v2/statistics/customer?fromDt=SOME_STRING_VALUE&toDt=SOME_STRING_VALUE&metric=SOME_STRING_VALUE&distributionId=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE&granularity=SOME_STRING_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "fromTs": "2024-08-20T09:28:38",
- "toTs": "2024-08-20T09:40:00",
- "service": "cdn",
- "granularity": "5MIN",
- "groupBy": "REGION",
- "distributionId": null,
- "series": [
- {
- "apac": [
- {
- "2024-08-20T09:30:00Z": 183825403.06666666
}, - {
- "2024-08-20T09:35:00Z": 185589722.85333332
}, - {
- "2024-08-20T09:40:00Z": 197508437.41333333
}
], - "asia": [
- {
- "2024-08-20T09:30:00Z": 271617.8933333333
}, - {
- "2024-08-20T09:35:00Z": 43990.05333333334
}, - {
- "2024-08-20T09:40:00Z": 164099.75999999998
}
], - "eu": [
- {
- "2024-08-20T09:30:00Z": 123709458.08
}, - {
- "2024-08-20T09:35:00Z": 75186491.28
}, - {
- "2024-08-20T09:40:00Z": 56450983.413333334
}
]
}
]
}
Get Total Statistics For Customer
Query total statistics for customer This endpoint is intended to be used for getting the summed (total) statistics from the reporting backend
It currently supports DATATRANSFER, BANDWIDTH, REQUESTS, STATUS_2XX, STATUS_4XX, STATUS_5XX, CACHEHIT and 95TH as a metric.
DATATRANSFER: used to get the consumed amount of traffic (in bytes) in the queried period.
BANDWIDTH: used to get the mean amount of bits per second in the queried period.
STATUS_2XX/4XX/5XX: used to get a percentage of the amount of response codes in the queried period.
CACHEHIT: used to get the mean cache-hit ratio in the queried period.
REQUESTS: used to get the total amount of serviced requests in the queried period.
95TH: used to get the 95th percentile in bits per second for the queried period.
The fromDt and toDt must use the format YYYY-MM-ddTHH:mm:ss eg.. 2024-07-14T13:40:00.
Using the 'groupBy' parameter will allow you to group results together. Supported groupings are PROVIDER, DISTRIBUTION, CUSTOMER and REGION. By specifying the distributionId as an additional filter the query will run just for the specified distribution.
Authorizations:
query Parameters
fromDt required | string <date-time> (fromDt) |
toDt required | string <date-time> (toDt) |
metric required | string (metric) Enum: "DATATRANSFER" "BANDWIDTH" "REQUESTS" "STATUS_2XX" "STATUS_4XX" "STATUS_5XX" "CACHEHIT" "95TH" |
distributionId | string (distributionId) |
groupBy | string (groupBy) Enum: "PROVIDER" "DISTRIBUTION" "CUSTOMER" "REGION" |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/cdn/v2/statistics/customer/totals?fromDt=SOME_STRING_VALUE&toDt=SOME_STRING_VALUE&metric=SOME_STRING_VALUE&distributionId=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 422
- 500
- 503
{- "fromTs": "2024-07-13T14:45:00",
- "toTs": "2024-07-13T14:55:00",
- "service": "cdn",
- "granularity": "5MIN",
- "groupBy": "PROVIDER",
- "distributionId": null,
- "series": [
- {
- "edgio": [
- {
- "total": 237047731.04000002
}
]
}, - {
- "gcore": [
- {
- "total": 29610955.653333336
}
]
}
]
}
Leaseweb Domains are a service that allows businesses to manage their domains efficiently. It offers a range of domain options, including domain registration, domain management, and domain monitoring, to meet different domain needs and requirements.
List domains
Authorizations:
query Parameters
limit | integer Default: 10 Example: limit=10 Limit the number of results returned |
offset | integer Default: 0 Return results starting from the given offset |
type | string Enum: "dns" "email" "overview" Example: type=overview Supplement the domain listing with statistics about either DNS and Email |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/hosting/v2/domains?limit=10&offset=0&type=overview' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 403
- 500
- 503
{- "domains": [
- {
- "domainName": "example.com",
- "suspended": true,
- "dnsOnly": false,
- "status": "SUSPENDED",
- "contractStartDate": "2017-04-01T00:00:00+02:00",
- "contractEndDate": "2018-04-01T00:00:00+02:00",
- "_links": {
- "self": {
- "href": "/domains/example.com"
}, - "collection": {
- "href": "/domains"
}, - "catchAll": {
- "href": "/domains/example.com/catchAll"
}, - "contacts": {
- "href": "/domains/example.com/contacts"
}, - "nameservers": {
- "href": "/domains/example.com/nameservers"
}, - "emailAliases": {
- "href": "/domains/example.com/emailAliases"
}, - "forwards": {
- "href": "/domains/example.com/forwards"
}, - "mailboxes": {
- "href": "/domains/example.com/mailboxes"
}, - "resourceRecordSets": {
- "href": "/domains/example.com/resourceRecordSets"
}, - "validateZone": {
- "href": "/domains/example.com/validateZone"
}
}
}, - {
- "domainName": "example.org",
- "suspended": false,
- "dnsOnly": true,
- "status": "ACTIVE",
- "contractStartDate": "2015-01-01T00:00:00+00:00",
- "_links": {
- "self": {
- "href": "/domains/example.org"
}, - "collection": {
- "href": "/domains"
}, - "catchAll": {
- "href": "/domains/example.org/catchAll"
}, - "contacts": {
- "href": "/domains/example.com/contacts"
}, - "nameservers": {
- "href": "/domains/example.com/nameservers"
}, - "emailAliases": {
- "href": "/domains/example.org/emailAliases"
}, - "forwards": {
- "href": "/domains/example.org/forwards"
}, - "mailboxes": {
- "href": "/domains/example.org/mailboxes"
}, - "resourceRecordSets": {
- "href": "/domains/example.org/resourceRecordSets"
}, - "validateZone": {
- "href": "/domains/example.org/validateZone"
}
}
}, - {
- "domainName": "example.nl",
- "suspended": false,
- "dnsOnly": false,
- "status": "PENDING",
- "contractStartDate": "2017-08-01T00:00:00+02:00",
- "contractEndDate": "2019-08-01T00:00:00+02:00",
- "_links": {
- "self": {
- "href": "/domains/example.nl"
}, - "collection": {
- "href": "/domains"
}, - "catchAll": {
- "href": "/domains/example.nl/catchAll"
}, - "contacts": {
- "href": "/domains/example.com/contacts"
}, - "nameservers": {
- "href": "/domains/example.com/nameservers"
}, - "emailAliases": {
- "href": "/domains/example.nl/emailAliases"
}, - "forwards": {
- "href": "/domains/example.nl/forwards"
}, - "mailboxes": {
- "href": "/domains/example.nl/mailboxes"
}, - "resourceRecordSets": {
- "href": "/domains/example.nl/resourceRecordSets"
}, - "validateZone": {
- "href": "/domains/example.nl/validateZone"
}
}
}, - {
- "domainName": "no-email-services-configured.com",
- "suspended": true,
- "dnsOnly": false,
- "status": "SUSPENDED",
- "contractStartDate": "2012-11-01T00:00:00+01:00",
- "_links": {
- "self": {
- "href": "/domains/no-email-services-configured.com"
}, - "collection": {
- "href": "/domains"
}, - "catchAll": {
- "href": "/domains/no-email-services-configured.com/catchAll"
}, - "contacts": {
- "href": "/domains/example.com/contacts"
}, - "nameservers": {
- "href": "/domains/example.com/nameservers"
}, - "emailAliases": {
- "href": "/domains/no-email-services-configured.com/emailAliases"
}, - "forwards": {
- "href": "/domains/no-email-services-configured.com/forwards"
}, - "mailboxes": {
- "href": "/domains/no-email-services-configured.com/mailboxes"
}, - "resourceRecordSets": {
- "href": "/domains/no-email-services-configured.com/resourceRecordSets"
}, - "validateZone": {
- "href": "/domains/no-email-services-configured.com/validateZone"
}
}
}
], - "_links": {
- "self": {
- "href": "/domains"
}, - "dns": {
- "href": "/domains?type=dns"
}, - "email": {
- "href": "/domains?type=email"
}
}, - "_metadata": {
- "totalCount": 4,
- "limit": 10,
- "offset": 0
}
}
Inspect a domain
Authorizations:
path Parameters
domainName required | string Example: example.com Domain name |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/hosting/v2/domains/example.com \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 403
- 404
- 500
- 503
{- "domainName": "example.com",
- "suspended": true,
- "dnsOnly": true,
- "status": "SUSPENDED",
- "contractStartDate": "2017-04-01T00:00:00+02:00",
- "contractEndDate": "2018-04-01T00:00:00+02:00",
- "_links": {
- "self": {
- "href": "/domains/example.com"
}, - "collection": {
- "href": "/domains"
}, - "catchAll": {
- "href": "/domains/example.com/catchAll"
}, - "contacts": {
- "href": "/domains/example.com/contacts"
}, - "nameservers": {
- "href": "/domains/example.com/nameservers"
}, - "emailAliases": {
- "href": "/domains/example.com/emailAliases"
}, - "forwards": {
- "href": "/domains/example.com/forwards"
}, - "mailboxes": {
- "href": "/domains/example.com/mailboxes"
}, - "resourceRecordSets": {
- "href": "/domains/example.com/resourceRecordSets"
}, - "validateZone": {
- "href": "/domains/example.com/validateZone"
}
}
}
Check availability
Authorizations:
path Parameters
domainName required | string Example: example.com Domain name |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/hosting/v2/domains/example.com/available \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 403
- 404
- 500
- 503
{- "domainName": "example.com",
- "available": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/available"
}
}
}
List nameservers
Authorizations:
path Parameters
domainName required | string Example: example.com Domain name |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/hosting/v2/domains/example.com/nameservers \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 403
- 404
- 500
- 503
{- "nameservers": [
- {
- "name": "ns1.example.com"
}, - {
- "name": "ns2.example.net"
}
], - "status": "Nameservers update request is accepted. This request will be processed after 24 hours.",
- "isLeasewebNameserver": false,
- "_links": {
- "self": {
- "href": "/domains/{domainName}/nameservers"
}
}, - "_metadata": {
- "totalCount": 4
}
}
Update nameservers
Full replacement of all nameservers for a domain.
Please note that the request body should contain at least two nameservers.
Authorizations:
path Parameters
domainName required | string Example: example.com Domain name |
Request Body schema: application/json
required | Array of objects Array of nameservers |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "nameservers": [
- {
- "name": "ns1.example.com"
}, - {
- "name": "ns2.example.net"
}
]
}
Response samples
- 200
- 400
- 403
- 404
- 409
- 500
- 503
{- "nameservers": [
- {
- "name": "ns1.example.com"
}, - {
- "name": "ns2.example.net"
}
], - "status": "Nameservers update request is accepted. This request will be processed after 24 hours.",
- "_links": {
- "self": {
- "href": "/domains/{domainName}/nameservers"
}
}, - "_metadata": {
- "totalCount": 4
}
}
Inspect DNS Security (DNSSEC)
Retrieve the DNSSEC status for your domain.
Authorizations:
path Parameters
domainName required | string Example: example.com Domain name |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/hosting/v2/domains/example.com/dnssec \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 403
- 404
- 422
- 500
- 503
{- "status": "ENABLED",
- "nsec3": {
- "active": true
}, - "keyRollover": {
- "status": "INITIALIZED",
- "type": "KSK",
- "message": "It would take 25 hours to complete the process from the time its been initialized"
}, - "_links": {
- "self": {
- "href": "/domains/example.com/dnssec"
}
}
}
Update DNS Security (DNSSEC)
Enable or Disable DNSSEC for your domain.
Please note : If you are using Leaseweb nameservers we will add DNSSEC keys automatically when enabling DNSSEC. If you are managing your own nameservers (non-leaseweb nameservers) then you can add your own keys as shown in example.
Authorizations:
path Parameters
domainName required | string Example: example.com Domain name |
Request Body schema: application/json
status required | string Enum: "ENABLED" "DISABLED" Domain DNSSEC status |
object NSEC3 is an extension to DNSSEC and it requires DNSSEC to be enabled. | |
Array of objects Add DNSSEC keys only when you have non-leaseweb nameservers. |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "status": "DISABLED"
}
Response samples
- 200
- 400
- 403
- 404
- 409
- 422
- 500
- 503
{- "infoMessage": "DNSSEC disabled successfully. It may take up to 25 hours to reflect."
}
Leaseweb DNS is a service that allows businesses to manage their DNS efficiently. It offers a range of DNS options, including DNS registration, DNS management, and DNS monitoring, to meet different DNS needs and requirements.
List resource record sets
Authorizations:
path Parameters
domainName required | string Example: example.com Domain name |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/hosting/v2/domains/example.com/resourceRecordSets \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 404
- 500
- 503
{- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets"
}, - "parent": {
- "href": "/domains/example.com"
}, - "validateSet": {
- "href": "/domains/example.com/resourceRecordSets/validateSet"
}
}, - "infoMessage": "EXAMPLE: Sorry, but your domain is not yet listed on our nameservers. Please create a DNS record first so we can add your domain.",
- "resourceRecordSets": [
- {
- "name": "example.com.",
- "type": "A",
- "content": [
- "85.17.150.50",
- "85.17.150.50",
- "85.17.150.53"
], - "ttl": 300,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/example.com./A"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}, - {
- "name": "subdomain.example.com.",
- "type": "A",
- "content": [
- "85.17.150.54"
], - "ttl": 86400,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/subdomain.example.com./A"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}, - {
- "name": "example.com.",
- "type": "AAAA",
- "content": [
- "2a02:2770:8:0:216:3eff:fead:8c93"
], - "ttl": 28800,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/example.com./AAAA"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}, - {
- "name": "some.example.com.",
- "type": "AAAA",
- "content": [
- "2a02:2770:8:0:216:3eff:fead:8c93"
], - "ttl": 300,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/some.example.com./AAAA"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}, - {
- "name": "example.com.",
- "type": "CAA",
- "content": [
- "0 issue \"comodoca.com\""
], - "ttl": 300,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/example.com./CAA"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}, - {
- "name": "anotherurl.example.com.",
- "type": "CNAME",
- "content": [
- "example.com."
], - "ttl": 86400,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/anotherurl.example.com./CNAME"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}, - {
- "name": "example.com.",
- "type": "MX",
- "content": [
- "10 mail.example.com.",
- "20 mailfilter.leaseweb.com."
], - "ttl": 3600,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/example.com./MX"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}, - {
- "name": "subdomain.example.com.",
- "type": "NS",
- "content": [
- "other.nameserver.com",
- "yet-another.nameserver.com"
], - "ttl": 3600,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/subdomain.example.com./NS"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}, - {
- "name": "_service._protocol.example.com.",
- "type": "SRV",
- "content": [
- "10 5 5060 sipserver.example.com."
], - "ttl": 14400,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/example.com./SRV"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}, - {
- "name": "example.com.",
- "type": "TXT",
- "content": [
- "\"google-site-verification=Kkalsdhl8a9792342lksdo9bSER233\"",
- "\"v=spf1 a mx -all\""
], - "ttl": 3600,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/example.com./TXT"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}, - {
- "name": "example.com.",
- "type": "SOA",
- "content": [
- "ns0.example.com. postmaster.example.com. 2020021901 10800 3600 604800 300"
], - "ttl": 3600,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/example.com./SOA"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}, - {
- "name": "ds.example.com.",
- "type": "DS",
- "content": [
- "63708 13 2 ce46cb792d263081fe23c7245a1ccce4d59e3e501db22932edf59d858c03fd6e"
], - "ttl": 3600,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/ds.example.com./DS"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}, - {
- "name": "_443._tcp.example.com.",
- "type": "TLSA",
- "content": [
- "3 1 1 9141610c47dab44af34daa405017f576c6d2beb5a083a16ba83a52ce27d91988"
], - "ttl": 3600,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/_443._tcp.example.com./TLSA"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}
]
}
Create a resource record set
Authorizations:
path Parameters
domainName required | string Example: example.com Domain name |
Request Body schema:
name required | string (name) Name of the resource record set |
type required | string (resourceRecordSetType) Enum: "A" "AAAA" "CAA" "CNAME" "MX" "NS" "SRV" "TXT" "SOA" "DS" "TLSA" Type of the resource record set |
content required | Array of strings (resourceRecordSetContent) Array of resource record set content entries |
ttl required | integer (ttl) Enum: 60 300 1800 3600 14400 28800 43200 86400 Time to live of the resource record set |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "content": [
- "85.17.150.51",
- "85.17.150.52",
- "85.17.150.53"
], - "name": "example.com.",
- "ttl": 3600,
- "type": "A"
}
Response samples
- 201
- 400
- 401
- 403
- 404
- 500
- 503
{- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/example.com./A"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}, - "content": [
- "85.17.150.51",
- "85.17.150.52",
- "85.17.150.53"
], - "editable": true,
- "name": "example.com.",
- "ttl": 3600,
- "type": "A"
}
Update resource record sets
This is a full replacement of all editable resource records sets for a domain.
Authorizations:
path Parameters
domainName required | string Example: example.com Domain name |
Request Body schema:
required | Array of objects (resourceRecordSet) Array of resource record sets |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "resourceRecordSets": [
- {
- "name": "example.com.",
- "type": "A",
- "content": [
- "85.17.150.50",
- "85.17.150.50",
- "85.17.150.53"
], - "ttl": 300
}, - {
- "name": "*.example.com.",
- "type": "A",
- "content": [
- "85.17.150.54"
], - "ttl": 86400
}, - {
- "name": "example.com.",
- "type": "AAAA",
- "content": [
- "2a02:2770:8:0:216:3eff:fead:8c93"
], - "ttl": 28800
}, - {
- "name": "some.example.com.",
- "type": "AAAA",
- "content": [
- "2a02:2770:8:0:216:3eff:fead:8c93"
], - "ttl": 60
}, - {
- "name": "example.com.",
- "type": "CAA",
- "content": [
- "0 issue \"comodoca.com\""
], - "ttl": 300
}, - {
- "name": "anotherurl.example.com.",
- "type": "CNAME",
- "content": [
- "example.com."
], - "ttl": 86400
}, - {
- "name": "example.com.",
- "type": "MX",
- "content": [
- "10 mail.example.com.",
- "20 mailfilter.leaseweb.com."
], - "ttl": 3600
}, - {
- "name": "subdomain.example.com.",
- "type": "NS",
- "content": [
- "other.nameserver.com",
- "yet-another.nameserver.com"
], - "ttl": 3600
}, - {
- "name": "_service._protocol.example.com.",
- "type": "SRV",
- "content": [
- "10 5 5060 sipserver.example.com."
], - "ttl": 14400
}, - {
- "name": "example.com.",
- "type": "TXT",
- "content": [
- "\"google-site-verification=Kkalsdhl8a9792342lksdo9bSER233\"",
- "\"v=spf1 a mx -all\""
], - "ttl": 3600
}, - {
- "name": "another.example.com.",
- "type": "SOA",
- "ttl": 3600,
- "content": [
- "example.com"
]
}, - {
- "name": "ds.example.com.",
- "type": "DS",
- "content": [
- "63708 13 2 ce46cb792d263081fe23c7245a1ccce4d59e3e501db22932edf59d858c03fd6e"
], - "ttl": 14400
}
]
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/example.com./A"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}, - "content": [
- "85.17.150.51",
- "85.17.150.52",
- "85.17.150.53"
], - "editable": true,
- "name": "example.com.",
- "ttl": 3600,
- "type": "A"
}
Delete resource record sets
Delete all editable resource record sets for a domain.
Please note that this action will keep the domain's zone in place.
Authorizations:
path Parameters
domainName required | string Example: example.com Domain name |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request DELETE \ --url https://api.leaseweb.com/hosting/v2/domains/example.com/resourceRecordSets \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "401",
- "errorMessage": "You are not authorized to view this resource."
}
Inspect resource record set
Authorizations:
path Parameters
domainName required | string Example: example.com Domain name |
name required | string Example: example.com. Record name |
type required | string Enum: "A" "AAA" "CAA" "CNAME" "MX" "TLSA" "NS" "SRV" "TXT" "SOA" "DS" Example: A Record type |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/hosting/v2/domains/example.com/resourceRecordSets/example.com./A \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 404
- 500
- 503
{- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/example.com./A"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}, - "content": [
- "85.17.150.51",
- "85.17.150.52",
- "85.17.150.53"
], - "editable": true,
- "name": "example.com.",
- "ttl": 3600,
- "type": "A"
}
Update a resource record set
Authorizations:
path Parameters
domainName required | string Example: example.com Domain name |
name required | string Example: example.com. Record name |
type required | string Enum: "A" "AAA" "CAA" "CNAME" "MX" "TLSA" "NS" "SRV" "TXT" "SOA" "DS" Example: A Record type |
Request Body schema:
content required | Array of strings (resourceRecordSetContent) Array of resource record set content entries |
ttl required | integer (ttl) Enum: 60 300 1800 3600 14400 28800 43200 86400 Time to live of the resource record set |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "content": [
- "85.17.150.51",
- "85.17.150.52",
- "85.17.150.53"
], - "ttl": 3600
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/example.com./A"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}, - "content": [
- "85.17.150.51",
- "85.17.150.52",
- "85.17.150.53"
], - "editable": true,
- "name": "example.com.",
- "ttl": 3600,
- "type": "A"
}
Delete a resource record set
Authorizations:
path Parameters
domainName required | string Example: example.com Domain name |
name required | string Example: example.com. Record name |
type required | string Enum: "A" "AAA" "CAA" "CNAME" "MX" "TLSA" "NS" "SRV" "TXT" "SOA" "DS" Example: A Record type |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request DELETE \ --url https://api.leaseweb.com/hosting/v2/domains/example.com/resourceRecordSets/example.com./A \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "401",
- "errorMessage": "You are not authorized to view this resource."
}
Import dns records from bind file content
Authorizations:
path Parameters
domainName required | string Example: example.com Domain name |
Request Body schema: application/json
content required | string Dns bind file content as string |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "content": "$ORIGIN example.com. \r\n$TTL 86400 \r\n\tIN\tMX\t10\tmail.example.com. \r\n\r\n\t\r\ndns1\tIN\tA\t10.0.1.1"
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "resourceRecordSets": [
- {
- "name": "example.com.",
- "type": "A",
- "content": [
- "10.0.1.1"
], - "ttl": 3600,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/example.com./A"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}, - {
- "name": "example.com.",
- "type": "MX",
- "content": [
- "10 mail.example.com."
], - "ttl": 3600,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/example.com./MX"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}
]
}
Export dns records as a bind file content
Authorizations:
path Parameters
domainName required | string Example: example.com Domain name |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/hosting/v2/domains/example.com/resourceRecordSets/import \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
example.com 3600 IN NS ns0.nameserver.com. example.com. 3600 IN NS ns1.nameserver.com. example.com. 3600 IN SOA ns0.nameserver.com. postmaster.nameserver.com. 2024101701 10800 3600 1209600 3600
Validate a resource record set
This endpoint may be used to validate whether a resource record set is valid, without actually creating it.
Authorizations:
path Parameters
domainName required | string Example: example.com Domain name |
Request Body schema:
name required | string (name) Name of the resource record set |
type required | string (resourceRecordSetType) Enum: "A" "AAAA" "CAA" "CNAME" "MX" "NS" "SRV" "TXT" "SOA" "DS" "TLSA" Type of the resource record set |
content required | Array of strings (resourceRecordSetContent) Array of resource record set content entries |
ttl required | integer (ttl) Enum: 60 300 1800 3600 14400 28800 43200 86400 Time to live of the resource record set |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "content": [
- "85.17.150.51",
- "85.17.150.52",
- "85.17.150.53"
], - "name": "example.com.",
- "ttl": 3600,
- "type": "A"
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "infoMessage": "Resource record set is valid."
}
Validate zone
This endpoint may be used to validate whether a collection of resource record sets constitute a valid zone, without creating them.
Authorizations:
path Parameters
domainName required | string Example: example.com Domain name |
Request Body schema: application/json
required | Array of objects (resourceRecordSet) Array of resource record sets |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "resourceRecordSets": [
- {
- "name": "example.com.",
- "type": "A",
- "content": [
- "85.17.150.50",
- "85.17.150.50",
- "85.17.150.53"
], - "ttl": 300
}, - {
- "name": "*.example.com.",
- "type": "A",
- "content": [
- "85.17.150.54"
], - "ttl": 86400
}, - {
- "name": "example.com.",
- "type": "AAAA",
- "content": [
- "2a02:2770:8:0:216:3eff:fead:8c93"
], - "ttl": 28800
}, - {
- "name": "some.example.com.",
- "type": "AAAA",
- "content": [
- "2a02:2770:8:0:216:3eff:fead:8c93"
], - "ttl": 60
}, - {
- "name": "example.com.",
- "type": "CAA",
- "content": [
- "0 issue \"comodoca.com\""
], - "ttl": 300
}, - {
- "name": "anotherurl.example.com.",
- "type": "CNAME",
- "content": [
- "example.com."
], - "ttl": 86400
}, - {
- "name": "example.com.",
- "type": "MX",
- "content": [
- "10 mail.example.com.",
- "20 mailfilter.leaseweb.com."
], - "ttl": 3600
}, - {
- "name": "subdomain.example.com.",
- "type": "NS",
- "content": [
- "other.nameserver.com",
- "yet-another.nameserver.com"
], - "ttl": 3600
}, - {
- "name": "_service._protocol.example.com.",
- "type": "SRV",
- "content": [
- "10 5 5060 sipserver.example.com."
], - "ttl": 14400
}, - {
- "name": "example.com.",
- "type": "TXT",
- "content": [
- "\"google-site-verification=Kkalsdhl8a9792342lksdo9bSER233\"",
- "\"v=spf1 a mx -all\""
], - "ttl": 3600
}, - {
- "name": "another.example.com.",
- "type": "SOA",
- "ttl": 3600,
- "content": [
- "example.com"
]
}, - {
- "name": "ds.example.com.",
- "type": "DS",
- "content": [
- "63708 13 2 ce46cb792d263081fe23c7245a1ccce4d59e3e501db22932edf59d858c03fd6e"
], - "ttl": 14400
}
]
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
{- "infoMessage": "Zone example.com is valid."
}
Leaseweb Email is a service that allows businesses to manage their email efficiently. It offers a range of email options, including email registration, email management, and email monitoring, to meet different email needs and requirements.
List mailboxes
Authorizations:
path Parameters
domainName required | string Example: example.com Domain name |
query Parameters
limit | integer Default: 10 Example: limit=10 Limit the number of results returned |
offset | integer Default: 0 Return results starting from the given offset |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/hosting/v2/domains/example.com/mailboxes?limit=10&offset=0' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 403
- 404
- 500
- 503
{- "mailboxes": [
- {
- "active": true,
- "currentSize": 1234,
- "emailAddress": "mailbox@example.com",
- "maximumSize": 4321,
- "spamChecksEnabled": true,
- "suspended": true,
- "virusChecksEnabled": false,
- "createdAt": "2023-05-08T10:01:25+00:00",
- "modifiedAt": "2023-05-08T10:01:25+00:00",
- "_embedded": {
- "autoResponder": {
- "_links": {
- "self": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/autoResponder"
}
}
}
}, - "_links": {
- "self": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com"
}, - "collection": {
- "href": "/domains/example.com/mailboxes"
}, - "autoResponder": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/autoResponder"
}, - "forwards": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/forwards"
}
}
}, - {
- "active": false,
- "currentSize": 1234,
- "emailAddress": "info@example.com",
- "maximumSize": 4321,
- "spamChecksEnabled": false,
- "suspended": false,
- "virusChecksEnabled": true,
- "createdAt": "2023-05-08T10:01:25+00:00",
- "modifiedAt": "2023-05-08T10:01:25+00:00",
- "_links": {
- "self": {
- "href": "/domains/example.com/mailboxes/info%40example.com"
}, - "collection": {
- "href": "/domains/example.com/mailboxes"
}, - "autoResponder": {
- "href": "/domains/example.com/mailboxes/info%40example.com/autoResponder"
}, - "forwards": {
- "href": "/domains/example.com/mailboxes/info%40example.com/forwards"
}
}
}, - {
- "active": true,
- "currentSize": 1234,
- "emailAddress": "admin@example.com",
- "maximumSize": 4321,
- "spamChecksEnabled": false,
- "suspended": false,
- "virusChecksEnabled": false,
- "createdAt": "2023-05-08T10:01:25+00:00",
- "modifiedAt": "2023-05-08T10:01:25+00:00",
- "_links": {
- "self": {
- "href": "/domains/example.com/mailboxes/admin%40example.com"
}, - "collection": {
- "href": "/domains/example.com/mailboxes"
}, - "autoResponder": {
- "href": "/domains/example.com/mailboxes/admin%40example.com/autoResponder"
}, - "forwards": {
- "href": "/domains/example.com/mailboxes/admin%40example.com/forwards"
}
}
}, - {
- "active": true,
- "currentSize": 1234,
- "emailAddress": "user@example.com",
- "maximumSize": 4321,
- "spamChecksEnabled": true,
- "suspended": true,
- "virusChecksEnabled": true,
- "createdAt": "2023-05-08T10:01:25+00:00",
- "modifiedAt": "2023-05-08T10:01:25+00:00",
- "_links": {
- "self": {
- "href": "/domains/example.com/mailboxes/user%40example.com"
}, - "collection": {
- "href": "/domains/example.com/mailboxes"
}, - "autoResponder": {
- "href": "/domains/example.com/mailboxes/user%40example.com/autoResponder"
}, - "forwards": {
- "href": "/domains/example.com/mailboxes/user%40example.com/forwards"
}
}
}
], - "catchAll": false,
- "_links": {
- "self": {
- "href": "/domains/example.com/mailboxes"
}, - "parent": {
- "href": "/domains/example.com"
}
}, - "nameservers": "LEASEWEB",
- "_metadata": {
- "totalCount": 4,
- "allowedMailboxes": 250,
- "limit": 25,
- "offset": 0
}
}
Create a mailbox
Please note that it is only possible to create mailboxes when you have a web hosting pack with Leaseweb. Per web hosting pack it is possible to have up to 250 mailboxes.
Authorizations:
path Parameters
domainName required | string Example: example.com Domain name |
Request Body schema: application/json
emailAddress required | string The email address of the mailbox |
active required | boolean Boolean indicating whether the mailbox is active |
password required | string The password of the mailbox |
spamChecksEnabled required | boolean Boolean indicating whether spam checks are enabled |
virusChecksEnabled required | boolean Boolean indicating whether virus checks are enabled |
localDelivery required | boolean Boolean indicating whether email to be stored as a local copy when there is a forward |
setMxRecord | boolean Boolean indicating whether MX record needs to be updated for mailbox |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "emailAddress": "mailbox@example.com",
- "active": true,
- "password": "CHANGETHIS",
- "spamChecksEnabled": true,
- "virusChecksEnabled": false,
- "localDelivery": true,
- "setMxRecord": true
}
Response samples
- 201
- 400
- 403
- 404
- 500
- 503
{- "active": true,
- "currentSize": 123456789,
- "emailAddress": "mailbox@example.com",
- "maximumSize": 5368709120,
- "spamChecksEnabled": true,
- "suspended": false,
- "virusChecksEnabled": false,
- "localDelivery": true,
- "_embedded": {
- "autoResponder": {
- "_links": {
- "self": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/autoResponder"
}
}
}
}, - "_links": {
- "self": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com"
}, - "collection": {
- "href": "/domains/example.com/mailboxes"
}, - "autoResponder": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/autoResponder"
}, - "forwards": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/forwards"
}
}
}
Inspect a mailbox
Authorizations:
path Parameters
domainName required | string Example: example.com Domain name |
emailAddress required | string Email address |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/hosting/v2/domains/example.com/mailboxes/%7BemailAddress%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 403
- 404
- 500
- 503
{- "active": true,
- "currentSize": 123456789,
- "emailAddress": "mailbox@example.com",
- "maximumSize": 5368709120,
- "spamChecksEnabled": true,
- "suspended": false,
- "virusChecksEnabled": false,
- "localDelivery": false,
- "createdAt": "2023-05-08T10:01:25+00:00",
- "modifiedAt": "2023-05-08T10:01:25+00:00",
- "_embedded": {
- "autoResponder": {
- "_links": {
- "self": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/autoResponder"
}
}
}
}, - "_links": {
- "self": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com"
}, - "collection": {
- "href": "/domains/example.com/mailboxes"
}, - "autoResponder": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/autoResponder"
}, - "forwards": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/forwards"
}
}
}
Update a mailbox
Authorizations:
path Parameters
domainName required | string Example: example.com Domain name |
emailAddress required | string Email address |
Request Body schema: application/json
active required | boolean Boolean indicating whether the mailbox is active |
password | string The password of the mailbox |
spamChecksEnabled required | boolean Boolean indicating whether spam checks are enabled |
virusChecksEnabled required | boolean Boolean indicating whether virus checks are enabled |
localDelivery required | boolean Boolean indicating whether email to be stored as a local copy when there is a forward |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "active": true,
- "password": "CHANGETHIS",
- "spamChecksEnabled": true,
- "virusChecksEnabled": false,
- "localDelivery": false
}
Response samples
- 200
- 400
- 403
- 404
- 500
- 503
{- "active": true,
- "currentSize": 123456789,
- "emailAddress": "mailbox@example.com",
- "maximumSize": 5368709120,
- "spamChecksEnabled": true,
- "suspended": false,
- "virusChecksEnabled": false,
- "localDelivery": false,
- "_embedded": {
- "autoResponder": {
- "_links": {
- "self": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/autoResponder"
}
}
}
}, - "_links": {
- "self": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com"
}, - "collection": {
- "href": "/domains/example.com/mailboxes"
}, - "autoResponder": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/autoResponder"
}, - "forwards": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/forwards"
}
}
}
Delete a mailbox
Please note that deleting a mailbox also removes all associated alias and forwards
Authorizations:
path Parameters
domainName required | string Example: example.com Domain name |
emailAddress required | string Email address |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request DELETE \ --url https://api.leaseweb.com/hosting/v2/domains/example.com/mailboxes/%7BemailAddress%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 403
- 404
- 500
- 503
{- "value": {
- "errorMessage": "Access to the requested resource is forbidden.",
- "userMessage": "Sorry, but you do not have access at the moment.",
- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be"
}
}
Retrieve catch all information
Authorizations:
path Parameters
domainName required | string Example: example.com Domain name |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/hosting/v2/domains/example.com/catchAll \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 403
- 404
- 500
- 503
{- "destination": "destination@example.org",
- "spamChecksEnabled": true,
- "virusChecksEnabled": false,
- "_links": {
- "self": {
- "href": "/domains/example.com/catchAll"
}, - "parent": {
- "href": "/domains/example.com"
}
}
}
Change/create catch all
Authorizations:
path Parameters
domainName required | string Example: example.com Domain name |
Request Body schema: application/json
destination required | string The email address to which email messages will be delivered for the catch all |
spamChecksEnabled required | boolean Boolean indicating whether spam checks are enabled |
virusChecksEnabled required | boolean Boolean indicating whether virus checks are enabled |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "destination": "destination@example.org",
- "spamChecksEnabled": true,
- "virusChecksEnabled": false
}
Response samples
- 200
- 201
- 400
- 403
- 404
- 500
- 503
{- "destination": "destination@example.org",
- "spamChecksEnabled": true,
- "virusChecksEnabled": false,
- "_links": {
- "self": {
- "href": "/domains/example.com/catchAll"
}, - "parent": {
- "href": "/domains/example.com"
}
}
}
Delete a catch all
Authorizations:
path Parameters
domainName required | string Example: example.com Domain name |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request DELETE \ --url https://api.leaseweb.com/hosting/v2/domains/example.com/catchAll \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 403
- 404
- 500
- 503
{- "value": {
- "errorMessage": "Access to the requested resource is forbidden.",
- "userMessage": "Sorry, but you do not have access at the moment.",
- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be"
}
}
List email aliases
Authorizations:
path Parameters
domainName required | string Example: example.com Domain name |
query Parameters
limit | integer Default: 10 Example: limit=10 Limit the number of results returned |
offset | integer Default: 0 Return results starting from the given offset |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/hosting/v2/domains/example.com/emailAliases?limit=10&offset=0' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 403
- 404
- 500
- 503
{- "emailAliases": [
- {
- "active": true,
- "destination": "destination@example.com",
- "source": "source@example.com",
- "spamChecksEnabled": true,
- "virusChecksEnabled": true,
- "createdAt": "2023-05-08T10:01:25+00:00",
- "modifiedAt": "2023-05-08T10:01:25+00:00"
}, - {
- "active": true,
- "destination": "destination@example.org",
- "source": "source@example.com",
- "spamChecksEnabled": false,
- "virusChecksEnabled": true,
- "createdAt": "2023-05-08T10:01:25+00:00",
- "modifiedAt": "2023-05-08T10:01:25+00:00"
}, - {
- "active": true,
- "destination": "mailbox@example.org",
- "source": "not-a-mailbox@example.com",
- "spamChecksEnabled": true,
- "virusChecksEnabled": false,
- "createdAt": "2023-05-08T10:01:25+00:00",
- "modifiedAt": "2023-05-08T10:01:25+00:00"
}
], - "_links": {
- "self": {
- "href": "/domains/example.com/emailAliases"
}, - "parent": {
- "href": "/domains/example.com"
}
}, - "nameserver": "EXTERNAL",
- "_metadata": {
- "totalCount": 3,
- "limit": 25,
- "offset": 0
}
}
Create an email alias
Please note that the source address should always be part of the domain it is created for.
Authorizations:
path Parameters
domainName required | string Example: example.com Domain name |
Request Body schema: application/json
active required | boolean Boolean indicating whether the email alias is active |
destination required | string The email address to which email messages will be delivered |
source required | string The email address for which email messages will be forwarded |
spamChecksEnabled required | boolean Boolean indicating whether spam checks are enabled |
virusChecksEnabled required | boolean Boolean indicating whether virus checks are enabled |
setMxRecord | boolean Boolean indicating whether MX record needs to be created for email alias |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "active": true,
- "destination": "destination@example.com",
- "source": "source@test.example.com",
- "spamChecksEnabled": true,
- "virusChecksEnabled": true,
- "setMxRecord": true
}
Response samples
- 201
- 400
- 403
- 404
- 500
- 503
{- "active": true,
- "destination": "destination@example.com",
- "source": "source@example.com",
- "spamChecksEnabled": true,
- "virusChecksEnabled": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/emailAliases/source%40example.com/destination%40example.com"
}, - "collection": {
- "href": "/domains/example.com/emailAliases"
}
}
}
Inspect email alias
Authorizations:
path Parameters
domainName required | string Example: example.com Domain name |
source required | string |
destination required | string |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/hosting/v2/domains/example.com/emailAliases/%7Bsource%7D/%7Bdestination%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 403
- 404
- 500
- 503
{- "active": true,
- "destination": "destination@example.com",
- "source": "source@example.com",
- "spamChecksEnabled": true,
- "virusChecksEnabled": true,
- "createdAt": "2023-05-08T10:01:11+00:00",
- "modifiedAt": "2023-05-08T10:01:11+00:00"
}
Update an email alias
Authorizations:
path Parameters
domainName required | string Example: example.com Domain name |
source required | string |
destination required | string |
Request Body schema: application/json
active required | boolean Boolean indicating whether the email alias is active |
spamChecksEnabled required | boolean Boolean indicating whether spam checks are enabled |
virusChecksEnabled required | boolean Boolean indicating whether virus checks are enabled |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "active": true,
- "spamChecksEnabled": true,
- "virusChecksEnabled": true
}
Response samples
- 200
- 400
- 403
- 404
- 500
- 503
{- "active": true,
- "destination": "destination@example.com",
- "source": "source@example.com",
- "spamChecksEnabled": true,
- "virusChecksEnabled": true
}
Delete an email alias
Authorizations:
path Parameters
domainName required | string Example: example.com Domain name |
source required | string |
destination required | string |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request DELETE \ --url https://api.leaseweb.com/hosting/v2/domains/example.com/emailAliases/%7Bsource%7D/%7Bdestination%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 403
- 404
- 500
- 503
{- "value": {
- "errorMessage": "Access to the requested resource is forbidden.",
- "userMessage": "Sorry, but you do not have access at the moment.",
- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be"
}
}
List domain forwards
Authorizations:
path Parameters
domainName required | string Example: example.com Domain name |
query Parameters
limit | integer Default: 10 Example: limit=10 Limit the number of results returned |
offset | integer Default: 0 Return results starting from the given offset |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/hosting/v2/domains/example.com/forwards?limit=10&offset=0' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 403
- 500
- 503
{- "forwards": [
- {
- "active": true,
- "destination": "destination@example.com",
- "source": "mailbox@example.com",
- "spamChecksEnabled": false,
- "virusChecksEnabled": true,
- "createdAt": "2023-05-08T10:01:25+00:00",
- "modifiedAt": "2023-05-08T10:01:25+00:00",
- "_links": {
- "self": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/forwards/destination%40example.com"
}, - "collection": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/forwards"
}
}
}, - {
- "active": true,
- "destination": "destination@example.org",
- "source": "mailbox@example.com",
- "spamChecksEnabled": true,
- "virusChecksEnabled": true,
- "createdAt": "2023-05-08T10:01:25+00:00",
- "modifiedAt": "2023-05-08T10:01:25+00:00",
- "_links": {
- "self": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/forwards/destination%40email.org"
}, - "collection": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/forwards"
}
}
}, - {
- "active": true,
- "destination": "destination@example.com",
- "source": "originating@example.com",
- "spamChecksEnabled": false,
- "virusChecksEnabled": true,
- "createdAt": "2023-05-08T10:01:25+00:00",
- "modifiedAt": "2023-05-08T10:01:25+00:00",
- "_links": {
- "self": {
- "href": "/domains/example.com/mailboxes/originating%40example.com/forwards/destination%40example.com"
}, - "collection": {
- "href": "/domains/example.com/mailboxes/originating%40example.com/forwards"
}
}
}, - {
- "active": true,
- "destination": "destination@example.org",
- "source": "originating@example.com",
- "spamChecksEnabled": true,
- "virusChecksEnabled": false,
- "createdAt": "2023-05-08T10:01:25+00:00",
- "modifiedAt": "2023-05-08T10:01:25+00:00",
- "_links": {
- "self": {
- "href": "/domains/example.com/mailboxes/originating%40example.com/forwards/destination%40example.org"
}, - "collection": {
- "href": "/domains/example.com/mailboxes/originating%40example.com/forwards"
}
}
}
], - "_links": {
- "self": {
- "href": "/domains/example.com/forwards"
}, - "parent": {
- "href": "/domains/example.com"
}
}, - "_metadata": {
- "totalCount": 4,
- "limit": 25,
- "offset": 0
}
}
List forwards
Authorizations:
path Parameters
domainName required | string Example: example.com Domain name |
emailAddress required | string Email address |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/hosting/v2/domains/example.com/mailboxes/%7BemailAddress%7D/forwards \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 403
- 404
- 500
- 503
{- "forwards": [
- {
- "active": true,
- "destination": "destination@example.org",
- "source": "mailbox@example.com",
- "spamChecksEnabled": true,
- "virusChecksEnabled": true,
- "createdAt": "2023-05-08T10:01:25+00:00",
- "modifiedAt": "2023-05-08T10:01:25+00:00",
- "_links": {
- "self": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/forwards/destination%40example.org"
}, - "collection": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/forwards"
}
}
}, - {
- "active": true,
- "destination": "destination@example.com",
- "source": "mailbox@example.com",
- "spamChecksEnabled": false,
- "virusChecksEnabled": true,
- "createdAt": "2023-05-08T10:01:25+00:00",
- "modifiedAt": "2023-05-08T10:01:25+00:00",
- "_links": {
- "self": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/forwards/destination%40example.com"
}, - "collection": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/forwards"
}
}
}
], - "_links": {
- "self": {
- "href": "/domains/example.com/mailbox%40example.com/forwards"
}, - "parent": {
- "href": "/domains/example.com/mailbox%40example.com"
}
}, - "_metadata": {
- "totalCount": 2,
- "limit": 25,
- "offset": 0
}
}
Create a forward
Authorizations:
path Parameters
domainName required | string Example: example.com Domain name |
emailAddress required | string Email address |
Request Body schema: application/json
active required | boolean Boolean indicating whether the forward is active |
destination required | string The email address to which email messages will be forwarded |
source required | string The email address of the mailbox for which email messages will be forwarded |
spamChecksEnabled required | boolean Boolean indicating whether spam checks are enabled |
virusChecksEnabled required | boolean Boolean indicating whether virus checks are enabled |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "active": true,
- "destination": "destination@example.org",
- "source": "originating@example.com",
- "spamChecksEnabled": false,
- "virusChecksEnabled": true
}
Response samples
- 201
- 400
- 403
- 404
- 500
- 503
{- "active": true,
- "destination": "destination@example.org",
- "source": "mailbox@example.com",
- "spamChecksEnabled": false,
- "virusChecksEnabled": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/forwards/destination%40example.org"
}, - "collection": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/forwards"
}
}
}
Inspect a forward
Authorizations:
path Parameters
domainName required | string Example: example.com Domain name |
emailAddress required | string Email address |
destination required | string |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/hosting/v2/domains/example.com/mailboxes/%7BemailAddress%7D/forwards/%7Bdestination%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 403
- 404
- 500
- 503
{- "active": true,
- "destination": "destination@example.org",
- "source": "mailbox@example.com",
- "spamChecksEnabled": false,
- "virusChecksEnabled": true,
- "createdAt": "2023-05-08T10:01:25+00:00",
- "modifiedAt": "2023-05-08T10:01:25+00:00",
- "_links": {
- "self": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/forwards/destination%40example.org"
}, - "collection": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/forwards"
}
}
}
Update a forward
Authorizations:
path Parameters
domainName required | string Example: example.com Domain name |
emailAddress required | string Email address |
destination required | string |
Request Body schema: application/json
active required | boolean Boolean indicating whether the forward is active |
spamChecksEnabled required | boolean Boolean indicating whether spam checks are enabled |
virusChecksEnabled required | boolean Boolean indicating whether virus checks are enabled |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "active": true,
- "spamChecksEnabled": false,
- "virusChecksEnabled": true
}
Response samples
- 200
- 400
- 403
- 404
- 500
- 503
{- "active": true,
- "destination": "destination@example.org",
- "source": "mailbox@example.com",
- "spamChecksEnabled": false,
- "virusChecksEnabled": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/forwards/destination%40example.org"
}, - "collection": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/forwards"
}
}
}
Delete a forward
Authorizations:
path Parameters
domainName required | string Example: example.com Domain name |
emailAddress required | string Email address |
destination required | string |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request DELETE \ --url https://api.leaseweb.com/hosting/v2/domains/example.com/mailboxes/%7BemailAddress%7D/forwards/%7Bdestination%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 403
- 404
- 500
- 503
{- "value": {
- "errorMessage": "Access to the requested resource is forbidden.",
- "userMessage": "Sorry, but you do not have access at the moment.",
- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be"
}
}
Inspect an auto responder
Authorizations:
path Parameters
domainName required | string Example: example.com Domain name |
emailAddress required | string Email address |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/hosting/v2/domains/example.com/mailboxes/%7BemailAddress%7D/autoResponder \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 403
- 404
- 500
- 503
{- "active": true,
- "body": "I will be out of office until 14-12-2020. Please contact the reception desk for urgent matters.",
- "subject": "Out of office",
- "_links": {
- "self": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/autoResponder"
}, - "parent": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com"
}
}
}
Change an auto responder
Authorizations:
path Parameters
domainName required | string Example: example.com Domain name |
emailAddress required | string Email address |
Request Body schema: application/json
active required | boolean Boolean indicating whether the auto responder is active |
body required | string The body of the auto responder email message |
subject required | string The subject of the auto responder email message |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "active": true,
- "body": "I will be out of office until 14-12-2020. Please contact the reception desk for urgent matters.",
- "subject": "Out of office"
}
Response samples
- 200
- 201
- 400
- 403
- 404
- 500
- 503
{- "active": true,
- "body": "I will be out of office until 14-12-2020. Please contact the reception desk for urgent matters.",
- "subject": "Out of office",
- "_links": {
- "self": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/autoResponder"
}, - "parent": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com"
}
}
}
Delete an auto responder
Authorizations:
path Parameters
domainName required | string Example: example.com Domain name |
emailAddress required | string Email address |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request DELETE \ --url https://api.leaseweb.com/hosting/v2/domains/example.com/mailboxes/%7BemailAddress%7D/autoResponder \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 403
- 404
- 500
- 503
{- "value": {
- "errorMessage": "Access to the requested resource is forbidden.",
- "userMessage": "Sorry, but you do not have access at the moment.",
- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be"
}
}
LIMITED ACCESS
Leaseweb has a strict Abuse Handling Policy to prevent misuse of its services. If someone is using Leaseweb’s network for illegal, unethical, or unauthorized activities, you can submit an Abuse Report to notify Leaseweb’s compliance team.List reports
List reports
Authorizations:
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
status | string Default: "OPEN,WAITING,CLOSED" Example: status=OPEN,WAITING,CLOSED Comma separated list of report statuses to filter on. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/abuse/v1/reports?limit=20&offset=10&status=OPEN%2CWAITING%2CCLOSED' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "_metadata": {
- "totalCount": 2,
- "limit": 10,
- "offset": 0
}, - "reports": [
- {
- "id": "000000",
- "subject": "Report description",
- "status": "OPEN",
- "reportedAt": "2015-01-01T00:00:00+00:00",
- "updatedAt": "2015-01-01T00:00:00+00:00",
- "notifier": "REDACTED_FOR_PRIVACY",
- "customerId": "10000001",
- "legalEntityId": "2000",
- "deadline": "2015-01-01T00:00:00+00:00"
}, - {
- "id": "000001",
- "subject": "Report description",
- "status": "CLOSED",
- "reportedAt": "2015-01-01T00:00:00+00:00",
- "updatedAt": "2015-01-01T00:00:00+00:00",
- "notifier": "REDACTED_FOR_PRIVACY",
- "customerId": "10000001",
- "legalEntityId": "2600",
- "deadline": "2015-01-01T00:00:00+00:00"
}
]
}
Inspect a report
Authorizations:
path Parameters
reportId required | string Example: abc123 Report Id |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/abuse/v1/reports/abc123 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "abuseType": "MALLWARE",
- "attachments": [
- {
- "id": "1abd8e7f-0fdf-453c-b1f5-8fef436acbbe",
- "mimeType": "part/xml",
- "filename": "000001.xml"
}
], - "body": "string with content",
- "customerId": "10000001",
- "deadline": "2015-01-01T00:00:00+0100",
- "detectedDomainNames": [
- {
- "name": "example.com",
- "ipAddresses": [
- "93.184.216.34"
]
}
], - "detectedIpAddresses": [
- "127.0.0.1"
], - "id": "000005",
- "latestMessages": [
- {
- "postedBy": "CUSTOMER",
- "postedAt": "2015-09-30T06:23:40+00:00",
- "body": "Hello, this is my first message!"
}, - {
- "postedBy": "ABUSE_AGENT",
- "postedAt": "2015-10-08T08:25:29+00:00",
- "body": "Hi, this is our first reply.",
- "attachment": {
- "id": "436acbbe-0fdf-453c-b1f5-1abd8e7f8fef",
- "mimeType": "image/png",
- "filename": "notification.png"
}
}
], - "legalEntityId": "2000",
- "notifier": "notifier@email.com",
- "reopened": false,
- "reportedAt": "2015-01-01T00:00:00+0100",
- "status": "CLOSED",
- "subject": "Report description",
- "totalMessagesCount": 2,
- "updatedAt": "2015-01-01T00:00:00+0100"
}
List report messages
Authorizations:
path Parameters
reportId required | string Example: abc123 Report Id |
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/abuse/v1/reports/abc123/messages?limit=20&offset=10' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 404
- 500
- 503
{- "_metadata": {
- "totalCount": 2,
- "limit": 10,
- "offset": 0
}, - "messages": [
- {
- "postedBy": "CUSTOMER",
- "postedAt": "2015-09-30T06:23:40+00:00",
- "body": "Hello, this is my first message!"
}, - {
- "postedBy": "ABUSE_AGENT",
- "postedAt": "2015-10-08T08:25:29+00:00",
- "body": "Hi, this is our first reply.",
- "attachment": {
- "id": "436acbbe-0fdf-453c-b1f5-1abd8e7f8fef",
- "mimeType": "image/png",
- "filename": "notification.png"
}
}
]
}
Create new message
Sent a new message to the Leaseweb compliance team related to an abuse report.
Authorizations:
path Parameters
reportId required | string Example: abc123 Report Id |
Request Body schema: application/json
body required | string Plain text body of the message, for newlines use ' '. |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "body": "Hello, this is my first message."
}
Response samples
- 202
- 401
- 403
- 404
- 500
- 503
[- "To make sure the request has been processed please see if the message is added to the list."
]
Inspect a message attachment
The compliance team sometimes add an attachment to a message. You can use this endpoint to get the attachment. The content-type of the response depends on the content of the attachment.
Authorizations:
path Parameters
reportId required | string Example: abc123 Report Id |
fileId required | string Example: sdfa73-adsfs-4fadf-sdfasdfa File Id |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/abuse/v1/reports/abc123/messageAttachments/sdfa73-adsfs-4fadf-sdfasdfa \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "401",
- "errorMessage": "You are not authorized to view this resource."
}
Inspect a report attachment
Use this endpoint to get an attachment which was created with the abuse report. The content-type of the response depends on the content of the attachment.
Authorizations:
path Parameters
reportId required | string Example: abc123 Report Id |
fileId required | string Example: sdfa73-adsfs-4fadf-sdfasdfa File Id |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/abuse/v1/reports/abc123/reportAttachments/sdfa73-adsfs-4fadf-sdfasdfa \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "401",
- "errorMessage": "You are not authorized to view this resource."
}
List resolution options
In order to resolve a report, you need to specify a resolution. Use this endpoint to retrieve a list of all possible resolution options for this report.
Authorizations:
path Parameters
reportId required | string Example: abc123 Report Id |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/abuse/v1/reports/abc123/resolutions \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 404
- 500
- 503
{- "isMessageRequired": false,
- "resolutions": [
- {
- "id": "CONTENT_REMOVED",
- "description": "The mentioned content has been removed."
}, - {
- "id": "DOMAINS_REMOVED",
- "description": "The mentioned domain(s) has/have been removed from the LeaseWeb network."
}, - {
- "id": "SUSPENDED",
- "description": "The end customer (or responsible user) has been suspended."
}, - {
- "id": "DUPLICATE",
- "description": "This is either a duplicate or old notification and has already been resolved."
}
]
}
Resolve a report
Resolve a report
Authorizations:
path Parameters
reportId required | string Example: abc123 Report Id |
Request Body schema: application/json
resolutions required | Array of strings (resolutionList) List of selected resolution ID's to explain how the report is resolved. |
message | string Message is required and only allowed if any of the IP(s) related to this report are null routed. |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "message": "The IP address associated with this report has been null routed due to policy violations. Further access will be restricted until the issue is resolved.",
- "resolutions": [
- "CONTENT_REMOVED",
- "SUSPENDED"
]
}
Response samples
- 400
- 401
- 403
- 404
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
The Leaseweb Invoices API is a part of Leaseweb’s API suite that allows customers to manage and retrieve invoice-related data programmatically. This API is useful for businesses that need to automate billing processes, track financial transactions, and integrate invoice management with their internal accounting systems.
List invoices
This endpoint will return an overview of all the invoices for the customer.
Authorizations:
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/invoices/v1/invoices?limit=20&offset=10' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "_metadata": {
- "limit": 0,
- "offset": 0,
- "totalCount": 3
}, - "invoices": [
- {
- "currency": "EUR",
- "date": "2019-05-06T00:00:00+00:00",
- "dueDate": "2019-05-30T00:00:00+00:00",
- "id": "00000001",
- "isPartialPaymentAllowed": true,
- "openAmount": 1756.21,
- "status": "OVERDUE",
- "taxAmount": 0,
- "total": 1756.21
}, - {
- "currency": "EUR",
- "date": "2019-05-06T00:00:00+00:00",
- "dueDate": "2019-05-30T00:00:00+00:00",
- "id": "00000002",
- "isPartialPaymentAllowed": true,
- "openAmount": 34,
- "status": "OPEN",
- "taxAmount": 0,
- "total": 34
}, - {
- "currency": "EUR",
- "date": "2019-04-06T00:00:00+00:00",
- "dueDate": "2019-04-30T00:00:00+00:00",
- "id": "00000003",
- "isPartialPaymentAllowed": false,
- "openAmount": 0,
- "status": "PAID",
- "taxAmount": 0,
- "total": 14.37
}
]
}
Pro Forma
This endpoint will return an overview of contract items that will be invoiced as of the 1st of the upcoming month.
Authorizations:
query Parameters
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/invoices/v1/invoices/proforma?limit=20&offset=10' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "_metadata": {
- "limit": 10,
- "offset": 0,
- "totalCount": 2
}, - "contractItems": [
- {
- "contractId": "50000103",
- "currency": "EUR",
- "endDate": "2021-01-01T00:00:00+00:00",
- "equipmentId": "26430",
- "poNumber": "40002154000110",
- "price": 150.05,
- "product": "Backup",
- "reference": "this is a reference",
- "startDate": "2020-01-01T00:00:00+00:00"
}, - {
- "contractId": "50000103",
- "currency": "EUR",
- "endDate": "2021-01-01T00:00:00+00:00",
- "equipmentId": "26430",
- "poNumber": "40002154000110",
- "price": 150.05,
- "product": "Dedicated server",
- "reference": "this is a reference",
- "startDate": "2020-01-01T00:00:00+00:00"
}
], - "currency": "EUR",
- "proformaDate": "2020-06-01T00: 00: 00+00: 00",
- "subTotal": 300.04,
- "total": 352.55,
- "vatAmount": 52.51
}
Inspect an invoice
This endpoint will return a single invoice for the customer.
Authorizations:
path Parameters
invoiceId required | string Example: 00000001 Invoice Id |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/invoices/v1/invoices/00000001 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "credits": [
- {
- "date": "2019-05-06T00:00:00+00:00",
- "id": "00001211",
- "taxAmount": 1.5,
- "total": 15
}
], - "currency": "EUR",
- "date": "2019-05-06T00:00:00+00:00",
- "dueDate": "2019-05-30T00:00:00+00:00",
- "id": "00000001",
- "isPartialPaymentAllowed": true,
- "lineItems": [
- {
- "contractId": "12345678",
- "equipmentId": "1234",
- "product": "Rackspace",
- "quantity": 1,
- "reference": "This is a reference",
- "total": 151.5,
- "unitAmount": 151.5,
- "fromDate": "2023-02-01T00:00:00Z",
- "toDate": "2023-02-28T00:00:00Z"
}
], - "openAmount": 1756.21,
- "status": "OPEN",
- "taxAmount": 0,
- "total": 1756.21
}
Get invoice PDF
This endpoint will return a PDf of a single invoice for the customer.
Authorizations:
path Parameters
invoiceId required | string Example: 00000001 Invoice Id |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/invoices/v1/invoices/00000001/pdf \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 401
- 403
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "401",
- "errorMessage": "You are not authorized to view this resource."
}
The Leaseweb Services API is part of Leaseweb’s suite of APIs that allow customers to programmatically manage their hosted services, including dedicated servers, cloud instances, and network configurations. This API enables automation, monitoring, and control of Leaseweb services without needing to interact with the Leaseweb customer portal manually.
Get all your Services
This endpoint returns all your Services.
Authorizations:
query Parameters
limit | integer Default: 10 Limit the number of results returned |
offset | integer Default: 0 Return results starting from the given offset |
productId | string Filter the services endpoint with a productId |
reference | string Filter the services endpoint with a reference |
equipmentId | string Filter the services endpoint with an equipmentId |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/services/v1/services?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE&productId=SOME_STRING_VALUE&reference=SOME_STRING_VALUE&equipmentId=SOME_STRING_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 500
- 503
{- "metadata": {
- "limit": 2,
- "offset": 0,
- "totalCount": 10
}, - "services": [
- {
- "billingCycle": "1 MONTH",
- "cancellable": false,
- "contractId": "00000110",
- "contractTerm": "1 YEAR",
- "contractTermEndDate": "2020-01-31T00:00:00+00:00",
- "currency": "EUR",
- "deliveryDate": "2019-01-01T00:00:00+00:00",
- "deliveryEstimate": "5 - 7 business days",
- "endDate": "2020-01-31T00:00:00+00:00",
- "equipmentId": "12345678",
- "id": "10000000000010",
- "orderDate": "2019-01-01T00:00:00+00:00",
- "pricePerFrequency": 396.01,
- "productId": "DEDICATED_SERVER",
- "reference": "this is a reference",
- "startDate": "2019-01-01T00:00:00+00:00",
- "status": "ACTIVE",
- "uncancellable": true
}, - {
- "attributes": {
- "domainName": "test.com"
}, - "billingCycle": "1 YEAR",
- "cancellable": true,
- "contractId": "00000110",
- "contractTerm": "1 YEAR",
- "contractTermEndDate": "2020-01-31T00:00:00+00:00",
- "currency": "EUR",
- "deliveryDate": "2019-01-01T00:00:00+00:00",
- "deliveryEstimate": "5 - 7 business days",
- "id": "10000000000011",
- "orderDate": "2019-01-01T00:00:00+00:00",
- "pricePerFrequency": 139.99,
- "productId": "DOMAIN",
- "startDate": "2019-01-01T00:00:00+00:00",
- "status": "ACTIVE",
- "uncancellable": false
}
]
}
Get cancellation reasons
This endpoint will return our predefined cancellation reasons.
Authorizations:
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/services/v1/services/cancellationReasons \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 500
- 503
{- "cancellationReasons": [
- {
- "reason": "End of trial period?",
- "reasonCode": "CANCEL_TRIAL_PERIOD"
}, - {
- "reason": "Product switch within Leaseweb?",
- "reasonCode": "CANCEL_PRODUCT_SWITCH"
}, - {
- "reason": "Missing functions/features of product?",
- "reasonCode": "CANCEL_FEATURE_QUALITY"
}, - {
- "reason": "High prices?",
- "reasonCode": "CANCEL_HIGH_PRICE"
}, - {
- "reason": "Suspension of service?",
- "reasonCode": "CANCEL_SUSPENSION"
}, - {
- "reason": "Disagreement with the offered substitution?",
- "reasonCode": "CANCEL_NEW_OFFER"
}, - {
- "reason": "Long order delivery time?",
- "reasonCode": "CANCEL_DELIVERY_TIME"
}, - {
- "reason": "Order was out of stock?",
- "reasonCode": "CANCEL_OUT_OF_STOCK"
}, - {
- "reason": "Faulty delivery?",
- "reasonCode": "CANCEL_FAULTY_DELIVERY"
}, - {
- "reason": "Inconsistency of contract and offer?",
- "reasonCode": "CANCEL_INCONSISTENCY"
}, - {
- "reason": "Performance of product?",
- "reasonCode": "CANCEL_PERFORMANCE"
}, - {
- "reason": "Network issues?",
- "reasonCode": "CANCEL_NETWORK"
}, - {
- "reason": "Technical knowledge of Support?",
- "reasonCode": "CANCEL_SUPPORT_QUALITY"
}, - {
- "reason": "Slow response of Support?",
- "reasonCode": "CANCEL_SUPPORT_RESPONSE"
}, - {
- "reason": "Long resolution times of Support?",
- "reasonCode": "CANCEL_SUPPORT_RESOLUTION_TIME"
}, - {
- "reason": "Usability issues on Customer Portal/API?",
- "reasonCode": "CANCEL_CP_USABILITY"
}, - {
- "reason": "Missing functions/features on Customer Portal/API?",
- "reasonCode": "CANCEL_CP_FEATURE_QUALITY"
}, - {
- "reason": "Reliability of product?",
- "reasonCode": "CANCEL_RELIABILITY"
}, - {
- "reason": "Other selection?",
- "reasonCode": "CANCEL_OTHER"
}
]
}
Inspect a service
This endpoint will return a single service for the customer.
Authorizations:
path Parameters
id required | string Example: 41000000000000 The ID of a service |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url https://api.leaseweb.com/services/v1/services/41000000000000 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 200
- 401
- 403
- 404
- 500
- 503
{- "billingCycle": "1 MONTH",
- "cancellable": false,
- "contractId": "00000110",
- "contractTerm": "1 YEAR",
- "contractTermEndDate": "2020-01-31T00:00:00+00:00",
- "currency": "EUR",
- "deliveryDate": "2019-01-01T00:00:00+00:00",
- "deliveryEstimate": "5 - 7 business days",
- "endDate": "2020-01-31T00:00:00+00:00",
- "equipmentId": "12345678",
- "id": "10000000000010",
- "orderDate": "2019-01-01T00:00:00+00:00",
- "pricePerFrequency": 396.01,
- "productId": "DEDICATED_SERVER",
- "reference": "this is a reference",
- "startDate": "2019-01-01T00:00:00+00:00",
- "status": "ACTIVE",
- "uncancellable": true
}
Update a service
This endpoint allows you to update the reference of a service.
Additionally, if you're already using other product API's, you have the flexibility to modify the reference not only via this endpoint but also through their respective APIs. Please note that not all services have a corresponding product API.
Authorizations:
path Parameters
id required | string Example: 41000000000000 The ID of a service |
Request Body schema: application/json
reference | string non-empty The reference of the service |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "reference": "Awesome service reference"
}
Response samples
- 200
- 404
- 500
- 503
{- "billingCycle": "1 MONTH",
- "cancellable": false,
- "contractId": "00000110",
- "contractTerm": "1 YEAR",
- "contractTermEndDate": "2020-01-31T00:00:00+00:00",
- "currency": "EUR",
- "deliveryDate": "2019-01-01T00:00:00+00:00",
- "deliveryEstimate": "5 - 7 business days",
- "endDate": "2020-01-31T00:00:00+00:00",
- "equipmentId": "12345678",
- "id": "10000000000010",
- "orderDate": "2019-01-01T00:00:00+00:00",
- "pricePerFrequency": 396.01,
- "productId": "DEDICATED_SERVER",
- "reference": "Awesome service reference",
- "startDate": "2019-01-01T00:00:00+00:00",
- "status": "ACTIVE",
- "uncancellable": true
}
Cancel a service
This endpoint will cancel a specified service.
Authorizations:
path Parameters
id required | string Example: 41000000000000 The ID of a service |
Request Body schema: application/json
reason | string If |
reasonCode | string The reason code respresents a defined reason. |
Responses
Request samples
- Payload
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
{- "reason": "I am scaling down",
- "reasonCode": "CANCEL_OTHER"
}
Response samples
- 404
- 409
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "404",
- "errorMessage": "Resource not found"
}
Uncancel a service
This endpoint will uncancel an already cancelled service.
Authorizations:
path Parameters
id required | string Example: 41000000000000 The ID of a service |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request POST \ --url https://api.leaseweb.com/services/v1/services/41000000000000/uncancel \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Response samples
- 404
- 409
- 500
- 503
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "404",
- "errorMessage": "Resource not found"
}
BETA
This is the AWS compatible Public Cloud API Reference. It provides descriptions, API request parameters, and the XML response for each of the API actions that Leaseweb supports. The purpose of the AWS compatible Public Cloud API is to make the migration easy for the users to switch from the AWS EC2 to the Leaseweb Public Cloud APIs.DescribeInstances
Describes the specified instances or all instances.
If you specify instance IDs, the output includes information for only the specified instances.
If you specify filters, the output includes information for only those instances that meet the filter criteria.
If you do not specify instance IDs or filters, the output includes information for all instances, which can affect performance. We recommend that you use pagination to ensure that the operation returns quickly and successfully.
If you specify an instance ID that is not valid, an error is returned. If you specify an instance that you do not own, it is not included in the output.
AWS CLI example
aws ec2 describe-instances --filters "Name=<FILTER_NAME>,Values=<FILTER_VALUE>" --endpoint-url <LEASEWEB_AWS_EC2_SERVER_URL>
Authorizations:
query Parameters
Filter.N.instance-id | string Example: Filter.N.instance-id=29145c92-4a68-4c63-aaeb-f2212d85a74a The ID of the instance. |
Filter.N.ip-address | string Example: Filter.N.ip-address=123.456.7.8 The public IPv4 address of the instance. |
Filter.N.tag:reference | string Example: Filter.N.tag:reference=reference The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key reference and the value TeamA, specify tag:reference for the filter name and TeamA for the filter value. |
Filter.N.instance-state-name | string Enum: "pending" "running" "shutting-down" "terminated" "stopping" "stopped" Example: Filter.N.instance-state-name=pending The state of the instance. |
Filter.N.instance-type | string Example: Filter.N.instance-type=t2.micro The type of instance. The documentation has a complete list. |
Filter.N.availability-zone | string Example: Filter.N.availability-zone=eu-west-1 The Availability Zone of the instance. |
MaxResults | integer Example: MaxResults=10 The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. |
NextToken | integer Example: NextToken=1 The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/aws/ec2/?Filter.N.instance-id=29145c92-4a68-4c63-aaeb-f2212d85a74a&Filter.N.ip-address=123.456.7.8&Filter.N.tag%3Areference=reference&Filter.N.instance-state-name=pending&Filter.N.instance-type=t2.micro&Filter.N.availability-zone=eu-west-1&MaxResults=10&NextToken=1&Action=DescribeInstances' \ --header 'Authorization: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
<?xml version='1.0' encoding='UTF-8'?> <DescribeInstancesResponse xmlns='http://ec2.amazonaws.com/doc/2016-11-15/'> <nextToken>1</nextToken> <requestId>f7f55139-53d4-4b5f-bd7f-dbeddee039c0</requestId> <reservationSet> <item> <reservationId></reservationId> <instancesSet> <item> <instanceId>10a6163b-03c6-4303-a274-c96fa2217503</instanceId> <imageId>UBUNTU_22_04_64BIT</imageId> <instanceState> <code>16</code> <name>RUNNING</name> </instanceState> <amiLaunchIndex>-1</amiLaunchIndex> <instanceType>lsw.m3.large</instanceType> <launchTime>2024-05-07T12:02:49+0000</launchTime> <placement> <availabilityZone>eu-west-3</availabilityZone> <groupName></groupName> <tenancy></tenancy> </placement> <subnetId></subnetId> <vpcId></vpcId> <privateIpAddress></privateIpAddress> <ipAddress>85.17.17.88</ipAddress> <architecture>x86_64</architecture> <rootDeviceType></rootDeviceType> <virtualizationType></virtualizationType> <tagSet> <item> <key>reference</key> <value>test ono 3</value> </item> </tagSet> <cpuOptions> <coreCount>2</coreCount> <threadsPerCore>-1</threadsPerCore> </cpuOptions> <networkInterfaceSet> <item> <networkInterfaceId></networkInterfaceId> <subnetId></subnetId> <vpcId></vpcId> <description></description> <ownerId></ownerId> <status></status> <macAddress></macAddress> <privateIpAddress></privateIpAddress> <privateDnsName></privateDnsName> <sourceDestCheck></sourceDestCheck> <groupSet> <item> <groupId></groupId> <groupName></groupName> </item> </groupSet> <attachment> <attachmentId></attachmentId> <deviceIndex>-1</deviceIndex> <status></status> <attachTime>2000-01-01T00:00:00+0000</attachTime> <deleteOnTermination></deleteOnTermination> </attachment> <association> <publicIp>85.17.17.88</publicIp> <publicDnsName></publicDnsName> <ipOwnerId></ipOwnerId> </association> <privateIpAddressesSet> <item> <privateIpAddress></privateIpAddress> <privateDnsName></privateDnsName> <primary></primary> <association> <publicIp></publicIp> <publicDnsName></publicDnsName> <ipOwnerId></ipOwnerId> </association> </item> </privateIpAddressesSet> <ipv6AddressesSet> <item> <ipv6Address>85.17.17.88</ipv6Address> </item> </ipv6AddressesSet> </item> </networkInterfaceSet> </item> </instancesSet> </item> </reservationSet> </DescribeInstancesResponse>
RunInstances
Launches an instance using an image for which you have permissions.
AWS CLI example
aws ec2 run-instances --image-id <IMAGE_ID> --placement AvailabilityZone=<REGION> --instance-type <INSTANCE_TYPE> --endpoint-url <LEASEWEB_AWS_EC2_SERVER_URL>
Authorizations:
query Parameters
InstanceType required | string Example: InstanceType=lsw.t2.micro The instance type. |
ImageId required | string Example: ImageId=UBUNTU_22_04_64BIT The name of the image. An image is required to launch an instance and must be specified here. The documentation has a complete list. |
Placement required | string Example: Placement=eu-west-1 The placement for the instance. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/aws/ec2/?InstanceType=lsw.t2.micro&ImageId=UBUNTU_22_04_64BIT&Placement=eu-west-1&Action=RunInstances' \ --header 'Authorization: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
<?xml version='1.0' encoding='UTF-8'?> <RunInstancesResponse xmlns='http: //ec2.amazonaws.com/doc/2016-11-15/'> <groupSet/> <instancesSet> <item> <instanceId>10a6163b-03c6-4303-a274-c96fa2217503</instanceId> <imageId>UBUNTU_22_04_64BIT</imageId> <instanceState> <code>0</code> <name>CREATING</name> </instanceState> <amiLaunchIndex>-1</amiLaunchIndex> <instanceType>lsw.m3.large</instanceType> <launchTime>2024-05-07T12: 02: 49+0000</launchTime> <placement> <availabilityZone>eu-west-3</availabilityZone> <groupName></groupName> <tenancy></tenancy> </placement> <subnetId></subnetId> <vpcId></vpcId> <privateIpAddress></privateIpAddress> <ipAddress>85.17.17.88</ipAddress> <architecture>x86_64</architecture> <rootDeviceType></rootDeviceType> <virtualizationType></virtualizationType> <tagSet> <item> <key>reference</key> <value></value> </item> </tagSet> <cpuOptions> <coreCount>2</coreCount> <threadsPerCore>-1</threadsPerCore> </cpuOptions> <networkInterfaceSet> <item> <networkInterfaceId></networkInterfaceId> <subnetId></subnetId> <vpcId></vpcId> <description></description> <ownerId></ownerId> <status></status> <macAddress></macAddress> <privateIpAddress></privateIpAddress> <privateDnsName></privateDnsName> <sourceDestCheck></sourceDestCheck> <groupSet> <item> <groupId></groupId> <groupName></groupName> </item> </groupSet> <attachment> <attachmentId></attachmentId> <deviceIndex>-1</deviceIndex> <status></status> <attachTime>2000-01-01T00: 00: 00+0000</attachTime> <deleteOnTermination></deleteOnTermination> </attachment> <association> <publicIp>85.17.17.88</publicIp> <publicDnsName></publicDnsName> <ipOwnerId></ipOwnerId> </association> <privateIpAddressesSet> <item> <privateIpAddress></privateIpAddress> <privateDnsName></privateDnsName> <primary></primary> <association> <publicIp></publicIp> <publicDnsName></publicDnsName> <ipOwnerId></ipOwnerId> </association> </item> </privateIpAddressesSet> <ipv6AddressesSet> <item/> </ipv6AddressesSet> </item> </networkInterfaceSet> </item> </instancesSet> <requesterId></requesterId> <requestId></requestId> <reservationId></reservationId> </RunInstancesResponse>
StartInstances
Starts a Public Cloud instance that you've previously stopped.
AWS CLI example
aws ec2 start-instances --endpoint-url <LEASEWEB_AWS_EC2_SERVER_URL> --instance-ids <INSTANCE_ID>
Authorizations:
query Parameters
InstanceId.1 required | string Example: InstanceId.1=29145c92-4a68-4c63-aaeb-f2212d85a74a The instance id. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/aws/ec2/?InstanceId.1=29145c92-4a68-4c63-aaeb-f2212d85a74a&Action=StartInstances' \ --header 'Authorization: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
<?xml version='1.0' encoding='UTF-8'?> <StartInstancesResponse xmlns='http: //ec2.amazonaws.com/doc/2016-11-15/'> <instancesSet> <item> <instanceId>10a6163b-03c6-4303-a274-c96fa2217503</instanceId> </item> </instancesSet> <requestId>10a6163b-03c6-4303-a274</requestId> </StartInstancesResponse>
StopInstances
Stops a Public Cloud instance that you've previously started.
AWS CLI example
aws ec2 stop-instances --endpoint-url <LEASEWEB_AWS_EC2_SERVER_URL> --instance-ids <INSTANCE_ID>
Authorizations:
query Parameters
InstanceId.1 required | string Example: InstanceId.1=29145c92-4a68-4c63-aaeb-f2212d85a74a The instance id. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/aws/ec2/?InstanceId.1=29145c92-4a68-4c63-aaeb-f2212d85a74a&Action=StopInstances' \ --header 'Authorization: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
<?xml version='1.0' encoding='UTF-8'?> <StopInstancesResponse xmlns='http: //ec2.amazonaws.com/doc/2016-11-15/'> <instancesSet> <item> <instanceId>10a6163b-03c6-4303-a274-c96fa2217503</instanceId> </item> </instancesSet> <requestId>10a6163b-03c6-4303-a274</requestId> </StopInstancesResponse>
RebootInstances
Reboot a Public Cloud instance.
AWS CLI example
aws ec2 reboot-instances --endpoint-url <LEASEWEB_AWS_EC2_SERVER_URL> --instance-ids <INSTANCE_ID>
Authorizations:
query Parameters
InstanceId.1 required | string Example: InstanceId.1=29145c92-4a68-4c63-aaeb-f2212d85a74a The instance id. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/aws/ec2/?InstanceId.1=29145c92-4a68-4c63-aaeb-f2212d85a74a&Action=RebootInstances' \ --header 'Authorization: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
<?xml version='1.0' encoding='UTF-8'?> <RebootInstancesResponse xmlns='http: //ec2.amazonaws.com/doc/2016-11-15/'> <return>true</return> <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId> </RebootInstancesResponse>
CreateLoadBalancer
Create a load balancer, by providing the type, subnet, and a name.
AWS CLI example
aws elbv2 create-load-balancer --type <TYPE> --name <NAME> --subnets <REGION> --endpoint-url <LEASEWEB_AWS_EC2_SERVER_URL>
Authorizations:
query Parameters
Name required | string Example: Name=Test-Load-Blancer An identifying name you can refer to the load balancer. |
Type required | |
Subnets.member.1 required | string Example: Subnets.member.1=eu-west-3 Region to launch the load balancer into. The documentation has a complete list |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/aws/ec2/?Name=Test-Load-Blancer&Type=lsw.m3.large&Subnets.member.1=eu-west-3&Action=CreateLoadBalancer' \ --header 'Authorization: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
<?xml version='1.0' encoding='UTF-8'?> <CreateLoadBalancerResponse xmlns='http://elasticloadbalancing.amazonaws.com/doc/2015-12-01/'> <CreateLoadBalancerResult> <LoadBalancers> <member> <LoadBalancerArn>1ac942f4-cdd9-4c00-973f-ed82a92940cb</LoadBalancerArn> <LoadBalancerName>Test-Load-Blancer</LoadBalancerArn> <CreatedTime>2024-06-14T09:02,:31+00:00</CreatedTime>, <Type>lsw.m3.large</Type> <State> <Code>provisioning</Code> </State> <AvailabilityZones> <member> <ZoneName>eu-west-3</ZoneName> </member> </AvailabilityZones> </member> </LoadBalancers> </CreateLoadBalancerResult> <ResponseMetadata> <RequestId>8008e3fb-f671-46ab-ade4-871ca5508845</RequestId> </ResponseMetadata> </CreateLoadBalancerResponse>
DescribeLoadBalancers
Describes the specified load balancer or all load balancers.
If you specify load balancer IDs, the output includes information for only the specified load balancer.
If you specify names, the output includes information for only those load balancers that meet the name criteria.
If you do not specify load balancer IDs or names, the output includes information for all load balancers, which can affect performance. We recommend that you use pagination to ensure that the operation returns quickly and successfully.
If you specify a load balancer ID that is not valid, an error is returned. If you specify a load balancer that you do not own, it is not included in the output.
AWS CLI example
aws elbv2 describe-load-balancers --load-balancer-arns <LOAD_BALANCER_ID> --names <NAME> --endpoint-url <LEASEWEB_AWS_EC2_SERVER_URL>
Authorizations:
query Parameters
LoadBalancerArns.member.N | string Example: LoadBalancerArns.member.N=29145c92-4a68-4c63-aaeb-f2212d85a74a The ID of the load balancer. |
Names.member.N | string Example: Names.member.N=test-name The name of the load balancer. |
PageSize | integer Example: PageSize=10 The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. |
Marker | integer Example: Marker=1 The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/aws/ec2/?LoadBalancerArns.member.N=29145c92-4a68-4c63-aaeb-f2212d85a74a&Names.member.N=test-name&PageSize=10&Marker=1&Action=DescribeLoadBalancers' \ --header 'Authorization: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
<?xml version='1.0' encoding='UTF-8'?> <DescribeLoadBalancersResponse xmlns='http://elasticloadbalancing.amazonaws.com/doc/2015-12-01/'> <DescribeLoadBalancersResult> <NextMarker>1</NextMarker> <LoadBalancers> <member> <LoadBalancerArn>1ac942f4-cdd9-4c00-973f-ed82a92940cb</LoadBalancerArn> <LoadBalancerName>Test</LoadBalancerArn> <CreatedTime>2024-06-14T09:02,:31+00:00</CreatedTime>, <Type>lsw.m3.large</Type> <State> <Code>active</Code> </State> <AvailabilityZones> <member> <ZoneName>eu-west-3</ZoneName> </member> </AvailabilityZones> </member> </LoadBalancers> </DescribeLoadBalancersResult> <ResponseMetadata> <RequestId>8008e3fb-f671-46ab-ade4-871ca5508845</RequestId> </ResponseMetadata> </DescribeLoadBalancersResponse>
RegisterTargets
Register one/multiple instance(s) to load balancer.
AWS CLI example
aws elbv2 register-targets --target-group-arn <LOAD_BALANCER_ID> --targets Id=<INSTANCE_ID> Id=<ANOTHER_INSTANCE_ID> --endpoint-url <LEASEWEB_AWS_EC2_SERVER_URL>
Authorizations:
query Parameters
TargetGroupArn required | string Example: TargetGroupArn=29145c92-4a68-4c63-aaeb-f2212d85a74a The ID of the load balancer. |
Targets.member.N.Id required | string Example: Targets.member.N.Id=Targets.member.1.Id=800c43a4-8c74-4f92-9cd0-5fa883c8ca35&Targets.member.2.Id=810c43a4-8c74-4f92-9cd0-5fa883c8ca35 Instance ID(s) register to load balancer. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/aws/ec2/?TargetGroupArn=29145c92-4a68-4c63-aaeb-f2212d85a74a&Targets.member.N.Id=Targets.member.1.Id%3D800c43a4-8c74-4f92-9cd0-5fa883c8ca35%26Targets.member.2.Id%3D810c43a4-8c74-4f92-9cd0-5fa883c8ca35&Action=RegisterTargets' \ --header 'Authorization: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
<?xml version='1.0' encoding='UTF-8'?> <Empty/>
CreateListener
Create a listener for a load balancer.
The Load Balancer ID is required.
The default-actions parameter is required.
The protocol and port are optional. If not specified, a listener with "HTTP" and port "80" will be created by default.
AWS CLI example
aws elbv2 create-listener --load-balancer-arn <LOAD_BALANCER_ID> --protocol <PROTOCOL> --port <PORT> --default-actions --endpoint-url <LEASEWEB_AWS_EC2_SERVER_URL>
Authorizations:
query Parameters
LoadBalancerArn required | string Example: LoadBalancerArn=29145c92-4a68-4c63-aaeb-f2212d85a74a The ID of the load balancer. |
Protocol | string Enum: "HTTPS" "HTTP" "TCP" Example: Protocol=HTTP Protocol of the listener. |
Port | integer Example: Port=80 Port of the listener. |
Responses
Request samples
- Shell + Curl
- Python + Python3
- Php + Http2
- Javascript + Jquery
- Go + Native
curl --request GET \ --url 'https://api.leaseweb.com/aws/ec2/?LoadBalancerArn=29145c92-4a68-4c63-aaeb-f2212d85a74a&Protocol=HTTP&Port=80&Action=CreateListener' \ --header 'Authorization: REPLACE_KEY_VALUE'
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- 503
<?xml version='1.0' encoding='UTF-8'?> <CreateListenerResponse xmlns='http://elasticloadbalancing.amazonaws.com/doc/2015-12-01/'> <CreateListenerResult> <Listeners> <member> <LoadBalancerArn>1ac942f4-cdd9-4c00-973f-ed82a92940cb</LoadBalancerArn> <Protocol>HTTP</Protocol> <Port>80</Port>, <ListenerArn>2ac942f4-cdd9-4c00-973f-ed82a92940cb</ListenerArn> </member> </Listeners> </CreateListenerResult> <ResponseMetadata> <RequestId>8008e3fb-f671-46ab-ade4-871ca5508845</RequestId> </ResponseMetadata> </CreateListenerResponse>