The base URL for this API is: https://api.leaseweb.com/publicCloud/v1/
This API provides ways to launch and manage Public Cloud instances.
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.
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/regions \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "_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"
}
]
}
Get instance types
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" Example: region=eu-west-3 region name |
limit | integer >= 0 Default: 50 |
offset | integer >= 0 Default: 0 |
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/instanceTypes?region=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "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 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
.
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" 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. |
{- "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"
}
{- "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_22_04_64BIT",
- "name": "Ubuntu 22.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": "STOPPED",
- "type": "lsw.m3.large"
}
List and filter instances
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" Example: region=eu-west-3 Available regions can be obtained using |
object (instanceType) Example: type=lsw.c3.xlarge Available instance types for your region can be obtained using |
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/instances?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE&ip=SOME_STRING_VALUE&reference=SOME_STRING_VALUE&id=SOME_STRING_VALUE&contractType=SOME_STRING_VALUE&contractState=SOME_STRING_VALUE&imageId=UBUNTU_22_04_64BIT&state=SOME_STRING_VALUE®ion=SOME_STRING_VALUE&type=SOME_OBJECT_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "_metadata": {
- "totalCount": 1,
- "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": "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"
}
}
]
}
Get details about the instance
instanceId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Instance's ID |
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/instances/695ddd91-051f-4dd6-9120-938a927a47d0 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "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": null,
- "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 Public Cloud instance
instanceId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Instance's ID |
curl --request DELETE \ --url https://api.leaseweb.com/publicCloud/v1/instances/695ddd91-051f-4dd6-9120-938a927a47d0 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Update the instance's reference, type, storage or contract type.
Eligible instance types for update can be obtained using /v1/instances/{instanceId}/instanceTypesUpdate
.
instanceId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Instance's ID |
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 |
{- "reference": "new-reference"
}
{- "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": null,
- "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 the termination process of monthly instances. Must be executed prior to the instance's contractEndsAt
.
instanceId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Instance's ID |
curl --request POST \ --url https://api.leaseweb.com/publicCloud/v1/instances/695ddd91-051f-4dd6-9120-938a927a47d0/cancelTermination \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Get console access to the instance
instanceId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Instance's ID |
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/instances/695ddd91-051f-4dd6-9120-938a927a47d0/console \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
Get available instance types for update
instanceId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Instance's ID |
limit | integer >= 0 Default: 50 |
offset | integer >= 0 Default: 0 |
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/instances/695ddd91-051f-4dd6-9120-938a927a47d0/instanceTypesUpdate?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "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 Images available for reinstall
instanceId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Instance's ID |
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. |
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/instances/695ddd91-051f-4dd6-9120-938a927a47d0/reinstall/images?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE&custom=SOME_BOOLEAN_VALUE&standard=SOME_BOOLEAN_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "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": null,
- "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": [
- "LOADBALANCER"
], - "storageTypes": [
- "LOCAL",
- "CENTRAL"
], - "storageSize": null,
- "state": "READY",
- "stateReason": null,
- "region": null,
- "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": null,
- "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": "396a3299-1795-464b-aa10-e1f179db1926",
- "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": 12,
- "limit": 6,
- "offset": 0
}
}
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/instances/{instanceId}/reinstall/images
.
Available Marketplace Apps can be obtained using /v1/images/{imageId}/marketApps
.
instanceId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Instance's ID |
imageId required | string The Image ID |
marketAppId | string The Market App to be installed |
{- "imageId": "UBUNTU_22_04_64BIT"
}
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
The instance must be stopped before the execution
instanceId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Instance's ID |
curl --request POST \ --url https://api.leaseweb.com/publicCloud/v1/instances/695ddd91-051f-4dd6-9120-938a927a47d0/start \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
The instance must be running before the execution
instanceId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Instance's ID |
curl --request POST \ --url https://api.leaseweb.com/publicCloud/v1/instances/695ddd91-051f-4dd6-9120-938a927a47d0/stop \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
The instance must be running before the execution
instanceId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Instance's ID |
curl --request POST \ --url https://api.leaseweb.com/publicCloud/v1/instances/695ddd91-051f-4dd6-9120-938a927a47d0/reboot \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Get all credentials stored for the instance
instanceId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Instance's ID |
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/instances/695ddd91-051f-4dd6-9120-938a927a47d0/credentials \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "_metadata": {
- "totalCount": 1,
- "limit": 20,
- "offset": 0
}, - "credentials": [
- {
- "type": "OPERATING_SYSTEM",
- "username": "root"
}
]
}
Store credential used for the instance
instanceId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Instance's ID |
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 |
{- "password": "a$Ndes-3fad2-rfas@-",
- "type": "OPERATING_SYSTEM",
- "username": "another-user"
}
{- "password": "a$Ndes-3fad2-rfas@-",
- "type": "OPERATING_SYSTEM",
- "username": "another-user"
}
Delete all credentials stored for a given instance
instanceId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Instance's ID |
curl --request DELETE \ --url https://api.leaseweb.com/publicCloud/v1/instances/695ddd91-051f-4dd6-9120-938a927a47d0/credentials \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "401",
- "errorMessage": "You are not authorized to view this resource."
}
Get credentials stored for the instance by their types
instanceId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Instance's ID |
type required | string Example: OPERATING_SYSTEM |
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/instances/695ddd91-051f-4dd6-9120-938a927a47d0/credentials/OPERATING_SYSTEM \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "_metadata": {
- "totalCount": 1,
- "limit": 20,
- "offset": 0
}, - "credentials": [
- {
- "type": "OPERATING_SYSTEM",
- "username": "root"
}
]
}
Get credentials by type and username
instanceId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Instance's ID |
type required | string Example: OPERATING_SYSTEM Credential type |
username required | string Example: root Username |
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/instances/695ddd91-051f-4dd6-9120-938a927a47d0/credentials/OPERATING_SYSTEM/root \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "password": "12341234",
- "type": "OPERATING_SYSTEM",
- "username": "root"
}
Update credentials for a given type and username
instanceId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Instance's ID |
type required | string Example: OPERATING_SYSTEM Credential type |
username required | string Example: root Username |
password required | string The new password |
{- "password": "@-n3w-Pa$$w0rD"
}
{- "password": "@-n3w-Pa$$w0rD",
- "type": "OPERATING_SYSTEM",
- "username": "another-user"
}
Delete credential for a given type and username
instanceId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Instance's ID |
type required | string Example: OPERATING_SYSTEM Credential type |
username required | string Example: root Username |
curl --request DELETE \ --url https://api.leaseweb.com/publicCloud/v1/instances/695ddd91-051f-4dd6-9120-938a927a47d0/credentials/OPERATING_SYSTEM/root \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "401",
- "errorMessage": "You are not authorized to view this resource."
}
The operation may take a few moments to complete.
You can obtain the new credential using the credentials endpoints
instanceId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Instance's ID |
curl --request POST \ --url https://api.leaseweb.com/publicCloud/v1/instances/695ddd91-051f-4dd6-9120-938a927a47d0/resetPassword \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
equipmentId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Equipment's UUID |
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 |
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/equipments/695ddd91-051f-4dd6-9120-938a927a47d0/expenses?from=SOME_STRING_VALUE&to=SOME_STRING_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "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 all available ISO images
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/isos \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "_metadata": {
- "totalCount": 2,
- "limit": 20,
- "offset": 0
}, - "isos": [
- {
- "id": "GRML",
- "name": "GRML 2022.11"
}, - {
- "id": "ACRONIS_BOOT_MEDIA",
- "name": "Acronis Boot Media"
}
]
}
Instance must not have ISO attached, otherwise, it will return a validation error.
Available ISOs can be obtained using /v1/isos
.
instanceId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Instance's ID |
isoId required | string The ISO ID, obtained using the ISO endpoints |
{- "isoId": "GRML"
}
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Instance must have ISO attached, otherwise, it will return a validation error
instanceId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Instance's ID |
curl --request POST \ --url https://api.leaseweb.com/publicCloud/v1/instances/695ddd91-051f-4dd6-9120-938a927a47d0/detachIso \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
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. |
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/images?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE&custom=SOME_BOOLEAN_VALUE&standard=SOME_BOOLEAN_VALUE&state=SOME_STRING_VALUE&marketAppId=SOME_STRING_VALUE&storageType=SOME_STRING_VALUE&name=SOME_STRING_VALUE&flavour=SOME_STRING_VALUE®ion=SOME_STRING_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "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": null,
- "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": [
- "LOADBALANCER"
], - "storageTypes": [
- "LOCAL",
- "CENTRAL"
], - "storageSize": null,
- "state": "READY",
- "stateReason": null,
- "region": null,
- "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": null,
- "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": "396a3299-1795-464b-aa10-e1f179db1926",
- "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": 12,
- "limit": 6,
- "offset": 0
}
}
Create a Custom Image
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. |
{- "name": "New custom image",
- "instanceId": "695ddd91-051f-4dd6-9120-938a927a47d0"
}
{- "architecture": null,
- "createdAt": "2024-07-05T10:54:27+00:00",
- "custom": true,
- "family": "linux",
- "flavour": "ubuntu",
- "id": "396a3299-1795-464b-aa10-e1f179db1926",
- "marketApps": [ ],
- "minDiskSize": null,
- "name": "Custom image",
- "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 a Custom Image
imageId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Image's ID |
name required | string The name of the custom image to be updated. |
{- "name": "Custom image"
}
{- "architecture": null,
- "createdAt": "2024-07-05T10:54:27+00:00",
- "custom": true,
- "family": "linux",
- "flavour": "ubuntu",
- "id": "396a3299-1795-464b-aa10-e1f179db1926",
- "marketApps": [ ],
- "minDiskSize": null,
- "name": "Custom image",
- "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
}
List and filter Target Groups
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" region name |
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/targetGroups?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE&id=SOME_STRING_VALUE&name=SOME_STRING_VALUE&protocol=HTTP&port=SOME_INTEGER_VALUE®ion=SOME_STRING_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "_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 a Target Group
id required | string <uuid> |
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" region name |
required | object or null (healthCheck) |
{- "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
}
}
{- "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
}
}
Get Target Group details.
targetGroupId required | string <uuid> Example: fb769dab-3daa-47e4-89ed-06a4b6499176 Target Group ID |
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/targetGroups/fb769dab-3daa-47e4-89ed-06a4b6499176 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "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
}
}
Update a Target Group
targetGroupId required | string <uuid> Example: fb769dab-3daa-47e4-89ed-06a4b6499176 Target Group ID |
id required | string <uuid> |
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" region name |
required | object or null (healthCheck) |
{- "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
}
}
{- "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
}
}
Delete a Target Group.
targetGroupId required | string <uuid> Example: fb769dab-3daa-47e4-89ed-06a4b6499176 Target Group ID |
curl --request DELETE \ --url https://api.leaseweb.com/publicCloud/v1/targetGroups/fb769dab-3daa-47e4-89ed-06a4b6499176 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Get targets in a Target Group
targetGroupId required | string <uuid> Example: fb769dab-3daa-47e4-89ed-06a4b6499176 Target Group ID |
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/targetGroups/fb769dab-3daa-47e4-89ed-06a4b6499176/targets \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "_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 in a Target Group
targetGroupId required | string <uuid> Example: fb769dab-3daa-47e4-89ed-06a4b6499176 Target Group ID |
[- "695ddd91-051f-4dd6-9120-938a927a47d0"
]
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Deregister Targets in a Target Group
targetGroupId required | string <uuid> Example: fb769dab-3daa-47e4-89ed-06a4b6499176 Target Group ID |
[- "695ddd91-051f-4dd6-9120-938a927a47d0"
]
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/marketApps \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "_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
}
}
]
}
instanceId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Instance's ID |
from | string <date> The start of the interval to get the metric |
to | string <date> 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 |
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/instances/695ddd91-051f-4dd6-9120-938a927a47d0/metrics/datatraffic \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "_metadata": {
- "from": "2023-10-01T00:00:00+00:00",
- "to": "2023-10-31T00:00:00+00:00",
- "granularity": "DAY",
- "aggregation": "SUM",
- "summary": {
- "DOWN_PUBLIC": {
- "average": "855.28 KB",
- "expected": "25.66 MB",
- "total": "1.71 MB",
- "peak": {
- "value": "1.25 MB",
- "timestamp": "2023-10-28T00:00:00+00:00"
}
}, - "UP_PUBLIC": {
- "average": "3.69 MB",
- "expected": "110.64 MB",
- "total": "7.38 MB",
- "peak": {
- "value": "6.94 MB",
- "timestamp": "2023-10-28T00:00:00+00:00"
}
}
}
}, - "metrics": {
- "DOWN_PUBLIC": {
- "values": [
- {
- "value": 461323,
- "timestamp": "2023-10-27T00:00:00+00:00"
}, - {
- "value": 1249243,
- "timestamp": "2023-10-28T00:00:00+00:00"
}
], - "unit": "B"
}, - "UP_PUBLIC": {
- "values": [
- {
- "value": 437565,
- "timestamp": "2023-10-27T00:00:00+00:00"
}, - {
- "value": 6938590,
- "timestamp": "2023-10-28T00:00:00+00:00"
}
], - "unit": "B"
}
}
}
instanceId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Instance's ID |
from | string <date> The start of the interval to get the metric |
to | string <date> The end of the interval to get the metric. Must be greater than the date provided in |
granularity | string (metricsGranularity) Enum: "5m" "10m" "30m" "60m" "DAY" The interval for each metric |
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/instances/695ddd91-051f-4dd6-9120-938a927a47d0/metrics/cpu \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "_metadata": {
- "from": "2023-10-27T08:00:00+00:00",
- "to": "2023-10-28T08:00:00+00:00",
- "granularity": "5m",
- "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": "%"
}
}
}
loadBalancerId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Load balancer ID |
from | string <date> The start of the interval to get the metric |
to | string <date> The end of the interval to get the metric. Must be greater than the date provided in |
granularity | string (metricsGranularity) Enum: "5m" "10m" "30m" "60m" "DAY" The interval for each metric |
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/loadBalancers/695ddd91-051f-4dd6-9120-938a927a47d0/metrics/requests \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "_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"
}
}
loadBalancerId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Load balancer ID |
from | string <date> The start of the interval to get the metric |
to | string <date> The end of the interval to get the metric. Must be greater than the date provided in |
granularity | string (metricsGranularity) Enum: "5m" "10m" "30m" "60m" "DAY" The interval for each metric |
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/loadBalancers/695ddd91-051f-4dd6-9120-938a927a47d0/metrics/requestsPerSecond \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "_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"
}
}
loadBalancerId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Load balancer ID |
from | string <date> The start of the interval to get the metric |
to | string <date> The end of the interval to get the metric. Must be greater than the date provided in |
granularity | string (metricsGranularity) Enum: "5m" "10m" "30m" "60m" "DAY" The interval for each metric |
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/loadBalancers/695ddd91-051f-4dd6-9120-938a927a47d0/metrics/dataTransferred \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "_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"
}
}
}
loadBalancerId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Load balancer ID |
from | string <date> The start of the interval to get the metric |
to | string <date> The end of the interval to get the metric. Must be greater than the date provided in |
granularity | string (metricsGranularity) Enum: "5m" "10m" "30m" "60m" "DAY" The interval for each metric |
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/loadBalancers/695ddd91-051f-4dd6-9120-938a927a47d0/metrics/dataTransferredPerSecond \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "_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"
}
}
}
loadBalancerId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Load balancer ID |
from | string <date> The start of the interval to get the metric |
to | string <date> The end of the interval to get the metric. Must be greater than the date provided in |
granularity | string Enum: "5m" "10m" "30m" "1h" "1d" "1w" The interval for each metric |
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/loadBalancers/695ddd91-051f-4dd6-9120-938a927a47d0/metrics/connections \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "_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"
}
}
loadBalancerId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Load balancer ID |
from | string <date> The start of the interval to get the metric |
to | string <date> The end of the interval to get the metric. Must be greater than the date provided in |
granularity | string Enum: "5m" "10m" "30m" "1h" "1d" "1w" The interval for each metric |
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/loadBalancers/695ddd91-051f-4dd6-9120-938a927a47d0/metrics/connectionsPerSecond \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "_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"
}
}
loadBalancerId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Load balancer ID |
from | string <date> The start of the interval to get the metric |
to | string <date> The end of the interval to get the metric. Must be greater than the date provided in |
granularity | string Enum: "5m" "10m" "30m" "1h" "1d" "1w" The interval for each metric |
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/loadBalancers/695ddd91-051f-4dd6-9120-938a927a47d0/metrics/responseCodes \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "_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"
}
}
}
loadBalancerId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Load balancer ID |
from | string <date> The start of the interval to get the metric |
to | string <date> The end of the interval to get the metric. Must be greater than the date provided in |
granularity | string Enum: "5m" "10m" "30m" "1h" "1d" "1w" The interval for each metric |
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/loadBalancers/695ddd91-051f-4dd6-9120-938a927a47d0/metrics/responseCodesPerSecond \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "_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"
}
}
}
List instance snapshots
instanceId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Instance's ID |
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/instances/695ddd91-051f-4dd6-9120-938a927a47d0/snapshots?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "_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"
}
]
}
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.
instanceId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Instance's ID |
curl --request POST \ --url https://api.leaseweb.com/publicCloud/v1/instances/695ddd91-051f-4dd6-9120-938a927a47d0/snapshots \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
instanceId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Instance's ID |
snapshotId required | string <uuid> |
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/instances/695ddd91-051f-4dd6-9120-938a927a47d0/snapshots/%7BsnapshotId%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "created": "2023-11-02T07:31:28+0000",
- "displayName": "snapshot 1",
- "id": "ef73e9e2-95cd-49ef-940f-a24e6ad6c4a0",
- "state": "READY"
}
instanceId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Instance's ID |
snapshotId required | string <uuid> |
curl --request PUT \ --url https://api.leaseweb.com/publicCloud/v1/instances/695ddd91-051f-4dd6-9120-938a927a47d0/snapshots/%7BsnapshotId%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
instanceId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Instance's ID |
snapshotId required | string <uuid> |
curl --request DELETE \ --url https://api.leaseweb.com/publicCloud/v1/instances/695ddd91-051f-4dd6-9120-938a927a47d0/snapshots/%7BsnapshotId%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
List the instance's IPs
instanceId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Instance's ID |
version | integer Example: version=4 |
nullRouted | boolean |
ips | string A list of IPs separated by |
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/instances/695ddd91-051f-4dd6-9120-938a927a47d0/ips \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "_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"
}
}
]
}
instanceId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Instance's ID |
ip required | string <ip> Example: 10.0.0.1 |
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/instances/695ddd91-051f-4dd6-9120-938a927a47d0/ips/%7Bip%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "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"
}
}
Allows you to set the reverse lookup for the IP
instanceId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Instance's ID |
ip required | string <ip> Example: 10.0.0.1 |
reverseLookup required | string |
{- "reverseLookup": "a-valid-domain.xpto"
}
{- "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 an IP. It may take a few minutes before the change is propagated across the network.
Only works for IPv4.
instanceId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Instance's ID |
ip required | string <ip> Example: 10.0.0.1 |
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 |
{- "automatedUnnulingAt": 2,
- "comment": "Getting DDoS"
}
{- "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. It may take a few minutes before the change is propagated across the network
instanceId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Instance's ID |
ip required | string <ip> Example: 10.0.0.1 |
curl --request POST \ --url https://api.leaseweb.com/publicCloud/v1/instances/695ddd91-051f-4dd6-9120-938a927a47d0/ips/%7Bip%7D/unnull \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "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"
}
}
Add instance to Private Network.
Cannot be performed when the instance has snapshots.
instanceId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Instance's ID |
curl --request PUT \ --url https://api.leaseweb.com/publicCloud/v1/instances/695ddd91-051f-4dd6-9120-938a927a47d0/addToPrivateNetwork \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Remove instance from Private Network.
Cannot be performed when the instance has snapshots.
instanceId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Instance's ID |
curl --request DELETE \ --url https://api.leaseweb.com/publicCloud/v1/instances/695ddd91-051f-4dd6-9120-938a927a47d0/removeFromPrivateNetwork \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
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
.
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" 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 Enum: "HOURLY" "MONTHLY" The contract applicable for the load balancer |
billingFrequency required | integer Enum: 1 3 6 12 How often you wish to be charged. Used only when contract type is MONTHLY. '1' means every month, '3' every three months and so on. |
rootDiskStorageType required | string (storageType) Enum: "LOCAL" "CENTRAL" Storage type |
targetPort required | integer The port that the registered instances listen to |
{- "billingFrequency": 1,
- "contractType": "HOURLY",
- "reference": "my-loadbalancer-1",
- "region": "eu-west-3",
- "rootDiskStorageType": "CENTRAL",
- "targetPort": 443,
- "type": "lsw.m3.large"
}
{- "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
}
}
List and filter load balancers
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" 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. |
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/loadBalancers?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE&ip=SOME_STRING_VALUE&reference=SOME_STRING_VALUE&id=SOME_STRING_VALUE&contractState=SOME_STRING_VALUE&contractType=SOME_STRING_VALUE&state=SOME_STRING_VALUE®ion=SOME_STRING_VALUE&type=SOME_STRING_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "_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,
- "ddos": null
}
], - "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 details about the load balancer
loadBalancerId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Load balancer ID |
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/loadBalancers/695ddd91-051f-4dd6-9120-938a927a47d0 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "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
}
}
Terminate a Load balancer
loadBalancerId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Load balancer ID |
curl --request DELETE \ --url https://api.leaseweb.com/publicCloud/v1/loadBalancers/695ddd91-051f-4dd6-9120-938a927a47d0 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Update load balancer configurations
loadBalancerId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Load balancer ID |
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 |
targetPort | integer Port on which the backend (target) servers are listening to handle incoming requests |
{- "balance": "roundrobin",
- "contractType": "HOURLY",
- "idleTimeOut": 60,
- "reference": "foo",
- "targetPort": 9000,
- "type": "lsw.m3.xlarge",
- "xForwardedFor": false
}
{- "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
}
}
List listeners
loadBalancerId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Load balancer ID |
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/loadBalancers/695ddd91-051f-4dd6-9120-938a927a47d0/listeners?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "_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
loadBalancerId required | string <uuid> Example: 695ddd91-051f-4dd6-9120-938a927a47d0 Load balancer ID |
protocol required | string Enum: "HTTPS" "HTTP" "TCP" |
port required | integer Port that the listener listens to |
required | object (certificate) |
required | object or null (listenerDefaultRule) |
{- "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-----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-----"
}
}
{- "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 details about a listener
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 |
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'
{- "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-----"
}
]
}
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 |
protocol required | string or null Enum: "HTTPS" "HTTP" "TCP" |
port required | integer or null Port that the listener listens to |
required | object or null (certificate) |
required | object or null (listenerDefaultRule) |
{- "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-----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-----"
}
}
{- "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 a listener
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 |
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'
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Create an Auto Scaling Group.
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 |
{- "reference": "Manual scaling",
- "type": "MANUAL",
- "desiredAmount": 2,
- "instanceId": "6762182e-7ae9-4d0b-b3b7-bea5a49b3f94"
}
{- "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
}
List and filter Auto Scaling Groups
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" 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 |
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/autoScalingGroups?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE&id=SOME_STRING_VALUE&instanceId=SOME_STRING_VALUE&type=SOME_STRING_VALUE®ion=SOME_STRING_VALUE&reference=SOME_STRING_VALUE&state=SOME_STRING_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "_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 an Auto Scaling Group.
autoScalingGroupId required | string <uuid> Example: fb769dab-3daa-47e4-89ed-06a4b6499176 Auto Scaling Group ID |
curl --request DELETE \ --url https://api.leaseweb.com/publicCloud/v1/autoScalingGroups/fb769dab-3daa-47e4-89ed-06a4b6499176 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
- "errorCode": "400",
- "errorDetails": { },
- "errorMessage": "The API could not interpret your request correctly."
}
Update an Auto Scaling Group.
autoScalingGroupId required | string <uuid> Example: fb769dab-3daa-47e4-89ed-06a4b6499176 Auto Scaling Group ID |
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" |
{- "reference": "Changed reference",
- "desiredAmount": 4
}
{- "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 details about Auto Scaling Group.
autoScalingGroupId required | string <uuid> Example: fb769dab-3daa-47e4-89ed-06a4b6499176 Auto Scaling Group ID |
curl --request GET \ --url https://api.leaseweb.com/publicCloud/v1/autoScalingGroups/fb769dab-3daa-47e4-89ed-06a4b6499176 \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "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
}
List instances belonging to an Auto Scaling Group
autoScalingGroupId required | string <uuid> Example: fb769dab-3daa-47e4-89ed-06a4b6499176 Auto Scaling Group ID |
limit | integer Example: limit=20 Limit the number of results returned. |
offset | integer Example: offset=10 Return results starting from the given offset. |
curl --request GET \ --url 'https://api.leaseweb.com/publicCloud/v1/autoScalingGroups/fb769dab-3daa-47e4-89ed-06a4b6499176/instances?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "_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
}
]
}
Associates an auto scaling group with a target group.
autoScalingGroupId required | string <uuid> Example: fb769dab-3daa-47e4-89ed-06a4b6499176 Auto Scaling Group ID |
targetGroupId required | string <uuid> The target group unique identifier |
{- "targetGroupId": "b05917e1-96a4-442a-900c-c41f273d95c9"
}
{- "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
}
Disassociate a target group from an Auto Scaling Group
autoScalingGroupId required | string <uuid> Example: fb769dab-3daa-47e4-89ed-06a4b6499176 Auto Scaling Group ID |
targetGroupId required | string <uuid> The target group unique identifier |
{- "targetGroupId": "b05917e1-96a4-442a-900c-c41f273d95c9"
}
{- "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
}