Skip to content

A HTTP server based on JSON Server that mocks Hetzner Robot API

License

Notifications You must be signed in to change notification settings

nl2go/hetzner-robot-api-mock

Repository files navigation

Travis (.org) branch Codecov Code Climate maintainability Docker Pulls GitHub tag (latest by date)

Hetzner Robot API Mock

A HTTP server based on JSON Server that mocks Hetzner Robot API.

Implemented Endpoints

Name API Reference
GET /reset get-reset
GET /reset/{server-ip} get-reset-server-ip
POST /reset/{server-ip} post-reset-server-ip
GET /boot/{server-ip}/rescue get-boot-server-ip-rescue
POST /boot/{server-ip}/rescue post-boot-server-ip-rescue
DELETE /boot/{server-ip}/rescue delete-boot-server-ip-rescue
GET /firewall/{server-ip} get-firewall-server-ip
POST /firewall/{server-ip} post-firewall-server-ip
DELETE /firewall/{server-ip} delete-firewall-server-ip
GET /firewall/template get-firewall-template
POST /firewall/template post-firewall-template
GET /firewall/template/{template-id} get-firewall-template-template-id
POST /firewall/template/{template-id} post-firewall-template-template-id
DELETE /firewall/template/{template-id} delete-firewall-template-template-id
GET /vswitch get-vswitch
POST /vswitch post-vswitch
GET /vswitch/{vswitch-id} get-vswitch-vswitch-id
POST /vswitch/{vswitch-id} post-vswitch-vswitch-id
DELETE /vswitch/{vswitch-id} delete-vswitch-vswitch-id
GET /server/{server-ip} get-server-server-ip
POST /server/{server-ip} post-server-server-ip
GET /key get-key
POST /key post-key
GET /key/{fingerprint} get-key-fingerprint
POST /key/{fingerprint} post-key-fingerprint
DELETE /key/{fingerprint} delete-key-fingerprint

Authentication

Use username robot and password secret to authenticate.

Development

Bootstrap

npm install

Run tests

npm test

Run locally

cd /src/ && node index.js

Run locally built image

docker-compose up

Rebuild image

docker-compose build

Maintainers

License

See the LICENSE.md file for details