Serverspace Public API is a public API for interacting with Serverspace services. Actions performed in the Serverspace dashboard can also be performed using the public API. This documentation describes the Serverspace application programming interface (API): the various API operations, request and response structures, error codes, and examples.
You need to create an API key for the project to work with the public API. The key can be generated by the project owner in Automation tab in the control panel. Each key has attributes: name, key value, issue date, expiration date. The key name can be arbitrary, up to 50 characters long. The key value is generated automatically and is 64 characters long. The key expiration date may be left blank, meaning the key does not expire and can be used indefinitely.
To work with the public API, the key value must be passed with all requests in the X-API-KEY
header, for example:
-H "X-API-KEY: lmGwbvllpIqIrKROOCLgE5Z941MKP5EYfbkgwtqJZGigfXUTpuYRpNQkCqShmm6r"
All API requests must be made over HTTPS. Requests made over plain HTTP will fail. API requests without authentication will also fail.
Endpoint:
https://api.serverspace.com.tr/
Below are the objects that can be manipulated using the public API and how they relate to the services in the control panel.
Service | Object | Actions |
---|---|---|
Cloud servers | OS image | View available operating systems for creating servers and networks |
Cloud servers | Configuration | View available configurations for creating servers and networks |
Cloud servers | Location | View available locations for creating servers and networks |
Cloud servers | Server | Create a server View details Manage power Change configuration Delete a server |
Cloud servers | Volume | Create a volume View details Resize a volume Delete a volume |
Cloud servers | Snapshot | Create a snapshot View details Return the server to a snapshot Delete a snapshot |
Cloud servers | Affinity groups | Create group View Details Delete group |
Cloud servers | Private network | Create a private network View details Change configuration Delete a private network |
Cloud servers | Network interface | Connect the server to the network (create a network interface) View details Disconnect the server from the network (remove the network interface) |
Cloud servers | Gateway | Create an edge gateway View details Manage Firewall and NAT rules Connecting and disconnecting the isolated network Delete a gateway |
Project | SSH key | Create an SSH key View details Delete an SSH key |
Project | Project | View project details |
Project | Task | View details |
DNS | Domain name | Create a domain name View details Delete a domain name |
DNS | DNS-record | Create a DNS-record View details Update a DNS-record Delete a DNS-record |
Returns the project ID and the current project balance. Projects let the account holder provide full or limited access to their infrastructure or resources (servers, networks, balance, etc.) to other users to collaborate with resources. There are two types of projects: personal and general. Each user in the project can be assigned a role with certain access rights: owner, administrator or accountant
{- "project": {
- "id": 123,
- "balance": 850.44,
- "currency": "TRY",
- "state": "Active",
- "created": "2020-06-01T15:23:07.6258725Z"
}
}
Returns a list of SSH keys. SSH keys are used to create a server running a Linux operating system. Using SSH keys lets you connect to the server without a password and increases the server's security level
{- "ssh_keys": [
- {
- "id": 1,
- "name": "Test Ssh-Key 1",
- "public_key": "---- BEGIN SSH2 PUBLIC KEY ----\r\nComment: \"rsa-key-20190927\"\r\nAAAAB3NzaC1yc2EAAAABJQAAAQEAkEWseYLYVW4wpdNwWNXtoz84r5sYZ2FBXJ5M\r\nsfibRpJ47o/2z6VcdYnbhhJ/J2dE9AlDCGgleXilnxc9UKRgWXi3NHMmDNFi1kR5\r\nJ6xcY3Tv0ly6w0if+QMJULnoixgPulg93JanVxCvAFy4sE8kwQqTQrYio3UJbiQ5\r\nlX0kEkaWMDM/p8Z97d5izVN+PoMjW0bZdK17VAS90cf+FKFL6cs5VKrY/d7OMfxi\r\nqNeEs+vzYPK2VT4aiLLzryTIiDgG9CjsPtRoMxSihw5tdIw3mhsFdZkKdaJDfank\r\noQ3Y6P4XFPbzwOfDLwIRkDd7Gbh7jRp+4SeVVsBP9AbBR/kv3w==\r\n---- END SSH2 PUBLIC KEY ----"
}, - {
- "id": 2,
- "name": "Test Ssh-Key 2",
- "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEA4pO1k8IU4JYNASJEGWR/3ECARddXiKLePNN8hIGaqT2grSpFIRULrRhL4qFIQOUB5m9qy0ZjazHoBUzaK/m+nrmkfamF90sKMN5KHRCUMbBOixS0Uc5r/HK7SDDnozjNSFDWscfpMuZfzSXQ512HRZ0ZN+fmXl9Ku87SE9fhrir7injfTVvF/VYfz9W1CvIwN8D6iTBo2zpI1xVfX1tuL2akME4ZBvH9+xVV7Ejw4ad6e/Z1p8g/pYzcmoMvng8qhrBMQaNSq1fTHN+YrJmr86k0pFpKbbSEksOLmV2piTBxqWqR00faRFgvG7HJDtoVAKSdpREUyDvDYeyUGyJwJw== rsa-key-20200730"
}
]
}
Adds a new SSH key. SSH keys are used to create a server running a Linux operating system. Using SSH keys lets you connect to the server without a password and increases the server's security level
Supported formats OpenSSH and SSH2
name required | string Key name |
public_key required | string Key code |
{- "name": "Test Ssh-Key 1",
- "public_key": "---- BEGIN SSH2 PUBLIC KEY ----\r\nComment: \"rsa-key-20190927\"\r\nAAAAB3NzaC1yc2EAAAABJQAAAQEAkEWseYLYVW4wpdNwWNXtoz84r5sYZ2FBXJ5M\r\nsfibRpJ47o/2z6VcdYnbhhJ/J2dE9AlDCGgleXilnxc9UKRgWXi3NHMmDNFi1kR5\r\nJ6xcY3Tv0ly6w0if+QMJULnoixgPulg93JanVxCvAFy4sE8kwQqTQrYio3UJbiQ5\r\nlX0kEkaWMDM/p8Z97d5izVN+PoMjW0bZdK17VAS90cf+FKFL6cs5VKrY/d7OMfxi\r\nqNeEs+vzYPK2VT4aiLLzryTIiDgG9CjsPtRoMxSihw5tdIw3mhsFdZkKdaJDfank\r\noQ3Y6P4XFPbzwOfDLwIRkDd7Gbh7jRp+4SeVVsBP9AbBR/kv3w==\r\n---- END SSH2 PUBLIC KEY ----"
}
{- "id": 1,
- "name": "Test Ssh-Key 1",
- "public_key": "---- BEGIN SSH2 PUBLIC KEY ----\r\nComment: \"rsa-key-20190927\"\r\nAAAAB3NzaC1yc2EAAAABJQAAAQEAkEWseYLYVW4wpdNwWNXtoz84r5sYZ2FBXJ5M\r\nsfibRpJ47o/2z6VcdYnbhhJ/J2dE9AlDCGgleXilnxc9UKRgWXi3NHMmDNFi1kR5\r\nJ6xcY3Tv0ly6w0if+QMJULnoixgPulg93JanVxCvAFy4sE8kwQqTQrYio3UJbiQ5\r\nlX0kEkaWMDM/p8Z97d5izVN+PoMjW0bZdK17VAS90cf+FKFL6cs5VKrY/d7OMfxi\r\nqNeEs+vzYPK2VT4aiLLzryTIiDgG9CjsPtRoMxSihw5tdIw3mhsFdZkKdaJDfank\r\noQ3Y6P4XFPbzwOfDLwIRkDd7Gbh7jRp+4SeVVsBP9AbBR/kv3w==\r\n---- END SSH2 PUBLIC KEY ----"
}
Returns the granularity of a single SSH key. SSH keys are used to create a server with a Linux operating system. Using SSH keys lets you connect to the server without a password and increases the server's security level
ssh_key_id required | integer <int32> ID of the SSH key that you need to get information about |
{- "ssh_key": {
- "id": 1,
- "name": "Test Ssh-Key 1",
- "public_key": "---- BEGIN SSH2 PUBLIC KEY ----\r\nComment: \"rsa-key-20190927\"\r\nAAAAB3NzaC1yc2EAAAABJQAAAQEAkEWseYLYVW4wpdNwWNXtoz84r5sYZ2FBXJ5M\r\nsfibRpJ47o/2z6VcdYnbhhJ/J2dE9AlDCGgleXilnxc9UKRgWXi3NHMmDNFi1kR5\r\nJ6xcY3Tv0ly6w0if+QMJULnoixgPulg93JanVxCvAFy4sE8kwQqTQrYio3UJbiQ5\r\nlX0kEkaWMDM/p8Z97d5izVN+PoMjW0bZdK17VAS90cf+FKFL6cs5VKrY/d7OMfxi\r\nqNeEs+vzYPK2VT4aiLLzryTIiDgG9CjsPtRoMxSihw5tdIw3mhsFdZkKdaJDfank\r\noQ3Y6P4XFPbzwOfDLwIRkDd7Gbh7jRp+4SeVVsBP9AbBR/kv3w==\r\n---- END SSH2 PUBLIC KEY ----"
}
}
Returns information about the task, the ID of the entity the action is performed on, and data about its completion
task_id required | string The ID of the task that you need to get information on |
{- "task": {
- "id": "lt17499",
- "server_id": "l1s2274",
- "created": "2020-10-28T13:41:48.7754873Z",
- "completed": "2020-10-28T13:42:13.0265233Z",
- "is_completed": "Completed"
}
}
Returns a list of locations where server and network creation is available, as well as the data on minimum and maximum volume sizes
{- "locations": [
- {
- "id": "am2",
- "system_volume_min": 25600,
- "additional_volume_min": 10240,
- "volume_max": 512000,
- "windows_system_volume_min": 25600,
- "bandwidth_min": 50,
- "bandwidth_max": 200,
- "cpu_quantity_options": [
- 1,
- 2,
- 3,
- 4,
- 6,
- 8,
- 12,
- 16
], - "ram_size_options": [
- 1024,
- 2048,
- 3072,
- 4096,
- 8192,
- 16384,
- 32768,
- 49152,
- 65536,
- 98304,
- 131072
]
}, - {
- "id": "nj3",
- "system_volume_min": 10240,
- "additional_volume_min": 10240,
- "volume_max": 512000,
- "windows_system_volume_min": 25600,
- "bandwidth_min": 50,
- "bandwidth_max": 200,
- "cpu_quantity_options": [
- 1,
- 2,
- 3,
- 4,
- 6,
- 8
], - "ram_size_options": [
- 1024,
- 2048,
- 3072,
- 4096,
- 8192,
- 16384,
- 32768,
- 49152,
- 65536
]
}
]
}
{- "images": [
- {
- "id": "Freebsd-12.1-X64",
- "location_id": "nj3",
- "type": "Freebsd",
- "os_version": "12.1",
- "architecture": "X64",
- "allow_ssh_keys": true
}, - {
- "id": "Ubuntu-20.04-X64",
- "location_id": "nj3",
- "type": "Ubuntu",
- "os_version": "20.04",
- "architecture": "X64",
- "allow_ssh_keys": true
}, - {
- "id": "Windows-Server 2019 Std-X64",
- "location_id": "am2",
- "type": "Windows",
- "os_version": "Server 2019 Std",
- "architecture": "X64",
- "allow_ssh_keys": false
}, - {
- "id": "Debian-10.1-X64",
- "location_id": "am2",
- "type": "Debian",
- "os_version": "10.1",
- "architecture": "X64",
- "allow_ssh_keys": true
}
]
}
Returns the list of applications available for installation on the servers
location_id | string Location name, allows you to filter available applications by location |
{- "applications": [
- {
- "id": "apache",
- "location_id": "nj3",
- "images": [
- "CentOS-7.9-X64",
- "CentOS-8.2-X64",
- "CentOS-8.3-X64",
- "Debian-10.7-X64",
- "Debian-11-X64",
- "Freebsd-12.2-X64",
- "Freebsd-13.0-X64",
- "Oracle-8.6-X64",
- "Ubuntu-18.04-X64",
- "Ubuntu-20.04-X64"
]
}, - {
- "id": "docker",
- "location_id": "nj3",
- "images": [
- "CentOS-7.9-X64",
- "CentOS-8.2-X64",
- "CentOS-8.3-X64",
- "Debian-10.7-X64",
- "Debian-11-X64",
- "Oracle-8.6-X64",
- "Ubuntu-18.04-X64",
- "Ubuntu-20.04-X64"
]
}, - {
- "id": "gitlab",
- "location_id": "nj3",
- "images": [
- "CentOS-7.9-X64",
- "CentOS-8.2-X64",
- "CentOS-8.3-X64",
- "Debian-10.7-X64",
- "Debian-11-X64",
- "Oracle-8.6-X64",
- "Ubuntu-18.04-X64",
- "Ubuntu-20.04-X64"
]
}, - {
- "id": "lamp",
- "location_id": "nj3",
- "images": [
- "CentOS-7.9-X64",
- "CentOS-8.2-X64",
- "CentOS-8.3-X64",
- "Debian-10.7-X64",
- "Debian-11-X64",
- "Freebsd-12.2-X64",
- "Freebsd-13.0-X64",
- "Oracle-8.6-X64",
- "Ubuntu-18.04-X64",
- "Ubuntu-20.04-X64"
]
}, - {
- "id": "lemp",
- "location_id": "nj3",
- "images": [
- "CentOS-7.9-X64",
- "CentOS-8.2-X64",
- "CentOS-8.3-X64",
- "Debian-10.7-X64",
- "Debian-11-X64",
- "Freebsd-12.2-X64",
- "Freebsd-13.0-X64",
- "Oracle-8.6-X64",
- "Ubuntu-18.04-X64",
- "Ubuntu-20.04-X64"
]
}, - {
- "id": "nginx",
- "location_id": "nj3",
- "images": [
- "CentOS-7.9-X64",
- "CentOS-8.2-X64",
- "CentOS-8.3-X64",
- "Debian-10.7-X64",
- "Debian-11-X64",
- "Freebsd-12.2-X64",
- "Freebsd-13.0-X64",
- "Oracle-8.6-X64",
- "Ubuntu-18.04-X64",
- "Ubuntu-20.04-X64"
]
}, - {
- "id": "php",
- "location_id": "nj3",
- "images": [
- "CentOS-7.9-X64",
- "CentOS-8.2-X64",
- "CentOS-8.3-X64",
- "Debian-10.7-X64",
- "Debian-11-X64",
- "Freebsd-12.2-X64",
- "Freebsd-13.0-X64",
- "Oracle-8.6-X64",
- "Ubuntu-18.04-X64",
- "Ubuntu-20.04-X64"
]
}, - {
- "id": "postgreSQL",
- "location_id": "nj3",
- "images": [
- "CentOS-7.9-X64",
- "CentOS-8.2-X64",
- "CentOS-8.3-X64",
- "Debian-10.7-X64",
- "Debian-11-X64",
- "Freebsd-12.2-X64",
- "Freebsd-13.0-X64",
- "Oracle-8.6-X64",
- "Ubuntu-18.04-X64",
- "Ubuntu-20.04-X64"
]
}, - {
- "id": "wordpress",
- "location_id": "nj3",
- "images": [
- "CentOS-7.9-X64",
- "CentOS-8.2-X64",
- "CentOS-8.3-X64",
- "Debian-10.7-X64",
- "Debian-11-X64",
- "Freebsd-12.2-X64",
- "Freebsd-13.0-X64",
- "Oracle-8.6-X64",
- "Ubuntu-18.04-X64",
- "Ubuntu-20.04-X64"
]
}
]
}
{- "servers": [
- {
- "id": "l1s2400",
- "location_id": "am2",
- "cpu": 1,
- "ram_mb": 1024,
- "volumes": [
- {
- "id": 2977,
- "name": "boot",
- "size_mb": 25600,
- "created": "2020-11-12T09:09:30.46252"
}, - {
- "id": 2978,
- "name": "additional",
- "size_mb": 30720,
- "created": "2020-11-12T09:36:34.376165"
}
], - "nics": [
- {
- "id": 3024,
- "network_id": "l1n1",
- "network_type": "PublicShared",
- "mac": "ca:05:27:ff:56:89",
- "ip_address": "45.14.48.218",
- "mask": 28,
- "bandwidth_mbps": 50
}, - {
- "id": 3025,
- "network_id": "l1n368",
- "network_type": "Isolated",
- "mac": "ca:05:1a:50:f6:07",
- "ip_address": "10.0.0.1",
- "mask": 24,
- "bandwidth_mbps": 1024
}
], - "image_id": "CentOS-7.7-X64",
- "is_power_on": true,
- "name": "public-api",
- "login": "root",
- "password": "EuvzlqK6pv",
- "ssh_key_ids": [
- 223,
- 224
], - "state": "Active",
- "created": "2020-11-12T09:09:54.6478655Z",
- "tags": [
- "production",
- "elastic"
]
}, - {
- "id": "l1s2401",
- "location_id": "am2",
- "cpu": 2,
- "ram_mb": 3072,
- "volumes": [
- {
- "id": 2979,
- "name": "boot",
- "size_mb": 25600,
- "created": "2020-11-12T09:43:43.257493"
}
], - "nics": [
- {
- "id": 3026,
- "network_id": "l1n1",
- "network_type": "PublicShared",
- "mac": "ca:05:5e:6e:4d:36",
- "ip_address": "45.14.48.219",
- "mask": 28,
- "bandwidth_mbps": 100
}
], - "image_id": "CentOS-7.7-X64",
- "is_power_on": false,
- "name": "example",
- "login": "root",
- "password": "TzJYPpAV9P9",
- "ssh_key_ids": [ ],
- "state": "Active",
- "created": "2020-11-12T09:44:05.0545552Z",
- "tags": [
- "production",
- "gitlab"
], - "application_ids": [
- "nginx",
- "gitlab",
- "wordpress"
], - "affinity_group_id": "l1g11"
}
]
}
Creates a new server. Returns a task ID that you can use to track the process of creating a server, and its server ID. When creating a server, at least one volume must be specified, which will be bootable, and its name must be "boot". To connect to a public network, you only need to specify the interface bandwidth in the request body. To connect to an isolated network, you should specify only its identifier
location_id required | string Location ID |
image_id required | string Image ID |
cpu required | integer <int32> Number of cores |
ram_mb required | integer <int32> The amount of RAM in MB |
required | Array of objects |
Array of objects | |
name required | string Server name |
ssh_key_ids | Array of integers <int32> [ items <int32 > ] SSH key ID, if no SSH key is specified, then authentication by login and password will be available for the server |
application_ids | Array of strings List of applications to be installed on the server. If the application_ids field specified, the server_init_script field ignored |
tags | Array of strings List of tags that will be assigned to the server. You can keep the list empty |
affinity_group_id | string Affinity group ID |
server_init_script | string A custom script that will run on the server when it is created. You can use quoting, special and control characters when writing the script. Only for Linux and FreeBSD. If the application_ids field specified, the server_init_script field ignored |
{- "value": {
- "location_id": "am2",
- "image_id": "Ubuntu-20.04-X64",
- "cpu": 1,
- "ram_mb": 1024,
- "volumes": [
- {
- "name": "boot",
- "size_mb": 25600
}
], - "networks": [
- {
- "bandwidth_mbps": 50
}, - {
- "network_id": "l6n343",
- "ip_address": "10.0.0.5"
}
], - "name": "public-api",
- "ssh_key_ids": [
- 223
], - "application_ids": [
- "nginx",
- "gitlab",
- "wordpress"
], - "tags": [
- "example",
- "my_tag"
], - "affinity_group_id": "l1g11",
- "server_init_script": "sudo apt update\nsudo apt install apache2 -y\nsudo systemctl enable apache2\nsudo systemctl start apache2\n"
}
}
{- "task_id": "lt17499"
}
Returns the details of a server
server_id required | string ID of the server you want to get details on |
{- "server": {
- "id": "l1s2400",
- "location_id": "am2",
- "cpu": 1,
- "ram_mb": 1024,
- "volumes": [
- {
- "id": 2977,
- "name": "boot",
- "size_mb": 25600,
- "created": "2020-11-12T09:09:30.46252"
}, - {
- "id": 2978,
- "name": "additional",
- "size_mb": 30720,
- "created": "2020-11-12T09:36:34.376165"
}
], - "nics": [
- {
- "id": 3024,
- "network_id": "l1n1",
- "network_type": "PublicShared",
- "mac": "ca:05:27:ff:56:89",
- "ip_address": "45.14.48.218",
- "mask": 28,
- "gateway": "45.14.48.209",
- "bandwidth_mbps": 50
}, - {
- "id": 3025,
- "network_id": "l1n368",
- "network_type": "Isolated",
- "mac": "ca:05:1a:50:f6:07",
- "ip_address": "10.0.0.1",
- "mask": 24,
- "bandwidth_mbps": 1024
}
], - "image_id": "CentOS-7.7-X64",
- "is_power_on": true,
- "name": "public-api",
- "login": "root",
- "password": "EuvzlqK6pv",
- "ssh_key_ids": [
- 223,
- 224
], - "state": "Active",
- "created": "2020-11-12T09:09:54.6478655Z",
- "tags": [
- "production",
- "elastic"
], - "application_ids": [
- "nginx",
- "gitlab",
- "wordpress"
], - "affinity_group_id": "l1g11"
}
}
Changes the number of cores and the amount of RAM used by one server. Returns a task that you can use to track the process of changing the server and its server ID
server_id required | string ID of the server to be changed |
cpu required | integer <int32> New number of cores |
ram_mb required | integer <int32> New amount of RAM in MB |
{- "cpu": 4,
- "ram_mb": 4096
}
{- "task_id": "lt17499"
}
Changes the number of cores or/and the amount of RAM used by one server. Returns a task that you can use to track the process of changing the server and its server ID
server_id required | string ID of the server to be changed |
cpu | integer <int32> New number of cores |
ram_mb | integer <int32> New amount of RAM in MB |
{- "cpu": 4
}
{- "task_id": "lt17499"
}
Changes the server name. Returns a task that you can use to track the process of changing the server and its server ID
server_id required | string ID of the server to be changed |
name required | string New server name |
{- "name": "Rename"
}
{- "task_id": "lt17499"
}
Returns the monthly price of the server with the specified configuration. The resource accepts the same model that is required when creating the server
location_id required | string Location ID |
image_id required | string Image ID |
cpu required | integer <int32> Number of cores |
ram_mb required | integer <int32> The amount of RAM in MB |
required | Array of objects |
Array of objects | |
name | string Server name. Optional field, used for compatibility with the server create request |
ssh_key_ids | Array of integers <int32> [ items <int32 > ] SSH key ID. Optional field, used for compatibility with the server create request |
{- "location_id": "am2",
- "image_id": "CentOS-8.3-X64",
- "cpu": 1,
- "ram_mb": 1024,
- "volumes": [
- {
- "name": "boot",
- "size_mb": 25600
}
], - "networks": [
- {
- "bandwidth_mbps": 50
}, - {
- "bandwidth_mbps": 100
}
]
}
{- "price": 3011.4
}
Returns a list of system and additional SSD volumes that could be used to increase available storage space for the server
server_id required | string ID of the server that you want to get a list of volumes for |
{- "volumes": [
- {
- "id": 2799,
- "server_id": "l1s2272",
- "name": "boot",
- "size_mb": 51200,
- "created": "2020-10-28T12:10:47.213843"
}, - {
- "id": 2802,
- "server_id": "l1s2272",
- "name": "addition",
- "size_mb": 10240,
- "created": "2020-10-28T15:33:34.862965"
}
]
}
Adds a new SSD volume to the server. Returns a task ID. When adding a volume, the server is rebooted. Connection is performed automatically and is available for servers with any operating system
server_id required | string ID of the server that you want to create a volume for |
name required | string Volume name |
size_mb required | integer <int32> Volume size in MB, the minimum and maximum volume size can be found in the location details, volume size must be a multiple of 10 GB |
{- "name": "Volume 1",
- "size_mb": 10240
}
{- "task_id": "lt17499"
}
Returns the granularity of one volume. Additional SSD volumes are used to increase the available storage space for a server
server_id required | string ID of the server you want to get volume details for |
volume_id required | integer <int32> ID of the volume that you want to get details for |
{- "volume": {
- "id": 2799,
- "server_id": "l1s2272",
- "name": "boot",
- "size_mb": 51200,
- "created": "2020-10-28T12:10:47.213843"
}
}
Changes the size of a volume or its name. Returns task ID. When a volume is changed, the server is rebooted. Name change is ignored for the "boot" bootable volume
server_id required | string ID of the server that you want to resize the volume on |
volume_id required | integer <int32> ID of the volume to be changed |
The volume size must be specified in MB. The minimum and maximum volume size can be found in the location details. The volume can’t be shrunk, only increased
name | string Volume name |
size_mb | integer <int32> Volume size in MB, volume size must be a multiple of 10 GB |
{- "size_mb": 20480
}
{- "task_id": "lt17499"
}
Returns a list of server snapshots
server_id required | string ID of the server that you want to get the list of snapshots from |
{- "snapshots": [
- {
- "id": 55,
- "server_id": "l1s2276",
- "name": "snapshot-1",
- "size_mb": 216,
- "created": "2020-10-28T17:05:55.625218Z"
}, - {
- "id": 56,
- "server_id": "l1s2276",
- "name": "snapshot-2",
- "size_mb": 103,
- "created": "2020-10-29T13:13:39.329388Z"
}
]
}
Creates a snapshot of the server and returns a task ID
server_id required | string ID of the server to take a snapshot of |
name | string Snapshot name |
{- "name": "snapshot-example"
}
{- "task_id": "lt17499"
}
Returns the details of one snapshot
server_id required | string ID of server you want to get the details of the snapshot for |
snapshot_id required | integer <int32> ID of the snapshot you want to get details for |
{- "snapshot": {
- "id": 55,
- "server_id": "l1s2276",
- "name": "snapshot-1",
- "size_mb": 216,
- "created": "2020-10-28T17:05:55.625218Z"
}
}
Returns the server state to the selected snapshot and returns a task ID. When restoring from any snapshot other than the most recent one, the newer ones are automatically deleted!
server_id required | string ID of server to be rolled back to the snapshot |
snapshot_id required | integer <int32> ID of the snapshot to return to |
{- "task_id": "lt17499"
}
Get information about groups Affinity and Anti-Affinity. The Affinity and Anti-Affinity groups offer to host a set of servers on different or the same location pool, depending on requirements
{- "affinity-groups": [
- {
- "id": "l1g11",
- "location_id": "am2",
- "name": "affinity-group",
- "affinity": true,
- "server_ids": [
- "l1s2401",
- "l1s2402"
]
}, - {
- "id": "l1g20",
- "location_id": "am2",
- "name": "anti-affinity-group",
- "affinity": false,
- "server_ids"": [
- "l1s2403",
- "l1s2404",
- "l1s2405"
]
}
]
}
Creates a new Affinity or Anti-Affinity group
name required | string Group name |
location_id required | string Location ID |
affinity required | boolean Group type Affinity or Anti-Affinity |
{- "name": "affinity-group",
- "location_id": "am2",
- "affinity": true
}
{- "affinity_group": {
- "id": "l1g12",
- "location_id": "am2",
- "name": "anti-affinity",
- "affinity": false,
- "server_ids": [
- "l1s2406",
- "l1s2408"
]
}
}
Returns a detail of a group
affinity-group_id required | string ID of the group you want to get details on |
{- "affinity-groups": [
- {
- "id": "l1g11",
- "location_id": "am2",
- "name": "affinity-group",
- "affinity": true,
- "server_ids": [
- "l1s2401",
- "l1s2402"
]
}
]
}
Returns a list of server network interfaces
server_id required | string ID of the server that you want to get a list of network interfaces for |
{- "nics": [
- {
- "id": 2863,
- "server_id": "l1s2275",
- "network_id": "l1n1",
- "mac": "ca:05:39:c7:5c:58",
- "ip_address": "45.14.48.220",
- "gateway": "45.14.48.209",
- "mask": 28,
- "bandwidth_mbps": 40
}, - {
- "id": 2864,
- "server_id": "l1s2275",
- "network_id": "l1n325",
- "mac": "ca:05:c3:90:83:07",
- "ip_address": "10.0.0.1",
- "mask": 24,
- "bandwidth_mbps": 1024
}
]
}
Connects a server to the network. Returns the task ID. To connect to a public network, you only need to specify the interface bandwidth in the request body. To connect to an isolated network, you should specify only its identifier. Networks allow you to combine virtual servers into a cloud within a data center. If additional public IP addresses are connected, a one-time charge equal to the cost of one IP address for one month may be applied
server_id required | string ID of the server to connect to the network |
network_id | string ID of the isolated network the server should be connected to |
ip_address | string The IP address on the isolated network that will be assigned to the server. If no IP address is specified, it will be assigned automatically |
bandwidth_mbps | integer <int32> Public network interface bandwidth. Interface bandwidth in Mbps, the bandwidth value must be a multiple of 10 Mbps. If no interface is specified, then will be created one public interface with the minimum allowable bandwidth |
{- "network_id": "l7n343",
- "ip_address": "192.168.0.23"
}
{- "task_id": "lt17499"
}
Returns the details of a network interface
server_id required | string ID of the server that you want to get the network interface details for |
nic_id required | integer <int32> ID of the network interface that you want to get the details of |
{- "nic": {
- "id": 2864,
- "server_id": "l1s2275",
- "network_id": "l1n325",
- "mac": "ca:05:c3:90:83:07",
- "ip_address": "10.0.0.1",
- "mask": 24,
- "gateway": "10.0.0.254",
- "bandwidth_mbps": 1024
}
}
Changes the bandwidth of the interface channel for the public shared network
server_id required | string The ID of the server for which you want to change the network interface bandwidth |
nic_id required | integer <int32> The ID of the network interface which bandwidth you need to change |
You can change only the bandwidth of the interface connected to the public shared network
bandwidth_mbps | integer <int32> Public network interface bandwidth. Interface bandwidth in Mbps, the bandwidth value must be a multiple of 10 Mbps |
{- "bandwidth_mbps": 150
}
{- "task_id": "lt17499"
}
Returns a list of isolated networks. An isolated network allows virtual servers to be combined into a private cloud within a single data center. Resources are placed in a private cloud in a separate isolated network segment without access to the Internet, providing a high level of security and confidentiality
{- "isolated_networks": [
- {
- "id": "l6n343",
- "location_id": "nj3",
- "name": "isolated-net-1",
- "description": "isolated-net-1 description",
- "network_prefix": "10.0.0.0",
- "mask": 24,
- "server_ids": [
- "l6s2275",
- "l6s2276"
], - "gateway_ids": [
- "l6e138",
- "l6e136"
], - "state": "Active",
- "created": "2020-10-29T09:46:29.454269Z",
- "tags": [
- "cluster",
- "balancing"
]
}, - {
- "id": "l6n344",
- "location_id": "nj3",
- "name": "isolated-net-2",
- "description": "isolated-net-2 description",
- "network_prefix": "192.168.1.0",
- "mask": 24,
- "server_ids": [
- "l6s2276"
], - "gateway_ids": [
- "l6e138"
], - "state": "Active",
- "created": "2020-10-29T09:51:55.148213Z",
- "tags": [
- "cluster",
- "example"
]
}
]
}
Creates a new isolated network. Returns a task ID. An isolated network allows virtual servers to be combined into a private cloud within a single data center. Resources are placed in a private cloud in a separate isolated network segment without access to the Internet, providing a high level of security and confidentiality
location_id required | string ID of the location to create a network in |
name required | string Network name |
description | string Network description |
network_prefix | string Network address |
mask | integer <int32> The subnet mask defines the unchanged part of the address and affects the capacity of the network (the number of available addresses). It is defined as the number of most significant bits that do not change from address to address. For example, 24 is equivalent to the entry "255.255.255.0" and means there are 256 available (254 work) addresses. Appropriate values for masks are from 18 to 24 inclusive |
{- "location_id": "am2",
- "name": "example-network",
- "description": "description",
- "network_prefix": "192.168.0.0",
- "mask": 24
}
{- "task_id": "l1t11871"
}
Gets the granularity of one isolated network. An isolated network allows virtual servers to be combined into a private cloud within a single data center. Resources are placed in a private cloud in a separate isolated network segment without access to the Internet, providing a high level of security and confidentiality
network_id required | string ID of the isolated network that you want to get details for |
{- "isolated_network": {
- "id": "l6n343",
- "location_id": "nj3",
- "name": "isolated-net-1",
- "description": "isolated-net-1 description",
- "network_prefix": "10.0.0.0",
- "mask": 24,
- "server_ids": [
- "l6s2275",
- "l6s2276"
], - "gateway_ids": [
- "l1e138",
- "l1e136"
], - "state": "Active",
- "created": "2020-10-29T09:46:29.454269Z",
- "tags": [
- "cluster",
- "balancing"
]
}
}
Changes the name and description of the isolated network. An isolated network allows virtual servers to be combined into a private cloud within a single data center. Resources are placed in a private cloud in a separate isolated network segment without access to the Internet, providing a high level of security and confidentiality
network_id required | string ID of the isolated network to be changed |
name | string New name of isolated network |
description | string New description of isolated network |
{- "name": "Network 1",
- "description": "Description of Network 1"
}
{- "isolated_network": {
- "id": "l6n343",
- "location_id": "nj3",
- "name": "Network 1",
- "description": "Description of Network 1",
- "network_prefix": "10.0.0.0",
- "mask": 24,
- "server_ids": [
- "l6s2275",
- "l6s2276"
], - "gateway_ids": [
- "l1e138",
- "l1e136"
], - "state": "Active",
- "created": "2020-10-29T09:46:29.454269Z"
}
}
{- "gateways": [
- {
- "id": "l1e137",
- "location_id": "am2",
- "name": "router",
- "nics": [
- {
- "id": 12345,
- "network_id": "l1n1",
- "ip_address": "45.14.48.213",
- "bandwidth_mbps": 40
}, - {
- "id": 23456,
- "network_id": "l1n1497",
- "ip_address": "10.0.0.2",
- "bandwidth_mbps": 1024
}
], - "nat_rules": [ ],
- "firewall_rules": [ ],
- "state": "Active",
- "powered_on": false,
- "created": "2022-06-07T09:25:19.352137Z"
}, - {
- "id": "l1e136",
- "location_id": "am2",
- "name": "edge",
- "nics": [
- {
- "id": 54321,
- "network_id": "l1n1489",
- "ip_address": "192.168.0.1",
- "bandwidth_mbps": 1024
}, - {
- "id": 65432,
- "network_id": "l1n1",
- "ip_address": "45.14.48.210",
- "bandwidth_mbps": 60
}, - {
- "id": 76543,
- "network_id": "l1n1497",
- "ip_address": "10.0.0.1",
- "bandwidth_mbps": 1024
}
], - "nat_rules": [
- {
- "type": "SNAT",
- "protocol": "TCP",
- "source": "0.0.0.0/0",
- "destination": "45.14.48.220/32",
- "destination_port": 80,
- "translated": "45.14.48.210",
- "translated_port": 443
}, - {
- "type": "SNAT",
- "protocol": "UDP",
- "source": "10.0.0.0/24",
- "destination": "0.0.0.0/0",
- "destination_port": 25,
- "translated": "45.14.48.210",
- "translated_port": 225
}, - {
- "type": "BINAT",
- "protocol": "TCP",
- "source": "192.168.0.3/32",
- "destination": "0.0.0.0/0",
- "destination_port": 0,
- "translated": "45.14.48.210",
- "translated_port": 0
}, - {
- "type": "DNAT",
- "protocol": "TCP",
- "source": "0.0.0.0/0",
- "destination": "45.14.48.210/32",
- "destination_port": 80,
- "translated": "192.168.0.5",
- "translated_port": 8080
}
], - "firewall_rules": [
- {
- "action": "Deny",
- "direction": "In",
- "protocol": "TCP",
- "source": "0.0.0.0/0",
- "source_port": 80,
- "destination": "192.168.0.0/24",
- "destination_port": 80
}, - {
- "action": "Allow",
- "direction": "In",
- "protocol": "UDP",
- "source": "0.0.0.0/0",
- "source_port": 0,
- "destination": "10.0.0.0/24",
- "destination_port": 0
}, - {
- "action": "Deny",
- "direction": "Out",
- "protocol": "ICMP",
- "source": "10.0.0.0/24",
- "source_port": 0,
- "destination": "0.0.0.0/0",
- "destination_port": 0
}
], - "state": "Active",
- "powered_on": true,
- "created": "2022-06-06T12:59:11.913863Z",
- "tags": [
- "MyTag",
- "Prod"
]
}
]
}
Creates a new edge gateway. Returns a task ID that you can use to track the process of creating a gateway, and its gateway ID. Isolated networks must be specified when creating the gateway, which will be connected to the gateway
location_id required | string Location ID |
name required | string Gateway name |
bandwidth_mbps required | integer <int32> Public network interface bandwidth. Interface bandwidth in Mbps, the bandwidth value must be a multiple of 10 Mbps |
network_ids required | Array of strings Isolated network IDs. The maximum number of isolated networks that can be connected to the gateway is 3 |
{- "location_id": "am2",
- "name": "api-example",
- "bandwidth_mbps": 60,
- "network_ids": [
- "l1n1497",
- "l1n1489"
]
}
{- "task_id": "lt17499"
}
Returns the details of an edge gateway
gateway_id required | string ID of the edge gateway you want to get details on |
{- "gateway": {
- "id": "l1e136",
- "location_id": "am2",
- "name": "edge",
- "nics": [
- {
- "id": 12345,
- "network_id": "l1n1489",
- "ip_address": "192.168.0.1",
- "bandwidth_mbps": 1024
}, - {
- "id": 23456,
- "network_id": "l1n1497",
- "ip_address": "10.0.0.1",
- "bandwidth_mbps": 1024
}, - {
- "id": 34567,
- "network_id": "l1n1",
- "ip_address": "45.14.48.210",
- "bandwidth_mbps": 60
}
], - "nat_rules": [
- {
- "type": "SNAT",
- "protocol": "TCP",
- "source": "0.0.0.0/0",
- "destination": "45.14.48.220/32",
- "destination_port": 80,
- "translated": "45.14.48.210",
- "translated_port": 443
}, - {
- "type": "SNAT",
- "protocol": "UDP",
- "source": "10.0.0.0/24",
- "destination": "0.0.0.0/0",
- "destination_port": 25,
- "translated": "45.14.48.210",
- "translated_port": 225
}, - {
- "type": "BINAT",
- "protocol": "TCP",
- "source": "192.168.0.3/32",
- "destination": "0.0.0.0/0",
- "destination_port": 0,
- "translated": "45.14.48.210",
- "translated_port": 0
}, - {
- "type": "DNAT",
- "protocol": "TCP",
- "source": "0.0.0.0/0",
- "destination": "45.14.48.210/32",
- "destination_port": 80,
- "translated": "192.168.0.5",
- "translated_port": 8080
}
], - "firewall_rules": [
- {
- "action": "Deny",
- "direction": "In",
- "protocol": "TCP",
- "source": "0.0.0.0/0",
- "source_port": 80,
- "destination": "192.168.0.0/24",
- "destination_port": 80
}, - {
- "action": "Allow",
- "direction": "In",
- "protocol": "UDP",
- "source": "0.0.0.0/0",
- "source_port": 0,
- "destination": "10.0.0.0/24",
- "destination_port": 0
}, - {
- "action": "Deny",
- "direction": "Out",
- "protocol": "ICMP",
- "source": "10.0.0.0/24",
- "source_port": 0,
- "destination": "0.0.0.0/0",
- "destination_port": 0
}
], - "state": "Active",
- "powered_on": false,
- "created": "2022-06-06T12:59:11.913863Z",
- "tags": [
- "MyTag",
- "Prod"
]
}
}
Changes the edge gateway name
gateway_id required | string ID of the edge gateway to be changed |
name required | string New name of edge gateway |
{- "name": "Rename"
}
{- "gateway": {
- "id": "l1e136",
- "location_id": "am2",
- "name": "Rename",
- "nics": [
- {
- "id": 12345,
- "network_id": "l1n1489",
- "ip_address": "192.168.0.1",
- "bandwidth_mbps": 1024
}, - {
- "id": 23456,
- "network_id": "l1n1497",
- "ip_address": "10.0.0.1",
- "bandwidth_mbps": 1024
}, - {
- "id": 34567,
- "network_id": "l1n1",
- "ip_address": "45.14.48.210",
- "bandwidth_mbps": 60
}
], - "nat_rules": [
- {
- "type": "SNAT",
- "protocol": "TCP",
- "source": "0.0.0.0/0",
- "destination": "45.14.48.220/32",
- "destination_port": 80,
- "translated": "45.14.48.210",
- "translated_port": 443
}, - {
- "type": "BINAT",
- "protocol": "TCP",
- "source": "192.168.0.3/32",
- "destination": "0.0.0.0/0",
- "destination_port": 0,
- "translated": "45.14.48.210",
- "translated_port": 0
}, - {
- "type": "DNAT",
- "protocol": "TCP",
- "source": "0.0.0.0/0",
- "destination": "45.14.48.210/32",
- "destination_port": 80,
- "translated": "192.168.0.5",
- "translated_port": 8080
}
], - "firewall_rules": [
- {
- "action": "Deny",
- "direction": "In",
- "protocol": "TCP",
- "source": "0.0.0.0/0",
- "source_port": 80,
- "destination": "192.168.0.0/24",
- "destination_port": 80
}, - {
- "action": "Allow",
- "direction": "In",
- "protocol": "UDP",
- "source": "0.0.0.0/0",
- "source_port": 0,
- "destination": "10.0.0.0/24",
- "destination_port": 0
}, - {
- "action": "Deny",
- "direction": "Out",
- "protocol": "ICMP",
- "source": "10.0.0.0/24",
- "source_port": 0,
- "destination": "0.0.0.0/0",
- "destination_port": 0
}
], - "state": "Active",
- "powered_on": true,
- "created": "2022-06-06T12:59:11.913863Z",
- "tags": [
- "MyTag",
- "Prod"
]
}
}
Changes the bandwidth of the public interface channel for the edge gateway
gateway_id required | string The ID of the edge gateway which bandwidth you need to change |
bandwidth_mbps | integer <int32> New public network interface bandwidth. Interface bandwidth in Mbps, the bandwidth value must be a multiple of 10 Mbps |
{- "bandwidth_mbps": 100
}
{- "task_id": "lt17499"
}
Returns a list of Firewall rules of one edge gateway. Rules are executed sequentially. The priority rule is the last rule that the traffic falls under. The higher rule is on the list, the lower its priority
gateway_id required | string The gateway ID of the edge gateway for which you want to get the list of Firewall rules |
{- "firewall_rules": [
- {
- "action": "Allow",
- "direction": "Out",
- "protocol": "ICMP",
- "source": "10.0.0.0/24",
- "source_port": 0,
- "destination": "0.0.0.0/0",
- "destination_port": 0
}, - {
- "action": "Allow",
- "direction": "In",
- "protocol": "TCP",
- "source": "45.121.122.123/32",
- "source_port": 80,
- "destination": "192.168.0.2/32",
- "destination_port": 8080
}, - {
- "action": "Deny",
- "direction": "In",
- "protocol": "UDP",
- "source": "45.138.24.17/32",
- "source_port": 443,
- "destination": "10.0.0.0/24",
- "destination_port": 0
}
]
}
Changes the Firewall rule set of the edge gateway. The request body passes an array of rules that will be applied to this gateway. The method deletes existing rules and creates passed rules. It is possible to pass an empty list to delete all rules.
Rules are executed sequentially. The priority rule is the last rule that the traffic falls under. The higher rule is on the list, the lower its priority
gateway_id required | string The ID of the edge gateway for which you want to change the Firewall rule set |
Array of objects List of Firewall rules |
{- "firewall_rules": [
- {
- "action": "Deny",
- "direction": "In",
- "protocol": "ICMP",
- "source": "0.0.0.0/0",
- "source_port": 0,
- "destination": "111.112.113.114/32",
- "destination_port": 0
}, - {
- "action": "Deny",
- "direction": "Out",
- "protocol": "UDP",
- "source": "111.112.113.114/32",
- "source_port": 0,
- "destination": "0.0.0.0/0",
- "destination_port": 0
}, - {
- "action": "Deny",
- "direction": "Out",
- "protocol": "TCP",
- "source": "111.112.113.114/32",
- "source_port": 0,
- "destination": "0.0.0.0/0",
- "destination_port": 0
}, - {
- "action": "Allow",
- "direction": "Out",
- "protocol": "UDP",
- "source": "111.112.113.114/32",
- "source_port": 53,
- "destination": "0.0.0.0/0",
- "destination_port": 53
}
]
}
{- "task_id": "lt17499"
}
Returns a list of NAT rules of one edge gateway
gateway_id required | string ID of the gateway the NAT rules list of which you want to get |
{- "nat_rules": [
- {
- "type": "SNAT",
- "protocol": "TCP",
- "source": "0.0.0.0/0",
- "destination": "45.14.48.220/32",
- "destination_port": 80,
- "translated": "45.14.48.210",
- "translated_port": 443
}, - {
- "type": "BINAT",
- "protocol": "TCP",
- "source": "192.168.0.3/32",
- "destination": "0.0.0.0/0",
- "destination_port": 0,
- "translated": "45.14.48.210",
- "translated_port": 0
}, - {
- "type": "DNAT",
- "protocol": "TCP",
- "source": "0.0.0.0/0",
- "destination": "45.14.48.210/32",
- "destination_port": 80,
- "translated": "192.168.0.5",
- "translated_port": 8080
}
]
}
Changes the NAT rule set of the edge gateway. The request body passes an array of rules that will be applied to this gateway. The method deletes existing rules and creates passed rules. It is possible to pass an empty list to delete all rules
gateway_id required | string The ID of the edge gateway for which you want to change the NAT rule set |
Array of objects List of NAT rules |
{- "nat_rules": [
- {
- "type": "SNAT",
- "protocol": "TCP",
- "source": "0.0.0.0/0",
- "destination": "45.14.48.220/32",
- "destination_port": 80,
- "translated": "45.14.48.210",
- "translated_port": 443
}, - {
- "type": "BINAT",
- "protocol": "TCP",
- "source": "192.168.0.3/32",
- "destination": "0.0.0.0/0",
- "destination_port": 0,
- "translated": "45.14.48.210",
- "translated_port": 0
}, - {
- "type": "DNAT",
- "protocol": "TCP",
- "source": "0.0.0.0/0",
- "destination": "45.14.48.210/32",
- "destination_port": 80,
- "translated": "192.168.0.5",
- "translated_port": 8080
}
]
}
{- "task_id": "lt17499"
}
Connects isolated network to the gateway. Returns the task ID
gateway_id required | string ID of the gateway to which you want to connect the isolated network |
network_id required | string Isolated network ID to be connected to the gateway |
{- "network_id": "l1n218"
}
{- "task_id": "lt65000"
}
Manage domains and DNS records. Domain names can be used in URL requests with or without the zero-level (root level).
{- "domains": [
- {
- "name": "example.net.",
- "is_delegated": false,
- "records": [
- {
- "id": 7183,
- "name": "www.example.net.",
- "type": "A",
- "ip": "93.184.216.34",
- "ttl": "1h"
}, - {
- "id": 7179,
- "name": "example.net.",
- "type": "A",
- "ip": "93.184.216.34",
- "ttl": "1h"
}, - {
- "id": 7180,
- "name": "example.net.",
- "type": "AAAA",
- "ip": "2606:2800:220:1:248:1893:25c8:1946",
- "ttl": "1h"
}, - {
- "id": 7184,
- "name": "www.example.net.",
- "type": "AAAA",
- "ip": "2606:2800:220:1:248:1893:25c8:1946",
- "ttl": "1h"
}, - {
- "id": 7196,
- "name": "mx.example.net.",
- "type": "MX",
- "mail_host": "mail.example.net.",
- "priority": 80,
- "ttl": "30s"
}, - {
- "id": 7177,
- "name": "example.net.",
- "type": "NS",
- "name_server_host": "ns01.serverspace.com.tr.",
- "ttl": "1h"
}, - {
- "id": 7178,
- "name": "example.net.",
- "type": "NS",
- "name_server_host": "ns02.serverspace.com.tr.",
- "ttl": "1h"
}, - {
- "id": 7182,
- "name": "example.net.",
- "type": "TXT",
- "text": "5fpl1ghm7scnth0907z0pft8c79lvc8t",
- "ttl": "1h"
}, - {
- "id": 7185,
- "name": "www.example.net.",
- "type": "TXT",
- "text": "v=spf1 -all",
- "ttl": "1h"
}, - {
- "id": 7181,
- "name": "example.net.",
- "type": "TXT",
- "text": "v=spf1 -all",
- "ttl": "1h"
}
]
}, - {
- "name": "example.org.",
- "is_delegated": false,
- "records": [
- {
- "id": 7189,
- "name": "example.org.",
- "type": "A",
- "ip": "93.184.216.34",
- "ttl": "1h"
}, - {
- "id": 7193,
- "name": "www.example.org.",
- "type": "A",
- "ip": "93.184.216.34",
- "ttl": "1h"
}, - {
- "id": 7190,
- "name": "example.org.",
- "type": "AAAA",
- "ip": "2606:2800:220:1:248:1893:25c8:1946",
- "ttl": "1h"
}, - {
- "id": 7192,
- "name": "www.example.org.",
- "type": "AAAA",
- "ip": "2606:2800:220:1:248:1893:25c8:1946",
- "ttl": "1h"
}, - {
- "id": 7188,
- "name": "example.org.",
- "type": "NS",
- "name_server_host": "ns02.serverspace.com.tr.",
- "ttl": "1h"
}, - {
- "id": 7187,
- "name": "example.org.",
- "type": "NS",
- "name_server_host": "ns01.serverspace.com.tr.",
- "ttl": "1h"
}, - {
- "id": 7195,
- "name": "www.example.org.",
- "type": "TXT",
- "text": "29wj71wrbc45pyy8dtwvg4bqf10t5qsq",
- "ttl": "1h"
}, - {
- "id": 7191,
- "name": "example.org.",
- "type": "TXT",
- "text": "v=spf1 -all",
- "ttl": "1h"
}, - {
- "id": 7194,
- "name": "www.example.org.",
- "type": "TXT",
- "text": "v=spf1 -all",
- "ttl": "1h"
}
]
}
]
}
Creates a new domain. Returns a task ID that you can use to track the process of creating a domain, and its domain ID
name required | string Domain name |
migrate_records | boolean Migrate DNS records |
{- "name": "example.com",
- "migrate_records": true
}
{- "task_id": "dns3895"
}
Returns the details of a domain name
domain_name required | string Domain name you want to get details on |
{- "domain": {
- "name": "example.net.",
- "is_delegated": false,
- "records": [
- {
- "id": 7183,
- "name": "www.example.net.",
- "type": "A",
- "ip": "93.184.216.34",
- "ttl": "1h"
}, - {
- "id": 7179,
- "name": "example.net.",
- "type": "A",
- "ip": "93.184.216.34",
- "ttl": "1h"
}, - {
- "id": 7180,
- "name": "example.net.",
- "type": "AAAA",
- "ip": "2606:2800:220:1:248:1893:25c8:1946",
- "ttl": "1h"
}, - {
- "id": 7184,
- "name": "www.example.net.",
- "type": "AAAA",
- "ip": "2606:2800:220:1:248:1893:25c8:1946",
- "ttl": "1h"
}, - {
- "id": 7196,
- "name": "mx.example.net.",
- "type": "MX",
- "mail_host": "mail.example.net.",
- "priority": 80,
- "ttl": "30s"
}, - {
- "id": 7177,
- "name": "example.net.",
- "type": "NS",
- "name_server_host": "ns01.serverspace.com.tr.",
- "ttl": "1h"
}, - {
- "id": 7178,
- "name": "example.net.",
- "type": "NS",
- "name_server_host": "ns02.serverspace.com.tr.",
- "ttl": "1h"
}, - {
- "id": 7182,
- "name": "example.net.",
- "type": "TXT",
- "text": "5fpl1ghm7scnth0907z0pft8c79lvc8t",
- "ttl": "1h"
}, - {
- "id": 7185,
- "name": "www.example.net.",
- "type": "TXT",
- "text": "v=spf1 -all",
- "ttl": "1h"
}, - {
- "id": 7181,
- "name": "example.net.",
- "type": "TXT",
- "text": "v=spf1 -all",
- "ttl": "1h"
}
]
}
}
Returns a list of records from one domain
domain_name required | string Domain name you want to get records on |
{- "records": [
- {
- "id": 7183,
- "name": "www.example.net.",
- "type": "A",
- "ip": "93.184.216.34",
- "ttl": "1h"
}, - {
- "id": 7179,
- "name": "example.net.",
- "type": "A",
- "ip": "93.184.216.34",
- "ttl": "1h"
}, - {
- "id": 7180,
- "name": "example.net.",
- "type": "AAAA",
- "ip": "2606:2800:220:1:248:1893:25c8:1946",
- "ttl": "1h"
}, - {
- "id": 7184,
- "name": "www.example.net.",
- "type": "AAAA",
- "ip": "2606:2800:220:1:248:1893:25c8:1946",
- "ttl": "1h"
}, - {
- "id": 7196,
- "name": "mx.example.net.",
- "type": "MX",
- "mail_host": "mail.example.net.",
- "priority": 80,
- "ttl": "30s"
}, - {
- "id": 7177,
- "name": "example.net.",
- "type": "NS",
- "name_server_host": "ns01.serverspace.com.tr.",
- "ttl": "1h"
}, - {
- "id": 7178,
- "name": "example.net.",
- "type": "NS",
- "name_server_host": "ns02.serverspace.com.tr.",
- "ttl": "1h"
}, - {
- "id": 7182,
- "name": "example.net.",
- "type": "TXT",
- "text": "5fpl1ghm7scnth0907z0pft8c79lvc8t",
- "ttl": "1h"
}, - {
- "id": 7185,
- "name": "www.example.net.",
- "type": "TXT",
- "text": "v=spf1 -all",
- "ttl": "1h"
}, - {
- "id": 7181,
- "name": "example.net.",
- "type": "TXT",
- "text": "v=spf1 -all",
- "ttl": "1h"
}
]
}
Creates a new record. Returns a task ID that you can use to track the process of creating a record, and its record ID
domain_name required | string Domain name for which you want to create a record |
name required | string Domain name |
type | string Enum: "A" "AAAA" "MX" "CNAME" "NS" "TXT" "SRV" Record type |
ip | string IP address, used for A and AAAA records |
mail_host | string Mail server, used for MX records |
priority | integer <int32> Record priority, used for MX and SRV records. The priority must be a number between 0 and 65535 |
canonical_name | string Canonical name, used for CNAME records |
name_server_host | string Domain name of a host, used for NS records |
text | string Text, used for TXT records |
protocol | string Enum: "TCP" "UDP" "TLS" Protocol, used for SRV record |
service | string Service name, used for SRV records |
weight | integer <int32> Record weight, used for SRV records |
port | integer <int32> Port, used for SRV records |
target | string The canonical name of the machine providing the service, used for the SRV records |
ttl | string Enum: "1s" "5s" "30s" "1m" "5m" "10m" "15m" "30m" "1h" "2h" "6h" "12h" "1d" Record TTL |
{- "name": "a.example.org.",
- "type": "A",
- "ip": "93.184.216.38",
- "ttl": "2h"
}
{- "task_id": "dns3895"
}
Returns a one domain record
domain_name required | string Domain name you want to get a record on |
record_id required | string Record ID you want to get details on |
{- "record": {
- "id": 7183,
- "name": "www.example.net.",
- "type": "A",
- "ip": "93.184.216.34",
- "ttl": "1h"
}
}
Updates an existing record, as a result, the task ID is returned, by which you can track the process of updating the record and its ID
domain_name required | string Domain name you wand to update record |
record_id required | string Record ID you want to update |
name | string Domain name |
type | string Enum: "A" "AAAA" "MX" "CNAME" "NS" "TXT" "SRV" Record type |
ip | string IP address, used for A and AAAA records |
mail_host | string Mail server, used for MX records |
priority | integer <int32> Record priority, used for MX and SRV records. The priority must be a number between 0 and 65535 |
canonical_name | string Canonical name, used for CNAME records |
name_server_host | string Domain name of a host, used for NS records |
text | string Text, used for TXT records |
protocol | string Enum: "TCP" "UDP" "TLS" Protocol, used for SRV record |
service | string Service name, used for SRV records |
weight | integer <int32> Record weight, used for SRV records |
port | integer <int32> Port, used for SRV records |
target | string The canonical name of the machine providing the service, used for the SRV records |
ttl | string Enum: "1s" "5s" "30s" "1m" "5m" "10m" "15m" "30m" "1h" "2h" "6h" "12h" "1d" Record TTL |
{- "name": "a.example.org.",
- "type": "A",
- "ip": "93.184.216.38",
- "ttl": "2h"
}
{- "task_id": "dns3895"
}