Skip to content
Justin Halsall edited this page Dec 10, 2015 · 2 revisions

Welcome to the SoftLayer-Ruby wiki!

Getting Started

Installing the Gem

We recommend using something like Bundler but installing the gem in the conventional way works as well:

$ gem install softlayer-api

Setting up authentication

Getting the API key

Most of SoftLayer's API is hidden behind nifty tokens called Authentication Keys. To find out what your tokens are please visit your user profile in the SoftLayer Customer Portal and scroll down to "API Access Information" and copy your Authentication Key (you will need it for later).

Config file

To have the SoftLayer API gem authenticate you need to set up a .softlayer config file in your home directory ~/ Other options are also available

$ vim ~/.softlayer

Add the following contents to the file, and change the api_key to reflect your Authentication Key and username to reflect your username you normally use to get into the portal:

[softlayer]
api_key = Y0URAP1K3Y
username = yourusername
endpoint_url = https://api.softlayer.com/xmlrpc/v3/
timeout = 60

Next steps

Great! Now you are ready to get your hands dirty. You can view some example scripts, view the gem documentation, or view the SoftLayer References overview or examples if you need to do something outside the scope of the gem.

Clone this wiki locally