Public API (v1.0.0)

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.

Authentication

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.br/

Facilities

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

Projects

Get information about project

Detailing

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

Responses

Response samples

Content type
application/json
{
  • "project": {
    }
}

SSH keys

Work with SSH Keys

List

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

Responses

Response samples

Content type
application/json
{
  • "ssh_keys": [
    ]
}

Create new

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

Request Body schema: application/json

Supported formats OpenSSH and SSH2

name
required
string

Key name

public_key
required
string

Key code

Responses

Request samples

Content type
application/json
{
  • "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 ----"
}

Response samples

Content type
application/json
{
  • "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 ----"
}

Get by ID

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

path Parameters
ssh_key_id
required
integer <int32>

ID of the SSH key that you need to get information about

Responses

Response samples

Content type
application/json
{
  • "ssh_key": {
    }
}

Delete

Removes an SSH key

path Parameters
ssh_key_id
required
integer <int32>

ID of the SSH key to be removed

Responses

Tasks

Get task information

Task

Returns information about the task, the ID of the entity the action is performed on, and data about its completion

path Parameters
task_id
required
string

The ID of the task that you need to get information on

Responses

Response samples

Content type
application/json
Example
{
  • "task": {
    }
}

Server metadata

Get metadata information

List of locations

Returns a list of locations where server and network creation is available, as well as the data on minimum and maximum volume sizes

Responses

Response samples

Content type
application/json
{
  • "locations": [
    ]
}

List of images

Returns a list of available images

Responses

Response samples

Content type
application/json
{
  • "images": [
    ]
}

List of applications

Returns the list of applications available for installation on the servers

query Parameters
location_id
string

Location name, allows you to filter available applications by location

Responses

Response samples

Content type
application/json
{
  • "applications": [
    ]
}

Servers

Get information about servers

List

Returns a list of project servers

Responses

Response samples

Content type
application/json
{
  • "servers": [
    ]
}

Create

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

Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "value": {
    }
}

Response samples

Content type
application/json
{
  • "task_id": "lt17499"
}

Get by ID

Returns the details of a server

path Parameters
server_id
required
string

ID of the server you want to get details on

Responses

Response samples

Content type
application/json
{
  • "server": {
    }
}

Edit

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

path Parameters
server_id
required
string

ID of the server to be changed

Request Body schema: application/json
cpu
required
integer <int32>

New number of cores

ram_mb
required
integer <int32>

New amount of RAM in MB

Responses

Request samples

Content type
application/json
{
  • "cpu": 4,
  • "ram_mb": 4096
}

Response samples

Content type
application/json
{
  • "task_id": "lt17499"
}

Edit

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

path Parameters
server_id
required
string

ID of the server to be changed

Request Body schema: application/json
cpu
integer <int32>

New number of cores

ram_mb
integer <int32>

New amount of RAM in MB

Responses

Request samples

Content type
application/json
Example
{
  • "cpu": 4
}

Response samples

Content type
application/json
{
  • "task_id": "lt17499"
}

Delete

Deletes a server

path Parameters
server_id
required
string

ID of the server to be deleted

Responses

Edit name

Changes the server name. Returns a task that you can use to track the process of changing the server and its server ID

path Parameters
server_id
required
string

ID of the server to be changed

Request Body schema: application/json
name
required
string

New server name

Responses

Request samples

Content type
application/json
{
  • "name": "Rename"
}

Response samples

Content type
application/json
{
  • "task_id": "lt17499"
}

Create tag

Adds a new tag to the server. Tag is the text marker up to 32 symbols in length; any symbols except spaces can be used

path Parameters
server_id
required
string

ID of server you want to create the tag for

Request Body schema: application/json
value
required
string

Tag name. Tag is the text marker up to 32 symbols in length; any symbols except spaces can be used

Responses

Request samples

Content type
application/json
{
  • "value": "MyTag"
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

Delete tag

Removes one server tag

path Parameters
server_id
required
string

ID of the server that owns the tag

tag
required
string

Name of the tag to be deleted

Responses

Get price

Returns the monthly price of the server with the specified configuration. The resource accepts the same model that is required when creating the server

Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "location_id": "am2",
  • "image_id": "CentOS-8.3-X64",
  • "cpu": 1,
  • "ram_mb": 1024,
  • "volumes": [
    ],
  • "networks": [
    ]
}

Response samples

Content type
application/json
{
  • "price": 3011.4
}

Server power

Manage server power

Power on

Turns on the server power. Returns a task ID

path Parameters
server_id
required
string

ID of the server to be enabled

Responses

Response samples

Content type
application/json
{
  • "task_id": "lt17499"
}

Shut down via operating system

Shuts down a server via operating system. Returns a task ID

path Parameters
server_id
required
string

ID of the server to be shut down

Responses

Response samples

Content type
application/json
{
  • "task_id": "lt17499"
}

Shut down via power off

Shuts down a server via power off. Returns a task ID

path Parameters
server_id
required
string

ID of the server to be shut down

Responses

Response samples

Content type
application/json
{
  • "task_id": "lt17499"
}

Soft Reboot

Soft reboots a server. Returns a task ID

path Parameters
server_id
required
string

ID of the server to be rebooted

Responses

Response samples

Content type
application/json
{
  • "task_id": "lt17499"
}

Hard Reboot

Hard reboots a server. Returns a task ID

path Parameters
server_id
required
string

ID of the server to be rebooted

Responses

Response samples

Content type
application/json
{
  • "task_id": "lt17499"
}

Volumes

Get information about volumes

List

Returns a list of system and additional SSD volumes that could be used to increase available storage space for the server

path Parameters
server_id
required
string

ID of the server that you want to get a list of volumes for

Responses

Response samples

Content type
application/json
{
  • "volumes": [
    ]
}

Create

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

path Parameters
server_id
required
string

ID of the server that you want to create a volume for

Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "name": "Volume 1",
  • "size_mb": 10240
}

Response samples

Content type
application/json
{
  • "task_id": "lt17499"
}

Get by ID

Returns the granularity of one volume. Additional SSD volumes are used to increase the available storage space for a server

path Parameters
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

Responses

Response samples

Content type
application/json
{
  • "volume": {
    }
}

Edit

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

path Parameters
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

Request Body schema: application/json

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

Responses

Request samples

Content type
application/json
Example
{
  • "size_mb": 20480
}

Response samples

Content type
application/json
{
  • "task_id": "lt17499"
}

Delete

Removes one volume

path Parameters
server_id
required
string

ID of the server that you want to delete the volume from

volume_id
required
integer <int32>

ID of volume to be deleted

Responses

Snapshots

Get information about snapshots

List

Returns a list of server snapshots

path Parameters
server_id
required
string

ID of the server that you want to get the list of snapshots from

Responses

Response samples

Content type
application/json
{
  • "snapshots": [
    ]
}

Create

Creates a snapshot of the server and returns a task ID

path Parameters
server_id
required
string

ID of the server to take a snapshot of

Request Body schema: application/json
name
string

Snapshot name

Responses

Request samples

Content type
application/json
{
  • "name": "snapshot-example"
}

Response samples

Content type
application/json
{
  • "task_id": "lt17499"
}

Get by ID

Returns the details of one snapshot

path Parameters
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

Responses

Response samples

Content type
application/json
{
  • "snapshot": {
    }
}

Delete

Deletes a server snapshot

path Parameters
server_id
required
string

ID of the server that owns the snapshot

snapshot_id
required
integer <int32>

ID of the snapshot to be deleted

Responses

Rollback to snapshot

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!

path Parameters
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

Responses

Response samples

Content type
application/json
{
  • "task_id": "lt17499"
}

Affinity groups

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

List

Returns a list of Affinity and Anti-Affinity groups

Responses

Response samples

Content type
application/json
{
  • "affinity-groups": [
    ]
}

Create

Creates a new Affinity or Anti-Affinity group

Request Body schema: application/json
name
required
string

Group name

location_id
required
string

Location ID

affinity
required
boolean

Group type Affinity or Anti-Affinity

Responses

Request samples

Content type
application/json
{
  • "name": "affinity-group",
  • "location_id": "am2",
  • "affinity": true
}

Response samples

Content type
application/json
{
  • "affinity_group": {
    }
}

Get by ID

Returns a detail of a group

path Parameters
affinity-group_id
required
string

ID of the group you want to get details on

Responses

Response samples

Content type
application/json
{
  • "affinity-groups": [
    ]
}

Delete

Deletes Affinity or Anti-Affinity group

path Parameters
affinity-group_id
required
string

ID of the group to be deleted

Responses

Network interfaces

Get information about network interfaces

List

Returns a list of server network interfaces

path Parameters
server_id
required
string

ID of the server that you want to get a list of network interfaces for

Responses

Response samples

Content type
application/json
{
  • "nics": [
    ]
}

Create

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

path Parameters
server_id
required
string

ID of the server to connect to the network

Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
Example
{
  • "network_id": "l7n343",
  • "ip_address": "192.168.0.23"
}

Response samples

Content type
application/json
{
  • "task_id": "lt17499"
}

Get by ID

Returns the details of a network interface

path Parameters
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

Responses

Response samples

Content type
application/json
{
  • "nic": {
    }
}

Edit

Changes the bandwidth of the interface channel for the public shared network

path Parameters
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

Request Body schema: application/json

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

Responses

Request samples

Content type
application/json
{
  • "bandwidth_mbps": 150
}

Response samples

Content type
application/json
{
  • "task_id": "lt17499"
}

Delete

Removes a network interface (disconnects the server from the network)

path Parameters
server_id
required
string

ID of the server that you want to remove the network interface from

nic_id
required
integer <int32>

ID of the network interface to be removed

Responses

Isolated networks

Get information about isolated networks

List

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

Responses

Response samples

Content type
application/json
{
  • "isolated_networks": [
    ]
}

Create

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

Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "location_id": "am2",
  • "name": "example-network",
  • "description": "description",
  • "network_prefix": "192.168.0.0",
  • "mask": 24
}

Response samples

Content type
application/json
{
  • "task_id": "l1t11871"
}

Get by ID

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

path Parameters
network_id
required
string

ID of the isolated network that you want to get details for

Responses

Response samples

Content type
application/json
{
  • "isolated_network": {
    }
}

Edit

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

path Parameters
network_id
required
string

ID of the isolated network to be changed

Request Body schema: application/json
name
string

New name of isolated network

description
string

New description of isolated network

Responses

Request samples

Content type
application/json
{
  • "name": "Network 1",
  • "description": "Description of Network 1"
}

Response samples

Content type
application/json
{
  • "isolated_network": {
    }
}

Delete

Deletes an isolated network

path Parameters
network_id
required
string

ID of the isolated network to be removed

Responses

Create tag

Adds a new tag to the isolated network. Tag is the text marker up to 32 symbols in length; any symbols except spaces can be used

path Parameters
network_id
required
string

ID of isolated network you want to create the tag for

Request Body schema: application/json
value
required
string

Tag name. Tag is the text marker up to 32 symbols in length; any symbols except spaces can be used

Responses

Request samples

Content type
application/json
{
  • "value": "MyTag"
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

Delete tag

Removes one isolated network tag

path Parameters
network_id
required
string

ID of the server that owns the tag

tag
required
string

Name of the tag to be deleted

Responses

Gateways

Get information about edge gateways

List

Returns a list of project gateways

Responses

Response samples

Content type
application/json
{
  • "gateways": [
    ]
}

Create

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

Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "location_id": "am2",
  • "name": "api-example",
  • "bandwidth_mbps": 60,
  • "network_ids": [
    ]
}

Response samples

Content type
application/json
{
  • "task_id": "lt17499"
}

Get by ID

Returns the details of an edge gateway

path Parameters
gateway_id
required
string

ID of the edge gateway you want to get details on

Responses

Response samples

Content type
application/json
{
  • "gateway": {
    }
}

Edit

Changes the edge gateway name

path Parameters
gateway_id
required
string

ID of the edge gateway to be changed

Request Body schema: application/json
name
required
string

New name of edge gateway

Responses

Request samples

Content type
application/json
{
  • "name": "Rename"
}

Response samples

Content type
application/json
{
  • "gateway": {
    }
}

Delete

Deletes an edge gateway

path Parameters
gateway_id
required
string

ID of the edge gateway to be removed

Responses

Edit bandwidth

Changes the bandwidth of the public interface channel for the edge gateway

path Parameters
gateway_id
required
string

The ID of the edge gateway which bandwidth you need to change

Request Body schema: application/json
bandwidth_mbps
integer <int32>

New public network interface bandwidth. Interface bandwidth in Mbps, the bandwidth value must be a multiple of 10 Mbps

Responses

Request samples

Content type
application/json
{
  • "bandwidth_mbps": 100
}

Response samples

Content type
application/json
{
  • "task_id": "lt17499"
}

Stop gateway

Stopped the gateway. Returns a task ID

path Parameters
gateway_id
required
string

ID of the edge gateway you want to stop

Responses

Response samples

Content type
application/json
{
  • "task_id": "l1t90073"
}

Start gateway

Started the gateway. Returns a task ID

path Parameters
gateway_id
required
string

ID of the edge gateway you want to start

Responses

Response samples

Content type
application/json
{
  • "task_id": "l1t90074"
}

Restart gateway

Restarted the gateway. Returns a task ID

path Parameters
gateway_id
required
string

ID of the edge gateway you want to restart

Responses

Response samples

Content type
application/json
{
  • "task_id": "l1t90075"
}

Get list of Firewall rules

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

path Parameters
gateway_id
required
string

The gateway ID of the edge gateway for which you want to get the list of Firewall rules

Responses

Response samples

Content type
application/json
{
  • "firewall_rules": [
    ]
}

Change Firewall rules

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

path Parameters
gateway_id
required
string

The ID of the edge gateway for which you want to change the Firewall rule set

Request Body schema: application/json
Array of objects

List of Firewall rules

Responses

Request samples

Content type
application/json
{
  • "firewall_rules": [
    ]
}

Response samples

Content type
application/json
{
  • "task_id": "lt17499"
}

Returns a list of NAT rules

Returns a list of NAT rules of one edge gateway

path Parameters
gateway_id
required
string

ID of the gateway the NAT rules list of which you want to get

Responses

Response samples

Content type
application/json
{
  • "nat_rules": [
    ]
}

Change NAT rules

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

path Parameters
gateway_id
required
string

The ID of the edge gateway for which you want to change the NAT rule set

Request Body schema: application/json
Array of objects

List of NAT rules

Responses

Request samples

Content type
application/json
{
  • "nat_rules": [
    ]
}

Response samples

Content type
application/json
{
  • "task_id": "lt17499"
}

Connect network

Connects isolated network to the gateway. Returns the task ID

path Parameters
gateway_id
required
string

ID of the gateway to which you want to connect the isolated network

Request Body schema: application/json
network_id
required
string

Isolated network ID to be connected to the gateway

Responses

Request samples

Content type
application/json
{
  • "network_id": "l1n218"
}

Response samples

Content type
application/json
{
  • "task_id": "lt65000"
}

Disconnect network

Disconnects isolated network from the gateway

path Parameters
gateway_id
required
string

ID of the gateway for which you want to disconnect the isolated network

nic_id
required
string

Gateway network interface ID to be disconnected from the gateway

Responses

Create tag

Adds a new tag to the gateway. Tag is the text marker up to 32 symbols in length; any symbols except spaces can be used

path Parameters
gateway_id
required
string

ID of gateway you want to create the tag for

Request Body schema: application/json
value
required
string

Tag name. Tag is the text marker up to 32 symbols in length; any symbols except spaces can be used

Responses

Request samples

Content type
application/json
{
  • "value": "MyTag"
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

Delete tag

Removes one gateway tag

path Parameters
gateway_id
required
string

ID of the gateway that owns the tag

tag
required
string

Name of the tag to be deleted

Responses

DNS

Manage domains and DNS records. Domain names can be used in URL requests with or without the zero-level (root level).

Domain names list

Returns a list of project domain names

Responses

Response samples

Content type
application/json
{
  • "domains": [
    ]
}

Create domain

Creates a new domain. Returns a task ID that you can use to track the process of creating a domain, and its domain ID

Request Body schema: application/json
name
required
string

Domain name

migrate_records
boolean

Migrate DNS records

Responses

Request samples

Content type
application/json
{
  • "name": "example.com",
  • "migrate_records": true
}

Response samples

Content type
application/json
{
  • "task_id": "dns3895"
}

Get domain by name

Returns the details of a domain name

path Parameters
domain_name
required
string

Domain name you want to get details on

Responses

Response samples

Content type
application/json
{
  • "domain": {
    }
}

Delete domain

Deletes a one domain name

path Parameters
domain_name
required
string

Domain name to be deleted

Responses

List of domain records

Returns a list of records from one domain

path Parameters
domain_name
required
string

Domain name you want to get records on

Responses

Response samples

Content type
application/json
{
  • "records": [
    ]
}

Create record

Creates a new record. Returns a task ID that you can use to track the process of creating a record, and its record ID

path Parameters
domain_name
required
string

Domain name for which you want to create a record

Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
Example
{
  • "name": "a.example.org.",
  • "type": "A",
  • "ip": "93.184.216.38",
  • "ttl": "2h"
}

Response samples

Content type
application/json
{
  • "task_id": "dns3895"
}

Get domain record

Returns a one domain record

path Parameters
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

Responses

Response samples

Content type
application/json
Example
{
  • "record": {
    }
}

Update record

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

path Parameters
domain_name
required
string

Domain name you wand to update record

record_id
required
string

Record ID you want to update

Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
Example
{
  • "name": "a.example.org.",
  • "type": "A",
  • "ip": "93.184.216.38",
  • "ttl": "2h"
}

Response samples

Content type
application/json
{
  • "task_id": "dns3895"
}

Delete record

Deletes a record

path Parameters
domain_name
required
string

Domain name, the record for which must be deleted

record_id
required
string

Record ID you want to delete

Responses