Mit dem API von Scaleway kann man Daten zu seinem Server abfragen, neu starten und sogar frisch installieren. Auch von der Command Line aus. Den Zugangstoken erhält man in der Online Console.

Server-Liste

curl -X GET \
     -H "Authorization: Bearer <TOKEN>" \
     -H "X-Pretty-JSON: 1" \
     "https://api.online.net/api/v1/server"

Daten zu Server

curl -X GET \
     -H "Authorization: Bearer <TOKEN>" \
     -H "X-Pretty-JSON: 1" \
     "https://api.online.net/api/v1/server/<SERVERID>"

Daten zur Harddisk

curl -X GET \
     -H "Authorization: Bearer <TOKEN>" \
     -H "X-Pretty-JSON: 1" \
     "https://api.online.net/api/v1/server/hardware/disk/<HDDID>"

Daten zur Server-IP

curl -X GET \
     -H "Authorization: Bearer <TOKEN>" \
     -H "X-Pretty-JSON: 1" \
     "https://api.online.net/api/v1/server/ip/<IP>"

Betriebssystem

curl -X GET \
     -H "Authorization: Bearer <TOKEN>" \
     -H "X-Pretty-JSON: 1" \
     "https://api.online.net/api/v1/server/operatingSystems/<SERVERID>"

Neustart

curl -X POST \
     -H "Authorization: Bearer <TOKEN>" \
     -H "X-Pretty-JSON: 1" \
     --data "reason=test" \
     --data "email=<me@example.org>" \
     "https://api.online.net/api/v1/server/reboot/<SERVERID>"

Verfügbare Rescue Images

curl -X GET \
     -H "Authorization: Bearer <TOKEN>" \
     -H "X-Pretty-JSON: 1" \
     "https://api.online.net/api/v1/server/rescue_images/ID"