December 29, 2016


Get verbose details about a Bare Metal Server

Retrieve the packages, categories and items associated with a Bare Metal Server.

This script will get the Packages, Categories, and items associated with a Bare Metal Server.


require 'softlayer_api'
require 'pp'

client = SoftLayer::Client.new(:timeout => 120)

hardware_id = 26961063
object_mask = 'mask[id,fullyQualifiedDomainName,billingItem[id,item[id,description],category[name,id],children[id,item[id,description],category[name,id]]]]'

getDetails = client['SoftLayer_Hardware'].object_mask(object_mask).object_with_id(hardware_id).getObject
pp getDetails