Rename an application template
/api/v1/template/rename?template=template&new_name=new-template&vdc=controller-name
Name of the template to be renamed
New name of the template
Name of the target virtual data center
synchronous
GET
Rename a template named TWiki_r4 to TWiki_r5.
GET http://192.168.123.200/api/v1/template/rename?template=TWiki_r4&new_name=TWiki_r5&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 (template). - Argument template=template missing in the request.
Missing required arguments (new_name). - Argument new_name=new-name missing in the request.
Entity not found – Permission Denied – application VDS_CentOS_r1 does not exist.
Destroy an application template
/api/v1/template/destroy?template=application&vdc=controller-name
Name of the application template to be destroyed
Name of the target virtual data center
asynchronous
GET
Destroy an application template named test.
GET http://192.168.123.200/api/v1/template/destroy?template=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 (template). - Argument template=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 template.
/api/v1/template/import?template=application&target=directory-or-file&vdc=controller-name
Name of the application template
vdc
Name of the target Virtual Data Center
asynchronous
GET
Import application template named test
GET http://192.168.123.200/api/v1/template/import?template=test&vdc=mygrid
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job>
{
"job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
}
All the output in JSON is UTF8 encoded. Use a UTF8 decode to decode the UTF8 encoded output.
The following is an example of a simple PHP script to decode UTF8 encoded JSON output:
<?
$json = '{"a": "\u00e3\u0081\u0082" }';
$j = json_decode($json);
echo utf8_decode($j->{'a'});
?>
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Missing required arguments (template). - Argument template=app missing in the request.
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 job object.
Export an application template.
/api/v1/template/export?template=application&target=directory-or-file&vdc=controller-name
Name of the application template
Name of the target Virtual Data Center
asynchronous
GET
Export application template named test
GET http://192.168.123.200/api/v1/template/export?template=test&vdc=mygrid
XML
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job>
JSON
{
"job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
}
All the output in JSON is UTF8 encoded. Use a UTF8 decode to decode the UTF8 encoded output.
The following is an example of a simple PHP script to decode UTF8 encoded JSON output:
<?
$json = '{"a": "\u00e3\u0081\u0082" }';
$j = json_decode($json);
echo utf8_decode($j->{'a'});
?>
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Missing required arguments (template). - Argument template=app missing in the request.
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 job object.
Copy an application template
/api/v1/template/copy?template=application&new_name=new-application&vdc=controller-name
Name of the application template to be copied
Name of the new application template
Name of the target virtual data center
asynchronous
GET
Copy an application template named test to test2.
GET http://192.168.123.200/api/v1/template/copy?template=test&new_name=test2&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 (template). - Argument template=app missing in the request.
Missing required arguments (new_name). - Argument new=new-name 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.
Migrate an application template from a remote grid
/api/v1/template/migrate?grid=remote-grid&template=application&vdc=controller-name
Controller IP or FQDN of a remote grid
Name of the application template to be migrated
Name of the target virtual data center
See Application Control in the Command Line Shell Reference for descriptions of the options available for this command.
Note: The migrate method does not support SSH agent forwarding.
asynchronous
GET
Migrate an application template named test from remote-grid.mygrid.net.
GET http://192.168.123.200/api/v1/template/migrate?grid=remote-grid.mygrid.net&template=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 (template). - Argument template=app missing in the request.
Missing required arguments (grid). - Argument grid=remote-grid 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 template configuration parameters
/api/v1/template/config?template=template&vdc=controller-name
Name of the application template
Name of the target virtual data center
See Application Control in the Command Line Shell Reference for descriptions of the options available for this command.
Note: The template object in the Web Services API relates to the application object of the shell.
synchronous
GET
Retrieve configuration parameters for template VDS_CentOS51_r15.
GET http://192.168.123.200/api/v1/template/config?template=VDS_CentOS51_r15&vdc=mygrid
<config> <name>VDS_CentOS51_r15</name> <__description>Virtual Dedicated Server - Based on CentOS 5.1 (v1.0.14-1)</__description> <__doc_url>http://doc.3tera.net/AppLogic27/RefAppsVdsLinux.html</__doc_url> <__template>0</__template> </config>
{
"__doc_url" : "http://doc.3tera.net/AppLogic27/RefAppsVdsLinux.html",
"__template" : "0",
"__description" : "Virtual Dedicated Server - Based on CentOS 5.1 (v1.0.14-1)",
"name" : "VDS_CentOS51_r15"
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Missing required arguments (template). - Argument template=template missing in the request.
Entity not found – Permission Denied – application VDS_CentOS_r1 does not exist.
|
Copyright © 2012 CA.
All rights reserved.
|
|