Reputation: 36
I am trying to construct a REST query to get the month to date cost of my hourly instance at Softlayer. I need to do some comparisons between the VSI and one of my instances at AWS.
I am a little unsure if I should be calling on Softlayer_account or Billing_Item?
Upvotes: 1
Views: 74
Reputation: 1532
This request can help you to get the Date, cost for Virtual Guest’ invoices:
https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/[vsi_id]/getBillingItem?objectMask=mask[hoursUsed,hourlyRecurringFee,currentHourlyCharge,invoiceItems[recurringFee,hourlyRecurringFee,createDate]]
Where:
createDate: The date the invoice item was created.
recurringFee: The recurring fee of the invoice item represented by a floating point decimal in US Dollars ($USD)
To get more information about the meaning of these values, please see:
http://sldn.softlayer.com/reference/datatypes/SoftLayer_Billing_Invoice_Item
Other references:
http://sldn.softlayer.com/reference/services/SoftLayer_Billing_Item
http://sldn.softlayer.com/reference/services/SoftLayer_Billing_Item/getInvoiceItems
http://sldn.softlayer.com/reference/services/SoftLayer_Virtual_Guest/getBillingItem
Upvotes: 2