Get User Group Billing Reports

To get billing reports for a user group, use the following requests:

1
2
GET /user_groups/:id/report.xml
GET /user_groups/:id/report.json

XML Request Example

1
curl -i -X GET http://onapp.test/user_groups/13/report.xml -u user:userpass -H 'Accept: application/xml' -H 'Content-type: application/xml'

JSON Request Example

1
curl -i -X GET http://onapp.test/user_groups/13/report.json -u user:userpass -H 'Accept: application/json' -H 'Content-type: application/json'

XML Output Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
<billing_user_group_reports type="array">
  <billing_user_group_report>
      <from type="dateTime">2018-06-01T00:00:00Z</from>
      <till type="dateTime">2018-06-08T23:59:59Z</till>
      <user_id type="integer">9501</user_id>
      <virtual_machine_id type="integer">19682</virtual_machine_id>
      <resource_pool_costs type="decimal">11275.0</resource_pool_costs>
      <network_costs type="decimal">0.0</network_costs>
      <storage_costs type="decimal">176.0</storage_costs>
      <service_addon_costs type="decimal">0.0</service_addon_costs>
      <total_cost type="decimal">11451.0</total_cost>
  </billing_user_group_report>
  <billing_user_group_report>...</billing_user_group_report>
</billing_user_group_reports>

Where:

from - the start date for generating statistics in the [YYYY][MM][DD]T[hh][mm][ss] format

till - the end date for generating statistics in the [YYYY][MM][DD]T[hh][mm][ss] format

user_id - the ID of the user who owns the virtual server

virtual_machine_id - the ID of the virtual server for which the report is generated

resource_pool_costs - the price for the usage of resource pool for the specified period of time

network_costs - the price for the usage of network resources for the specified period of time

storage_costs - the price for the usage of storage resources for the specified period of time

service_addon_costs - the price for the usage of service add-ons for the specified period of time

total_cost - the price for all used resources (resource_pool_costs, network_costs, storage_costs, and service_addon_costs) for the specified period of time