-1

I'm trying to get storage information specifically cost, and what host is it assigned to from the API.

Using this endpoint (https://api.softlayer.com/rest/v3/SoftLayer_Account/getNextInvoiceTopLevelBillingItems.json

I was able to get the cost of storage but it is all showing up as "Endurance Storage" or "Performance Storage" on the invoice. Need a way to tie this back to what host is assigned or what is the volume name.

1 Answers1

0

The merhod http://sldn.softlayer.com/reference/services/SoftLayer_Account/getNextInvoiceTopLevelBillingItems returns an array of billing Items ,the only way to tie that with the Storage device is by matching that billing item with the billing item of the Storage. You can get the billing Item of all your storages using this method.

http://sldn.softlayer.com/reference/services/SoftLayer_Account/getNetworkStorage

plus a mask to get their billing items.

e.g. using RESTFul

GET https://$USER:APIKEY@api.softlayer.com/rest/v3/SoftLayer_Account/getNetworkStorage?objectMask=mask[billingItem]

Then you need to link the billing items which are equals.

Regards