Files
2026-03-15 22:23:54 +01:00

10181 lines
354 KiB
JSON
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"openapi": "3.0.1",
"info": {
"title": "Public API",
"description": "Serverspace Public API is a public API for interacting with [Serverspace](https://serverspace.io) 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.\n\n# Authentication\n 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](https://my.serverspace.io/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.\n \n To work with the public API, the key value must be passed with all requests in the `X-API-KEY` header, for example:\n ```\n -H \"X-API-KEY: lmGwbvllpIqIrKROOCLgE5Z941MKP5EYfbkgwtqJZGigfXUTpuYRpNQkCqShmm6r\"\n ```\n All API requests must be made over HTTPS. Requests made over plain HTTP will fail. API requests without authentication will also fail.\n\n Endpoint:\n ```\n https://api.serverspace.io/\n ```\n# Facilities \n \n Below are the objects that can be manipulated using the public API and how they relate to the services in the control panel.\n \n Service | Object | Actions\n----------------|-------------|-------------|\nCloud servers | OS image | View available operating systems for creating servers and networks\nCloud servers | Configuration | View available configurations for creating servers and networks\nCloud servers | Location | View available locations for creating servers and networks\nCloud servers | Server | Create a server <br> View details <br> Manage power <br> Change configuration <br> Delete a server\nCloud servers | Volume | Create a volume <br> View details <br> Resize a volume <br> Delete a volume\nCloud servers | Snapshot | Create a snapshot <br> View details <br> Return the server to a snapshot <br> Delete a snapshot\nCloud servers | Affinity groups | Create group <br> View Details <br> Delete group\nCloud servers | Private network | Create a private network <br> View details <br> Change configuration <br> Delete a private network\nCloud servers | Network interface | Connect the server to the network (create a network interface) <br> View details <br> Disconnect the server from the network (remove the network interface)\nCloud servers | Gateway | Create an edge gateway <br> View details <br> Manage Firewall and NAT rules <br> Connecting and disconnecting the isolated network <br> Delete a gateway\nProject | SSH key | Create an SSH key <br> View details <br> Delete an SSH key\nProject | Project | View project details\nProject | Task | View details\nDNS | Domain name | Create a domain name <br> View details <br> Delete a domain name\nDNS | DNS-record | Create a DNS-record <br> View details <br> Update a DNS-record <br> Delete a DNS-record\n",
"termsOfService": "https://serverspace.io/conditions/terms-of-service/",
"contact": {
"email": "support@serverspace.io"
},
"x-logo": {
"url": "https://static.serverspace.io/logos/logo.svg",
"altText": "Serverspace",
"href": "https://serverspace.io"
},
"version": "v1.0.0"
},
"servers": [
{
"url": "https://api.serverspace.io/"
}
],
"tags": [
{
"name": "Projects",
"description": "Get information about project"
},
{
"name": "SSH keys",
"description": "Work with SSH Keys"
},
{
"name": "Tasks",
"description": "Get task information"
},
{
"name": "Server metadata",
"description": "Get metadata information"
},
{
"name": "Servers",
"description": "Get information about servers"
},
{
"name": "Server power",
"description": "Manage server power"
},
{
"name": "Volumes",
"description": "Get information about volumes"
},
{
"name": "Snapshots",
"description": "Get information about snapshots"
},
{
"name": "Affinity groups",
"description": "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"
},
{
"name": "Network interfaces",
"description": "Get information about network interfaces"
},
{
"name": "Isolated networks",
"description": "Get information about isolated networks"
},
{
"name": "Gateways",
"description": "Get information about edge gateways"
},
{
"name": "DNS",
"description": "Manage domains and DNS records. Domain names can be used in URL requests with or without the zero-level (root level)."
}
],
"paths": {
"/api/v1/project": {
"get": {
"tags": [
"Projects"
],
"summary": "Detailing",
"description": "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": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/project"
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
}
}
}
},
"/api/v1/tasks/{task_id}": {
"get": {
"tags": [
"Tasks"
],
"summary": "Task",
"description": "Returns information about the task, the ID of the entity the action is performed on, and data about its completion",
"operationId": "vstack_get_task",
"parameters": [
{
"name": "task_id",
"in": "path",
"description": "The ID of the task that you need to get information on",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/vstack_task"
},
"examples": {
"server": {
"value": {
"task": {
"id": "lt17499",
"server_id": "l1s2274",
"created": "2020-10-28T13:41:48.7754873Z",
"completed": "2020-10-28T13:42:13.0265233Z",
"is_completed": "Completed"
}
}
},
"dns": {
"value": {
"task": {
"id": "dns3696",
"domain_id": "example.org.",
"record_id": 7189,
"created": "2021-03-24T12:13:03.948931Z",
"completed": "2021-03-24T12:13:05.393743Z",
"is_completed": "Completed"
}
}
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Task not found"
}
}
}
},
"/api/v1/locations": {
"get": {
"tags": [
"Server metadata"
],
"summary": "List of locations",
"description": "Returns a list of locations where server and network creation is available, as well as the data on minimum and maximum volume sizes",
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/location"
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
}
}
}
},
"/api/v1/ssh-keys": {
"get": {
"tags": [
"SSH keys"
],
"summary": "List",
"description": "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": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ssh_key"
},
"example": {
"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"
}
]
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
}
}
},
"post": {
"tags": [
"SSH keys"
],
"summary": "Create new",
"description": "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",
"requestBody": {
"description": "Supported formats OpenSSH and SSH2",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Key name"
},
"public_key": {
"type": "string",
"description": "Key code"
}
},
"required": [
"name",
"public_key"
],
"example": {
"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 ----"
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32",
"description": "SSH key ID"
},
"name": {
"type": "string",
"description": "Key name"
},
"public_key": {
"type": "string",
"description": "Key code"
}
}
},
"example": {
"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 ----"
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"description": "Error code"
},
"message": {
"type": "string",
"description": "Error message"
},
"error_params": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Parameter information"
},
"value": {
"type": "object",
"description": "Value"
}
},
"description": "Additional error information"
}
}
}
}
}
},
"example": {
"errors": [
{
"code": -19000,
"message": "Bad request"
}
]
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
}
}
}
},
"/api/v1/ssh-keys/{ssh_key_id}": {
"get": {
"tags": [
"SSH keys"
],
"summary": "Get by ID",
"description": "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",
"parameters": [
{
"name": "ssh_key_id",
"in": "path",
"description": "ID of the SSH key that you need to get information about",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ssh_key": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32",
"description": "SSH key ID"
},
"name": {
"type": "string",
"description": "Key name"
},
"public_key": {
"type": "string",
"description": "Key code"
}
}
}
}
},
"example": {
"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 ----"
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "SSH key not found"
}
}
},
"delete": {
"tags": [
"SSH keys"
],
"summary": "Delete",
"description": "Removes an SSH key",
"parameters": [
{
"name": "ssh_key_id",
"in": "path",
"description": "ID of the SSH key to be removed",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "Successful execution"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "SSH key not found"
}
}
}
},
"/api/v1/servers/{server_id}/volumes": {
"get": {
"tags": [
"Volumes"
],
"summary": "List",
"description": "Returns a list of system and additional SSD volumes that could be used to increase available storage space for the server",
"parameters": [
{
"name": "server_id",
"in": "path",
"description": "ID of the server that you want to get a list of volumes for",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/volume"
},
"example": {
"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"
}
]
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Server not found"
}
}
},
"post": {
"tags": [
"Volumes"
],
"summary": "Create",
"description": "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",
"parameters": [
{
"name": "server_id",
"in": "path",
"description": "ID of the server that you want to create a volume for",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Volume name"
},
"size_mb": {
"type": "integer",
"format": "int32",
"description": "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"
}
},
"required": [
"name",
"size_mb"
],
"example": {
"name": "Volume 1",
"size_mb": 10240
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"task_id": {
"type": "string",
"description": "Task ID"
}
},
"example": {
"task_id": "lt17499"
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"description": "Error code"
},
"message": {
"type": "string",
"description": "Error message"
},
"error_params": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Parameter information"
},
"value": {
"type": "object",
"description": "Value"
}
},
"description": "Additional error information"
}
}
}
}
}
},
"example": {
"errors": [
{
"code": -19006,
"message": "The drive is too small"
}
]
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Server not found"
}
}
}
},
"/api/v1/servers/{server_id}/volumes/{volume_id}": {
"get": {
"tags": [
"Volumes"
],
"summary": "Get by ID",
"description": "Returns the granularity of one volume. Additional SSD volumes are used to increase the available storage space for a server",
"parameters": [
{
"name": "server_id",
"in": "path",
"description": "ID of the server you want to get volume details for",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "volume_id",
"in": "path",
"description": "ID of the volume that you want to get details for",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"volume": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32",
"description": "Volume ID"
},
"server_id": {
"type": "string",
"description": "Server ID to which the volume is connected"
},
"name": {
"type": "string",
"description": "Volume name"
},
"size_mb": {
"type": "integer",
"format": "int32",
"description": "Volume space in MB"
},
"created": {
"type": "string",
"format": "date-time",
"description": "Volume creation date"
}
}
}
}
},
"example": {
"volume": {
"id": 2799,
"server_id": "l1s2272",
"name": "boot",
"size_mb": 51200,
"created": "2020-10-28T12:10:47.213843"
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Server or volume not found"
}
}
},
"put": {
"tags": [
"Volumes"
],
"summary": "Edit",
"description": "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",
"parameters": [
{
"name": "server_id",
"in": "path",
"description": "ID of the server that you want to resize the volume on",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "volume_id",
"in": "path",
"description": "ID of the volume to be changed",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"requestBody": {
"description": "The volume size must be specified in MB. The minimum and maximum volume size can be found in the location details. The volume cant be shrunk, only increased",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Volume name"
},
"size_mb": {
"type": "integer",
"format": "int32",
"description": "Volume size in MB, volume size must be a multiple of 10 GB"
}
},
"required": [
"size_mb"
]
},
"examples": {
"only_size": {
"value": {
"size_mb": 20480
}
},
"full": {
"value": {
"name": "renamed",
"size_mb": 20480
}
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"task_id": {
"type": "string",
"description": "Task ID"
}
},
"example": {
"task_id": "lt17499"
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"description": "Error code"
},
"message": {
"type": "string",
"description": "Error message"
},
"error_params": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Parameter information"
},
"value": {
"type": "object",
"description": "Value"
}
},
"description": "Additional error information"
}
}
}
}
}
},
"example": {
"errors": [
{
"code": -19006,
"message": "The drive is too small"
}
]
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Server or volume not found"
}
}
},
"delete": {
"tags": [
"Volumes"
],
"summary": "Delete",
"description": "Removes one volume",
"parameters": [
{
"name": "server_id",
"in": "path",
"description": "ID of the server that you want to delete the volume from",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "volume_id",
"in": "path",
"description": "ID of volume to be deleted",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "Successful execution"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Server or volume not found"
}
}
}
},
"/api/v1/images": {
"get": {
"tags": [
"Server metadata"
],
"summary": "List of images",
"description": "Returns a list of available images",
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/images"
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
}
}
}
},
"/api/v1/servers/{server_id}/nics": {
"get": {
"tags": [
"Network interfaces"
],
"summary": "List",
"description": "Returns a list of server network interfaces",
"parameters": [
{
"name": "server_id",
"in": "path",
"description": "ID of the server that you want to get a list of network interfaces for",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/vm_nic"
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Server not found"
}
}
},
"post": {
"tags": [
"Network interfaces"
],
"summary": "Create",
"description": "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",
"parameters": [
{
"name": "server_id",
"in": "path",
"description": "ID of the server to connect to the network",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"network_id": {
"type": "string",
"description": "ID of the isolated network the server should be connected to"
},
"ip_address": {
"type": "string",
"description": "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": {
"type": "integer",
"format": "int32",
"description": "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"
}
}
},
"examples": {
"Isolated Network": {
"value": {
"network_id": "l7n343",
"ip_address": "192.168.0.23"
}
},
"Public Network": {
"value": {
"bandwidth_mbps": 60
}
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"task_id": {
"type": "string",
"description": "Task ID"
}
},
"example": {
"task_id": "lt17499"
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"description": "Error code"
},
"message": {
"type": "string",
"description": "Error message"
},
"error_params": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Parameter information"
},
"value": {
"type": "object",
"description": "Value"
}
},
"description": "Additional error information"
}
}
}
}
}
},
"example": {
"errors": [
{
"code": -19000,
"message": "Bad request"
}
]
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Server not found"
}
}
}
},
"/api/v1/servers/{server_id}/nics/{nic_id}": {
"get": {
"tags": [
"Network interfaces"
],
"summary": "Get by ID",
"description": "Returns the details of a network interface",
"parameters": [
{
"name": "server_id",
"in": "path",
"description": "ID of the server that you want to get the network interface details for",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "nic_id",
"in": "path",
"description": "ID of the network interface that you want to get the details of",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"nic": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32",
"description": "Network interface ID"
},
"server_id": {
"type": "string",
"description": "Server ID to which the network interface is connected"
},
"network_id": {
"type": "string",
"description": "Network ID"
},
"mac": {
"type": "string",
"description": "Network interface MAC address"
},
"ip_address": {
"type": "string",
"description": "Network interface IP address"
},
"mask": {
"type": "integer",
"format": "int32",
"description": "Net mask"
},
"gateway": {
"type": "string",
"description": "Network gateway"
},
"bandwidth_mbps": {
"type": "integer",
"format": "int32",
"description": "Channel width"
}
}
}
}
},
"example": {
"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
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Server or network interface not found"
}
}
},
"put": {
"tags": [
"Network interfaces"
],
"summary": "Edit",
"description": "Changes the bandwidth of the interface channel for the public shared network",
"parameters": [
{
"name": "server_id",
"in": "path",
"description": "The ID of the server for which you want to change the network interface bandwidth",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "nic_id",
"in": "path",
"description": "The ID of the network interface which bandwidth you need to change",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"requestBody": {
"description": "You can change only the bandwidth of the interface connected to the public shared network",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"bandwidth_mbps": {
"type": "integer",
"format": "int32",
"description": "Public network interface bandwidth. Interface bandwidth in Mbps, the bandwidth value must be a multiple of 10 Mbps"
}
},
"example": {
"bandwidth_mbps": 150
}
}
}
},
"required": true
},
"responses": {
"201": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"task_id": {
"type": "string",
"description": "Task ID"
}
},
"example": {
"task_id": "lt17499"
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"description": "Error code"
},
"message": {
"type": "string",
"description": "Error message"
},
"error_params": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Parameter information"
},
"value": {
"type": "object",
"description": "Value"
}
},
"description": "Additional error information"
}
}
}
}
}
},
"example": {
"errors": [
{
"code": -19000,
"message": "Bad request"
}
]
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Server or network interface not found"
}
}
},
"delete": {
"tags": [
"Network interfaces"
],
"summary": "Delete",
"description": "Removes a network interface (disconnects the server from the network)",
"parameters": [
{
"name": "server_id",
"in": "path",
"description": "ID of the server that you want to remove the network interface from",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "nic_id",
"in": "path",
"description": "ID of the network interface to be removed",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "Successful execution"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Server or network interface not found"
}
}
}
},
"/api/v1/networks/isolated": {
"get": {
"tags": [
"Isolated networks"
],
"summary": "List",
"description": "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": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/private_network"
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
}
}
},
"post": {
"tags": [
"Isolated networks"
],
"summary": "Create",
"description": "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",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"location_id": {
"type": "string",
"description": "ID of the location to create a network in"
},
"name": {
"type": "string",
"description": "Network name"
},
"description": {
"type": "string",
"description": "Network description"
},
"network_prefix": {
"type": "string",
"description": "Network address"
},
"mask": {
"type": "integer",
"format": "int32",
"description": "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 29 inclusive"
}
},
"required": [
"location_id",
"name"
],
"example": {
"location_id": "am2",
"name": "example-network",
"description": "description",
"network_prefix": "192.168.0.0",
"mask": 24
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"task_id": {
"type": "string",
"description": "Task ID"
}
},
"example": {
"task_id": "l1t11871"
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"description": "Error code"
},
"message": {
"type": "string",
"description": "Error message"
},
"error_params": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Parameter information"
},
"value": {
"type": "object",
"description": "Value"
}
},
"description": "Additional error information"
}
}
}
}
}
},
"example": {
"errors": [
{
"code": -19039,
"message": "Location not found"
}
]
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
}
}
}
},
"/api/v1/networks/isolated/{network_id}": {
"get": {
"tags": [
"Isolated networks"
],
"summary": "Get by ID",
"description": "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",
"parameters": [
{
"name": "network_id",
"in": "path",
"description": "ID of the isolated network that you want to get details for",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"isolated_network": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Isolated network ID"
},
"location_id": {
"type": "string",
"description": "ID of the location in which the isolated network is located"
},
"name": {
"type": "string",
"description": "Name of isolated network"
},
"description": {
"type": "string",
"description": "Description of isolated network"
},
"network_prefix": {
"type": "string",
"description": "Isolated network address"
},
"mask": {
"type": "integer",
"format": "int32",
"description": "The subnet mask defines the unchanged part of the address and affects the capacity of the network (the number of available addresses). It is indicated 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 256 available (254 work) addresses. Available range of masks from 18 to 24 inclusive"
},
"server_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of server IDs connected to the network"
},
"gateway_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of gateway IDs connected to the network"
},
"state": {
"type": "string",
"enum": [
"Active",
"Busy"
],
"description": "Isolated network state"
},
"created": {
"type": "string",
"format": "date-time",
"description": "Isolated network creation date"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of isolated network tags"
}
}
}
},
"example": {
"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"
]
}
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Network not found"
}
}
},
"put": {
"tags": [
"Isolated networks"
],
"summary": "Edit",
"description": "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",
"parameters": [
{
"name": "network_id",
"in": "path",
"description": "ID of the isolated network to be changed",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "New name of isolated network"
},
"description": {
"type": "string",
"description": "New description of isolated network"
}
},
"example": {
"name": "Network 1",
"description": "Description of Network 1"
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"isolated_network": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Isolated network ID"
},
"location_id": {
"type": "string",
"description": "ID of the location in which the isolated network is located"
},
"name": {
"type": "string",
"description": "Name of isolated network"
},
"description": {
"type": "string",
"description": "Description of isolated network"
},
"network_prefix": {
"type": "string",
"description": "Isolated network address"
},
"mask": {
"type": "integer",
"format": "int32",
"description": "Net mask"
},
"server_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of server IDs connected to the network"
},
"gateway_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of gateway IDs connected to the network"
},
"state": {
"type": "string",
"enum": [
"Active",
"Busy"
],
"description": "Isolated network state"
},
"created": {
"type": "string",
"format": "date-time",
"description": "Isolated network creation date"
}
}
}
},
"example": {
"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"
}
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"description": "Error code"
},
"message": {
"type": "string",
"description": "Error message"
},
"error_params": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Parameter information"
},
"value": {
"type": "object",
"description": "Value"
}
},
"description": "Additional error information"
}
}
}
}
}
},
"example": {
"errors": [
{
"code": -19016,
"message": "You must specify the network name"
}
]
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Network not found"
}
}
},
"delete": {
"tags": [
"Isolated networks"
],
"summary": "Delete",
"description": "Deletes an isolated network",
"parameters": [
{
"name": "network_id",
"in": "path",
"description": "ID of the isolated network to be removed",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful execution"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Network not found"
}
}
}
},
"/api/v1/servers": {
"get": {
"tags": [
"Servers"
],
"summary": "List",
"description": "Returns a list of project servers",
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/server"
},
"example": {
"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"
}
]
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
}
}
},
"post": {
"tags": [
"Servers"
],
"summary": "Create",
"description": "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",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"location_id": {
"type": "string",
"description": "Location ID"
},
"image_id": {
"type": "string",
"description": "Image ID"
},
"cpu": {
"type": "integer",
"format": "int32",
"description": "Number of cores"
},
"ram_mb": {
"type": "integer",
"format": "int32",
"description": "The amount of RAM in MB"
},
"volumes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Volume name. You must specify \"boot\" as the name of the boot volume, such a volume must be in one copy. The rest of the volumes can have arbitrary names"
},
"size_mb": {
"type": "integer",
"format": "int32",
"description": "Volume space in MB, volume size must be a multiple of 10 GB"
}
}
}
},
"networks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"bandwidth_mbps": {
"type": "integer",
"format": "int32",
"description": "Interface bandwidth in Mbps, the bandwidth value must be a multiple of 10 Mbps. To connect to a public network, you only need to specify the interface bandwidth. If no interface is specified, then will be created one public interface with the minimum allowable bandwidth"
},
"network_id": {
"type": "string",
"description": "ID of the isolated network the server should be connected to. To connect to an isolated network, you should specify only its identifier"
},
"ip_address": {
"type": "string",
"description": "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"
}
}
}
},
"name": {
"type": "string",
"description": "Server name"
},
"ssh_key_ids": {
"type": "array",
"items": {
"type": "integer",
"format": "int32"
},
"description": "SSH key ID, if no SSH key is specified, then authentication by login and password will be available for the server"
},
"application_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of applications to be installed on the server. If the application_ids field specified, the server_init_script field ignored"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of tags that will be assigned to the server. You can keep the list empty"
},
"affinity_group_id": {
"type": "string",
"description": "Affinity group ID"
},
"server_init_script": {
"type": "string",
"description": "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"
}
},
"required": [
"location_id",
"image_id",
"cpu",
"ram_mb",
"volumes",
"name"
],
"example": {
"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"
}
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"task_id": {
"type": "string",
"description": "Task ID"
}
},
"example": {
"task_id": "lt17499"
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"description": "Error code"
},
"message": {
"type": "string",
"description": "Error message"
},
"error_params": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Parameter information"
},
"value": {
"type": "object",
"description": "Value"
}
},
"description": "Additional error information"
}
}
}
}
}
},
"example": {
"errors": [
{
"code": -19006,
"message": "The drive is too small",
"error_params": [
{
"name": "LineNumber",
"value": 1
}
]
},
{
"code": -19041,
"message": "System drive not found"
}
]
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"description": "Error code"
},
"message": {
"type": "string",
"description": "Error message"
},
"error_params": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Parameter information"
},
"value": {
"type": "object",
"description": "Value"
}
},
"description": "Additional error information"
}
}
}
}
}
},
"example": {
"errors": [
{
"code": -19047,
"message": "The limit of servers has been reached"
}
]
}
}
}
}
}
}
}
},
"/api/v1/servers/{server_id}": {
"get": {
"tags": [
"Servers"
],
"summary": "Get by ID",
"description": "Returns the details of a server",
"parameters": [
{
"name": "server_id",
"in": "path",
"description": "ID of the server you want to get details on",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"server": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"location_id": {
"type": "string",
"description": "Location ID where the server is located"
},
"cpu": {
"type": "integer",
"format": "int32",
"description": "Number of server cores"
},
"ram_mb": {
"type": "integer",
"format": "int32",
"description": "The amount of RAM in MB"
},
"volumes": {
"type": "array",
"description": "A list of volumes for the server",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32",
"description": "Volume ID"
},
"name": {
"type": "string",
"description": "Volume name"
},
"size_mb": {
"type": "integer",
"format": "int32",
"description": "Volume space in MB"
},
"created": {
"type": "string",
"format": "date-time",
"description": "Volume creation date"
}
}
}
},
"nics": {
"type": "array",
"description": "A list of server network interfaces",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32",
"description": "Network interface ID"
},
"network_id": {
"type": "string",
"description": "Network ID"
},
"network_type": {
"type": "string",
"enum": [
"PublicShared",
"Isolated"
],
"description": "Network interface type"
},
"mac": {
"type": "string",
"description": "Network interface MAC address"
},
"ip_address": {
"type": "string",
"description": "Network interface IP address"
},
"mask": {
"type": "integer",
"format": "int32",
"description": "Net mask"
},
"gateway": {
"type": "string",
"description": "Network gateway"
},
"bandwidth_mbps": {
"type": "integer",
"format": "int32",
"description": "Channel width"
}
}
}
},
"image_id": {
"type": "string",
"description": "Image ID of server"
},
"is_power_on": {
"type": "boolean",
"description": "Server power status"
},
"name": {
"type": "string",
"description": "Server name"
},
"login": {
"type": "string",
"description": "Login to connect to the server"
},
"password": {
"type": "string",
"description": "Password to connect to the server"
},
"ssh_key_ids": {
"type": "array",
"items": {
"type": "integer",
"format": "int32"
},
"description": "List of SSH key ID to connect to the server"
},
"state": {
"type": "string",
"enum": [
"New",
"Active",
"Busy",
"Blocked"
],
"description": "Server state"
},
"created": {
"type": "string",
"format": "date-time",
"description": "Server creation date"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of server tags"
},
"application_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of applications selected when creating the server"
},
"affinity_group_id": {
"type": "string",
"description": "Affinity group ID"
}
}
}
}
},
"example": {
"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"
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Server not found"
}
}
},
"put": {
"tags": [
"Servers"
],
"summary": "Edit",
"description": "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",
"parameters": [
{
"name": "server_id",
"in": "path",
"description": "ID of the server to be changed",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"cpu": {
"type": "integer",
"format": "int32",
"description": "New number of cores"
},
"ram_mb": {
"type": "integer",
"format": "int32",
"description": "New amount of RAM in MB"
}
},
"required": [
"cpu",
"ram_mb"
],
"example": {
"cpu": 4,
"ram_mb": 4096
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"task_id": {
"type": "string",
"description": "Task ID"
}
},
"example": {
"task_id": "lt17499"
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"description": "Error code"
},
"message": {
"type": "string",
"description": "Error message"
},
"error_params": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Parameter information"
},
"value": {
"type": "object",
"description": "Value"
}
},
"description": "Additional error information"
}
}
}
}
}
},
"example": {
"errors": [
{
"code": -19034,
"message": "Configuration not supported"
}
]
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Server not found"
}
}
},
"patch": {
"tags": [
"Servers"
],
"summary": "Edit",
"description": "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",
"parameters": [
{
"name": "server_id",
"in": "path",
"description": "ID of the server to be changed",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"cpu": {
"type": "integer",
"format": "int32",
"description": "New number of cores"
},
"ram_mb": {
"type": "integer",
"format": "int32",
"description": "New amount of RAM in MB"
}
}
},
"examples": {
"CPU": {
"value": {
"cpu": 4
}
},
"RAM": {
"value": {
"ram_mb": 4096
}
},
"CPU and RAM": {
"value": {
"cpu": 4,
"ram_mb": 4096
}
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"task_id": {
"type": "string",
"description": "Task ID"
}
},
"example": {
"task_id": "lt17499"
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"description": "Error code"
},
"message": {
"type": "string",
"description": "Error message"
},
"error_params": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Parameter information"
},
"value": {
"type": "object",
"description": "Value"
}
},
"description": "Additional error information"
}
}
}
}
}
},
"example": {
"errors": [
{
"code": -19034,
"message": "Configuration not supported"
}
]
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Server not found"
}
}
},
"delete": {
"tags": [
"Servers"
],
"summary": "Delete",
"description": "Deletes a server",
"parameters": [
{
"name": "server_id",
"in": "path",
"description": "ID of the server to be deleted",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful execution"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Server not found"
}
}
}
},
"/api/v1/servers/{server_id}/name": {
"put": {
"tags": [
"Servers"
],
"summary": "Edit name",
"description": "Changes the server name. Returns a task that you can use to track the process of changing the server and its server ID",
"parameters": [
{
"name": "server_id",
"in": "path",
"description": "ID of the server to be changed",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "New server name"
}
},
"required": [
"name"
],
"example": {
"name": "Rename"
}
}
}
}
},
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"task_id": {
"type": "string",
"description": "Task ID"
}
},
"example": {
"task_id": "lt17499"
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"description": "Error code"
},
"message": {
"type": "string",
"description": "Error message"
},
"error_params": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Parameter information"
},
"value": {
"type": "object",
"description": "Value"
}
},
"description": "Additional error information"
}
}
}
}
}
},
"example": {
"errors": [
{
"code": -19034,
"message": "The server name can contain letters of the Latin alphabet, numbers, hyphens and periods. It cannot start with a dot or contain two or more dots in a row"
}
]
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Server not found"
}
}
}
},
"/api/v1/servers/{server_id}/power/on": {
"post": {
"tags": [
"Server power"
],
"summary": "Power on",
"description": "Turns on the server power. Returns a task ID",
"parameters": [
{
"name": "server_id",
"in": "path",
"description": "ID of the server to be enabled",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"task_id": {
"type": "string",
"description": "Task ID"
}
},
"example": {
"task_id": "lt17499"
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"description": "Error code"
},
"message": {
"type": "string",
"description": "Error message"
},
"error_params": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Parameter information"
},
"value": {
"type": "object",
"description": "Value"
}
},
"description": "Additional error information"
}
}
}
}
}
},
"example": {
"errors": [
{
"code": -19000,
"message": "Bad request"
}
]
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Server not found"
}
}
}
},
"/api/v1/servers/{server_id}/power/off": {
"post": {
"tags": [
"Server power"
],
"summary": "Shut down via operating system",
"description": "Shuts down a server via operating system. Returns a task ID",
"parameters": [
{
"name": "server_id",
"in": "path",
"description": "ID of the server to be shut down",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"task_id": {
"type": "string",
"description": "Task ID"
}
},
"example": {
"task_id": "lt17499"
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"description": "Error code"
},
"message": {
"type": "string",
"description": "Error message"
},
"error_params": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Parameter information"
},
"value": {
"type": "object",
"description": "Value"
}
},
"description": "Additional error information"
}
}
}
}
}
},
"example": {
"errors": [
{
"code": -19000,
"message": "Bad request"
}
]
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Server not found"
}
}
}
},
"/api/v1/servers/{server_id}/power/shutdown": {
"post": {
"tags": [
"Server power"
],
"summary": "Shut down via power off",
"description": "Shuts down a server via power off. Returns a task ID",
"parameters": [
{
"name": "server_id",
"in": "path",
"description": "ID of the server to be shut down",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"task_id": {
"type": "string",
"description": "Task ID"
}
},
"example": {
"task_id": "lt17499"
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"description": "Error code"
},
"message": {
"type": "string",
"description": "Error message"
},
"error_params": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Parameter information"
},
"value": {
"type": "object",
"description": "Value"
}
},
"description": "Additional error information"
}
}
}
}
}
},
"example": {
"errors": [
{
"code": -19000,
"message": "Bad request"
}
]
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Server not found"
}
}
}
},
"/api/v1/servers/{server_id}/power/reboot": {
"post": {
"tags": [
"Server power"
],
"summary": "Soft Reboot",
"description": "Soft reboots a server. Returns a task ID",
"parameters": [
{
"name": "server_id",
"in": "path",
"description": "ID of the server to be rebooted",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"task_id": {
"type": "string",
"description": "Task ID"
}
},
"example": {
"task_id": "lt17499"
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"description": "Error code"
},
"message": {
"type": "string",
"description": "Error message"
},
"error_params": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Parameter information"
},
"value": {
"type": "object",
"description": "Value"
}
},
"description": "Additional error information"
}
}
}
}
}
},
"example": {
"errors": [
{
"code": -19000,
"message": "Bad request"
}
]
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Server not found"
}
}
}
},
"/api/v1/servers/{server_id}/power/reset": {
"post": {
"tags": [
"Server power"
],
"summary": "Hard Reboot",
"description": "Hard reboots a server. Returns a task ID",
"parameters": [
{
"name": "server_id",
"in": "path",
"description": "ID of the server to be rebooted",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"task_id": {
"type": "string",
"description": "Task ID"
}
},
"example": {
"task_id": "lt17499"
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"description": "Error code"
},
"message": {
"type": "string",
"description": "Error message"
},
"error_params": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Parameter information"
},
"value": {
"type": "object",
"description": "Value"
}
},
"description": "Additional error information"
}
}
}
}
}
},
"example": {
"errors": [
{
"code": -19000,
"message": "Bad request"
}
]
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Server not found"
}
}
}
},
"/api/v1/servers/{server_id}/snapshots": {
"get": {
"tags": [
"Snapshots"
],
"summary": "List",
"description": "Returns a list of server snapshots",
"parameters": [
{
"name": "server_id",
"in": "path",
"description": "ID of the server that you want to get the list of snapshots from",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/snapshot"
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Server not found"
}
}
},
"post": {
"tags": [
"Snapshots"
],
"summary": "Create",
"description": "Creates a snapshot of the server and returns a task ID",
"parameters": [
{
"name": "server_id",
"in": "path",
"description": "ID of the server to take a snapshot of",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Snapshot name"
}
},
"example": {
"name": "snapshot-example"
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"task_id": {
"type": "string",
"description": "Task ID"
}
},
"example": {
"task_id": "lt17499"
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"description": "Error code"
},
"message": {
"type": "string",
"description": "Error message"
},
"error_params": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Parameter information"
},
"value": {
"type": "object",
"description": "Value"
}
},
"description": "Additional error information"
}
}
}
}
}
},
"example": {
"errors": [
{
"code": -19032,
"message": "You must specify the snapshot name"
}
]
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Server not found"
}
}
}
},
"/api/v1/servers/{server_id}/snapshots/{snapshot_id}": {
"get": {
"tags": [
"Snapshots"
],
"summary": "Get by ID",
"description": "Returns the details of one snapshot",
"parameters": [
{
"name": "server_id",
"in": "path",
"description": "ID of server you want to get the details of the snapshot for",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "snapshot_id",
"in": "path",
"description": "ID of the snapshot you want to get details for",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"snapshot": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32",
"description": "Snapshot ID"
},
"server_id": {
"type": "string",
"description": "Server ID that owns the snapshot"
},
"name": {
"type": "string",
"description": "Snapshot name"
},
"size_mb": {
"type": "integer",
"format": "int32",
"description": "Snapshot size in MB"
},
"created": {
"type": "string",
"format": "date-time",
"description": "Snapshot creation date"
}
}
}
}
},
"example": {
"snapshot": {
"id": 55,
"server_id": "l1s2276",
"name": "snapshot-1",
"size_mb": 216,
"created": "2020-10-28T17:05:55.625218Z"
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Server or snapshot not found"
}
}
},
"delete": {
"tags": [
"Snapshots"
],
"summary": "Delete",
"description": "Deletes a server snapshot",
"parameters": [
{
"name": "server_id",
"in": "path",
"description": "ID of the server that owns the snapshot",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "snapshot_id",
"in": "path",
"description": "ID of the snapshot to be deleted",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "Successful execution"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Server or snapshot not found"
}
}
}
},
"/api/v1/servers/{server_id}/snapshots/{snapshot_id}/rollback": {
"post": {
"tags": [
"Snapshots"
],
"summary": "Rollback to snapshot",
"description": "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!",
"parameters": [
{
"name": "server_id",
"in": "path",
"description": "ID of server to be rolled back to the snapshot",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "snapshot_id",
"in": "path",
"description": "ID of the snapshot to return to",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"task_id": {
"type": "string",
"description": "Task ID"
}
},
"example": {
"task_id": "lt17499"
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"description": "Error code"
},
"message": {
"type": "string",
"description": "Error message"
},
"error_params": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Parameter information"
},
"value": {
"type": "object",
"description": "Value"
}
},
"description": "Additional error information"
}
}
}
}
}
},
"example": {
"errors": [
{
"code": -19000,
"message": "Bad request"
}
]
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Server or snapshot not found"
}
}
}
},
"/api/v1/affinity-groups": {
"get": {
"tags": [
"Affinity groups"
],
"summary": "List",
"description": "Returns a list of Affinity and Anti-Affinity groups",
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"affinity_groups": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Group ID"
},
"location_id": {
"type": "string",
"description": "Location ID"
},
"name": {
"type": "string",
"description": "Group name"
},
"affinity": {
"type": "boolean",
"description": "Group type Affinity or Anti-Affinity"
},
"server_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of server IDs in the group"
}
}
}
},
"example": {
"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"
]
}
]
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Group not found"
}
}
},
"post": {
"tags": [
"Affinity groups"
],
"summary": "Create",
"description": "Creates a new Affinity or Anti-Affinity group",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Group name"
},
"location_id": {
"type": "string",
"description": "Location ID"
},
"affinity": {
"type": "boolean",
"description": "Group type Affinity or Anti-Affinity"
}
},
"required": [
"name",
"location_id",
"affinity"
],
"example": {
"name": "affinity-group",
"location_id": "am2",
"affinity": true
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"affinity_group": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Group ID"
},
"location_id": {
"type": "string",
"description": "Location ID"
},
"name": {
"type": "string",
"description": "Group name"
},
"affinity": {
"type": "boolean",
"description": "Group type Affinity or Anti-Affinity"
},
"server_ids": {
"type": "array",
"items": {
"type": "integer",
"format": "int32"
},
"description": "List of server IDs in the group"
}
}
}
},
"example": {
"affinity_group": {
"id": "l1g12",
"location_id": "am2",
"name": "anti-affinity",
"affinity": false,
"server_ids": [
"l1s2406",
"l1s2408"
]
}
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"description": "Error code"
},
"message": {
"type": "string",
"description": "Error message"
},
"error_params": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Parameter information"
},
"value": {
"type": "object",
"description": "Value"
}
},
"description": "Additional error information"
}
}
}
}
}
},
"example": {
"errors": [
{
"code": -19200,
"message": "The group limit is exceeded",
"error_params": [
{
"name": "Limit",
"value": 5
}
]
},
{
"code": -19210,
"message": "Fill in the name of the group"
}
]
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
}
}
}
},
"/api/v1/affinity-groups/{affinity-group_id}": {
"get": {
"tags": [
"Affinity groups"
],
"summary": "Get by ID",
"description": "Returns a detail of a group",
"parameters": [
{
"name": "affinity-group_id",
"in": "path",
"description": "ID of the group you want to get details on",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"affinity_groups": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Group ID"
},
"location_id": {
"type": "string",
"description": "Location ID"
},
"name": {
"type": "string",
"description": "Group name"
},
"affinity": {
"type": "boolean",
"description": "Group type Affinity or Anti-Affinity"
},
"server_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of server IDs in the group"
}
}
}
},
"example": {
"affinity-groups": [
{
"id": "l1g11",
"location_id": "am2",
"name": "affinity-group",
"affinity": true,
"server_ids": [
"l1s2401",
"l1s2402"
]
}
]
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Group not found"
}
}
},
"delete": {
"tags": [
"Affinity groups"
],
"summary": "Delete",
"description": "Deletes Affinity or Anti-Affinity group",
"parameters": [
{
"name": "affinity-group_id",
"in": "path",
"description": "ID of the group to be deleted",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful execution"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Group not found"
}
}
}
},
"/api/v1/servers/{server_id}/tags": {
"post": {
"tags": [
"Servers"
],
"summary": "Create tag",
"description": "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",
"parameters": [
{
"name": "server_id",
"in": "path",
"description": "ID of server you want to create the tag for",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"value": {
"type": "string",
"description": "Tag name. Tag is the text marker up to 32 symbols in length; any symbols except spaces can be used"
}
},
"required": [
"value"
],
"example": {
"value": "MyTag"
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful execution"
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"description": "Error code"
},
"message": {
"type": "string",
"description": "Error message"
},
"error_params": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Parameter information"
},
"value": {
"type": "object",
"description": "Value"
}
},
"description": "Additional error information"
}
}
}
}
}
},
"example": {
"errors": [
{
"code": -16034,
"message": "The tag has not to contain spaces"
}
]
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Server not found"
}
}
}
},
"/api/v1/servers/{server_id}/tags/{tag}": {
"delete": {
"tags": [
"Servers"
],
"summary": "Delete tag",
"description": "Removes one server tag",
"parameters": [
{
"name": "server_id",
"in": "path",
"description": "ID of the server that owns the tag",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "tag",
"in": "path",
"description": "Name of the tag to be deleted",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful execution"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Server or tag not found"
}
}
}
},
"/api/v1/networks/isolated/{network_id}/tags": {
"post": {
"tags": [
"Isolated networks"
],
"summary": "Create tag",
"description": "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",
"parameters": [
{
"name": "network_id",
"in": "path",
"description": "ID of isolated network you want to create the tag for",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"value": {
"type": "string",
"description": "Tag name. Tag is the text marker up to 32 symbols in length; any symbols except spaces can be used"
}
},
"required": [
"value"
],
"example": {
"value": "MyTag"
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful execution"
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"description": "Error code"
},
"message": {
"type": "string",
"description": "Error message"
},
"error_params": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Parameter information"
},
"value": {
"type": "object",
"description": "Value"
}
},
"description": "Additional error information"
}
}
}
}
}
},
"example": {
"errors": [
{
"code": -16034,
"message": "The tag has not to contain spaces"
}
]
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Isolated network not found"
}
}
}
},
"/api/v1/networks/isolated/{network_id}/tags/{tag}": {
"delete": {
"tags": [
"Isolated networks"
],
"summary": "Delete tag",
"description": "Removes one isolated network tag",
"parameters": [
{
"name": "network_id",
"in": "path",
"description": "ID of the server that owns the tag",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "tag",
"in": "path",
"description": "Name of the tag to be deleted",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful execution"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Server or snapshot not found"
}
}
}
},
"/api/v1/servers/price": {
"post": {
"tags": [
"Servers"
],
"summary": "Get price",
"description": "Returns the monthly price of the server with the specified configuration. The resource accepts the same model that is required when creating the server",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"location_id": {
"type": "string",
"description": "Location ID"
},
"image_id": {
"type": "string",
"description": "Image ID"
},
"cpu": {
"type": "integer",
"format": "int32",
"description": "Number of cores"
},
"ram_mb": {
"type": "integer",
"format": "int32",
"description": "The amount of RAM in MB"
},
"volumes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Volume name. You must specify \"boot\" as the name of the boot volume, such a volume must be in one copy. The rest of the volumes can have arbitrary names"
},
"size_mb": {
"type": "integer",
"format": "int32",
"description": "Volume space in MB, volume size must be a multiple of 10 GB"
}
}
}
},
"networks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"bandwidth_mbps": {
"type": "integer",
"format": "int32",
"description": "Interface bandwidth in Mbps, the bandwidth value must be a multiple of 10 Mbps. If the interface is not specified, then the price of one public interface with the minimum allowable bandwidth is used for the calculation"
}
}
}
},
"name": {
"type": "string",
"description": "Server name. Optional field, used for compatibility with the server create request"
},
"ssh_key_ids": {
"type": "array",
"items": {
"type": "integer",
"format": "int32"
},
"description": "SSH key ID. Optional field, used for compatibility with the server create request"
}
},
"required": [
"location_id",
"image_id",
"cpu",
"ram_mb",
"volumes"
],
"example": {
"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
}
]
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"price": {
"type": "number",
"format": "double",
"description": "Monthly price of the server with the specified configuration"
}
},
"example": {
"price": 3011.4
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"description": "Error code"
},
"message": {
"type": "string",
"description": "Error message"
},
"error_params": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Parameter information"
},
"value": {
"type": "object",
"description": "Value"
}
},
"description": "Additional error message"
}
}
}
}
}
},
"example": {
"errors": [
{
"code": -19006,
"message": "The drive is too small",
"error_params": [
{
"name": "LineNumber",
"value": 1
}
]
},
{
"code": -19041,
"message": "System drive not found"
}
]
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
}
}
}
},
"/api/v1/domains": {
"get": {
"tags": [
"DNS"
],
"summary": "Domain names list",
"description": "Returns a list of project domain names",
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/domain"
},
"example": {
"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.io.",
"ttl": "1h"
},
{
"id": 7178,
"name": "example.net.",
"type": "NS",
"name_server_host": "ns02.serverspace.io.",
"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.io.",
"ttl": "1h"
},
{
"id": 7187,
"name": "example.org.",
"type": "NS",
"name_server_host": "ns01.serverspace.io.",
"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"
}
]
}
]
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
}
}
},
"post": {
"tags": [
"DNS"
],
"summary": "Create domain",
"description": "Creates a new domain. Returns a task ID that you can use to track the process of creating a domain, and its domain ID",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Domain name"
}
},
"required": [
"name"
],
"example": {
"name": "example.com"
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"task_id": {
"type": "string",
"description": "Task ID"
}
},
"example": {
"task_id": "dns3895"
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"description": "Error code"
},
"message": {
"type": "string",
"description": "Error message"
},
"error_params": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Parameter information"
},
"value": {
"type": "object",
"description": "Value"
}
},
"description": "Additional error information"
}
}
}
}
}
},
"example": {
"errors": [
{
"code": -5548,
"message": "Domain usage prohibited"
}
]
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
}
}
}
},
"/api/v1/domains/{domain_name}": {
"get": {
"tags": [
"DNS"
],
"summary": "Get domain by name",
"description": "Returns the details of a domain name",
"parameters": [
{
"name": "domain_name",
"in": "path",
"description": "Domain name you want to get details on",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"domain": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Domain name"
},
"is_delegated": {
"type": "boolean",
"description": "Domain delegation to serverspace.io DNS servers"
},
"records": {
"type": "array",
"description": "A list of domain records",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32",
"description": "Record ID"
},
"name": {
"type": "string",
"description": "Domain name"
},
"type": {
"type": "string",
"enum": [
"A",
"AAAA",
"MX",
"CNAME",
"NS",
"TXT",
"SRV"
],
"description": "Record type"
},
"ip": {
"type": "string",
"description": "IP address, used for A and AAAA records"
},
"mail_host": {
"type": "string",
"description": "Mail server, used for MX records"
},
"priority": {
"type": "integer",
"format": "int32",
"description": "Record priority, used for MX and SRV records. The priority is a number between 0 and 65535"
},
"canonical_name": {
"type": "string",
"description": "Canonical name, used for CNAME records"
},
"name_server_host": {
"type": "string",
"description": "Domain name of a host, used for NS records"
},
"text": {
"type": "string",
"description": "Text, used for TXT records"
},
"protocol": {
"type": "string",
"enum": [
"TCP",
"UDP",
"TLS"
],
"description": "Protocol, used for SRV record"
},
"service": {
"type": "string",
"description": "Service name, used for SRV records"
},
"weight": {
"type": "integer",
"format": "int32",
"description": "Record weight, used for SRV records"
},
"port": {
"type": "integer",
"format": "int32",
"description": "Port, used for SRV records"
},
"target": {
"type": "string",
"description": "The canonical name of the machine providing the service, used for the SRV records"
},
"ttl": {
"type": "string",
"enum": [
"1s",
"5s",
"30s",
"1m",
"5m",
"10m",
"15m",
"30m",
"1h",
"2h",
"6h",
"12h",
"1d"
],
"description": "Record TTL"
}
}
}
}
}
}
}
},
"example": {
"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.io.",
"ttl": "1h"
},
{
"id": 7178,
"name": "example.net.",
"type": "NS",
"name_server_host": "ns02.serverspace.io.",
"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"
}
]
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Domain name not found"
}
}
},
"delete": {
"tags": [
"DNS"
],
"summary": "Delete domain",
"description": "Deletes a one domain name",
"parameters": [
{
"name": "domain_name",
"in": "path",
"description": "Domain name to be deleted",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful execution"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Domain name not found"
}
}
}
},
"/api/v1/domains/{domain_name}/records": {
"get": {
"tags": [
"DNS"
],
"summary": "List of domain records",
"description": "Returns a list of records from one domain",
"parameters": [
{
"name": "domain_name",
"in": "path",
"description": "Domain name you want to get records on",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"records": {
"type": "array",
"description": "A list of domain records",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32",
"description": "Record ID"
},
"name": {
"type": "string",
"description": "Domain name"
},
"type": {
"type": "string",
"enum": [
"A",
"AAAA",
"MX",
"CNAME",
"NS",
"TXT",
"SRV"
],
"description": "Record type"
},
"ip": {
"type": "string",
"description": "IP address, used for A and AAAA records"
},
"mail_host": {
"type": "string",
"description": "Mail server, used for MX records"
},
"priority": {
"type": "integer",
"format": "int32",
"description": "Record priority, used for MX and SRV records. The priority is a number between 0 and 65535"
},
"canonical_name": {
"type": "string",
"description": "Canonical name, used for CNAME records"
},
"name_server_host": {
"type": "string",
"description": "Domain name of a host, used for NS records"
},
"text": {
"type": "string",
"description": "Text, used for TXT records"
},
"protocol": {
"type": "string",
"enum": [
"TCP",
"UDP",
"TLS"
],
"description": "Protocol, used for SRV record"
},
"service": {
"type": "string",
"description": "Service name, used for SRV records"
},
"weight": {
"type": "integer",
"format": "int32",
"description": "Record weight, used for SRV records"
},
"port": {
"type": "integer",
"format": "int32",
"description": "Port, used for SRV records"
},
"target": {
"type": "string",
"description": "The canonical name of the machine providing the service, used for the SRV records"
},
"ttl": {
"type": "string",
"enum": [
"1s",
"5s",
"30s",
"1m",
"5m",
"10m",
"15m",
"30m",
"1h",
"2h",
"6h",
"12h",
"1d"
],
"description": "Record TTL"
}
}
}
}
}
},
"example": {
"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.io.",
"ttl": "1h"
},
{
"id": 7178,
"name": "example.net.",
"type": "NS",
"name_server_host": "ns02.serverspace.io.",
"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"
}
]
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Domain name not found"
}
}
},
"post": {
"tags": [
"DNS"
],
"summary": "Create record",
"description": "Creates a new record. Returns a task ID that you can use to track the process of creating a record, and its record ID",
"parameters": [
{
"name": "domain_name",
"in": "path",
"description": "Domain name for which you want to create a record",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Domain name"
},
"type": {
"type": "string",
"enum": [
"A",
"AAAA",
"MX",
"CNAME",
"NS",
"TXT",
"SRV"
],
"description": "Record type"
},
"ip": {
"type": "string",
"description": "IP address, used for A and AAAA records"
},
"mail_host": {
"type": "string",
"description": "Mail server, used for MX records"
},
"priority": {
"type": "integer",
"format": "int32",
"description": "Record priority, used for MX and SRV records. The priority must be a number between 0 and 65535"
},
"canonical_name": {
"type": "string",
"description": "Canonical name, used for CNAME records"
},
"name_server_host": {
"type": "string",
"description": "Domain name of a host, used for NS records"
},
"text": {
"type": "string",
"description": "Text, used for TXT records"
},
"protocol": {
"type": "string",
"enum": [
"TCP",
"UDP",
"TLS"
],
"description": "Protocol, used for SRV record"
},
"service": {
"type": "string",
"description": "Service name, used for SRV records"
},
"weight": {
"type": "integer",
"format": "int32",
"description": "Record weight, used for SRV records"
},
"port": {
"type": "integer",
"format": "int32",
"description": "Port, used for SRV records"
},
"target": {
"type": "string",
"description": "The canonical name of the machine providing the service, used for the SRV records"
},
"ttl": {
"type": "string",
"enum": [
"1s",
"5s",
"30s",
"1m",
"5m",
"10m",
"15m",
"30m",
"1h",
"2h",
"6h",
"12h",
"1d"
],
"description": "Record TTL"
}
},
"required": [
"name"
]
},
"examples": {
"A": {
"value": {
"name": "a.example.org.",
"type": "A",
"ip": "93.184.216.38",
"ttl": "2h"
}
},
"AAAA": {
"value": {
"name": "aaaa.example.org.",
"type": "AAAA",
"ip": "2606:2800:220:1:248:1893:25c8:1946",
"ttl": "1h"
}
},
"MX": {
"value": {
"name": "mx.example.org.",
"type": "MX",
"mail_host": "mail.example.org.",
"priority": 30,
"ttl": "30s"
}
},
"CNAME": {
"value": {
"name": "_5f43ede0732aa0aac67e742303cbac3e.example.org.",
"type": "CNAME",
"canonical_name": "ABD7472204F0BCB4C0A4C27A8F38D446.80F8AD62786443AC0136C0BF54669605.t0962963001600948553.comodoca.com.",
"ttl": "1d"
}
},
"NS": {
"value": {
"name": "example.org.",
"type": "NS",
"name_server_host": "ns02.example.com.",
"ttl": "30s"
}
},
"TXT": {
"value": {
"name": "www.example.org.",
"type": "TXT",
"text": "29wj71wrbc45pyy8dtwvg4bqf10t5qsq",
"ttl": "1h"
}
},
"SRV": {
"value": {
"name": "service.example.org.",
"type": "SRV",
"protocol": "udp",
"service": "sip",
"priority": 90,
"weight": 100,
"port": 45,
"target": "host.example.org.",
"ttl": "10m"
}
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"task_id": {
"type": "string",
"description": "Task ID"
}
},
"example": {
"task_id": "dns3895"
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"description": "Error code"
},
"message": {
"type": "string",
"description": "Error message"
},
"error_params": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Parameter information"
},
"value": {
"type": "object",
"description": "Value"
}
},
"description": "Additional error information"
}
}
}
}
}
},
"example": {
"errors": [
{
"code": -5006,
"message": "The record type is invalid or empty"
}
]
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
}
}
}
},
"/api/v1/domains/{domain_name}/records/{record_id}": {
"get": {
"tags": [
"DNS"
],
"summary": "Get domain record",
"description": "Returns a one domain record",
"parameters": [
{
"name": "domain_name",
"in": "path",
"description": "Domain name you want to get a record on",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "record_id",
"in": "path",
"description": "Record ID you want to get details on",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"record": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32",
"description": "Record ID"
},
"name": {
"type": "string",
"description": "Domain name"
},
"type": {
"type": "string",
"enum": [
"A",
"AAAA",
"MX",
"CNAME",
"NS",
"TXT",
"SRV"
],
"description": "Record type"
},
"ip": {
"type": "string",
"description": "IP address, used for A and AAAA records"
},
"mail_host": {
"type": "string",
"description": "Mail server, used for MX records"
},
"priority": {
"type": "integer",
"format": "int32",
"description": "Record priority, used for MX and SRV records. The priority is a number between 0 and 65535"
},
"canonical_name": {
"type": "string",
"description": "Canonical name, used for CNAME records"
},
"name_server_host": {
"type": "string",
"description": "Domain name of a host, used for NS records"
},
"text": {
"type": "string",
"description": "Text, used for TXT records"
},
"protocol": {
"type": "string",
"enum": [
"TCP",
"UDP",
"TLS"
],
"description": "Protocol, used for SRV record"
},
"service": {
"type": "string",
"description": "Service name, used for SRV records"
},
"weight": {
"type": "integer",
"format": "int32",
"description": "Record weight, used for SRV records"
},
"port": {
"type": "integer",
"format": "int32",
"description": "Port, used for SRV records"
},
"target": {
"type": "string",
"description": "The canonical name of the machine providing the service, used for the SRV records"
},
"ttl": {
"type": "string",
"enum": [
"1s",
"5s",
"30s",
"1m",
"5m",
"10m",
"15m",
"30m",
"1h",
"2h",
"6h",
"12h",
"1d"
],
"description": "Record TTL"
}
}
}
}
},
"examples": {
"A": {
"value": {
"record": {
"id": 7183,
"name": "www.example.net.",
"type": "A",
"ip": "93.184.216.34",
"ttl": "1h"
}
}
},
"AAAA": {
"value": {
"record": {
"id": 7180,
"name": "example.net.",
"type": "AAAA",
"ip": "2606:2800:220:1:248:1893:25c8:1946",
"ttl": "1h"
}
}
},
"MX": {
"value": {
"record": {
"id": 7196,
"name": "mx.example.net.",
"type": "MX",
"mail_host": "mail.example.net.",
"priority": 80,
"ttl": "30s"
}
}
},
"CNAME": {
"value": {
"record": {
"id": 7213,
"name": "_5f43ede0732aa0aac67e742303cbac3e.example.net.",
"type": "CNAME",
"canonical_name": "ABD7472204F0BCB4C0A4C27A8F38D446.80F8AD62786443AC0136C0BF54669605.t0962963001600948553.comodoca.com.",
"ttl": "1d"
}
}
},
"NS": {
"value": {
"record": {
"id": 7177,
"name": "example.net.",
"type": "NS",
"name_server_host": "ns01.serverspace.io.",
"ttl": "1h"
}
}
},
"TXT": {
"value": {
"record": {
"id": 7182,
"name": "example.net.",
"type": "TXT",
"text": "5fpl1ghm7scnth0907z0pft8c79lvc8t",
"ttl": "1h"
}
}
},
"SRV": {
"value": {
"record": {
"id": 7215,
"name": "service.example.net.",
"type": "SRV",
"protocol": "udp",
"service": "sip",
"priority": 90,
"weight": 100,
"port": 45,
"target": "host.example.net.",
"ttl": "10m"
}
}
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Domain name not found"
}
}
},
"put": {
"tags": [
"DNS"
],
"summary": "Update record",
"description": "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",
"parameters": [
{
"name": "domain_name",
"in": "path",
"description": "Domain name you wand to update record",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "record_id",
"in": "path",
"description": "Record ID you want to update",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Domain name"
},
"type": {
"type": "string",
"enum": [
"A",
"AAAA",
"MX",
"CNAME",
"NS",
"TXT",
"SRV"
],
"description": "Record type"
},
"ip": {
"type": "string",
"description": "IP address, used for A and AAAA records"
},
"mail_host": {
"type": "string",
"description": "Mail server, used for MX records"
},
"priority": {
"type": "integer",
"format": "int32",
"description": "Record priority, used for MX and SRV records. The priority must be a number between 0 and 65535"
},
"canonical_name": {
"type": "string",
"description": "Canonical name, used for CNAME records"
},
"name_server_host": {
"type": "string",
"description": "Domain name of a host, used for NS records"
},
"text": {
"type": "string",
"description": "Text, used for TXT records"
},
"protocol": {
"type": "string",
"enum": [
"TCP",
"UDP",
"TLS"
],
"description": "Protocol, used for SRV record"
},
"service": {
"type": "string",
"description": "Service name, used for SRV records"
},
"weight": {
"type": "integer",
"format": "int32",
"description": "Record weight, used for SRV records"
},
"port": {
"type": "integer",
"format": "int32",
"description": "Port, used for SRV records"
},
"target": {
"type": "string",
"description": "The canonical name of the machine providing the service, used for the SRV records"
},
"ttl": {
"type": "string",
"enum": [
"1s",
"5s",
"30s",
"1m",
"5m",
"10m",
"15m",
"30m",
"1h",
"2h",
"6h",
"12h",
"1d"
],
"description": "Record TTL"
}
}
},
"examples": {
"A": {
"value": {
"name": "a.example.org.",
"type": "A",
"ip": "93.184.216.38",
"ttl": "2h"
}
},
"AAAA": {
"value": {
"name": "aaaa.example.org.",
"type": "AAAA",
"ip": "2606:2800:220:1:248:1893:25c8:1946",
"ttl": "1h"
}
},
"MX": {
"value": {
"name": "mx.example.org.",
"type": "MX",
"mail_host": "mail.example.org.",
"priority": 30,
"ttl": "30s"
}
},
"CNAME": {
"value": {
"name": "_5f43ede0732aa0aac67e742303cbac3e.example.org.",
"type": "CNAME",
"canonical_name": "ABD7472204F0BCB4C0A4C27A8F38D446.80F8AD62786443AC0136C0BF54669605.t0962963001600948553.comodoca.com.",
"ttl": "1d"
}
},
"NS": {
"value": {
"name": "example.org.",
"type": "NS",
"name_server_host": "ns02.example.com.",
"ttl": "30s"
}
},
"TXT": {
"value": {
"name": "www.example.org.",
"type": "TXT",
"text": "29wj71wrbc45pyy8dtwvg4bqf10t5qsq",
"ttl": "1h"
}
},
"SRV": {
"value": {
"name": "service.example.org.",
"type": "SRV",
"protocol": "udp",
"service": "sip",
"priority": 90,
"weight": 100,
"port": 45,
"target": "host.example.org.",
"ttl": "10m"
}
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"task_id": {
"type": "string",
"description": "Task ID"
}
},
"example": {
"task_id": "dns3895"
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"description": "Error code"
},
"message": {
"type": "string",
"description": "Error message"
},
"error_params": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Parameter information"
},
"value": {
"type": "object",
"description": "Value"
}
},
"description": "Additional error information"
}
}
}
}
}
},
"example": {
"errors": [
{
"code": -5006,
"message": "The record type is invalid or empty"
}
]
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Domain name or record not found"
}
}
},
"delete": {
"tags": [
"DNS"
],
"summary": "Delete record",
"description": "Deletes a record",
"parameters": [
{
"name": "domain_name",
"in": "path",
"description": "Domain name, the record for which must be deleted",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "record_id",
"in": "path",
"description": "Record ID you want to delete",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful execution"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Domain name or record not found"
}
}
}
},
"/api/v1/gateways": {
"get": {
"tags": [
"Gateways"
],
"summary": "List",
"description": "Returns a list of project gateways",
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/edge"
},
"example": {
"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"
]
}
]
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
}
}
},
"post": {
"tags": [
"Gateways"
],
"summary": "Create",
"description": "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",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"location_id": {
"type": "string",
"description": "Location ID"
},
"name": {
"type": "string",
"description": "Gateway name"
},
"bandwidth_mbps": {
"type": "integer",
"format": "int32",
"description": "Public network interface bandwidth. Interface bandwidth in Mbps, the bandwidth value must be a multiple of 10 Mbps"
},
"network_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Isolated network IDs. The maximum number of isolated networks that can be connected to the gateway is 3"
}
},
"required": [
"location_id",
"name",
"bandwidth_mbps",
"network_ids"
],
"example": {
"location_id": "am2",
"name": "api-example",
"bandwidth_mbps": 60,
"network_ids": [
"l1n1497",
"l1n1489"
]
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"task_id": {
"type": "string",
"description": "Task ID"
}
},
"example": {
"task_id": "lt17499"
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"description": "Error code"
},
"message": {
"type": "string",
"description": "Error message"
},
"error_params": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Parameter information"
},
"value": {
"type": "object",
"description": "Value"
}
},
"description": "Additional error information"
}
}
}
}
}
},
"example": {
"errors": [
{
"code": -19113,
"message": "It is necessary to specify the bandwidth of the edge gateway"
}
]
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
}
}
}
},
"/api/v1/gateways/{gateway_id}": {
"get": {
"tags": [
"Gateways"
],
"summary": "Get by ID",
"description": "Returns the details of an edge gateway",
"parameters": [
{
"name": "gateway_id",
"in": "path",
"description": "ID of the edge gateway you want to get details on",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"gateway": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Gateway ID"
},
"location_id": {
"type": "string",
"description": "Location ID where the gateway is located"
},
"name": {
"type": "string",
"description": "Edge gateway name"
},
"nics": {
"type": "array",
"description": "A list of gateway network interfaces",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Gateway network interface ID"
},
"network_id": {
"type": "string",
"description": "Network ID"
},
"ip_address": {
"type": "string",
"description": "Network interface IP address"
},
"bandwidth_mbps": {
"type": "integer",
"format": "int32",
"description": "Channel width"
}
}
}
},
"nat_rules": {
"type": "array",
"description": "List of NAT rules",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"SNAT",
"DNAT",
"BINAT"
],
"description": "Rule type"
},
"protocol": {
"type": "string",
"enum": [
"TCP",
"ICMP",
"UDP",
"IP"
],
"description": "Protocol type"
},
"source": {
"type": "string",
"description": "Source, acceptable values:<br>&bull; IP address in CIDR format, for example \"192.168.0.3/32\"<br>&bull; the network address in CIDR format, for example \"10.0.0.0/24\"<br>&bull; \"0.0.0.0/0\", means any address on the network<br><br>For SNAT, you usually specify a private network address or an IP address of a server on a private network. External networks and IP addresses are typically specified for DNAT. For BINAT, you specify an IP address of a server on a private network"
},
"destination": {
"type": "string",
"description": "Destination, acceptable values:<br>&bull; IP address in CIDR format, for example \"192.168.0.3/32\"<br>&bull; the network address in CIDR format, for example \"10.0.0.0/24\"<br>&bull; \"0.0.0.0/0\", means any address on the network<br><br>For SNAT, you usually specify external networks and IP addresses. For DNAT, destination can be an address of a private network or an IP address of a server on a private network. For BINAT, use an IP address on an external network"
},
"destination_port": {
"type": "string",
"description": "Destination port<br>Acceptable values:<br>&bull; port number in the range 1-65535<br>&bull; 0, means any port"
},
"translated": {
"type": "string",
"description": "The external address of the edge gateway in the network"
},
"translated_port": {
"type": "string",
"description": "Translated port<br>Acceptable values:<br>&bull; port number in the range 1-65535<br>&bull; 0, means any port"
}
}
}
},
"firewall_rules": {
"type": "array",
"description": "List of Firewall 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",
"items": {
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": [
"Deny",
"Allow"
],
"description": "The action to be applied:<br>Allow - allows the transfer of data packets<br>Deny - restricts the transfer of data packet"
},
"direction": {
"type": "string",
"enum": [
"In",
"Out"
],
"description": "Direction for applying the rule:<br>In - the rule is applied for incoming data packets<br>Out - for outgoing ones"
},
"protocol": {
"type": "string",
"enum": [
"TCP",
"ICMP",
"UDP",
"IP"
],
"description": "Protocol type"
},
"source": {
"type": "string",
"description": "Source, acceptable values:<br>&bull; IP address in CIDR format, for example \"192.168.0.3/32\"<br>&bull; the network address in CIDR format, for example \"10.0.0.0/24\"<br>&bull; \"0.0.0.0/0\", means any address on the network"
},
"source_port": {
"type": "integer",
"format": "int32",
"description": "Source port<br>Acceptable values:<br>&bull; port number in the range 1-65535<br>&bull; 0, means any port"
},
"destination": {
"type": "string",
"description": "Destination, acceptable values:<br>&bull; IP address in CIDR format, for example \"192.168.0.3/32\"<br>&bull; the network address in CIDR format, for example \"10.0.0.0/24\"<br>&bull; \"0.0.0.0/0\", means any address on the network"
},
"destination_port": {
"type": "integer",
"format": "int32",
"description": "Destination port<br>Acceptable values:<br>&bull; port number in the range 1-65535<br>&bull; 0, means any port"
}
}
}
},
"state": {
"type": "string",
"enum": [
"New",
"Active",
"Busy",
"Blocked"
],
"description": "Gateway state"
},
"powered_on": {
"type": "boolean",
"description": "Gateway power status"
},
"created": {
"type": "string",
"format": "date-time",
"description": "Gateway creation date"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of gateway tags"
}
}
}
}
},
"example": {
"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"
]
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Gateway not found"
}
}
},
"put": {
"tags": [
"Gateways"
],
"summary": "Edit",
"description": "Changes the edge gateway name",
"parameters": [
{
"name": "gateway_id",
"in": "path",
"description": "ID of the edge gateway to be changed",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "New name of edge gateway"
}
},
"required": [
"name"
],
"example": {
"name": "Rename"
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"gateway": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Gateway ID"
},
"location_id": {
"type": "string",
"description": "Location ID where the gateway is located"
},
"name": {
"type": "string",
"description": "Edge gateway name"
},
"nics": {
"type": "array",
"description": "A list of gateway network interfaces",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Gateway network interface ID"
},
"network_id": {
"type": "string",
"description": "Network ID"
},
"ip_address": {
"type": "string",
"description": "Network interface IP address"
},
"bandwidth_mbps": {
"type": "integer",
"format": "int32",
"description": "Channel width"
}
}
}
},
"nat_rules": {
"type": "array",
"description": "List of NAT rules",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"SNAT",
"DNAT",
"BINAT"
],
"description": "Rule type"
},
"protocol": {
"type": "string",
"enum": [
"TCP",
"ICMP",
"UDP",
"IP"
],
"description": "Protocol type"
},
"source": {
"type": "string",
"description": "Source, acceptable values:<br>&bull; IP address in CIDR format, for example \"192.168.0.3/32\"<br>&bull; the network address in CIDR format, for example \"10.0.0.0/24\"<br>&bull; \"0.0.0.0/0\", means any address on the network<br><br>For SNAT, you usually specify a private network address or an IP address of a server on a private network. External networks and IP addresses are typically specified for DNAT. For BINAT, you specify an IP address of a server on a private network"
},
"destination": {
"type": "string",
"description": "Destination, acceptable values:<br>&bull; IP address in CIDR format, for example \"192.168.0.3/32\"<br>&bull; the network address in CIDR format, for example \"10.0.0.0/24\"<br>&bull; \"0.0.0.0/0\", means any address on the network<br><br>For SNAT, you usually specify external networks and IP addresses. For DNAT, destination can be an address of a private network or an IP address of a server on a private network. For BINAT, use an IP address on an external network"
},
"destination_port": {
"type": "string",
"description": "Destination port<br>Acceptable values:<br>&bull; port number in the range 1-65535<br>&bull; 0, means any port"
},
"translated": {
"type": "string",
"description": "The external address of the edge gateway in the network"
},
"translated_port": {
"type": "string",
"description": "Translated port<br>Acceptable values:<br>&bull; port number in the range 1-65535<br>&bull; 0, means any port"
}
}
}
},
"firewall_rules": {
"type": "array",
"description": "List of Firewall 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",
"items": {
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": [
"Deny",
"Allow"
],
"description": "The action to be applied:<br>Allow - allows the transfer of data packets<br>Deny - restricts the transfer of data packet"
},
"direction": {
"type": "string",
"enum": [
"In",
"Out"
],
"description": "Direction for applying the rule:<br>In - the rule is applied for incoming data packets<br>Out - for outgoing ones"
},
"protocol": {
"type": "string",
"enum": [
"TCP",
"ICMP",
"UDP",
"IP"
],
"description": "Protocol type"
},
"source": {
"type": "string",
"description": "Source, acceptable values:<br>&bull; IP address in CIDR format, for example \"192.168.0.3/32\"<br>&bull; the network address in CIDR format, for example \"10.0.0.0/24\"<br>&bull; \"0.0.0.0/0\", means any address on the network"
},
"source_port": {
"type": "integer",
"format": "int32",
"description": "Source port<br>Acceptable values:<br>&bull; port number in the range 1-65535<br>&bull; 0, means any port"
},
"destination": {
"type": "string",
"description": "Destination, acceptable values:<br>&bull; IP address in CIDR format, for example \"192.168.0.3/32\"<br>&bull; the network address in CIDR format, for example \"10.0.0.0/24\"<br>&bull; \"0.0.0.0/0\", means any address on the network"
},
"destination_port": {
"type": "integer",
"format": "int32",
"description": "Destination port<br>Acceptable values:<br>&bull; port number in the range 1-65535<br>&bull; 0, means any port"
}
}
}
},
"state": {
"type": "string",
"enum": [
"New",
"Active",
"Busy",
"Blocked"
],
"description": "Gateway state"
},
"powered_on": {
"type": "boolean",
"description": "Gateway power status"
},
"created": {
"type": "string",
"format": "date-time",
"description": "Gateway creation date"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of gateway tags"
}
}
}
},
"example": {
"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"
]
}
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"description": "Error code"
},
"message": {
"type": "string",
"description": "Error message"
},
"error_params": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Parameter information"
},
"value": {
"type": "object",
"description": "Value"
}
},
"description": "Additional error information"
}
}
}
}
}
},
"example": {
"errors": [
{
"code": -2002,
"message": "The request body is not formatted or not specified"
}
]
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Gateway not found"
}
}
},
"delete": {
"tags": [
"Gateways"
],
"summary": "Delete",
"description": "Deletes an edge gateway",
"parameters": [
{
"name": "gateway_id",
"in": "path",
"description": "ID of the edge gateway to be removed",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful execution"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Gateway not found"
}
}
}
},
"/api/v1/gateways/{gateway_id}/bandwidth": {
"put": {
"tags": [
"Gateways"
],
"summary": "Edit bandwidth",
"description": "Changes the bandwidth of the public interface channel for the edge gateway",
"parameters": [
{
"name": "gateway_id",
"in": "path",
"description": "The ID of the edge gateway which bandwidth you need to change",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"bandwidth_mbps": {
"type": "integer",
"format": "int32",
"description": "New public network interface bandwidth. Interface bandwidth in Mbps, the bandwidth value must be a multiple of 10 Mbps"
}
},
"example": {
"bandwidth_mbps": 100
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"task_id": {
"type": "string",
"description": "Task ID"
}
},
"example": {
"task_id": "lt17499"
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"description": "Error code"
},
"message": {
"type": "string",
"description": "Error message"
},
"error_params": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Parameter information"
},
"value": {
"type": "object",
"description": "Value"
}
},
"description": "Additional error information"
}
}
}
}
}
},
"example": {
"errors": [
{
"code": -19114,
"message": "The bandwidth of the edge gateway must be between 10 and 200 Mbps",
"error_params": [
{
"name": "Min",
"value": "10"
},
{
"name": "Max",
"value": "200"
}
]
}
]
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Gateway not found"
}
}
}
},
"/api/v1/gateways/{gateway_id}/stop": {
"post": {
"tags": [
"Gateways"
],
"summary": "Stop gateway",
"description": "Stopped the gateway. Returns a task ID",
"parameters": [
{
"name": "gateway_id",
"in": "path",
"description": "ID of the edge gateway you want to stop",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"task_id": {
"type": "string",
"description": "Task ID"
}
},
"example": {
"task_id": "l1t90073"
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"description": "Error code"
},
"message": {
"type": "string",
"description": "Error message"
}
}
}
}
},
"example": {
"errors": [
{
"code": -19566,
"message": "The edge gateway already stopped"
}
]
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Gateway not found"
}
}
}
},
"/api/v1/gateways/{gateway_id}/start": {
"post": {
"tags": [
"Gateways"
],
"summary": "Start gateway",
"description": "Started the gateway. Returns a task ID",
"parameters": [
{
"name": "gateway_id",
"in": "path",
"description": "ID of the edge gateway you want to start",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"task_id": {
"type": "string",
"description": "Task ID"
}
},
"example": {
"task_id": "l1t90074"
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"description": "Error code"
},
"message": {
"type": "string",
"description": "Error message"
}
}
}
}
},
"example": {
"errors": [
{
"code": -19565,
"message": "The edge gateway already started"
}
]
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Gateway not found"
}
}
}
},
"/api/v1/gateways/{gateway_id}/restart": {
"post": {
"tags": [
"Gateways"
],
"summary": "Restart gateway",
"description": "Restarted the gateway. Returns a task ID",
"parameters": [
{
"name": "gateway_id",
"in": "path",
"description": "ID of the edge gateway you want to restart",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"task_id": {
"type": "string",
"description": "Task ID"
}
},
"example": {
"task_id": "l1t90075"
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"description": "Error code"
},
"message": {
"type": "string",
"description": "Error message"
}
}
}
}
},
"example": {
"errors": [
{
"code": -19803,
"message": "A conflict occurred during the competitive change of the object. Wait until the end of the previous operation and try again."
}
]
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Gateway not found"
}
}
}
},
"/api/v1/gateways/{gateway_id}/firewall": {
"get": {
"tags": [
"Gateways"
],
"summary": "Get list of Firewall rules",
"description": "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",
"parameters": [
{
"name": "gateway_id",
"in": "path",
"description": "The gateway ID of the edge gateway for which you want to get the list of Firewall rules",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"firewall_rules": {
"type": "array",
"description": "List of Firewall rules",
"items": {
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": [
"Deny",
"Allow"
],
"description": "The action to be applied:<br>Allow - allows the transfer of data packets<br>Deny - restricts the transfer of data packet"
},
"direction": {
"type": "string",
"enum": [
"In",
"Out"
],
"description": "Direction for applying the rule:<br>In - the rule is applied for incoming data packets<br>Out - for outgoing ones"
},
"protocol": {
"type": "string",
"enum": [
"TCP",
"ICMP",
"UDP",
"IP"
],
"description": "Protocol type"
},
"source": {
"type": "string",
"description": "Source, acceptable values:<br>&bull; IP address in CIDR format, for example \"192.168.0.3/32\"<br>&bull; the network address in CIDR format, for example \"10.0.0.0/24\"<br>&bull; \"0.0.0.0/0\", means any address on the network"
},
"source_port": {
"type": "integer",
"format": "int32",
"description": "Source port<br>Acceptable values:<br>&bull; port number in the range 1-65535<br>&bull; 0, means any port"
},
"destination": {
"type": "string",
"description": "Destination, acceptable values:<br>&bull; IP address in CIDR format, for example \"192.168.0.3/32\"<br>&bull; the network address in CIDR format, for example \"10.0.0.0/24\"<br>&bull; \"0.0.0.0/0\", means any address on the network"
},
"destination_port": {
"type": "integer",
"format": "int32",
"description": "Destination port<br>Acceptable values:<br>&bull; port number in the range 1-65535<br>&bull; 0, means any port"
}
}
}
}
}
},
"example": {
"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
}
]
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Gateway not found"
}
}
},
"put": {
"tags": [
"Gateways"
],
"summary": "Change Firewall rules",
"description": "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.<br>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",
"parameters": [
{
"name": "gateway_id",
"in": "path",
"description": "The ID of the edge gateway for which you want to change the Firewall rule set",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"firewall_rules": {
"type": "array",
"description": "List of Firewall rules",
"items": {
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": [
"Deny",
"Allow"
],
"description": "The action to be applied:<br>Allow - allows the transfer of data packets<br>Deny - restricts the transfer of data packet"
},
"direction": {
"type": "string",
"enum": [
"In",
"Out"
],
"description": "Direction for applying the rule:<br>In - the rule is applied for incoming data packets<br>Out - for outgoing ones"
},
"protocol": {
"type": "string",
"enum": [
"TCP",
"ICMP",
"UDP",
"IP"
],
"description": "Protocol type"
},
"source": {
"type": "string",
"description": "Source, acceptable values:<br>&bull; IP address in CIDR format, for example \"192.168.0.3/32\"<br>&bull; the network address in CIDR format, for example \"10.0.0.0/24\"<br>&bull; \"0.0.0.0/0\", means any address on the network"
},
"source_port": {
"type": "integer",
"format": "int32",
"description": "Source port<br>Acceptable values:<br>&bull; port number in the range 1-65535<br>&bull; 0, means any port"
},
"destination": {
"type": "string",
"description": "Destination, acceptable values:<br>&bull; IP address in CIDR format, for example \"192.168.0.3/32\"<br>&bull; the network address in CIDR format, for example \"10.0.0.0/24\"<br>&bull; \"0.0.0.0/0\", means any address on the network"
},
"destination_port": {
"type": "integer",
"format": "int32",
"description": "Destination port<br>Acceptable values:<br>&bull; port number in the range 1-65535<br>&bull; 0, means any port"
}
}
}
}
},
"example": {
"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
}
]
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"task_id": {
"type": "string",
"description": "Task ID"
}
},
"example": {
"task_id": "lt17499"
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"description": "Error code"
},
"message": {
"type": "string",
"description": "Error message"
},
"error_params": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Parameter information"
},
"value": {
"type": "object",
"description": "Value"
}
},
"description": "Additional error information"
}
}
}
}
}
},
"example": {
"errors": [
{
"code": -2002,
"message": "The request body is not formatted or not specified"
}
]
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Gateway not found"
}
}
}
},
"/api/v1/gateways/{gateway_id}/nat": {
"get": {
"tags": [
"Gateways"
],
"summary": "Returns a list of NAT rules",
"description": "Returns a list of NAT rules of one edge gateway",
"parameters": [
{
"name": "gateway_id",
"in": "path",
"description": "ID of the gateway the NAT rules list of which you want to get",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"nat_rules": {
"type": "array",
"description": "List of NAT rules",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"SNAT",
"DNAT",
"BINAT"
],
"description": "Rule type"
},
"protocol": {
"type": "string",
"enum": [
"TCP",
"ICMP",
"UDP",
"IP"
],
"description": "Protocol type"
},
"source": {
"type": "string",
"description": "Source, acceptable values:<br>&bull; IP address in CIDR format, for example \"192.168.0.3/32\"<br>&bull; the network address in CIDR format, for example \"10.0.0.0/24\"<br>&bull; \"0.0.0.0/0\", means any address on the network<br><br>For SNAT, you usually specify a private network address or an IP address of a server on a private network. External networks and IP addresses are typically specified for DNAT. For BINAT, you specify an IP address of a server on a private network"
},
"destination": {
"type": "string",
"description": "Destination, acceptable values:<br>&bull; IP address in CIDR format, for example \"192.168.0.3/32\"<br>&bull; the network address in CIDR format, for example \"10.0.0.0/24\"<br>&bull; \"0.0.0.0/0\", means any address on the network<br><br>For SNAT, you usually specify external networks and IP addresses. For DNAT, destination can be an address of a private network or an IP address of a server on a private network. For BINAT, use an IP address on an external network"
},
"destination_port": {
"type": "integer",
"format": "int32",
"description": "Destination port<br>Acceptable values:<br>&bull; port number in the range 1-65535<br>&bull; 0, means any port"
},
"translated": {
"type": "string",
"description": "The external address of the edge gateway in the network"
},
"translated_port": {
"type": "integer",
"format": "int32",
"description": "Translated port<br>Acceptable values:<br>&bull; port number in the range 1-65535<br>&bull; 0, means any port"
}
}
}
}
}
},
"example": {
"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
}
]
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Gateway not found"
}
}
},
"put": {
"tags": [
"Gateways"
],
"summary": "Change NAT rules",
"description": "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",
"parameters": [
{
"name": "gateway_id",
"in": "path",
"description": "The ID of the edge gateway for which you want to change the NAT rule set",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"nat_rules": {
"type": "array",
"description": "List of NAT rules",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"SNAT",
"DNAT",
"BINAT"
],
"description": "Rule type"
},
"protocol": {
"type": "string",
"enum": [
"TCP",
"ICMP",
"UDP",
"IP"
],
"description": "Protocol type"
},
"source": {
"type": "string",
"description": "Source, acceptable values:<br>&bull; IP address in CIDR format, for example \"192.168.0.3/32\"<br>&bull; the network address in CIDR format, for example \"10.0.0.0/24\"<br>&bull; \"0.0.0.0/0\", means any address on the network<br><br>For SNAT, you usually specify a private network address or an IP address of a server on a private network. External networks and IP addresses are typically specified for DNAT. For BINAT, you specify an IP address of a server on a private network"
},
"destination": {
"type": "string",
"description": "Destination, acceptable values:<br>&bull; IP address in CIDR format, for example \"192.168.0.3/32\"<br>&bull; the network address in CIDR format, for example \"10.0.0.0/24\"<br>&bull; \"0.0.0.0/0\", means any address on the network<br><br>For SNAT, you usually specify external networks and IP addresses. For DNAT, destination can be an address of a private network or an IP address of a server on a private network. For BINAT, use an IP address on an external network"
},
"destination_port": {
"type": "integer",
"format": "int32",
"description": "Destination port<br>Acceptable values:<br>&bull; port number in the range 1-65535<br>&bull; 0, means any port"
},
"translated": {
"type": "string",
"description": "The external address of the edge gateway in the network"
},
"translated_port": {
"type": "integer",
"format": "int32",
"description": "Translated port<br>Acceptable values:<br>&bull; port number in the range 1-65535<br>&bull; 0, means any port"
}
}
}
}
},
"example": {
"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
}
]
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"task_id": {
"type": "string",
"description": "Task ID"
}
},
"example": {
"task_id": "lt17499"
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"description": "Error code"
},
"message": {
"type": "string",
"description": "Error message"
},
"error_params": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Parameter information"
},
"value": {
"type": "object",
"description": "Value"
}
},
"description": "Additional error information"
}
}
}
}
}
},
"example": {
"errors": [
{
"code": -2002,
"message": "The request body is not formatted or not specified"
}
]
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Gateway not found"
}
}
}
},
"/api/v1/gateways/{gateway_id}/nics": {
"post": {
"tags": [
"Gateways"
],
"summary": "Connect network",
"description": "Connects isolated network to the gateway. Returns the task ID",
"parameters": [
{
"name": "gateway_id",
"in": "path",
"description": "ID of the gateway to which you want to connect the isolated network",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"network_id": {
"type": "string",
"description": "Isolated network ID to be connected to the gateway"
}
},
"required": [
"network_id"
],
"example": {
"network_id": "l1n218"
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"task_id": {
"type": "string",
"description": "Task ID"
}
},
"example": {
"task_id": "lt65000"
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"description": "Error code"
},
"message": {
"type": "string",
"description": "Error message"
},
"error_params": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Parameter information"
},
"value": {
"type": "object",
"description": "Value"
}
},
"description": "Additional error information"
}
}
}
}
}
},
"example": {
"errors": [
{
"code": -19103,
"message": "The maximum number of networks connected to the edge gateway is 3",
"error_params": [
{
"name": "MaxSize",
"value": 3
}
]
}
]
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Gateway or network not found"
}
}
}
},
"/api/v1/gateways/{gateway_id}/nics/{nic_id}": {
"delete": {
"tags": [
"Gateways"
],
"summary": "Disconnect network",
"description": "Disconnects isolated network from the gateway",
"parameters": [
{
"name": "gateway_id",
"in": "path",
"description": "ID of the gateway for which you want to disconnect the isolated network",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "nic_id",
"in": "path",
"description": "Gateway network interface ID to be disconnected from the gateway",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful execution"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Gateway or network not found"
}
}
}
},
"/api/v1/gateways/{gateway_id}/tags": {
"post": {
"tags": [
"Gateways"
],
"summary": "Create tag",
"description": "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",
"parameters": [
{
"name": "gateway_id",
"in": "path",
"description": "ID of gateway you want to create the tag for",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"value": {
"type": "string",
"description": "Tag name. Tag is the text marker up to 32 symbols in length; any symbols except spaces can be used"
}
},
"required": [
"value"
],
"example": {
"value": "MyTag"
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful execution"
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"description": "Error code"
},
"message": {
"type": "string",
"description": "Error message"
},
"error_params": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Parameter information"
},
"value": {
"type": "object",
"description": "Value"
}
},
"description": "Additional error information"
}
}
}
}
}
},
"example": {
"errors": [
{
"code": -16031,
"message": "The tag is already there"
}
]
}
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Gateway not found"
}
}
}
},
"/api/v1/gateways/{gateway_id}/tags/{tag}": {
"delete": {
"tags": [
"Gateways"
],
"summary": "Delete tag",
"description": "Removes one gateway tag",
"parameters": [
{
"name": "gateway_id",
"in": "path",
"description": "ID of the gateway that owns the tag",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "tag",
"in": "path",
"description": "Name of the tag to be deleted",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful execution"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Gateway or tag not found"
}
}
}
},
"/api/v1/applications": {
"get": {
"tags": [
"Server metadata"
],
"summary": "List of applications",
"description": "Returns the list of applications available for installation on the servers",
"parameters": [
{
"in": "query",
"name": "location_id",
"schema": {
"type": "string"
},
"description": "Location name, allows you to filter available applications by location"
}
],
"responses": {
"200": {
"description": "Successful execution",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/application"
}
}
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Access denied"
}
}
}
}
},
"components": {
"schemas": {
"vstack_task": {
"type": "object",
"properties": {
"task": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Task ID"
},
"location_id": {
"type": "string",
"description": "Location ID in which the task is executed"
},
"network_id": {
"type": "string",
"description": "Network ID"
},
"server_id": {
"type": "string",
"description": "Server ID"
},
"volume_id": {
"type": "integer",
"format": "int32",
"description": "Volume ID"
},
"snapshot_id": {
"type": "integer",
"format": "int32",
"description": "Snapshot ID"
},
"nic_id": {
"type": "integer",
"format": "int32",
"description": "Network interface ID"
},
"gateway_id": {
"type": "integer",
"format": "int32",
"description": "Edge gateway ID"
},
"domain_id": {
"type": "string",
"description": "Domain name"
},
"record_id": {
"type": "integer",
"format": "int32",
"description": "Domain record ID"
},
"created": {
"type": "string",
"format": "date-time",
"description": "Task creation date"
},
"completed": {
"type": "string",
"format": "date-time",
"description": "Task completion date"
},
"is_completed": {
"type": "string",
"enum": [
"New",
"InProgress",
"Completed",
"Failed",
"Canceled"
],
"description": "Task state"
}
}
}
}
},
"location": {
"type": "object",
"properties": {
"locations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Location ID"
},
"system_volume_min": {
"type": "integer",
"format": "int32",
"description": "Minimum available system volume space in MB"
},
"additional_volume_min": {
"type": "integer",
"format": "int32",
"description": "Minimum available additional volume space in MB"
},
"volume_max": {
"type": "integer",
"format": "int32",
"description": "Maximum available volume space in MB"
},
"windows_system_volume_min": {
"type": "integer",
"format": "int32",
"description": "Minimum available system volume space for Windows OS in MB"
},
"bandwidth_min": {
"type": "integer",
"format": "int32",
"description": "Minimum available channel width in Mbps"
},
"bandwidth_max": {
"type": "integer",
"format": "int32",
"description": "Maximum available channel width in Mbps"
},
"cpu_quantity_options": {
"type": "array",
"description": "Number of cores available for order",
"items": {
"type": "integer",
"format": "int32"
}
},
"ram_size_options": {
"type": "array",
"description": "Available for ordering the amount of RAM in MB",
"items": {
"type": "integer",
"format": "int32"
}
}
}
}
}
},
"example": {
"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
]
}
]
}
},
"project": {
"type": "object",
"properties": {
"project": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32",
"description": "Project ID"
},
"balance": {
"type": "number",
"format": "double",
"description": "Project balance"
},
"currency": {
"type": "string",
"description": "Project currency"
},
"state": {
"type": "string",
"enum": [
"Active",
"Blocked"
],
"description": "Project status"
},
"created": {
"type": "string",
"format": "date-time",
"description": "Project creation date"
}
}
}
},
"example": {
"project": {
"id": 123,
"balance": 850.44,
"currency": "EUR",
"state": "Active",
"created": "2020-06-01T15:23:07.6258725Z"
}
}
},
"ssh_key": {
"type": "object",
"properties": {
"ssh_key": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32",
"description": "ID of SSH key"
},
"name": {
"type": "string",
"description": "SSH key name"
},
"public_key": {
"type": "string",
"description": "SSH key code"
}
}
}
}
}
},
"volume": {
"type": "object",
"properties": {
"volumes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32",
"description": "Volume ID"
},
"server_id": {
"type": "string",
"description": "Server ID to which the volume is connected"
},
"name": {
"type": "string",
"description": "Volume name"
},
"size_mb": {
"type": "integer",
"format": "int32",
"description": "Volume space in MB"
},
"created": {
"type": "string",
"format": "date-time",
"description": "Volume creation date"
}
}
}
}
}
},
"images": {
"type": "object",
"properties": {
"images": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Image ID"
},
"location_id": {
"type": "string",
"description": "Location ID where the template is located"
},
"type": {
"type": "string",
"enum": [
"Ubuntu",
"Windows",
"CentOS",
"Freebsd",
"Debian"
],
"description": "Operating system type"
},
"os_version": {
"type": "string",
"description": "Operating system version"
},
"architecture": {
"type": "string",
"enum": [
"X32",
"X64"
],
"description": "Architecture"
},
"allow_ssh_keys": {
"type": "boolean",
"description": "Accessibility using SSH keys"
}
}
}
}
},
"example": {
"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
}
]
}
},
"vm_nic": {
"type": "object",
"properties": {
"nics": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32",
"description": "Network interface ID"
},
"server_id": {
"type": "string",
"description": "Server ID to which the network interface is connected"
},
"network_id": {
"type": "string",
"description": "Network ID"
},
"mac": {
"type": "string",
"description": "Network interface MAC address"
},
"ip_address": {
"type": "string",
"description": "Network interface IP address"
},
"mask": {
"type": "integer",
"format": "int32",
"description": "Net mask"
},
"gateway": {
"type": "string",
"description": "Network gateway"
},
"bandwidth_mbps": {
"type": "integer",
"format": "int32",
"description": "Channel width"
}
}
}
}
},
"example": {
"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
}
]
}
},
"private_network": {
"type": "object",
"properties": {
"isolated_networks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Isolated network ID"
},
"location_id": {
"type": "string",
"description": "ID of the location in which the isolated network is located"
},
"name": {
"type": "string",
"description": "Name of isolated network"
},
"description": {
"type": "string",
"description": "Description of isolated network"
},
"network_prefix": {
"type": "string",
"description": "Isolated network address"
},
"mask": {
"type": "integer",
"format": "int32",
"description": "The subnet mask defines the unchanged part of the address and affects the capacity of the network (the number of available addresses). It is indicated 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 256 available (254 work) addresses. Available range of masks from 18 to 24 inclusive"
},
"server_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of server IDs connected to the network"
},
"gateway_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of gateway IDs connected to the network"
},
"state": {
"type": "string",
"enum": [
"Active",
"Busy"
],
"description": "Isolated network state"
},
"created": {
"type": "string",
"format": "date-time",
"description": "Isolated network creation date"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"description": "Isolated network tags"
}
}
}
}
},
"example": {
"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"
]
}
]
}
},
"server": {
"type": "object",
"properties": {
"servers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"location_id": {
"type": "string",
"description": "Location ID where the server is located"
},
"cpu": {
"type": "integer",
"format": "int32",
"description": "Number of server cores"
},
"ram_mb": {
"type": "integer",
"format": "int32",
"description": "The amount of RAM in MB"
},
"volumes": {
"type": "array",
"description": "A list of volumes for the server",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32",
"description": "Volume ID"
},
"name": {
"type": "string",
"description": "Volume name"
},
"size_mb": {
"type": "integer",
"format": "int32",
"description": "Volume space in MB"
},
"created": {
"type": "string",
"format": "date-time",
"description": "Volume creation date"
}
}
}
},
"nics": {
"type": "array",
"description": "A list of server network interfaces",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32",
"description": "Network interface ID"
},
"network_id": {
"type": "string",
"description": "Network ID"
},
"network_type": {
"type": "string",
"enum": [
"PublicShared",
"Isolated"
],
"description": "Network interface type"
},
"mac": {
"type": "string",
"description": "Network interface MAC address"
},
"ip_address": {
"type": "string",
"description": "Network interface IP address"
},
"mask": {
"type": "integer",
"format": "int32",
"description": "Net mask"
},
"gateway": {
"type": "string",
"description": "Network gateway"
},
"bandwidth_mbps": {
"type": "integer",
"format": "int32",
"description": "Channel width"
}
}
}
},
"image_id": {
"type": "string",
"description": "Image ID of server"
},
"is_power_on": {
"type": "boolean",
"description": "Server power status"
},
"name": {
"type": "string",
"description": "Server name"
},
"login": {
"type": "string",
"description": "Login to connect to the server"
},
"password": {
"type": "string",
"description": "Password to connect to the server"
},
"ssh_key_ids": {
"type": "array",
"items": {
"type": "integer",
"format": "int32"
},
"description": "List of SSH key IDs connected to the server"
},
"state": {
"type": "string",
"enum": [
"New",
"Active",
"Busy",
"Blocked"
],
"description": "Server state"
},
"created": {
"type": "string",
"format": "date-time",
"description": "Server creation date"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of server tags"
},
"application_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of applications selected when creating the server"
},
"affinity_group_id": {
"type": "string",
"description": "Affinity group ID"
}
}
}
}
}
},
"snapshot": {
"type": "object",
"properties": {
"snapshots": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32",
"description": "Snapshot ID"
},
"server_id": {
"type": "string",
"description": "Server ID that owns the snapshot"
},
"name": {
"type": "string",
"description": "Snapshot name"
},
"size_mb": {
"type": "integer",
"format": "int32",
"description": "Snapshot size in MB"
},
"created": {
"type": "string",
"format": "date-time",
"description": "Snapshot creation date"
}
}
}
}
},
"example": {
"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"
}
]
}
},
"domain": {
"type": "object",
"properties": {
"domains": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Domain name"
},
"is_delegated": {
"type": "boolean",
"description": "Domain delegation to serverspace.io DNS servers"
},
"records": {
"type": "array",
"description": "A list of domain records",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32",
"description": "Record ID"
},
"name": {
"type": "string",
"description": "Domain name"
},
"type": {
"type": "string",
"enum": [
"A",
"AAAA",
"MX",
"CNAME",
"NS",
"TXT",
"SRV"
],
"description": "Record type"
},
"ip": {
"type": "string",
"description": "IP address, used for A and AAAA records"
},
"mail_host": {
"type": "string",
"description": "Mail server, used for MX records"
},
"priority": {
"type": "integer",
"format": "int32",
"description": "Record priority, used for MX and SRV records. The priority is a number between 0 and 65535"
},
"canonical_name": {
"type": "string",
"description": "Canonical name, used for CNAME records"
},
"name_server_host": {
"type": "string",
"description": "Domain name of a host, used for NS records"
},
"text": {
"type": "string",
"description": "Text, used for TXT records"
},
"protocol": {
"type": "string",
"enum": [
"TCP",
"UDP",
"TLS"
],
"description": "Protocol, used for SRV records"
},
"service": {
"type": "string",
"description": "Service name, used for SRV records"
},
"weight": {
"type": "integer",
"format": "int32",
"description": "Record weight, used for SRV records"
},
"port": {
"type": "integer",
"format": "int32",
"description": "Port, used for SRV records"
},
"target": {
"type": "string",
"description": "The canonical name of the machine providing the service, used for the SRV records"
},
"ttl": {
"type": "string",
"enum": [
"1s",
"5s",
"30s",
"1m",
"5m",
"10m",
"15m",
"30m",
"1h",
"2h",
"6h",
"12h",
"1d"
],
"description": "Record TTL"
}
}
}
}
}
}
}
}
},
"edge": {
"type": "object",
"properties": {
"gateways": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Gateway ID"
},
"location_id": {
"type": "string",
"description": "Location ID where the gateway is located"
},
"name": {
"type": "string",
"description": "Edge gateway name"
},
"nics": {
"type": "array",
"description": "A list of gateway network interfaces",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Gateway network interface ID"
},
"network_id": {
"type": "string",
"description": "Network ID"
},
"ip_address": {
"type": "string",
"description": "Network interface IP address"
},
"bandwidth_mbps": {
"type": "integer",
"format": "int32",
"description": "Channel width"
}
}
}
},
"nat_rules": {
"type": "array",
"description": "List of NAT rules",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"SNAT",
"DNAT",
"BINAT"
],
"description": "Rule type"
},
"protocol": {
"type": "string",
"enum": [
"TCP",
"ICMP",
"UDP",
"IP"
],
"description": "Protocol type"
},
"source": {
"type": "string",
"description": "Source, acceptable values:<br>&bull; IP address in CIDR format, for example \"192.168.0.3/32\"<br>&bull; the network address in CIDR format, for example \"10.0.0.0/24\"<br>&bull; \"0.0.0.0/0\" means any address on the network<br><br>For SNAT, you usually specify a private network address or an IP address of a server on a private network. External networks and IP addresses are typically specified for DNAT. For BINAT, you specify an IP address of a server on a private network"
},
"destination": {
"type": "string",
"description": "Destenation, acceptable values:<br>&bull; IP address in CIDR format, for example \"192.168.0.3/32\"<br>&bull; the network address in CIDR format, for example \"10.0.0.0/24\"<br>&bull; \"0.0.0.0/0\" means any address on the network<br><br>For SNAT, you usually specify external networks and IP addresses. For DNAT, destination can be an address of a private network or an IP address of a server on a private network. For BINAT, use an IP address on an external network"
},
"destination_port": {
"type": "integer",
"format": "int32",
"description": "Destenation port<br>Acceptable values:<br>&bull; port number in the range 1-65535<br>&bull; 0, means any port"
},
"translated": {
"type": "string",
"description": "The external address of the edge gateway in the network"
},
"translated_port": {
"type": "integer",
"format": "int32",
"description": "Translated port<br>Acceptable values:<br>&bull; port number in the range 1-65535<br>&bull; 0, means any port"
}
}
}
},
"firewall_rules": {
"type": "array",
"description": "List of Firewall 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",
"items": {
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": [
"Deny",
"Allow"
],
"description": "The action to be applied:<br>Allow - allows the transfer of data packets<br>Deny - restricts the transfer of data packet"
},
"direction": {
"type": "string",
"enum": [
"In",
"Out"
],
"description": "Direction for applying the rule:<br>In - the rule is applied for incoming data packets<br>Out - for outgoing ones"
},
"protocol": {
"type": "string",
"enum": [
"TCP",
"ICMP",
"UDP",
"IP"
],
"description": "Protocol type"
},
"source": {
"type": "string",
"description": "Source, acceptable values:<br>&bull; IP address in CIDR format, for example \"192.168.0.3/32\"<br>&bull; the network address in CIDR format, for example \"10.0.0.0/24\"<br>&bull; \"0.0.0.0/0\" means any address on the network"
},
"source_port": {
"type": "integer",
"format": "int32",
"description": "Source port<br>Acceptable values:<br>&bull; port number in the range 1-65535<br>&bull; 0, means any port"
},
"destination": {
"type": "string",
"description": "Destination, acceptable values:<br>&bull; IP address in CIDR format, for example \"192.168.0.3/32\"<br>&bull; the network address in CIDR format, for example \"10.0.0.0/24\"<br>&bull; \"0.0.0.0/0\" means any address on the network"
},
"destination_port": {
"type": "integer",
"format": "int32",
"description": "Destenation port<br>Acceptable values:<br>&bull; port number in the range 1-65535<br>&bull; 0, means any port"
}
}
}
},
"state": {
"type": "string",
"enum": [
"New",
"Active",
"Busy",
"Blocked"
],
"description": "Gateway state"
},
"powered_on": {
"type": "boolean",
"description": "Gateway power status"
},
"created": {
"type": "string",
"format": "date-time",
"description": "Gateway creation date"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of gateway tags"
}
}
}
}
}
},
"application": {
"type": "object",
"properties": {
"applications": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Application name"
},
"location_id": {
"type": "string",
"description": "Location name where the application is available"
},
"images": {
"type": "array",
"description": "List of operating system images for which the application is available",
"items": {
"type": "string"
}
}
}
}
}
},
"example": {
"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"
]
}
]
}
}
}
}
}