Abiquo Documentation Cookies Policy

Our Documentation website uses cookies to improve your experience. Please visit our Cookie Policy page for more information about cookies and how we use them.


Abiquo 2.6


Skip to end of metadata
Go to start of metadata

Statistics Resource

Exposed Resources Hierarchy
Statistics Resource

Contents:

Generic resource to get statistical data for different types of cloud usage.

Main URI of the Resource

This class operates mainly over the Resource URI: /statistics

Exposed Methods

VAppsResourcesResource Resource

Exposed Resources Hierarchy
VAppsResourcesResource Resource

 

Shows statistical data on resources used by Virtual Appliances * Virtual CPUs used by the virtual machines (total and currently running) * Storage size (total and used) of disks used by virtual machines (total and currently running) * RAM used by the virtual machines (total and currently running) * External storage (in volumes defined in the datacenter's storage section) used by virtual machines (total and currently running) * Total and used number of VLANs defined * Total, reserved and used number of public IPs

Main URI of the Resource

This class operates mainly over the Resource URI: /statistics/vappsresources

Exposed Methods

Retrieve a list of virtual appliance resources for this enterprise

Retrieves a list of virtual appliance resources for this enterprise

Synopsis: GET http://example.com/api/statistics/vappsresources
Roles Required: ROLE_AUTHENTICATED
Request Headers: Accept: application/vnd.abiquo.virtualappsresources+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

identerprise

false

 

enterprise identifier

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: VirtualAppsResources Media Type
Request Example:

 Click here to show or hide the request example
Retrieve a list of virtual appliance resources for this enterprise example
getvappsresourcesbyenterprise
-----------------------------
$ curl http://example.com/api/statistics/vappsresources?identerprise=1 \
    -v -u user:pass \
    -X GET \
    -H "Accept: application/vnd.abiquo.virtualappsresources+xml;version=2.4"
> GET /api/login/sessions HTTP/1.1
> Authorization: Basic YWRtaW46eGFiaXF1bw==
> User-Agent: curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18
> Host: example.com
> Accept: application/vnd.abiquo.virtualappsresources+xml;version=2.4
> 
< HTTP/1.1 200 OK
< Date: Mon, 20 Aug 2012 10:28:51 GMT
< Set-Cookie: auth=YWRtaW46MTM0NTQ2MDMzMTQ1MzpmY2Q1MjI0NTk1Mjg4ZWM1YWVjMTVhODMxZjdiN2MwMzpBQklRVU8; Expires=Mon, 20-Aug-2012 10:58:51 GMT; Path=/api
< Set-Cookie: JSESSIONID=E2318305EEC1B93E814DF7493DDEF1A9; Path=/api
< Content-Type: application/vnd.abiquo.virtualappsresources+xml;version=2.4
< Content-Length: 269
< 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<vappsresources>
    <vappresources>
        <id>1</id>
        <idEnterprise>1</idEnterprise>
        <idVirtualDataCenter>1</idVirtualDataCenter>
        <vappName>vaaa</vappName>
        <vdcName>vdc</vdcName>
        <vmActive>0</vmActive>
        <vmCreated>0</vmCreated>
        <volAttached>0</volAttached>
    </vappresources>
</vappsresources>

VirtualDatacentersResources Resource

Exposed Resources Hierarchy
VirtualDatacentersResources Resource

 

Shows statistical data on resources used by virtual datacenters such as: * Virtual datacenter name * Total virtual machines deployed * Currently running virtual machines * Total number of storage volumes created * Number of storage volumes currently attached to virtual machines

Main URI of the Resource

This class operates mainly over the Resource URI: /statistics/vdcsresources

Exposed Methods

Retrieve a list of virtual datacenter resources for an enterprise

Retrieves a list of virtual datacenter resources filtered by enterprise

Synopsis: GET http://example.com/api/statistics/vdcsresources
Roles Required: ROLE_AUTHENTICATED
Request Headers: Accept: application/vnd.abiquo.virtualdatacentersresources+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

identerprise

false

 

enterprise identifier

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: VirtualDatacentersResources Media Type
Request Example:

 Click here to show or hide the request example
Retrieve a list of virtual datacenter resources for an enterprise example
$ curl http://example.com/api/statistics/vdcsresources?identerprise=1 \
    -v -u user:pass \
    -X GET \
    -H "Accept: application/vnd.abiquo.virtualdatacentersresources+xml;version=2.4"
> GET /api/login/sessions HTTP/1.1
> Authorization: Basic YWRtaW46eGFiaXF1bw==
> User-Agent: curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18
> Host: example.com
> Accept: application/vnd.abiquo.virtualdatacentersresources+xml;version=2.4
> 
< HTTP/1.1 200 OK
< Date: Mon, 20 Aug 2012 10:28:51 GMT
< Set-Cookie: auth=YWRtaW46MTM0NTQ2MDMzMTQ1MzpmY2Q1MjI0NTk1Mjg4ZWM1YWVjMTVhODMxZjdiN2MwMzpBQklRVU8; Expires=Mon, 20-Aug-2012 10:58:51 GMT; Path=/api
< Set-Cookie: JSESSIONID=E2318305EEC1B93E814DF7493DDEF1A9; Path=/api
< Content-Type: application/vnd.abiquo.virtualdatacentersresources+xml;version=2.4
< Content-Length: 269
< 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<vdcsresources>
    <vdcresources>
        <id>1</id>
        <extStorageReserved>0</extStorageReserved>
        <extStorageUsed>1024</extStorageUsed>
        <idEnterprise>1</idEnterprise>
        <localStorageReserved>0</localStorageReserved>
        <localStorageUsed>0</localStorageUsed>
        <memoryReserved>0</memoryReserved>
        <memoryUsed>0</memoryUsed>
        <publicIPsReserved>0</publicIPsReserved>
        <publicIPsUsed>0</publicIPsUsed>
        <vdcName>vdc</vdcName>
        <virtualCpuReserved>0</virtualCpuReserved>
        <virtualCpuUsed>0</virtualCpuUsed>
        <vlanReserved>0</vlanReserved>
        <vlanUsed>1</vlanUsed>
        <vmActive>0</vmActive>
        <vmCreated>0</vmCreated>
        <volAttached>0</volAttached>
        <volCreated>1</volCreated>
    </vdcresources>
</vdcsresources>

CloudUsagesResource Resource

Exposed Resources Hierarchy
CloudUsagesResource Resource

 

Shows statistical data on resources used by the Abiquo managed cloud

Main URI of the Resource

This class operates mainly over the Resource URI: /statistics/cloudusage

Exposed Methods

Retrieve all the cloud usages data for all datacenters

Retrieves all the cloud usage data for all datacenters

Synopsis: GET http://example.com/api/statistics/cloudusage/actions/total
Roles Required: ROLE_PHYS_DC_RETRIEVE_RESOURCE_USAGE
Request Headers: Accept: application/vnd.abiquo.cloudusages+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: CloudUsages Media Type
Request Example:

 Click here to show or hide the request example
Retrieve all the cloud usages data for all datacenters example
$ curl http://example.com/api/statistics/cloudusage/actions/total \
    -v -u user:pass \
    -X GET \
    -H "Accept: application/vnd.abiquo.cloudusages+xml;version=2.4"
> GET /api/login/sessions HTTP/1.1
> Authorization: Basic YWRtaW46eGFiaXF1bw==
> User-Agent: curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18
> Host: example.com
> Accept: application/vnd.abiquo.cloudusages+xml;version=2.4
> 
< HTTP/1.1 200 OK
< Date: Mon, 20 Aug 2012 10:28:51 GMT
< Set-Cookie: auth=YWRtaW46MTM0NTQ2MDMzMTQ1MzpmY2Q1MjI0NTk1Mjg4ZWM1YWVjMTVhODMxZjdiN2MwMzpBQklRVU8; Expires=Mon, 20-Aug-2012 10:58:51 GMT; Path=/api
< Set-Cookie: JSESSIONID=E2318305EEC1B93E814DF7493DDEF1A9; Path=/api
< Content-Type: application/vnd.abiquo.cloudusages+xml;version=2.4
< Content-Length: 269
< 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<cloudusage>
    <numEnterprisesCreated>1</numEnterprisesCreated>
    <numUsersCreated>2</numUsersCreated>
    <numVdcCreated>1</numVdcCreated>
    <publicIPsReserved>0</publicIPsReserved>
    <publicIPsTotal>62</publicIPsTotal>
    <publicIPsUsed>0</publicIPsUsed>
    <serversRunning>1</serversRunning>
    <serversTotal>1</serversTotal>
    <storageReserved>0</storageReserved>
    <storageTotal>1024</storageTotal>
    <storageUsed>0</storageUsed>
    <virtualCpuReserved>0</virtualCpuReserved>
    <virtualCpuTotal>2</virtualCpuTotal>
    <virtualCpuUsed>0</virtualCpuUsed>
    <virtualMachinesRunning>0</virtualMachinesRunning>
    <virtualMachinesTotal>0</virtualMachinesTotal>
    <virtualMemoryReserved>0</virtualMemoryReserved>
    <virtualMemoryTotal>6138</virtualMemoryTotal>
    <virtualMemoryUsed>0</virtualMemoryUsed>
    <virtualStorageReserved>0</virtualStorageReserved>
    <virtualStorageTotal>244544700416</virtualStorageTotal>
    <virtualStorageUsed>25988956160</virtualStorageUsed>
    <vlanUsed>0</vlanUsed>
</cloudusage>

Retrieve a CloudUsageDto entity.

Synopsis: GET http://example.com/api/statistics/cloudusage/actions/total
Roles Required: ROLE_PHYS_DC_RETRIEVE_RESOURCE_USAGE
Request Headers: Accept: application/vnd.abiquo.cloudusage+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: CloudUsage Media Type
Request Example:

 Click here to show or hide the request example
Retrieve a CloudUsageDto entity. example
$ curl http://example.com/api/statistics/cloudusage/actions/total \
    -v -u user:pass \
    -X GET \
    -H "Accept: application/vnd.abiquo.cloudusages+xml;version=2.4"
> GET /api/login/sessions HTTP/1.1
> Authorization: Basic YWRtaW46eGFiaXF1bw==
> User-Agent: curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18
> Host: example.com
> Accept: application/vnd.abiquo.cloudusages+xml;version=2.4
> 
< HTTP/1.1 200 OK
< Date: Mon, 20 Aug 2012 10:28:51 GMT
< Set-Cookie: auth=YWRtaW46MTM0NTQ2MDMzMTQ1MzpmY2Q1MjI0NTk1Mjg4ZWM1YWVjMTVhODMxZjdiN2MwMzpBQklRVU8; Expires=Mon, 20-Aug-2012 10:58:51 GMT; Path=/api
< Set-Cookie: JSESSIONID=E2318305EEC1B93E814DF7493DDEF1A9; Path=/api
< Content-Type: application/vnd.abiquo.cloudusages+xml;version=2.4
< Content-Length: 269
< 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<cloudusage>
    <numEnterprisesCreated>1</numEnterprisesCreated>
    <numUsersCreated>2</numUsersCreated>
    <numVdcCreated>1</numVdcCreated>
    <publicIPsReserved>0</publicIPsReserved>
    <publicIPsTotal>62</publicIPsTotal>
    <publicIPsUsed>0</publicIPsUsed>
    <serversRunning>1</serversRunning>
    <serversTotal>1</serversTotal>
    <storageReserved>0</storageReserved>
    <storageTotal>1024</storageTotal>
    <storageUsed>0</storageUsed>
    <virtualCpuReserved>0</virtualCpuReserved>
    <virtualCpuTotal>2</virtualCpuTotal>
    <virtualCpuUsed>0</virtualCpuUsed>
    <virtualMachinesRunning>0</virtualMachinesRunning>
    <virtualMachinesTotal>0</virtualMachinesTotal>
    <virtualMemoryReserved>0</virtualMemoryReserved>
    <virtualMemoryTotal>6138</virtualMemoryTotal>
    <virtualMemoryUsed>0</virtualMemoryUsed>
    <virtualStorageReserved>0</virtualStorageReserved>
    <virtualStorageTotal>244544700416</virtualStorageTotal>
    <virtualStorageUsed>25988956160</virtualStorageUsed>
    <vlanUsed>0</vlanUsed>
</cloudusage>

Exposed Methods

Retrieve cloud usage data for a datacenter

Retrieves cloud usage data for a datacenter

Synopsis: GET http://example.com/api/statistics/cloudusage/{datacenter}
Roles Required: ROLE_PHYS_DC_RETRIEVE_RESOURCE_USAGE
Request Headers: Accept: application/vnd.abiquo.cloudusage+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: CloudUsage Media Type
Request Example:

 Click here to show or hide the request example
Retrieve cloud usage data for a datacenter example
$ curl http://example.com/api/statistics/cloudusage/1 \
    -v -u user:pass \
    -X GET \
    -H "Accept: application/vnd.abiquo.cloudusage+xml;version=2.4"
> GET /api/login/sessions HTTP/1.1
> Authorization: Basic YWRtaW46eGFiaXF1bw==
> User-Agent: curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18
> Host: example.com
> Accept: application/vnd.abiquo.cloudusage+xml;version=2.4
> 
< HTTP/1.1 200 OK
< Date: Mon, 20 Aug 2012 10:28:51 GMT
< Set-Cookie: auth=YWRtaW46MTM0NTQ2MDMzMTQ1MzpmY2Q1MjI0NTk1Mjg4ZWM1YWVjMTVhODMxZjdiN2MwMzpBQklRVU8; Expires=Mon, 20-Aug-2012 10:58:51 GMT; Path=/api
< Set-Cookie: JSESSIONID=E2318305EEC1B93E814DF7493DDEF1A9; Path=/api
< Content-Type: application/vnd.abiquo.cloudusage+xml;version=2.4
< Content-Length: 269
< 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<cloudusage>
    <id>1</id>
    <numEnterprisesCreated>0</numEnterprisesCreated>
    <numUsersCreated>0</numUsersCreated>
    <numVdcCreated>0</numVdcCreated>
    <publicIPsReserved>0</publicIPsReserved>
    <publicIPsTotal>62</publicIPsTotal>
    <publicIPsUsed>0</publicIPsUsed>
    <serversRunning>1</serversRunning>
    <serversTotal>1</serversTotal>
    <storageReserved>1024</storageReserved>
    <storageTotal>1024</storageTotal>
    <storageUsed>0</storageUsed>
    <virtualCpuReserved>0</virtualCpuReserved>
    <virtualCpuTotal>2</virtualCpuTotal>
    <virtualCpuUsed>0</virtualCpuUsed>
    <virtualMachinesRunning>0</virtualMachinesRunning>
    <virtualMachinesTotal>0</virtualMachinesTotal>
    <virtualMemoryReserved>0</virtualMemoryReserved>
    <virtualMemoryTotal>6138</virtualMemoryTotal>
    <virtualMemoryUsed>0</virtualMemoryUsed>
    <virtualStorageReserved>0</virtualStorageReserved>
    <virtualStorageTotal>244544700416</virtualStorageTotal>
    <virtualStorageUsed>25988956160</virtualStorageUsed>
    <vlanUsed>0</vlanUsed>
</cloudusage>

EnterprisesResources Resource

Exposed Resources Hierarchy
EnterprisesResources Resource

 

Shows statistics data on resources used by enterprises

Main URI of the Resource

This class operates mainly over the Resource URI: /statistics/enterpriseresources

Exposed Methods

Retrieves enterprise resources usage data for the whole system

Retrieves enterprise resources usage data for the whole system adding all the enterprises stats

Synopsis: GET http://example.com/api/statistics/enterpriseresources/actions/total
Roles Required: ROLE_ENTERPRISE_RESOURCE_SUMMARY_ENT
Request Headers: Accept: application/vnd.abiquo.enterpriseresources+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: EnterpriseResources Media Type
Request Example:

 Click here to show or hide the request example
Retrieves enterprise resources usage data for the whole system example
$ curl http://example.com/api/statistics/enterpriseresources/1 \
    -v -u user:pass \
    -X GET \
    -H "Accept: application/vnd.abiquo.enterpriseresources+xml;version=2.4"
> GET /api/login/sessions HTTP/1.1
> Authorization: Basic YWRtaW46eGFiaXF1bw==
> User-Agent: curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18
> Host: example.com
> Accept: application/vnd.abiquo.enterpriseresources+xml;version=2.4
> 
< HTTP/1.1 200 OK
< Date: Mon, 20 Aug 2012 10:28:51 GMT
< Set-Cookie: auth=YWRtaW46MTM0NTQ2MDMzMTQ1MzpmY2Q1MjI0NTk1Mjg4ZWM1YWVjMTVhODMxZjdiN2MwMzpBQklRVU8; Expires=Mon, 20-Aug-2012 10:58:51 GMT; Path=/api
< Set-Cookie: JSESSIONID=E2318305EEC1B93E814DF7493DDEF1A9; Path=/api
< Content-Type: application/vnd.abiquo.enterpriseresources+xml;version=2.4
< Content-Length: 269
< 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<enterpriseresources>
    <id>1</id>
    <extStorageReserved>0</extStorageReserved>
    <extStorageUsed>1024</extStorageUsed>
    <localStorageReserved>0</localStorageReserved>
    <localStorageUsed>0</localStorageUsed>
    <memoryReserved>0</memoryReserved>
    <memoryUsed>0</memoryUsed>
    <publicIPsLimit>0</publicIPsLimit>
    <publicIPsReserved>0</publicIPsReserved>
    <publicIPsUsed>0</publicIPsUsed>
    <repositoryReserved>0</repositoryReserved>
    <repositoryUsed>0</repositoryUsed>
    <virtualCpuReserved>0</virtualCpuReserved>
    <virtualCpuUsed>0</virtualCpuUsed>
    <vlanReserved>0</vlanReserved>
    <vlanUsed>1</vlanUsed>
</enterpriseresources>

Retrieve enterprise resources usage data for an enterprise

Retrieves enterprise resources usage data for an enterprise

Synopsis: GET http://example.com/api/statistics/enterpriseresources/{enterprise}
Roles Required: ROLE_AUTHENTICATED
Request Headers: Accept: application/vnd.abiquo.enterpriseresources+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: EnterpriseResources Media Type
Request Example:

 Click here to show or hide the request example
Retrieve enterprise resources usage data for an enterprise example
$ curl http://example.com/api/statistics/enterpriseresources/actions/total \
    -v -u user:pass \
    -X GET \
    -H "Accept: application/vnd.abiquo.enterpriseresources+xml;version=2.4"
> GET /api/login/sessions HTTP/1.1
> Authorization: Basic YWRtaW46eGFiaXF1bw==
> User-Agent: curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18
> Host: example.com
> Accept: application/vnd.abiquo.enterpriseresources+xml;version=2.4
> 
< HTTP/1.1 200 OK
< Date: Mon, 20 Aug 2012 10:28:51 GMT
< Set-Cookie: auth=YWRtaW46MTM0NTQ2MDMzMTQ1MzpmY2Q1MjI0NTk1Mjg4ZWM1YWVjMTVhODMxZjdiN2MwMzpBQklRVU8; Expires=Mon, 20-Aug-2012 10:58:51 GMT; Path=/api
< Set-Cookie: JSESSIONID=E2318305EEC1B93E814DF7493DDEF1A9; Path=/api
< Content-Type: application/vnd.abiquo.enterpriseresources+xml;version=2.4
< Content-Length: 269
< 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<enterpriseresources>
    <extStorageReserved>0</extStorageReserved>
    <extStorageUsed>1024</extStorageUsed>
    <localStorageReserved>0</localStorageReserved>
    <localStorageUsed>0</localStorageUsed>
    <memoryReserved>0</memoryReserved>
    <memoryUsed>0</memoryUsed>
    <publicIPsLimit>0</publicIPsLimit>
    <publicIPsReserved>0</publicIPsReserved>
    <publicIPsUsed>0</publicIPsUsed>
    <repositoryReserved>0</repositoryReserved>
    <repositoryUsed>0</repositoryUsed>
    <virtualCpuReserved>0</virtualCpuReserved>
    <virtualCpuUsed>0</virtualCpuUsed>
    <vlanReserved>0</vlanReserved>
    <vlanUsed>1</vlanUsed>
</enterpriseresources>