Use this object to create, configure and manage applications on a VDC.
|
Method |
Description |
|
Retrieve list of applications |
|
|
Retrieve application info |
|
|
Create a new application |
|
|
Destroy an application |
|
|
Provision an application from a template. |
|
|
Rename an application |
|
|
Retrieve application configuration parameters |
|
|
Retrieve application boundary |
|
|
Start an application |
|
|
Stop an application |
|
|
Stop all applications |
|
|
Copy an application |
|
|
Restart an application |
|
|
Migrate an application from a remote grid |
|
|
Lock an application |
|
|
Unlock an application |
|
|
Run a shell command on a specified application |
|
|
Clean instantiated application volumes |
|
|
Prepare application for running |
|
|
Continue starting of an application |
|
|
Repair an application |
|
|
Export an application |
|
|
Import an application |
|
|
Retrieve application package descriptor |
|
|
Replace application package descriptor |
|
|
Retrieves the application ACL or portion of the application ACL |
|
|
Replace the entire application ACL |
|
|
Replace portion of application ACL |
Retrieve a list of applications
/api/v<vers>/app/list?vdc=controller-name
Name of the target virtual data center
synchronous
GET
Retrieve a list of applications.
GET http://192.168.123.200/api/v2/app/list?vdc=mygrid
<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>
{
"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" : ""
},
.
.
.
]
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Retrieve application info
/api/v2/app/info?app=application&vdc=controller-name
Name of the application
Name of the target virtual data center
synchronous
GET
Retrieve information for an application named test.
GET http://192.168.123.200/api/v2/app/info?app=test&vdc=mygrid
<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>
{
"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" : ""
}
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-name not specified in the request.
Entity not found – Permission denied – application ‘test123’ does not exist.
Create a new application
/api/v2/app/create?app=application&vdc=controller-name
Name of the new application
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.
asynchronous
GET
Create a new empty application named test.
GET http://192.168.123.200/api/v2/app/create?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/v2/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 an application
/api/v2/app/destroy?app=application&vdc=controller-name
Name of the application to be destroyed
Name of the target virtual data center
asynchronous
GET
Destroy an application named test.
GET http://192.168.123.200/api/v2/app/destroy?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/v2/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 from a template, configure, and optionally start an application.
/api/v2/app/provision?app=application&template=template&vdc=controller-name
Name of the new application
Name of the template application
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.
asynchronous
GET
Provision an application named test from VDS_CentOS51_r15 template.
GET http://192.168.123.200/api/v2/app/provision?app=test&template=VDS_CentOS51_r15&vdc=mygridcode2
<job>be805915-76b2-48c8-b8a0-b881cca66db7</job>
{
"job" : "be805915-76b2-48c8-b8a0-b881cca66db7"
}
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 (app). - Argument app=app missing in the request.
Note: To get the status of job, issue a /api/v2/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.
Rename an application
/api/v2/app/rename?app=application&new_name=new-application&vdc=controller-name
Name of the application to be renamed
New name of the application
Name of the target virtual data center
synchronous
GET
Rename an application named test to test2.
GET http://192.168.123.200/api/v2/app/rename?app=test&new_name=test2&vdc=mygrid
<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.
Missing required arguments (new_name). - Argument new=new-name missing in the request.
Entity not found – Permission denied – application ‘test123’ does not exist.
Retrieve application configuration parameters
/api/v2/app/config?app=application&vdc=controller-name
Name of the application
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.
synchronous
GET
Retrieve configuration parameters for application test.
GET http://192.168.123.200/api/v2/app/config?app=test&vdc=mygrid
<config> <name>test</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" : "test"
}
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.
Application test does not exist. - An invalid application name was specified in the request.
Note: This method has been deprecated and is included here for compatibility with existing user scripts. New users should use the config command with the option flag &boundary.
Retrieve application boundary
/api/v2/app/config_boundary?app=application&vdc=controller-name
Name of the application
Name of the target virtual data center
synchronous
GET
Retrieve boundary for application main.
GET http://192.168.123.200/api/v2/app/config_boundary?app=main&vdc=mygrid
<boundary>
<interface>
<name>ext</name>
</interface>
<name>main</name>
<properties>
<property>
<mandatory>1</mandatory>
<name>mode</name>
<type>string</type>
<values>manual|format|fscopy|fsck|fsrepair</values>
</property>
.
.
.
<property>
<dflt></dflt>
<name>adv_options</name>
<type>string</type>
</property>
</properties>
<resources>
<resource>
<dflt>512M</dflt>
<max>1024M</max>
<min>160M</min>
<name>mem</name>
</resource>
.
.
.
</resource>
</resources>
<volume>
<name>dst</name>
</volume>
</boundary>
{
"resource" : [
{
"min" : "160M",
"max" : "1024M",
"name" : "mem",
"dflt" : "512M"
},
.
.
.
{
"min" : "1000K",
"max" : "1000K",
"name" : "bw",
"dflt" : "1000K"
}
],
"volume" : {
"name" : "dst"
},
"interface" : {
"name" : "ext"
},
"name" : "main",
"property" : [
{
"name" : "mode",
"type" : "string",
"values" : "manual|format|fscopy|fsck|fsrepair",
"mandatory" : 1
},
{
"name" : "fs_type_src",
"type" : "string",
"values" : "ext2|ext3|ext4|fat16|fat32|reiserfs|swap|ext3-
snapshot|iso9660|partitioned|ufssol|zfs|raw",
"dflt" : ""
},
{
"name" : "fs_type_dst",
"type" : "string",
"values" : "ext2|ext3|ext4|fat16|fat32|reiserfs|swap|ext3-
snapshot|iso9660|partitioned|ufssol|zfs|raw",
"dflt" : ""
},
.
.
.
{
"name" : "adv_options",
"type" : "string",
"dflt" : ""
}
]
}
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.
Start an application
/api/v2/app/start?app=application&vdc=controller-name
Name of the application to be started
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.
asynchronous
GET
Start an application named test.
GET http://192.168.123.200/api/v2/app/start?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/v2/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.
Stop an application
/api/v2/app/stop?app=application&vdc=controller-name
Name of the application to be stopped
Name of the target virtual data center
asynchronous
GET
Stop an application named test.
GET http://192.168.123.200/api/v2/app/stop?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/v2/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.
Note: This method has been deprecated and is included here for compatibility with existing user scripts. New users should use the stop command with the option flag &all.
Stop all applications
/api/v2/app/stop_all?vdc=controller-name
Name of the target virtual data center
asynchronous
GET
Stop all applications.
GET http://192.168.123.200/api/v2/app/stop_all?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.
Note: To get the status of job, issue a /api/v2/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 an application
/api/v2/app/copy?app=application&new_name=new-application&vdc=controller-name
Name of the application to be copied
Name of the new application
Name of the target virtual data center
asynchronous
GET
Copy an application named test to test2.
GET http://192.168.123.200/api/v2/app/copy?app=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 (app). - Argument app=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/v2/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.
Restart an application
/api/v2/app/restart?app=application&vdc=controller-name
Name of the application to be restarted
Name of the target virtual data center
asynchronous
GET
Restart an application named test.
GET http://192.168.123.200/api/v2/app/restart?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/v2/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 from a remote grid
/api/v2/app/migrate?grid=remote-grid&app=application&vdc=controller-name
Controller IP or FQDN of a remote grid
Name of the application 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 named test from remote-grid.mygrid.net.
GET http://192.168.123.200/api/v2/app/migrate?grid=remote-grid.mygrid.net&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.
Missing required arguments (grid). - Argument grid=remote-grid missing in the request.
Note: To get the status of job, issue a /api/v2/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.
Lock an application
/api/v2/app/lock?app=application&pwd=password&vdc=controller-name
Name of the application
Password
Name of the target virtual data center
synchronous
GET
Lock application test.
GET http://192.168.123.200/api/v2/app/lock?app=test&pwd=password&vdc=mygrid
<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.
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: The password that is used to lock an application is required to unlock the application. When an application is locked, no volumes belonging to the application may be managed and the application cannot be modified in any way.
Unlock an application
/api/v2/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/v2/app/unlock?app=test&pwd=password&vdc=mygrid
<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.
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.
Run a shell command on a specified application.
/api/v2/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/v2/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.
Note: The command will not run unless an ACL is set on the target application to authorize the user representing the Web Services API to control the application.
Clean instantiated application volumes
/api/v2/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/v2/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/v2/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/v2/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/v2/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/v2/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/v2/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/v2/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/v2/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/v2/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/v2/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/v2/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/v2/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/v2/app/export?app=test&vdc=mygrid
Export application named test to compressed tar file test.tar.gz:
GET http://192.168.123.200/api/v2/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/v2/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/v2/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/v2/app/import?app=test&vdc=mygrid
Import application named test, from sub-directory myapps:
GET http://192.168.123.200/api/v2/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/v2/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/v2/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/v2/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/v2/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/v2/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.
Retrieve the application ACL, or portion of the application ACL, that relates to a particular principal.
/api/v2/app/get_acl?app=application&principal=<principal>&vdc=controller-name
Name of the application
A URL-encoded principal. For example, local:user:api@3tera.com should be passed as local%3Auser%3Aapi%403tera.com
Name of the target virtual data center
synchronous
GET
Example: Retrieve Application ACL
Retrieve application ACL for application test
GET http://192.168.123.200/api/v2/app/get_acl?app=test&principal=&vdc=mygrid
{
"acl" : {
"owner" : {
"id" : ""
},
"entries" : [
{
"configure" : 1,
"id" : "778fee4e-9b83-4160-8b79-8bb0e1a87af8"
}
]
}
}
<acl>
<entries>
<entry>
<configure>1</configure>
<id>778fee4e-9b83-4160-8b79-8bb0e1a87af8</id>
</entry>
</entries>
<owner>
<id></id>
</owner>
</acl>
Example: Retrieve the ACL Data for principal
Retrieve the ACL data for principal local:user:api@3tera.com for application test.
GET http://192.168.123.200/api/v2/app/get_acl?app=test&principal=local%3Auser%3Aapi%403tera.com&vdc=mygrid
{
"acl" : {
"owner" : {
"id" : ""
},
"entries" : [
{
"id" : "f9939715-e340-4e09-b179-f61e3b031338",
"full" : 1
},
{
"id" : "932b639b-2f78-4415-9c3b-22a2a98ce9fe",
"full" : 1
},
{
"configure" : 1,
"id" : "778fee4e-9b83-4160-8b79-8bb0e1a87af8"
}
]
}
}
<acl>
<entries>
<entry>
<full>1</full>
<id>f9939715-e340-4e09-b179-f61e3b031338</id>
</entry>
<entry>
<full>1</full>
<id>932b639b-2f78-4415-9c3b-22a2a98ce9fe</id>
</entry>
<entry>
<configure>1</configure>
<id>778fee4e-9b83-4160-8b79-8bb0e1a87af8</id>
</entry>
</entries>
<owner>
<id></id>
</owner>
</acl>
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 (principal)
- Argument principal=principal missing
Entity not found - Application test does not exist.
- An application was specified that does not exist on mygrid.
Entity not found - Failed to retrieve application ACL - ACL does not contain principal local user 'test@3tera.com'.
- An invalid principal was specified
Note: This API is available with WS_API_r6-1.0.6-1 and above.
Replace the entire application ACL.
/api/v2/app/put_acl?app=application&owner=<owner>&acl=<ACLs>&vdc=controller-name
Name of the application
owner
A URL-encoded owner attribute of the application ACL to the specified principal. For example, local:user:api@3tera.com should be passed as local%3Auser%3Aapi%403tera.com
A URL-encoded owner attribute of the grid ACL to the specified principal
URL-encoded list of principals separated with a slash (/)
Name of the target virtual data center
Synchronous
GET
Replace the entire ACL for application test with an owner api@3tera.com
GET http://192.168.123.200/api/v2/app/put_acl?app=test&owner=local%3Auser%3Aapi%403tera.com&acl=&vdc=mygrid
Replace the entire ACL for application test with an owner api@3tera.com and principal local:user:api@3tera.com=full
GET http://192.168.123.200/api/v2/app/put_acl?app=test&owner=local%3Auser%3Aapi%403tera.com&acl= local%3Auser%3Aapi%403tera.com%3Dfull&vdc=mygrid
Replace the entire ACL for application test with an owner api@3tera.com and principal local:user:api@3tera.com=full/local:user:test@3tera.com=configure.
GET http://192.168.123.200/api/v2/app/put_acl?app=test&owner=local%3Auser%3Aapi%403tera.com&acl=local%3Auser%3Aapi%403tera.com%3Dfull%2Flocal%3Auser%3Atest%403tera.com%3Dconfigure&vdc=mygrid
JSON
{
"message" : ""
}
XML
<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.
Missing required arguments (owner)
- Argument owner=owner
Missing required arguments (acl)
- Argument acl=acl missing
Entity not found - Application test does not exist.
- An application was specified that does not exist on mygrid.
Entity not found - Failed to put application ACL - invalid principal data - principal local user 'test@3tera.com' does not exist.
- An invalid owner or acl was specified
This API is available with WS_API_r6-1.0.6-1 and above.
Replace the portion of the application ACL that relates to the owner or a principal.
/api/v2/app/modify_acl?app=application&acl=<ACLs>&vdc=controller-name
Name of the application
URL-encoded list of principals separated with a slash (/)
Name of the target virtual data center
Synchronous
GET
Modify the ACL for application test by replacing the owner with api@3tera.com
GET http://192.168.123.200/api/v2/app/modify_acl?app=test&acl=local%3Auser%3Aapi%403tera.com%3Downer&vdc=mygrid
Modify the ACL for application test by replacing the owner api@3tera.com and principal local:user:api@3tera.com=full
GET http://192.168.123.200/api/v2/app/modify_acl?app=test&acl=local%3Auser%3Aapi%403tera.com%3Downer%2Flocal%3Auser%3Aapi%403tera.com%3Dfull&vdc=mygrid
Modify the ACL for application by replacing the access levels for test@3tera.com and api@3tera.com and principal local:user:api@3tera.com=configure/local:user:test@3tera.com=read.
GET http://192.168.123.200/api/v2/app/modify_acl?app=test&acl=local%3Auser%3Aapi%403tera.com%3Dconfigure%2Flocal%3Auser%3Atest%403tera.com%3Dread&vdc=mygrid
{
"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
Missing required arguments (acl)
- Argument acl=acl missing
Entity not found - Application test does not exist.
- An application was specified that does not exist on mygrid.
Entity not found - Failed to put application ACL - invalid principal data - principal local user 'test@3tera.com' does not exist.
- An invalid owner or acl was specified
Note: This API is available with WS_API_r6-1.0.6-1 and above.
|
Copyright © 2013 CA Technologies.
All rights reserved.
|
|