Adding Clouds through the API

Breakdown of the required API arguments for each cloud provider:

Amazon AWS

To add an Amazon EC2 cloud, you will need to specify the apikey, apisecret and the region:

$ curl -H "Authorization: 2a513e833a731dd963d96e203087742ea0e12321ea645cf278ab4de1d0b39b45cc" -X POST -d '{"title": "EC2", "provider": "ec2", "apikey": "AKIAASDAEO2JJHJZAQ", "apisecret": "RN9nChyasdfsdafasdNJLa2tYkGU97x6uVB", "region": "ec2_ap_northeast"}' <a href="https://mist.io/api/v1/clouds">https://mist.io/api/v1/clouds</a>

You can find the list of available regions and their codes, here:  http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region

Digital Ocean

To add a Digital Ocean cloud, you will need your Digital Ocean token:

$ curl -H "Authorization: 2a513e833a731213122131e203087742ea0e36cea645cf278ab4de1d0b39b45cc" -X POST -d '{"title": "DO", "provider": "digitalocean", "token": "f6c2d8d7c12170213123da6d60d42473d90e8de9cc356d5a7c895ee174e2d5d"}' https://mist.io/api/v1/clouds

Docker

To add a Docker cloud, you need to specify the Docker engine url and the port:

$ curl -H "Authorization: 2a513e833a731dd963d96e203087742ea0e12321ea645cf278ab4de1d0b39b45cc" -X POST -d '{"title": "Docker", "provider": "docker", "docker_host": "my.docker.host.com", "docker_port": "2342"}' https://mist.io/api/v1/clouds

if you're using a username and a password to authenticate to Docker, you can add them using the auth_user and auth_password parameters:

$ curl -H "Authorization: 2a513e833a731dd963d96e203087742ea0e12321ea645cf278ab4de1d0b39b45cc" -X POST -d '{"title": "Docker", "provider": "docker", "docker_host": "my.docker.host.com", "docker_port": "2342", "auth_user":"username", "auth_password":"password"}' https://mist.io/api/v1/clouds

Linode

To add a Linode cloud you need to specify your Linode API key as api_key :

$ curl -H "Authorization: 2a513e833a731dd963d96e203087742ea0e12321ea645cf278ab4de1d0b39b45cc" -X POST -d '{"title": "Linode", "provider": "linode", "api_key": "0HRvfSdwUKl123123122Ysdt6Fo2T97dJDWCp3o4UwJsPrxsr8d8HQGsL87cgY"}' https://mist.io/api/v1/clouds

Nephoscale

To add a Nephoscale cloud, you will need your username and password

$ curl -H "Authorization: 2a513e833a731213122131e203087742ea0e36cea645cf278ab4de1d0b39b45cc" -X POST -d '{"title": "Nephoscale", "provider": "nephoscale", "username": "username", "password": "mynephopassword"}' https://mist.io/api/v1/clouds

Packet

To add a Packet cloud, you will need your Packet API key:

$ curl -H "Authorization: 2a513e833a731dd963d96e203087742ea0e12321ea645cf278ab4de1d0b39b45cc" -X POST -d '{"title": "PacketApi", "provider": "packet", "apikey": "i5w1uTwpASfASDbajzEptj3Lyuyp3EQhB"}' https://mist.io/api/v1/clouds

Rackspace

To add a rackspace cloud, you need to specify your username, api key and the Rackspace region:

$ curl -H "Authorization: 2a513e833a731dd963d96e203087742ea0e12321ea645cf278ab4de1d0b39b45cc" -X POST -d '{"title": "Rackspace", "provider": "rackspace", "apikey": "853e73d2131a2a19b75fbd084e043b4", "region": "dfw", "username": "myusername"}' https://mist.io/api/v1/clouds

You can find the list of available regions and their codes, here:  https://support.rackspace.com/how-to/about-regions/

SoftLayer

To add a SoftLayer cloud, you will need your username and API key:

$ curl -H "Authorization: 2a513e833a731dd963d96e203087742ea0e12321ea645cf278ab4de1d0b39b45cc" -X POST -d '{"title": "Softlayer", "provider": "softlayer", "apikey": "1a115512312aba636db734ad2702131204699b33f79a0cb628c6423f292fb417", "username": "SL122202"}' https://mist.io/api/v1/clouds

Still need help? Contact Us Contact Us