Previous Topic: lock Method (app Object)Next Topic: get_acl Method (app Object)


unlock Method (app Object)
Description

Unlock an application

Syntax
/api/v1/app/unlock?app=application&pwd=password&vdc=controller-name 
Arguments
app

Name of the application

pwd

Password

vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Examples

Unlock application test.

GET http://192.168.123.200/api/v1/app/unlock?app=test&pwd=password&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 (pwd). - Argument pwd=password missing in the request.

404.1

Application test does not exist. - An invalid application name was specified in the request.

Note: If the application was locked with a password, the passwords must match. If the application was locked without a password, then only an administrator may unlock the application.

exec Method (app Object)
Description

Log in an application and run a specified shell command.

Syntax

/api/v1/app/exec?app=application&cmd=command&vdc=controller-name

Arguments
app

Name of the application

cmd

Shell command to run.

vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Examples

Run the ‘df’ command on application test.

GET http://192.168.123.200/api/v1/app/exec?app=test&cmd=’df’&vdc=mygrid 
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 (cmd). - Argument cmd=command missing in the request.

404.1

Application test does not exist. - An invalid application name was specified in the request.

clean Method (app Object)
Description

Clean instantiated application volumes

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

Name of the application

vdc

Name of the target virtual data center

Transaction Type

asynchronous

Request Type

GET

Examples

Clean application named test

GET http://192.168.123.200/api/v1/app/clean?app=test&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.

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.

build Method (app Object)
Description

Prepare application for running.

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

Name of the application

vdc

Name of the target virtual data center

Transaction Type

asynchronous

Request Type

GET

Examples

Build application named test

GET http://192.168.123.200/api/v1/app/build?app=test&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.

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.

continue Method (app Object)
Description

Continue starting of an application.

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

Name of the application

vdc

Name of the target virtual data center

Transaction Type

asynchronous

Request Type

GET

Examples

Continue starting of application named test

GET http://192.168.123.200/api/v1/app/continue?app=test&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.

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.

repair Method (app Object)
Description

Repair an application.

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

Name of the application

vdc

Name of the target virtual data center

Transaction Type

asynchronous

Request Type

GET

Examples

Repair application named test

GET http://192.168.123.200/api/v1/app/repair?app=test&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.

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 (app Object)
Description

Export an application.

Syntax
/api/v1/app/export?app=application&target=directory-or-file&vdc=controller-name
Arguments
app

Name of the application

directory-or-file (optional)

One of the following:

Exchange Directory Name

Name of the exchange directory relative to /vol/_impex where the application is to be exported to.

Default: application name

Tar File Name

Name of tar file that is supposed to contain the exported application. The specified file must have one of the following extensions:

.tar

Creates a tar archive without compression

.tar.gz

Creates a zipped tar archive

.tar.bz2

Creates a bzip2 tar archive

vdc

Name of the target virtual data center

Transaction Type

asynchronous

Request Type

GET

Examples

Export application named test:

GET http://192.168.123.200/api/v1/app/export?app=test&vdc=mygrid 

Export application named test to compressed tar file test.tar.gz:

GET http://192.168.123.200/api/v1/app/export?app=test&target=test.tar.bz2&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.

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 (app Object)
Description

Import an application.

Syntax
/api/v1/app/import?app=application&target=directory-or-file&vdc=controller-name
Arguments
app

Name of the application

directory-or-file (optional)

One of the following:

Exchange Directory Name

Name of the exchange directory relative to /vol/_impex where the application is to be imported from.

Default: application name

Tar File Name

Name of tar file, optionally compressed to gzip or bzip2 format.

vdc

Name of the target virtual data center

Transaction Type

asynchronous

Request Type

GET

Examples

Import application named test:

GET http://192.168.123.200/api/v1/app/import?app=test&vdc=mygrid 

Import application named test, from sub-directory myapps:

GET http://192.168.123.200/api/v1/app/import?app=test&target=myapps&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.

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.

get_desc Method (app Object)
Description

Retrieve application package descriptor.

Syntax
/api/v1/app/get_desc?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 package descriptor of application test

GET http://192.168.123.200/api/v1/app/get_desc?app=test&vdc=mygrid 
Sample Output
XML:
<message>package test
   { 
   type          = application 
   description   = quot;test description&quot; 
   uid           = 12 
 
   package local : file = local/package.desc , type      = catalog 
 
   class top     : top                       , singleton 
   class main    : file = main.desc          , singleton 
   } 
 
assembly top 
   { 
   .category        = General 
 
   subordinate main : .class = main 
 
   visual 
      { 
      color = gray 
      style = small 
      pan_x = 0 
      pan_y = 0 
      } 
   } 
</message>
JSON:
{ 
   "message" : "package test\n   {\n   type          = application\n   description   = \"test description\"\n uid           = 12\n\n   package local : file = local/package.desc , type      = catalog\n\n   class top : top                       , singleton\n   class main    : file = main.desc          , singleton\n   }\n\nassembly top\n   {\n   .category = General\n\n   subordinate main : .class = main\n\n visual\n      {\n      color = gray\n      style = small\n pan_x = 0\n      pan_y = 0\n      }\n   }\n"
}

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.

404.1

Entity not found – Permission denied – application ‘test’ does not exist.

put_desc Method (app Object)
Description

Replace application package descriptor.

Syntax
/api/v1/app/put_desc?vdc=controller-name -F app=application -F desc=@descriptor-file
Arguments
app

Name of the application

desc

Name of the package descriptor file

vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

POST: multipart/form-data

Examples

Replace package descriptor of application named test

POST http://192.168.123.200/api/v1/app/put_desc?vdc=mygrid -F app=app -F desc=@desc.txt 
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.

404.1

Entity not found – Permission denied – application ‘test’ does not exist.

Note: Currently only requests of type “multipart/form-data” are supported. The descriptor file is expected to be UDL compliant.