-
Notifications
You must be signed in to change notification settings - Fork 35
Home
Welcome to the SoftLayer-Ruby wiki!
We recommend using something like (Bundler)[http://bundler.io] but installing the gem in the conventional way works as well:
$ gem install softlayer-api
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)[https://control.softlayer.com/account/user/profile] and scroll down to "API Access Information" and copy your Authentication Key
(you will need it for later).
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)[https://github.com/softlayer/softlayer-ruby/blob/master/lib/softlayer/Config.rb#L11-L44]
$ 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
Great! Now you are ready to get your hands dirty. You can view some (example scripts)[https://softlayer.github.io/ruby/], view the (gem documentation)[], or view the (SoftLayer References overview)[http://sldn.softlayer.com/reference/overview] or (examples)[https://softlayer.github.io/rest/] if you need to do something outside the scope of the gem.