Previous Topic: iface ObjectNext Topic: cat Object


vol Object

Use this object to manage volumes related to an application.

Method

Description

list

Retrieve list of volumes in the application

info

Retrieve detailed information for a volume

create

Create a new volume for an application

destroy

Remove an existing volume from an application

format

Format an existing volume

rename

Rename an application user volume

resize

Resize a volume

copy

Copy a volume

export

Export a volume to a container file

import

Import a volume from a container file

move

Move a volume to an alternate location

relocate

Relocate volumes to a specified store or off a disabled server

relocate_status

Retrieve current volume relocation status

fscheck

Verify the health of the filesystem on a volume

fsrepair

Verify and repair the filesystem on a volume

check

Initiate background check for volumes that need repair

repair

Restore degraded volume

repair_status

Retrieve current volume repair status

clean

 Destroy unused volume(s), unused volume streams, and volumes that have broken symbolic links

list Method (vol Object)
Description

Retrieve list of volumes in the application

Syntax
/api/v2/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/v2/vol/list?app=test&vdc=mygrid 
Sample Output
XML:

<volumes>
  <volume>
    <comment></comment>
    <filesystem>ext3</filesystem>
    <mount_state>in_use</mount_state>
    <n_mirrors>2</n_mirrors>
    <name>WS_API_r271:code</name>
    <scope_name>WS_API_r271</scope_name>
    <scope_type>application</scope_type>
    <server>srv1,srv2</server>
    <size>54525952</size>
    <state>ok</state>
    <store>local</store>
    <uuid>fc746912-cc65-4e9c-9327-14c66b1741c7</uuid>
  </volume>
  .
  .
  .
  <volume>
    <comment></comment>
    <filesystem>ext3</filesystem>
    <mount_state>available</mount_state>
    <n_mirrors>2</n_mirrors>
    <name>WS_API_r271:mon</name>
    <scope_name>WS_API_r271</scope_name>
    <scope_type>application</scope_type>
    <server>srv1,srv2</server>
    <size>53477376</size>
    <state>ok</state>
    <store>local</store>
    <uuid>f4fd637c-4aa8-4111-be31-55d28a1e275d</uuid>
  </volume>
</volumes>

JSON:
{
   "volume" : [
      {
         "store" : "local",
         "scope_type" : "application",
         "name" : "WS_API_r271:code",
         "scope_name" : "WS_API_r271",
         "mount_state" : "in_use",
         "uuid" : "fc746912-cc65-4e9c-9327-14c66b1741c7",
         "size" : "54525952",
         "state" : "ok",
         "comment" : "",
         "filesystem" : "ext3",
         "n_mirrors" : "2",
         "server" : "srv1,srv2"
      },
      .
      .
      .
      {
         "store" : "local",
         "scope_type" : "application",
         "name" : "WS_API_r271:mon",
         "scope_name" : "WS_API_r271",
         "mount_state" : "available",
         "uuid" : "f4fd637c-4aa8-4111-be31-55d28a1e275d",
         "size" : "53477376",
         "state" : "ok",
         "comment" : "",
         "filesystem" : "ext3",
         "n_mirrors" : "2",
         "server" : "srv1,srv2"
      }
   ]
}

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.

info Method (vol Object)
Description

Retrieve list of detailed information for a volume

Syntax
/api/v2/vol/info?app=application&vol=volume&vdc=controller-name 
Arguments
app

Name of the application

vol

Name of the volume

vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Examples

Retrieve list of detailed information for test:vol1.

GET http://192.168.123.200/api/v2/vol/info?app=test&vol=vol1&vdc=mygrid 
Sample Output
XML:
<volume>
  <comment></comment>
  <filesystem>ext3</filesystem>
  <link></link>
  <mirrors>
    <mirror>
      <name>srv1.v-e9937df4-28df-4e14-9f45-31d1668e7b4a</name>
      <server>srv1</server>
      <state>ok</state>
    </mirror>
    <mirror>
      <name>srv2.v-40b44d96-7a93-4edd-a13d-c320ea3d227d</name>
      <server>srv2</server>
      <state>ok</state>
    </mirror>
  </mirrors>
  <mount_attr>rw-excl</mount_attr>
  <mount_path>none</mount_path>
  <mount_state>in_use</mount_state>
  <n_mirrors>2</n_mirrors>
  <n_users>1</n_users>
  <name>conf</name>
  <size>53477376</size>
  <state>ok</state>
  <store>local</store>
  <time_accessed>1367537796</time_accessed>
  <time_created>1367449644</time_created>
  <time_written>1367449646</time_written>
  <uuid>93298b3c-d731-43b7-b7d9-2e98393f4263</uuid>
</volume>

JSON:
{
   "link" : "",
   "time_created" : "1367449644",
   "store" : "local",
   "mount_attr" : "rw-excl",
   "mirror" : [
      {
         "name" : "srv1.v-e9937df4-28df-4e14-9f45-31d1668e7b4a",
         "server" : "srv1",
         "state" : "ok"
      },
      {
         "name" : "srv2.v-40b44d96-7a93-4edd-a13d-c320ea3d227d",
         "server" : "srv2",
         "state" : "ok"
      }
   ],
   "time_accessed" : "1367537796",
   "name" : "conf",
   "uuid" : "93298b3c-d731-43b7-b7d9-2e98393f4263",
   "mount_state" : "in_use",
   "size" : "53477376",
   "state" : "ok",
   "n_users" : "1",
   "time_written" : "1367449646",
   "mount_path" : "none",
   "comment" : "",
   "filesystem" : "ext3",
   "n_mirrors" : "2"
}

HTTP Error Codes
404

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

400.4

Missing required arguments (app). - Argument app=app missing in the request.

400.4

Missing required arguments (vol). - Argument vol=vol missing in the request.

404.1

Volume 'test:data' does not exist. - Invalid application or volume specified in the request.

create Method (vol Object)
Description

Create a volume

Syntax
/api/v2/vol/create?app=application&vol=volume&fs=filesystem&size=size&vdc=controller-name 
Arguments
app

Name of the application

vol

Name of the volume

fs

Filesystem of the volume to be created

size

Size of the volume

vdc

Name of the target virtual data center

Transaction Type

asynchronous

Request Type

GET

Examples

Create a 1GB, ext3, mirrored volume named test:vol1.

GET http://192.168.123.200/api/v2/vol/create?app=test&vol=vol1&fs=ext3&size=1G&mirrored=1&vdc=mygrid 
Sample Output
XML:
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job> 
JSON:
{
   "job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
} 

HTTP Error Codes
404

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

Note: To get the status of job, issue a /api/v2/job/info? request with the job_id returned above as the argument. For more information about how to obtain the job status, refer to the job object.

destroy Method (vol Object)
Description

Destroy a volume

Syntax
/api/v2/vol/destroy?app=application&vol=volume&vdc=controller-name 
Arguments
app

Name of the application

vol

Name of the volume

vdc

Name of the target virtual data center

Transaction Type

asynchronous

Request Type

GET

Examples

Destroy a volume test:vol1.

GET http://192.168.123.200/api/v2/vol/destroy?app=test&vol=vol1&vdc=mygrid 
Sample Output
XML:
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job> 
JSON:
{
   "job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
} 

HTTP Error Codes
404

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

400.4

Missing required arguments (app). - Argument app=app missing in the request.

400.4

Missing required arguments (vol). - Argument vol=vol missing in the request.

Note: To get the status of job, issue a /api/v2/job/info? request with the job_id returned above as the argument. For more information about how to obtain the job status, refer to the job object.

format Method (vol Object)
Description

Format an existing volume

Syntax
/api/v2/vol/format?app=application&vol=volume&fs=filesystem&vdc=controller-name 
Arguments
app

Name of the application

vol

Name of the volume

fs

Filesystem of the volume to be created

vdc

Name of the target virtual data center

Transaction Type

asynchronous

Request Type

GET

Examples

Format a volume test:vol1 with fs=ext3.

GET http://192.168.123.200/api/v2/vol/format?app=test&vol=vol1&fs=ext3&vdc=mygrid 
Sample Output
XML:
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job> 
JSON:
{
   "job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
} 

HTTP Error Codes
404

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

400.4

Missing required arguments (app). - Argument app=app missing in the request.

400.4

Missing required arguments (vol). - Argument vol=vol missing in the request.

400.4

Missing required arguments (fs). - Argument fs=fs missing in the request.

Note: This will wipe out all the data that is currently on the volume. To get the status of job, issue a /api/v2/job/info? request with the job_id returned above as the argument. For more information about how to obtain the job status, refer to the job object.

rename Method (vol Object)
Description

Rename a volume

Syntax
/api/v2/vol/rename?app=application&vol=volume&volnew=new-volume&vdc=controller-name 
Arguments
app

Name of the application

vol

Name of the volume

volnew

Name of the new volume

vdc

Name of the target virtual data center

Transaction Type

asynchronous

Request Type

GET

Examples

Rename a volume test:vol1 to test:vol2.

GET http://192.168.123.200/api/v2/vol/rename?app=test&vol=vol1&volnew=vol2&vdc=mygrid 
Sample Output
XML:
<message></message>
JSON:
{
   "message" :""
}

HTTP Error Codes
404

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

400.4

Missing required arguments (app). - Argument app=app missing in the request.

400.4

Missing required arguments (vol). - Argument vol=vol missing in the request.

400.4

Missing required arguments (volnew). - Argument volnew=new_vol missing in the request.

404.1

Volume 'test:data' does not exist. - Invalid application in the request.

404.1

Failed to rename volume 'test:data'. - Volume specified in the request is in-use.

404.1

Volume 'test:data2' does not exist. - Invalid volume specified in the request.

resize Method (vol Object)
Description

Resize a volume

Syntax
/api/v2/vol/resize?app=application&vol=volume&size=size&vdc=controller-name 
Arguments
app

Name of the application

vol

Name of the volume

size

Size of the volume

vdc

Name of the target virtual data center

Transaction Type

asynchronous

Request Type

GET

Examples

Resize test:vol1 to 2GB.

GET http://192.168.123.200/api/v2/vol/resize?app=test&vol=vol1&size=2G&vdc=mygrid 
Sample Output
XML:
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job> 
JSON:
{
   "job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
} 

HTTP Error Codes
404

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

400.4

Missing required arguments (app). - Argument app=app missing in the request.

400.4

Missing required arguments (vol). - Argument vol=vol missing in the request.

400.4

Missing required arguments (size). - Argument size=size missing in the request.

Note: To get the status of job, issue a /api/v2/job/info? request with the job_id returned above as the argument. For more information about how to obtain the job status, refer to the job object.

copy Method (vol Object)
Description

Copy a volume

Syntax
/api/v2/vol/copy?app=application&vol=volume&volnew=new-volume&vdc=controller-name 
Arguments
app

Name of the application

vol

Name of the volume

volnew

Name of the new volume

vdc

Name of the target virtual data center

Options
appnew

Name of the alternate application to copy the volume to. By default, the volume is copied to the original application.

Transaction Type

asynchronous

Request Type

GET

Examples

Copy a volume test:vol1 to test:vol2.

GET http://192.168.123.200/api/v2/vol/copy?app=test&vol=vol1&appnew=test&volnew=vol2&vdc=mygrid

Copy a volume atest:vol1 to btest:vol2.

http://192.168.123.200/api/v2/vol/copy?app=atest&vol=vol1&appnew=btest&volnew=vol2&vdc=mygrid 
Sample Output
XML:
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job> 
JSON:
{
   "job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
} 

HTTP Error Codes
404

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

400.4

Missing required arguments (app). - Argument app=app missing in the request.

400.4

Missing required arguments (vol). - Argument vol=vol missing in the request.

400.4

Missing required arguments (volnew). - Argument volnew=new_vol missing in the request.

Note: To get the status of job, issue a /api/v2/job/info? request with the job_id returned above as the argument. For more information about how to obtain the job status, refer to the job object.

export Method (vol Object)
Description

Export a volume to a container file on /vol/_impex/

Syntax
/api/v2/vol/export?app=application&vol=volume&target=filename.img.gz&vdc=controller-name 
Arguments
app

Name of the application or domain hosting the volume

vol

Name of the volume

target

Name of the container file to export the volume to.

Creates the file at the root of the import/export volume of the grid: /vol/_impex/ Optionally compresses the file using gzip (upon specification of .gz as a file name extent)

vdc

Name of the target virtual data center

Transaction Type

asynchronous

Request Type

GET

Examples

Export the volume test1:vol1 to the compressed container file /vol/_impex/test.img.gz.

GET http://192.168.123.200/api/v2/vol/export?app=test1&vol=vol1&target=test.img.gz&vdc=mygrid
Sample Output
XML:
<job>bdc176a5-c069-4b23-89d2-d933127a9765</job> 
JSON:
{
   "job" : "bdc176a5-c069-4b23-89d2-d933127a9765"
} 
HTTP Error Codes
404

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

400.4

Missing required arguments (app). - Argument app=app missing in the request.

400.4

Missing required arguments (vol). - Argument vol=vol missing in the request.

400.4

Missing required arguments (target). - Argument target=filename missing in the request.

Note: To get the status of job, issue a /api/v2/job/info? request with the job_id returned above as the argument. For more information about how to obtain the job status, refer to the job object.

import Method (vol Object)
Description

Import a volume from a container file on /vol/_impex/

Syntax
/api/v2/vol/import?app=application&vol=volume&target=filename.img.gz&vdc=controller-name
Arguments
app

Name of the application or domain to host the new volum

vol

Name of the new volume

target

Name of the container file to import the volume from.

Retrieves the volume data from the file located at the root of the import/export volume on the specified grid: /vol/_impex/ Expects gzip-compressed data if the file name extent is .gz

vdc

Name of the target virtual data center.

Transaction Type

asynchronous

Request Type

GET

Examples

Import the volume test2:vol2 from the compressed container file

/vol/_impex/test.img.gz.

GET

http://192.168.123.200/api/v2/vol/import?app=test2&vol=vol2&target=test.img.gz&vdc=mygrid
Sample Output
XML:

<job>bdc176a5-c069-4b23-89d2-d933127a9766</job>

JSON:

{
   "job" : "bdc176a5-c069-4b23-89d2-d933127a9766"
} 

HTTP Error Codes
404

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

400.4

Missing required arguments (app). - Argument app=app missing in the request.

400.4

Missing required arguments (vol). - Argument vol=vol missing in the request.

400.4

Missing required arguments (target). - Argument target=filename missing in the request.

Note: To get the status of job, issue a /api/v2/job/info? request with the job_id returned above as the argument. For more information about how to obtain the job status, refer to the job object.

move Method (vol Object)
Description

Move a volume to an alternate location

Syntax

/api/v2/vol/move?app=application&vol=volume&volnew=new-volume-location&vdc=controller-name

Arguments
app

Name of the source application

vol

Name of the volume

volnew

New volume location, in the form <application>:<volume_name>

vdc

Name of the target virtual data center

Transaction Type

asynchronous

Request Type

GET

Examples

Move a volume atest:vol1 to btest:vol2.

GET http://192.168.123.200/api/v2/vol/move?app=atest&vol=vol1&volnew=btest:vol2&vdc=mygrid
Sample Output
XML:

<job>be805915-76b2-48c8-b8a0-b881cca66da6</job>

JSON:

{

"job" : "be805915-76b2-48c8-b8a0-b881cca66da6"

}

HTTP Error Codes
404

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

400.4

Missing required arguments (app). - Argument app=app missing in the request.

400.4

Missing required arguments (vol). - Argument vol=vol missing in the request.

400.4

Missing required arguments (volnew). - Argument volnew=new_vol missing in the request.

Note: To get the status of job, issue a /api/v2/job/info? request with the job_id returned above as the argument. For more information about how to obtain the job status, refer to the job (see page 308) object.

relocate Method (vol Object)
Description

Relocate volumes to different volume stores or servers within the same grid (in CA AppLogic 3.5, this command was called vol/migrate)

Syntax
/api/v2/vol/relocate?app=application&name=app-or-volume&vdc=controller-name
Arguments
name

Name of the volume to relocate

vdc

Name of the target virtual data center

Options
store

Specify the volume store to which the volume is to be relocated. The value may be ‘san’ or ‘local’.

n

Specify the number of volumes to simultaneously relocate. Default: one volume at a time.

&all

Relocate all volumes that need relocation.

&status

List volumes that need relocation or the relocation status of a specific volume.

&suspend

Suspend ongoing volume relocations.

Transaction Type

asynchronous

Request Type

GET

Examples

Relocate an application volume MYAPP:data to a local store:

GET http://aux/api/v2/vol/relocate?name=MYAPP:data&store=local&vdc=mygrid

Relocate all volumes for application MYAPP to a SAN:

GET http://aux/api/v2/vol/relocate?name=MYAPP&store=san&vdc=mygrid

Relocate all volumes off disabled server(s), three at a time:

GET http://aux/api/v2/vol/relocate?&all&n=3&vdc=mygrid

Sample Output
XML:
 <job>b88969ea-9264-40b2-ba08-29b7ecbcc150</job>
JSON:
{
   "job" : "b88969ea-9264-40b2-ba08-29b7ecbcc150"
}
HTTP Error Codes
404

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

Note: To get the status of job, issue a /api/v2/job/info? request with the job_id returned above as the argument. For more information about how to obtain the job status, refer to the job object.

relocate_status Method (vol Object)
Description

Report on the state of volume relocations ongoing on a grid

Syntax
/api/v2/vol/relocate_status?&vdc=controller-name 
Arguments
vdc

Name of the target virtual data center

Transaction Type

asynchronous

Request Type

GET

Examples

Check the progress of volume relocations on grid mygrid:

GET http://aux/api/v2/vol/relocate_status?&vdc=mygrid 
Sample Output
XML:
<opt></opt>

JSON:
{
   "message" : ""
}

HTTP Error Codes
404

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

fscheck Method (vol Object)
Description

Verify the health of the filesystem on a volume

Syntax
/api/v2/vol/fscheck?app=application&vol=volume&vdc=controller-name 
Arguments
app

Name of the application

vol

Name of the volume

vdc

Name of the target virtual data center

Transaction Type

asynchronous

Request Type

GET

Examples

Verify the health of test:vol1 with fs=ext3.

GET http://192.168.123.200>/api/v2/vol/fscheck?app=test&vol=vol1&vdc=mygrid 
Sample Output
XML:
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job> 
JSON:
{
   "job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
} 

HTTP Error Codes
404

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

400.4

Missing required arguments (app). - Argument app=app missing in the request.

400.4

Missing required arguments (vol). - Argument vol=vol missing in the request.

Note: To get the status of job, issue a /api/v2/job/info? request with the job_id returned above as the argument. For more information about how to obtain the job status, refer to the job object.

fsrepair Method (vol Object)
Description

Verify and repair the filesystem on a volume

Syntax
/api/v2/vol/fsrepair?app=application&vol=volume&vdc=controller-name 
Arguments
app

Name of the application

vol

Name of the volume

vdc

Name of the target virtual data center

Transaction Type

asynchronous

Request Type

GET

Examples

Verify and repair test:vol1.

GET http://192.168.123.200/api/v2/vol/fsrepair?app=test&vol=vol1&vdc=mygrid 
Sample Output
XML:
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job> 
JSON:
{
   "job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
} 

HTTP Error Codes
404

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

400.4

Missing required arguments (app). - Argument app=app missing in the request.

400.4

Missing required arguments (vol). - Argument vol=vol missing in the request.

Note: To get the status of job, issue a /api/v2/job/info? request with the job_id returned above as the argument. For more information about how to obtain the job status, refer to the job object.

check Method (vol Object)
Description

Initiate background check for volumes that need repair

Syntax
/api/v2/vol/check?vdc=controller-name 
Arguments
vdc

Name of the target virtual data center

Transaction Type

asynchronous

Request Type

GET

Examples

Initiate background volume check.

GET http://192.168.123.200/api/v2/vol/check?vdc=mygrid 
Sample Output
XML:
<message>A background check for volumes that need repair has been initiated and may take a few minutes to complete. Execute 'vol repair --status' to retrieve the current state of the volumes that are being repaired.</message> 
JSON:
{
"message" : "A background check for volumes that need repair has been initiated and may take \na few minutes to complete. Execute 'vol repair --status' to retrieve the \ncurrent state of the volumes that are being repaired.\n"
} 

HTTP Error Codes
404

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

404

A background check for volumes that need repair is already in progress.

repair Method (vol Object)
Description

Repair degraded volume

Syntax
/api/v2/vol/repair?app=application&vol=volume&vdc=controller-name 
Arguments
app

Name of the application

vol

Name of the volume

vdc

Name of the target virtual data center

Transaction Type

asynchronous

Request Type

GET

Examples

Repair test:vol1.

GET http://192.168.123.200/api/v2/vol/repair?app=test&vol=vol1&vdc=mygrid 

Repair all volumes

GET http://192.168.123.200/api/v2/vol/repair?&all&vdc=mygrid

Sample Output
XML:
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job> 
JSON:
{
   "job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
} 

HTTP Error Codes
404

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

Note: The volume repairs start immediately if there are available servers to execute the repair, otherwise the volume is queued for repair and will start once there are available servers. To get the status of job, issue a /api/v2/job/info? request with the job_id returned above as the argument. For more information about how to obtain the job status, refer to the job object.

repair_status Method (vol Object)
Description

Retrieve list of current volume repair status

Syntax
/api/v2/vol/repair_status?app=application&vol=volume&vdc=controller-name 
Arguments
app

Name of the application

vol

Name of the volume

vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Examples

Retrieve list of repair status for test:vol1.

GET http://192.168.123.200/api/v2/vol/repair_status?app=test&vol=vol1&vdc=mygrid 
Sample Output
XML:
<volume>
  <comment></comment>
  <filesystem>ext3</filesystem>
  <link></link>
  <mirrors>
    <mirror>
      <name>srv1.v-e9937df4-28df-4e14-9f45-31d1668e7b4a</name>
      <server>srv1</server>
      <state>ok</state>
    </mirror>
    <mirror>
      <name>srv2.v-40b44d96-7a93-4edd-a13d-c320ea3d227d</name>
      <server>srv2</server>
      <state>ok</state>
    </mirror>
  </mirrors>
  <mount_attr>rw-excl</mount_attr>
  <mount_path>none</mount_path>
  <mount_state>in_use</mount_state>
  <n_mirrors>2</n_mirrors>
  <n_users>1</n_users>
  <name>conf</name>
  <size>53477376</size>
  <state>ok</state>
  <store>local</store>
  <time_accessed>1367537796</time_accessed>
  <time_created>1367449644</time_created>
  <time_written>1367449646</time_written>
  <uuid>93298b3c-d731-43b7-b7d9-2e98393f4263</uuid>
</volume>
JSON:
{
   "volume" : {
      "link" : "",
      "time_created" : "1367449644",
      "store" : "local",
      "mount_attr" : "rw-excl",
      "mirror" : [
         {
            "name" : "srv1.v-e9937df4-28df-4e14-9f45-31d1668e7b4a",
            "server" : "srv1",
            "state" : "ok"
         },
         {
            "name" : "srv2.v-40b44d96-7a93-4edd-a13d-c320ea3d227d",
            "server" : "srv2",
            "state" : "ok"
         }
      ],
      "time_accessed" : "1367537796",
      "name" : "conf",
      "uuid" : "93298b3c-d731-43b7-b7d9-2e98393f4263",
      "mount_state" : "in_use",
      "size" : "53477376",
      "state" : "ok",
      "n_users" : "1",
      "time_written" : "1367449646",
      "mount_path" : "none",
      "comment" : "",
      "filesystem" : "ext3",
      "n_mirrors" : "2"
   }
}

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

The specified volume 'test:data' does not exist. - Invalid application or volume specified in the request.

clean Method (vol Object)
Description

Destroy unused volume(s), unused volume streams, and volumes that have broken symbolic links

Syntax
/api/v2/vol/clean?vdc=controller-name 
Arguments
vdc

Name of the target virtual data center

Transaction Type

asynchronous

Request Type

GET

Examples

Destroy unused volume(s), unused volume streams, and volumes that have broken symbolic links.

GET http://192.168.123.200/api/v2/vol/clean?vdc=mygrid 
Sample Output
XML:
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job> 
JSON:
{
   "job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
} 

HTTP Error Codes
404

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

Note: To get the status of job, issue a /api/v2/job/info? request with the job_id returned above as the argument. For more information about how to obtain the job status, refer to the job object.