Previous Topic: info Method (vol Object)Next Topic: migrate Method (vol Object)


rename Method (vol Object)
Description

Rename a volume

Syntax
/api/v1/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/v1/vol/rename?app=test&vol=vol1&volnew=vol2&vdc=mygrid 
Sample Output
XML:
<opt></opt>
JSON:
{} 

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/v1/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/v1/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/v1/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/v1/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/v1/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/v1/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/v1/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/v1/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/v1/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/v1/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/v1/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/v1/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/v1/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/v1/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/v1/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.