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 get the user statistics, use the following request:

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

XML Request Example

curl -i -X GET -H 'Accept: application/xml' -H 'Content-type: application/xml' -u user:userpass --url http://onapp.test/users/5/user_statistics.xml

JSON Request Example

curl -i -X GET -H 'Accept: application/json' -H 'Content-type: application/json' -u user:userpass --url http://onapp.test/users/5/user_statistics.json

XML Output Example

<vm_stats type=“array”/>
<stat_time type=“dateTime”>2023-02-07T15:52:31Z</stat_time>
<vm_cost type=“decimal”>0.0</vm_cost>
<vm_discount_due_to_free type=“decimal”>0.0</vm_discount_due_to_free>
<user_resources_cost type=“decimal”>0.0</user_resources_cost>
<user_resources_discount_due_to_free type=“decimal”>0.0</user_resources_discount_due_to_free>
<user_service_addon_cost type=“decimal”>0.0</user_service_addon_cost>
<vm_service_addon_cost type=“decimal”>0.0</vm_service_addon_cost>
<service_addon_discount_due_to_free type=“decimal”>0.0</service_addon_discount_due_to_free>
<total_cost type=“decimal”>0.0</total_cost>
<monthly_discount_due_to_free type=“decimal”>0.0</monthly_discount_due_to_free>
<total_discount_due_to_free type=“decimal”>0.0</total_discount_due_to_free>
<total_cost_with_discount type=“integer”>0</total_cost_with_discount>
<user_id type=“integer”>5</user_id>
<backup_cost type=“integer”>0</backup_cost>
<backup_discount_due_to_free type=“integer”>0</backup_discount_due_to_free>
<template_cost type=“integer”>0</template_cost>
<template_discount_due_to_free type=“integer”>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=“integer”>0</storage_disk_size_cost>
<storage_disk_size_discount_due_to_free type=“integer”>0</storage_disk_size_discount_due_to_free>
<backup_count_cost type=“decimal”>0.0</backup_count_cost>
<backup_count_discount_due_to_free type=“integer”>0</backup_count_discount_due_to_free>
<backup_disk_size_cost type=“decimal”>0.0</backup_disk_size_cost>
<backup_disk_size_discount_due_to_free type=“integer”>0</backup_disk_size_discount_due_to_free>
<template_count_cost type=“integer”>0</template_count_cost>
<template_count_discount_due_to_free type=“integer”>0</template_count_discount_due_to_free>
<template_disk_size_cost type=“integer”>0</template_disk_size_cost>
<template_disk_size_discount_due_to_free type=“integer”>0</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>


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

(lightbulb)user_service_addon_costtotal cost per User Service add-on

(lightbulb)vm_service_addon_cost - total cost per VS Service add-on

(lightbulb)service_addon_discount_due_to_free -  Service add-on discount based on free limits in a rate card

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. 6.8

Added the following parameters:

  • user_service_addon_cost
  • vm_service_addon_cost
  • service_addon_discount_due_to_free


  • 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 


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