The Joyent Cloud API is a RESTful API for programmatically interfacing with the Joyent Public Cloud. Many of the tasks that you can perform through the portal are also possible through CloudAPI including:
- Provision new machines
- Manage your account credentials
- Create custom analytics for monitoring your infrastructure
In this page, you will learn how to install the Cloud API command line tools. You can learn more about CloudAPI at apidocs.joyent.com/cloudapi/.
The CloudAPI tools require Node.js. You can find the latest version of Node.js at nodejs.org
Once Node.js is installed, install the CloudAPI tools. This command installs the CloudAPI tools globally.
If you get an EACCESS error, you may need to use sudo to install globally:
Next, set up your environment variables. You can set these in your .bashrc or .bash_profile file.
For SDC_URL choose the datacenter that hosts your instances, or the one closest to you:
|https://us-west-1.api.joyentcloud.com||San Francisco Area, USA|
|https://us-sw-1.api.joyentcloud.com||Las Vegas, USA|
You can find the SSH fingerprint for your keys in the Joyent Cloud Portal under My Account > SSH Keys.
For example, your setup might look something like this:
Test that everything is set up correctly: