Previous Topic: get_acl Method (template Object)Next Topic: rename Method (app Object)


app Object

Method

Description

list

Retrieve list of applications

info

Retrieve application info

create

Create a new application

destroy

Destroy an application

provision

Provision an application from a template.

rename

Rename an application

config

Retrieve application configuration parameters

config_boundary

Retrieve application boundary

start

Start an application

stop

Stop an application

stop_all

Stop all applications

copy

Copy an application

restart

Restart an application

migrate

Migrate an application from a remote grid

lock

Lock an application

unlock

Unlock an application

exec

Log in to an application and run a specified shell command.

clean

Clean instantiated application volumes

build

Prepare application for running

continue

Continue starting of an application

repair

Repair an application

export

Export an application

import

Import an application

get_desc

Retrieve application package descriptor

put_desc

Replace application package descriptor

get_acl

Retrieves the application ACL or portion of the application ACL

put_acl

Replace the entire application ACL

modify_acl

Replace portion of application ACL

list Method (app Object)
Description

Retrieve a list of applications

Syntax
/api/v<vers>/app/list?vdc=controller-name 
Arguments
vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Examples

Retrieve a list of applications.

GET http://192.168.123.200/api/v1/app/list?vdc=mygrid 
Sample Output
XML:
<applications> 
   <application> 
      name>J2EE</name> 
      description>J2EE application</description> 
      destroy_on_stop>0</destroy_on_stop> 
      doc_url></doc_url> 
      id>2</id> 
      state>stopped</state> 
      template>0</template> 
      user1></user1> 
      user2></user2> 
   </application> 
   <application> 
      name>Lamp</name> 
      description>Lamp application</description> 
      destroy_on_stop>0</destroy_on_stop> 
      doc_url></doc_url> 
      id>3</id> 
      state>running</state>
      template>0</template> 
      user1></user1> 
      user2></user2> 
   </application>
   . 
   . 
   . 
</applications> 
JSON:
{ 
   "application" : [ 
      { 
         "template" : "0", 
         "user1" : "", 
         "name" : "J2EE", br>         "description" : "J2EE application",
         "state" : "stopped", 
         "doc_url" : "", 
         "destroy_on_stop" : "0", br>         "id" : "2", 
         "user2" : "" 
      }, 
      
      { 
         "template" : "0", 
         "user1" : "", 
         "name" : "Lamp", 
         "description" : "Lamp application", 
         "state" : "running", 
         "doc_url" : "", 
         "destroy_on_stop" : "0", 
         "id" : "3", 
         "user2" : "" 
      },
      . 
      . 
      . 
   ] 
} 
HTTP Error Codes
404

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

info Method (app Object)
Description

Retrieve application info

Syntax
/api/v1/app/info?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 information for an application named test.

GET http://192.168.123.200/api/v1/app/info?app=test&vdc=mygrid 
Sample Output
XML:
<application> 
    <name>test</name> 
    <bw>1000000</bw> 
    <cpu>0.25</cpu> 
    <description>Virtual Dedicated Server - Based on CentOS 5.1 (v1.0.14-1)</description> 
    <destroy_on_stop>0</destroy_on_stop> 
    <dflt_appliance></dflt_appliance> 
    <dflt_appliance_opts></dflt_appliance_opts> 
    <doc_url>http://doc.3tera.net/AppLogic27/RefAppsVdsLinux.html</doc_url> 
    <id>12</id> 
    <incomplete>0</incomplete> 
    <locked>0</locked> 
    <mem>268435456</mem> 
    <state>stopped</state> 
    <template>0</template> 
    <user1></user1> 
    <user2></user2> 
</application>
JSON:
{ 
    "locked" : "0", 
    "template" : "0", 
    "cpu" : "0.25", 
    "user1" : "", 
    "name" : "test", 
    "dflt_appliance" : "", 
    "description" : "Virtual Dedicated Server - Based on CentOS 5.1 (v1.0.14-1)", 
    "state" : "stopped", 
    "bw" : "1000000", 
    "incomplete" : "0", 
    "doc_url" : "http://doc.3tera.net/AppLogic27/RefAppsVdsLinux.html", 
    "dflt_appliance_opts" : "", 
    "destroy_on_stop" : "0", 
    "id" : "12", 
    "mem" : "268435456", 
    "user2" : "" 
} 
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-name not specified in the request.

404.1

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

create Method (app Object)
Description

Create a new application

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

Name of the new application

vdc

Name of the target virtual data center

Options

See Application Control in the Command Line Shell Reference for descriptions of the options available for this command.

Transaction Type

asynchronous

Request Type

GET

Examples

Create a new empty application named test.

GET http://192.168.123.200/api/v1/app/create?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.

destroy Method (app Object)
Description

Destroy an application

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

Name of the application to be destroyed

vdc

Name of the target virtual data center

Transaction Type

asynchronous

Request Type

GET

Examples

Destroy an application named test.

GET http://192.168.123.200/api/v1/app/destroy?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.

provision Method (app Object)
Description

Provision from a template, configure, and optionally start an application.

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

Name of the new application

template

Name of the template application

vdc

Name of the target virtual data center.

Options

See Application Control in the Command Line Shell Reference for descriptions of the options available for this command.

Transaction Type

asynchronous

Request Type

GET

Examples

Provision an application named test from VDS_CentOS51_r15 template.

GET http://192.168.123.200/api/v1/app/provision?app=test&template=VDS_CentOS51_r15&vdc=mygridcode2

Sample Output
XML:

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

JSON:

{
   "job" : "be805915-76b2-48c8-b8a0-b881cca66db7"
}

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 (template). - Argument template=template missing in the request.

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.