Unlock an application
/api/v1/app/unlock?app=application&pwd=password&vdc=controller-name
Name of the application
Password
Name of the target virtual data center
synchronous
GET
Unlock application test.
GET http://192.168.123.200/api/v1/app/unlock?app=test&pwd=password&vdc=mygrid
<opt></opt>
{}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Missing required arguments (app). - Argument app=app missing in the request.
Missing required arguments (pwd). - Argument pwd=password missing in the request.
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.
Log in an application and run a specified shell command.
/api/v1/app/exec?app=application&cmd=command&vdc=controller-name
Name of the application
Shell command to run.
Name of the target virtual data center
synchronous
GET
Run the ‘df’ command on application test.
GET http://192.168.123.200/api/v1/app/exec?app=test&cmd=’df’&vdc=mygrid
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Missing required arguments (cmd). - Argument cmd=command missing in the request.
Application test does not exist. - An invalid application name was specified in the request.
Clean instantiated application volumes
/api/v1/app/clean?app=application&vdc=controller-name
Name of the application
Name of the target virtual data center
asynchronous
GET
Clean application named test
GET http://192.168.123.200/api/v1/app/clean?app=test&vdc=mygrid
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job>
{
"job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
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.
Prepare application for running.
/api/v1/app/build?app=application&vdc=controller-name
Name of the application
Name of the target virtual data center
asynchronous
GET
Build application named test
GET http://192.168.123.200/api/v1/app/build?app=test&vdc=mygrid
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job>
{
"job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
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 starting of an application.
/api/v1/app/continue?app=application&vdc=controller-name
Name of the application
Name of the target virtual data center
asynchronous
GET
Continue starting of application named test
GET http://192.168.123.200/api/v1/app/continue?app=test&vdc=mygrid
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job>
{
"job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
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 an application.
/api/v1/app/repair?app=application&vdc=controller-name
Name of the application
Name of the target virtual data center
asynchronous
GET
Repair application named test
GET http://192.168.123.200/api/v1/app/repair?app=test&vdc=mygrid
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job>
{
"job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
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 an application.
/api/v1/app/export?app=application&target=directory-or-file&vdc=controller-name
Name of the application
One of the following:
Name of the exchange directory relative to /vol/_impex where the application is to be exported to.
Default: application 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 |
Name of the target virtual data center
asynchronous
GET
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
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job>
{
"job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
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 an application.
/api/v1/app/import?app=application&target=directory-or-file&vdc=controller-name
Name of the application
One of the following:
Name of the exchange directory relative to /vol/_impex where the application is to be imported from.
Default: application name
Name of tar file, optionally compressed to gzip or bzip2 format.
Name of the target virtual data center
asynchronous
GET
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
XML
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job>
JSON
{
"job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
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.
Retrieve application package descriptor.
/api/v1/app/get_desc?app=application&vdc=controller-name
Name of the application
Name of the target virtual data center
synchronous
GET
Retrieve package descriptor of application test
GET http://192.168.123.200/api/v1/app/get_desc?app=test&vdc=mygrid
<message>package test
{
type = application
description = quot;test description"
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>
{
"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"
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Missing required arguments (app). - Argument app=app missing in the request.
Entity not found – Permission denied – application ‘test’ does not exist.
Replace application package descriptor.
/api/v1/app/put_desc?vdc=controller-name -F app=application -F desc=@descriptor-file
Name of the application
Name of the package descriptor file
Name of the target virtual data center
synchronous
POST: multipart/form-data
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
<message></message>
{
"message" : ""
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Missing required arguments (app). - Argument app=app missing in the request.
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.
|
Copyright © 2012 CA.
All rights reserved.
|
|