Get User Statistics

User's statistics show the summary of the resources used by a particular user and their costs (which are set in the bucket assigned to the user). To see the statistics, use this API call:

GET /users/:user_id/user_statistics.xml
GET /users/:user_id/user_statistics.json

XML Output example

<user_stat>
<vm_stats type="array">
<vm_stat>
<virtual_machine_id type="integer">5551</virtual_machine_id>
<total_cost type="decimal">0.0</total_cost>
</vm_stat>
<vm_stat>
...
</vm_stat>
</vm_stats>
<stat_time type="dateTime">2019-05-29T13:03:30Z</stat_time>
<vm_cost type="decimal">1276.0</vm_cost>
<vm_discount_due_to_free type="decimal">160.0</vm_discount_due_to_free>
<user_resources_cost type="decimal">842633.043828097</user_resources_cost>
<user_resources_discount_due_to_free type="decimal">53801.043828097</user_resources_discount_due_to_free>
<total_cost type="decimal">843909.043828097</total_cost>
<monthly_discount_due_to_free type="decimal">0.692663813</monthly_discount_due_to_free>
<total_discount_due_to_free type="decimal">53961.73649191</total_discount_due_to_free>
<total_cost_with_discount type="decimal">789947.307336187</total_cost_with_discount>
<currency_code>USD</currency_code>
<user_id type="integer">5</user_id>
<backup_cost type="decimal">0.0</backup_cost>
<backup_discount_due_to_free type="integer">0</backup_discount_due_to_free>
<template_cost type="decimal">13.0</template_cost>
<template_discount_due_to_free type="decimal">13.0</template_discount_due_to_free>
<template_iso_cost type="integer">0</template_iso_cost>
<template_iso_discount_due_to_free type="integer">0</template_iso_discount_due_to_free>
<storage_disk_size_cost type="decimal">137.6707077</storage_disk_size_cost>
<storage_disk_size_discount_due_to_free type="decimal">137.6707077</storage_disk_size_discount_due_to_free>
<backup_count_cost type="decimal">108.0</backup_count_cost>
<backup_count_discount_due_to_free type="decimal">108.0</backup_count_discount_due_to_free>
<backup_disk_size_cost type="decimal">66.81032182</backup_disk_size_cost>
<backup_disk_size_discount_due_to_free type="decimal">66.81032182</backup_disk_size_discount_due_to_free>
<template_count_cost type="decimal">110.0</template_count_cost>
<template_count_discount_due_to_free type="decimal">104.0</template_count_discount_due_to_free>
<template_disk_size_cost type="decimal">484.366775531</template_disk_size_cost>
<template_disk_size_discount_due_to_free type="decimal">484.366775531</template_disk_size_discount_due_to_free>
<recovery_point_cost type="integer">0</recovery_point_cost>
<recovery_point_discount_due_to_free type="integer">0</recovery_point_discount_due_to_free>
<recovery_point_size_cost type="integer">0</recovery_point_size_cost>
<recovery_point_size_discount_due_to_free type="integer">0</recovery_point_size_discount_due_to_free>
<autoscale_cost type="integer">0</autoscale_cost>
<autoscale_discount_due_to_free type="integer">0</autoscale_discount_due_to_free>
<acceleration_cost type="integer">0</acceleration_cost>
<acceleration_discount_due_to_free type="integer">0</acceleration_discount_due_to_free>
<ova_count_cost type="integer">0</ova_count_cost>
<ova_count_discount_due_to_free type="integer">0</ova_count_discount_due_to_free>
<ova_size_cost type="integer">0</ova_size_cost>
<ova_size_discount_due_to_free type="integer">0</ova_size_discount_due_to_free>
<edge_group_cost type="integer">0</edge_group_cost>
<backup_resource_usage_cost type="integer">0</backup_resource_usage_cost>
<backup_resource_usage_discount_due_to_free type="integer">0</backup_resource_usage_discount_due_to_free>
</user_stat>


Where:

vm_stat – billing statistics on virtual servers, owned by the user

virtual_machine _id – ID of the VS, for which this statistics is generated

user_resources_cost –costs for actual usage of the VS

backup_disk_size_cost - cost for the backups of a particular Backup server zone. The price is set by the Limits for backup server zone.

backup_cost – cost per backup per particular point of time for which these statistics are generated

backup_count_cost - price per backups located on backup server

template_iso_cost – cost per ISO per hour

autoscale_cost – cost per number of VSs using Autoscaling

customer_network_cost – cost per number of customer networks

acceleration_cost – cost per number of accelerated VSs

ova_cost – cost per OVA file per hour

ova_size_cost – cost per GB per hour for OVA file disk size

currency_code - the currency set for this user

template_disk_size_cost - cost for the templates of a particular Backup server zone

template_cost — total template costs on compute resources (cost per template per hour)

edge_group_cost - total edge group costs

user_id - the ID of the user for whom the statistics are generated

stat_time - a particular point of time for which these statistics are generated

storage_disk_size_cost – costs for disk size used for backups/templates storage (cost per GB per hour)

user_resources_cost — sum total of all backups/templates/monitis monitors costs (backup_cost+storage_disk_size_cost+template_cost+monit_cost)

total_cost — overall sum total of all costs (vm_cost+user_resources_cost)

vm_cost – total VSs costs (sum total of all user VSs)

vm_discount_due_to_free - VS discount counted based on free limits in a rate card

user_resources_discount_due_to_free - user resources discount counted based on free limits in a rate card

mothly_discount_due_to_free - on a monthly basis (including monthly peak free limits+ monthly free limits)

total_discount_due_to_free - sum of all discounts counted based on free limits in a rate card

total_cost_with_discount - total_cost value received after subtracting the total_discount_due_to_free value

backup_discout_due_to_free - backup discount counted based on free limits in a rate card

template_discount_due_to_free - template discount counted based on free limits in a rate card

template_iso_discount_due_to_free - ISO discount counted based on free limits in a rate card

storage_disk_size_discount_due_to_free - discount for disk size used for backups/templates storage

backup_disk_size_discount_due_to_free - cost for the backup disks of a particular Backup 

template_count_cost - price for templates located on backup server

template_count_discount_due_to_free - template discount counted based on free limits in a rate card

template_disk_size_discount_due_to_free - discount for disk size used for templates located on backup server 

recovery_point_cost - cost per recovery point of the backup resource

recovery_point_discount_due_to_free - recovery point discount counted based on free limits in a rate card

recovery_point_size_cost - cost per backup size on backup resource

recovery_point_size_discount_due_to_free - discount for recover point size used for templates located on backup server

autoscale_discount_due_to_free - discount for VSs using autoscaling counted based on free limits in a rate card

acceleration_discount_due_to_free - discount for accelerated VSs counted based on free limits in a rate card

ova_count_cost - cost per ova template 

ova_size_discount_due_to_free - discount for disk size used for OVAs located on backup server 

backup_resource_usage_cost - cost per used backup size

backup_resource_usage_discount_due_to_free - backup resource usage discount counted based on free limits in a rate card



Page history


v.5.6

  • Removed the vm_resource_cost parameter
  • Replaced the backup_count_cost parameter with the backup_cost parameter
  • Replaced the ova_count_cost parameter with the ova_cost parameter
  • Replaced the template_count_cost parameter with the template_cost parameter
  • Added the following parameters:
    • vm_discount_due_to_free 

    • user_resources_discount_due_to_free 

    • mothly_discount_due_to_free

    • total_discount_due_to_free 

    • total_cost_with_discount 

    • backup_discout_due_to_free 

    • template_discount_due_to_free 

    • template_iso_discount_due_to_free 

    • storage_disk_size_discount_due_to_free 

    • backup_disk_size_discount_due_to_free 

    • template_count_cost 

    • template_count_discount_due_to_free 

    • template_disk_size_discount_due_to_free

    • recovery_point_cost

    • recovery_point_discount_due_to_free

    • recovery_point_size_cost 

    • recovery_point_size_discount_due_to_free 

    • autoscale_discount_due_to_free 

    • acceleration_discount_due_to_free 

    • ova_count_cost 

    • ova_size_discount_due_to_free 

    • backup_resource_usage_cost 

    • backup_resource_usage_discount_due_to_free 


v5.2:

  • Added the following parameters:
    • template_iso_cost 
    • autoscale_cost 
    • customer_network_cost 
    • acceleration_cost 
    • ova_count_cost 
    • ova_size_cost