Previous Topic: vol ObjectNext Topic: info Method (vol Object)


list Method (vol Object)
Description

Retrieve list of volumes in the application

Syntax
/api/v1/vol/list?app=application&vdc=controller-name 
Arguments
app

Name of the application

vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Examples

Retrieve list of volumes for test.

GET http://192.168.123.200/api/v1/vol/list?app=test&vdc=mygrid 
Sample Output
XML:
<volume> 
   <name>vol1</name> 
   <comment></comment> 
   <filesystem>ext3</filesystem> 
   <mount_state>available</mount_state> 
   <n_mirrors>1</n_mirrors> 
   <scope_name>test</scope_name> 
   <scope_type>application</scope_type> 
   <server>srv1</server> 
   <size>1073741824</size> 
   <state>ok</state> 
   <uuid>cf432100-63fc-450d-8eb7- 2da6deca8627</uuid> 
</volume> 
JSON:
{ 
   "scope_type" : "application", 
   "name" : "vol1", 
   "scope_name" : "test", 
   "mount_state" : "available", 
   "uuid" : "cf432100-63fc-450d-8eb7-2da6deca8627", 
   "size" : "1073741824", 
   "state" : "ok", 
   "comment" : "", 
   "filesystem" : "ext3", 
   "n_mirrors" : "1", 
   "server" : "srv1" 
} 

HTTP Error Codes
404

Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.

400.1

Application 'test' does not exist. - Invalid application specified in the request.