ServerMania logo

Usage Trends Statistics

To view usage trends statistics, use the following request:

GET /billing/dashboard_statistics.xml
GET /billing/dashboard_statistics.json 

XML Request Example

curl -X GET "http://test/billing/dashboard_statistics.xml?stats_for=[cpus]&period[startdate]=2015-05-01&period[enddate]=2016-06-06" -u login:password -H 'Content-Type: application/xml' -g


stats_for - leave this parameter empty to get all statistics data. To get a specific data, indicate any of these values: cpus, memory, disk_size, virtual_servers, smart_servers, baremetal_servers.

period - indicate start date and end date for the period, for which you want to get the statistics.

JSON Request Example:

curl -i -X GET -u login:password --url http://test/billing/dashboard_statistics.json -d '{"stats_for":["cpus"], "period":{"startdate":"2016-06-22", "enddate":"2016-06-24"}}' -H 'Content-Type: application/json' -H 'Accept: application/json'


  • [1466568000000,29] - time (in milli seconds), value array.

If period <= 24 hours the API response contains hourly statistics, else (> 24 hours) - returns daily statistics.

XML Output Example

  <cpus type="array">
    <cpu type="array">
      <fixnum type="integer">1464667200000</fixnum>
      <fixnum type="integer">24</fixnum>
    <cpu type="array">
      <fixnum type="integer">1464753600000</fixnum>
      <fixnum type="integer">23</fixnum>
    <cpu type="array"> ...</cpu>