Nyx Cloud

API documentation

The Nyx Cloud customer API gives the same actions as the console: servers, power, networks, addresses, backups, SSH keys.

Authentication

Issue an API key in the console (Account - API keys) and send it in the Authorization header. A revoked key answers 401.

curl -H "Authorization: Bearer npk_..." https://nyx.dakasat.com/api/v1/vdcs

Virtual Data Center

Servers, networks, addresses, routers, images and ISO live in a Virtual Data Center (VDC) of the account. List, create, rename and delete VDCs with /vdcs; resources of a VDC are under /vdcs/{vdc}/..., where {vdc} is the VDC code (vdc-XXXXXX). Invoices, balance, keys, profile and tickets belong to the account and have no VDC.

curl -H "Authorization: Bearer npk_..." https://nyx.dakasat.com/api/v1/vdcs/vdc-k7q2mx/servers

Resource paths without a VDC (/servers, /networks, /ips, /routers, /isos, /images, /cloud/...) answer 410 vdc_required.

Rate limit

Up to 120 requests per minute per customer. Above the limit the API answers 429 with a Retry-After header (seconds).

Schema

/api/v1/openapi.json - OpenAPI 3.1 description of every operation, request and response.

Operations

GET/cataloggetCatalog
GET/operations/{id}getOperation
GET/ssh-keyslistSshKeys
POST/ssh-keysaddSshKey
DELETE/ssh-keys/{id}deleteSshKey
GET/vdcslistVdcs
POST/vdcscreateVdc
DELETE/vdcs/{vdc}deleteVdc
GET/vdcs/{vdc}getVdc
PATCH/vdcs/{vdc}renameVdc
GET/vdcs/{vdc}/backup-defaultgetCloudBackupDefault
PUT/vdcs/{vdc}/backup-defaultsetCloudBackupDefault
GET/vdcs/{vdc}/deletionpreviewVdcDeletion
GET/vdcs/{vdc}/imageslistCustomImages
DELETE/vdcs/{vdc}/images/{id}deleteCustomImage
GET/vdcs/{vdc}/ipslistIps
POST/vdcs/{vdc}/ipstakeIp
DELETE/vdcs/{vdc}/ips/{id}releaseIp
GET/vdcs/{vdc}/isoslistIsos
POST/vdcs/{vdc}/isosaddIso
DELETE/vdcs/{vdc}/isos/{id}deleteIso
GET/vdcs/{vdc}/networkslistNetworks
POST/vdcs/{vdc}/networkscreateNetwork
DELETE/vdcs/{vdc}/networks/{id}deleteNetwork
PATCH/vdcs/{vdc}/networks/{id}renameNetwork
GET/vdcs/{vdc}/routerslistRouters
POST/vdcs/{vdc}/routerscreateRouter
DELETE/vdcs/{vdc}/routers/{id}deleteRouter
GET/vdcs/{vdc}/routers/{id}getRouter
PATCH/vdcs/{vdc}/routers/{id}renameRouter
PUT/vdcs/{vdc}/routers/{id}/dhcpsetRouterDhcp
GET/vdcs/{vdc}/routers/{id}/forwardslistPortForwards
POST/vdcs/{vdc}/routers/{id}/forwardscreatePortForward
DELETE/vdcs/{vdc}/routers/{id}/forwards/{rule}deletePortForward
GET/vdcs/{vdc}/routers/{id}/ruleslistRouterRules
POST/vdcs/{vdc}/routers/{id}/rulescreateRouterRule
DELETE/vdcs/{vdc}/routers/{id}/rules/{rule}deleteRouterRule
PUT/vdcs/{vdc}/routers/{id}/rules/{rule}updateRouterRule
GET/vdcs/{vdc}/routers/{id}/vpn/{kind}getVpn
PUT/vdcs/{vdc}/routers/{id}/vpn/{kind}setVpn
POST/vdcs/{vdc}/routers/{id}/vpn/{kind}/devicescreateVpnDevice
DELETE/vdcs/{vdc}/routers/{id}/vpn/{kind}/devices/{device}deleteVpnDevice
POST/vdcs/{vdc}/routers/{id}/vpn/{kind}/devices/{device}/reissuereissueVpnDevice
GET/vdcs/{vdc}/serverslistServers
POST/vdcs/{vdc}/serverscreateServer
DELETE/vdcs/{vdc}/servers/{id}deleteServer
GET/vdcs/{vdc}/servers/{id}getServer
PATCH/vdcs/{vdc}/servers/{id}renameServer
POST/vdcs/{vdc}/servers/{id}/actions/{action}serverAction
GET/vdcs/{vdc}/servers/{id}/backup-policygetBackupPolicy
PUT/vdcs/{vdc}/servers/{id}/backup-policysetBackupPolicy
GET/vdcs/{vdc}/servers/{id}/backupslistServerBackups
POST/vdcs/{vdc}/servers/{id}/backupscreateServerBackup
DELETE/vdcs/{vdc}/servers/{id}/backups/{backup}deleteServerBackup
POST/vdcs/{vdc}/servers/{id}/backups/{backup}/restorerestoreServerBackup
POST/vdcs/{vdc}/servers/{id}/consoleopenServerConsole
GET/vdcs/{vdc}/servers/{id}/diskslistServerDisks
POST/vdcs/{vdc}/servers/{id}/disksaddServerDisk
DELETE/vdcs/{vdc}/servers/{id}/disks/{disk}deleteServerDisk
PATCH/vdcs/{vdc}/servers/{id}/disks/{disk}growServerDisk
GET/vdcs/{vdc}/servers/{id}/eventsserverEvents
GET/vdcs/{vdc}/servers/{id}/firewallgetFirewall
PUT/vdcs/{vdc}/servers/{id}/firewallsetFirewallOptions
POST/vdcs/{vdc}/servers/{id}/firewall/rulesaddFirewallRule
DELETE/vdcs/{vdc}/servers/{id}/firewall/rules/{rule}deleteFirewallRule
POST/vdcs/{vdc}/servers/{id}/imagecreateCustomImage
DELETE/vdcs/{vdc}/servers/{id}/ips/{ip}unassignIp
PUT/vdcs/{vdc}/servers/{id}/ips/{ip}assignIp
POST/vdcs/{vdc}/servers/{id}/ips/{ip}/primarymakePrimaryIp
DELETE/vdcs/{vdc}/servers/{id}/isoejectServerIso
GET/vdcs/{vdc}/servers/{id}/isogetServerIso
PUT/vdcs/{vdc}/servers/{id}/isoinsertServerIso
GET/vdcs/{vdc}/servers/{id}/metricsserverMetrics
GET/vdcs/{vdc}/servers/{id}/nicslistServerNics
POST/vdcs/{vdc}/servers/{id}/nicsattachNetwork
DELETE/vdcs/{vdc}/servers/{id}/nics/{nic}detachNic
POST/vdcs/{vdc}/servers/{id}/oschangeServerOs
POST/vdcs/{vdc}/servers/{id}/passwordresetServerPassword
POST/vdcs/{vdc}/servers/{id}/planchangeServerPlan
POST/vdcs/{vdc}/servers/{id}/rebuildrebuildServer
POST/vdcs/{vdc}/servers/{id}/resizeresizeServer
POST/vdcs/{vdc}/servers/{id}/ssh-keysaddServerSshKeys
POST/vdcs/{vdc}/servers/{id}/tagsaddServerTag
DELETE/vdcs/{vdc}/servers/{id}/tags/{tag}removeServerTag
GET/vdcs/{vdc}/summarygetCloudSummary

Русский