Skip to content

Servers beta ​

Virtual servers (product family server, scope console-servers).

MethodPathAbilityNotes
GET/serversview?name=
GET/servers/{server}viewwith status, location, floating_ips, post_install
PUT/PATCH/servers/{server}updatename
DELETE/servers/{server}deletebody name = the server's name → 204
POST/servers/{server}/powerpoweraction → 202
POST/servers/{server}/reinstallreinstalloperating_system_id, optional post_install_script → 202
GET/servers/{server}/post-installviewthe latest post-install run; 404 without one
GET/servers/{server}/backupsview
POST/servers/{server}/backupsupdatenotes (optional) → 202
POST/servers/{server}/backups/{backup}/restoreupdate202
DELETE/servers/{server}/backups/{backup}update202
GET/servers/{server}/snapshotsview
POST/servers/{server}/snapshotsupdatename, description, state → 202
POST/servers/{server}/snapshots/{name}/rollbackupdate202
DELETE/servers/{server}/snapshots/{name}update202

Access ​

  • {server} is the server's id. Servers you cannot see answer 404.
  • The abilities are those of the Console: team members may do everything; a reseller's end customer by its grant level - view, power for power and reinstall, manage for name, backups and snapshots. Deleting is for the team only. Otherwise 403.

Background operations ​

202 operations run in the background ({"message": "…"}); check the result with GET.

  • status is read from the host at most every 15 seconds; it is null while the host is not reachable.
  • Reading backups or snapshots, creating a snapshot or renaming while the host is not reachable answers 503.
  • Unknown backups and snapshots answer 404.

The server object ​

GET /servers (paginated) lists the servers with their own fields only; ?name= filters by the exact name. GET /servers/{server} (and the answer of a rename) adds:

Field
statusthe live status, or null; provisioning while the server is being set up beta
provisioning_status betanull when ready, provisioning or failed - see Products being set up
location{id, name, country}
floating_ips[{ip, version, floating_ip_id, provisioning_status}] - floating_ip_id is the floating IP product, null for an address that came with the server; provisioning_status is the floating IP product's (null when ready)
post_installthe latest post-install run (see Post-install scripts)
bash
curl "https://console.anikeen.com/api/v1/servers?name=web-01.example.com" \
  -H "Authorization: Bearer $ANIKEEN_TOKEN" -H "Accept: application/json"

Rename ​

http
PUT /v1/servers/{server}
{"name": "web-02.example.com"}

name is a hostname (max. 254 characters); the virtual machine is renamed too.

Delete ​

http
DELETE /v1/servers/{server}
{"name": "web-02.example.com"}
  • The name must match (422 otherwise).
  • The server is switched off and billing stops right away. It is purged after 14 days (until then support can restore it).
  • A server with the deletion protection on answers 409, error: server_protected (switch it off in the Console).

Power ​

http
POST /v1/servers/{server}/power
{"action": "start"}

action: start, stop, shutdown, reboot → 202.

A server suspended for an unpaid subscription is not started, restarted or reinstalled: 409, error: billing_suspended. Stopping stays possible.

Reinstall ​

http
POST /v1/servers/{server}/reinstall
{"operating_system_id": "01JC…", "post_install_script": "#!/bin/bash\napt-get update"}
Field
operating_system_idrequired, one of the images available for the server's host (as on its reinstall page in the Console)
post_install_scriptoptional - see Post-install scripts

Backups ​

RequestBodyResult
GET …/backups{"data": [...]} with id, notes, size (bytes), created_at, newest first
POST …/backups{"notes": "before update"} (optional, max. 1000)202
POST …/backups/{backup}/restore202; the server is stopped and overwritten
DELETE …/backups/{backup}202

Snapshots ​

RequestBodyResult
GET …/snapshots{"data": [...]} with name, description, parent, state (with RAM), created_at, newest first
POST …/snapshots{"name": "before_update", "description": "…", "state": true}202
POST …/snapshots/{name}/rollback202
DELETE …/snapshots/{name}202

Snapshot name: a letter, then letters, digits, -, _; 2–40 characters; an existing name answers 422. description: optional, max. 1000 characters. state (boolean, default false) includes the RAM in the snapshot.

Floating IPs ​

Floating IPs are ordered as family floatingIp (see Order attributes) and show up in the server's floating_ips. They belong to the scope console-servers.

Anikeen Console documentation