StatisticsResource


Get available stats


GET https://example.com/api/statistics

Roles : [ROLE_AUTHENTICATED]

Accept : links

List alerts last triggered


Retrieve the last triggered alerts in the current user's enterprise.

GET https://example.com/api/statistics/lastalerts

Roles : [ROLE_AUTHENTICATED]

Parameter Type Default Value Description
identerprise Integer If present, filter based on the enterprise identifier
startwith Integer 0 The first element to be retrieved of the filtered search
by String timestamp Order by
limit Integer 25 The number of entities to retrieve
asc Boolean false If the value of the 'by' parameter must be sorted in ascending order (true) or descending order (false)

Accept : alerthistories

Error Codes

  • EN-0 - The requested enterprise does not exist

List unused load balancers


Retrieve unused load balancers in the user's enterprise.

GET https://example.com/api/statistics/lbsusage

Roles : [ROLE_DASHBOARD_OPTIMIZATION_VIEW]

Parameter Type Default Value Description
identerprise Integer If present, filter based on the enterprise identifier
startwith Integer 0 The first element to be retrieved of the filtered search
by String name Order by
limit Integer 25 The number of entities to retrieve
asc Boolean true If the value of the 'by' parameter must be sorted in ascending order (true) or descending order (false)

Accept : loadbalancers

List unused public ips


Retrieve unused public IPs in the user's enterprise.

GET https://example.com/api/statistics/publicipsusage

Roles : [ROLE_DASHBOARD_OPTIMIZATION_VIEW]

Parameter Type Default Value Description
identerprise Integer If present, filter based on the enterprise identifier
startwith Integer 0 The first element to be retrieved of the filtered search
by String name Order by
limit Integer 25 The number of entities to retrieve
asc Boolean true If the value of the 'by' parameter must be sorted in ascending order (true) or descending order (false)

Accept : statisticips

List virtual machines by enterprise and hypervisor type


Retrieve virtual machines in the current user's enterprise by location and cloudType

GET https://example.com/api/statistics/virtualmachines/groupbyhypervisortype

Roles : [ROLE_DASHBOARD_HYBRID_VIEW]

Parameter Type Default Value Description
identerprise Integer If present, filter based on the enterprise identifier
cloudtype String Could be 'private' to get all the results of private datacenters or the hypervisorType to get the result of a specific type.
startwith Integer 0 The first element to be retrieved of the filtered search
by String name Order by
limit Integer 25 The number of entities to retrieve
asc Boolean true If the value of the 'by' parameter must be sorted in ascending order (true) or descending order (false)

Accept : virtualmachines

List virtual machines last deployed


Retrieve information about the last deployed VMs in the current user's enterprise.

GET https://example.com/api/statistics/virtualmachines/lastdeployed

Roles : [ROLE_AUTHENTICATED, ROLE_PHYS_DC_RETRIEVE_RESOURCE_USAGE]

Parameter Type Default Value Description
identerprise Integer If present, filter based on the enterprise identifier
iduser Integer If present, filter based on the user identifier
existuser Boolean true If false, search for virtual machines without an owner
limit Integer Maximum number of results to show

Example

List virtual machines most time deployed


Retrieve information about the virtual machines with the most time deployed in the current user's enterprise.

GET https://example.com/api/statistics/virtualmachines/mosttimedeployed

Roles : [ROLE_DASHBOARD_OPTIMIZATION_VIEW]

Parameter Type Default Value Description
identerprise Integer If present, filter based on the enterprise identifier
iduser Integer If present, filter based on the user identifier
existuser Boolean true If false, search for virtual machines without an owner
limit Integer Maximum number of results to show

Example

List users owners of virtual machines last deployed


Retrieve links to users who own the last deployed virtual machines in the current user's enterprise.

GET https://example.com/api/statistics/virtualmachines/userslastdeployed

Roles : [ROLE_AUTHENTICATED, ROLE_PHYS_DC_RETRIEVE_RESOURCE_USAGE]

Parameter Type Default Value Description
identerprise Integer If present, filter based on the enterprise identifier

Accept : links

List virtual machine count in a datacenter and hypervisor type


Retrieve the count of virtual machines in the current user's enterprise by datacenter

GET https://example.com/api/statistics/virtualmachines/workloads

Roles : [ROLE_DASHBOARD_HYBRID_VIEW]

Parameter Type Default Value Description
identerprise Integer If present, filter based on the enterprise identifier

Accept : workloads

Example

List virtual machine usages


Retrieve virtual machines usage

GET https://example.com/api/statistics/vmsusage

Roles : [ROLE_DASHBOARD_OPTIMIZATION_VIEW]

Parameter Type Default Value Description
identerprise Integer Required. Identifier of an enterprise
metric String Metric name to use
stat String Statistic to use on filtering: 'avg', 'min' or 'max'. The default value is 'avg'
over Double Return usages which statistic values are greater than or equals than the specified value
under Double Return usages which statistic values are less than or equals than the specified value
sort String How to sort the results by statistic value. Use ''desc'' to overwrite default ascending order
limit Integer Maximum number of results to show. Zero means no limit

Accept : vmusages