Retrieve the application ACL, or portion of the application ACL, that relates to a particular principal.
/api/v1/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/v1/app/get_acl?app=test&principal=&vdc=mygrid
{
"acl" : {
"owner" : {
"id" : "b543eff7-db88-4d79-a11c-4de22d5e6d3b"
},
"entries" : {
"entries[0]" : {
"id" : "4f865f5b-e63a-410a-9d9a-96427c3ecfc7",
"full" : 1
},
"entries[1]" : {
"id" : "b543eff7-db88-4d79-a11c-4de22d5e6d3b",
"full" : 1
}
}
}
}
<acl>
<entries>
<name>entries[0]</name>
<full>1</full>
<id>4f865f5b-e63a-410a-9d9a-96427c3ecfc7</id>
</entries>
<entries>
<name>entries[1]</name>
<configure>1</configure>
<id>b543eff7-db88-4d79-a11c-4de22d5e6d3b</id>
</entries>
<owner>
<id>b543eff7-db88-4d79-a11c-4de22d5e6d3b</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/v1/app/get_acl?app=test&principal=local%3Auser%3Aapi%403tera.com&vdc=mygrid
{
"acl" : {
"entries" : {
"entries[0]" : {
"id" : "4f865f5b-e63a-410a-9d9a-96427c3ecfc7",
"full" : 1
}
}
}
<acl>
<entries>
<name>entries[0]</name>
<full>1</full>
<id>4f865f5b-e63a-410a-9d9a-96427c3ecfc7</id>
</entries>
</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/v1/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/v1/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/v1/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/v1/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/v1/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/v1/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/v1/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/v1/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 © 2012 CA.
All rights reserved.
|
|