API Usage Examples

Examples of using the API

For HTTP methods

To start using the API, we need to specify which HTTP method we want to request.

This will vary according to the request, but GET, POST, PUT and DELETE commands are all possible.


The cURL command will allow us to demonstrate endpoints in a simple, textual format.

To list all servers

To list all the servers in your account, send a GET request to /devices

curl --request GET \
--url https://api.maxihost.com/devices

To create a server

To create a new server, send a POST request to /devices

curl --request POST \
--url https://api.maxihost.com/devices \
--data '{"facility":"mh1","plan":"type_1","hostname":"sp-1.maxihost.com","operating_system":"ubuntu_16","billing_cycle":"monthly","backorder":"true"}'

More information