Get List of User Monthly Bills
To get data on user's monthly bills for a year, use the following request:
GET /users/:user_id/monthly_bills.xml
GET /users/:user_id/monthly_bills.json
To view user monthly bills for a particular year, use the following request:
XML Request Example
curl -X GET -u 'user:userpass' https://onapp.test/users/12/monthly_bills.xml -d "date[year]=2015"
JSON Request Example
curl -X GET -u 'user:userpass' https://onapp.test/users/12/monthly_bills.json -d "date[year]=2015"
XML Output Example
<vm_stats type="array"> <vm_stat> <month type="integer">5</month> <cost type="float">167.371330738068</cost> </vm_stat> </vm_stats>
Where:
month - number of a month
cost - total user costs, charged for that month (monthly price+costs for resources and usage. See the Get User Billing Statistics section for details)