Previous Topic: rename Method (cat Object)Next Topic: class Object


get_acl Method (cat Object)
Description

Retrieve the global catalog ACL, or display that portion of the global catalog ACL which relates to a particular principal.

Syntax
/api/v1/cat/get_acl?cat=catalog&principal=<principal>&vdc=controller-name
Arguments
cat

Name of the catalog

principal

A URL-encoded principal

vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Example: URL-encoded principal

A URL-encoded principal. E.g. local:user:api@3tera.com should be passed as local%3Auser%3Aapi%403tera.com.

GET http://192.168.123.200/api/v1/cat/get_acl?cat=/test&principal=&vdc=mygrid 
Sample Output
JSON:
{
   "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
         }
      }
   }
}

XML:

<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: Display ACL data for principal

Display the ACL data for principal local:user:api@3tera.com for catalog test

GET
http://192.168.123.200/api/v1/cat/get_acl?cat=/test&principal=local%3Auser%3Aapi%403tera.com&vdc=mygrid

Sample Output
JSON:
{
   "acl" : {
      "entries" : {
         "entries[0]" : {
            "id" : "4f865f5b-e63a-410a-9d9a-96427c3ecfc7",
            "full" : 1
         }
      }
   }

XML:

<acl>
  <entries>
    <name>entries[0]</name>
    <full>1</full>
    <id>4f865f5b-e63a-410a-9d9a-96427c3ecfc7</id>
  </entries>
</acl>
HTTP Error Codes
400

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

400.4

Missing required arguments (cat)
- Argument cat=cat missing

Missing required arguments (principal)
- Argument principal=principal missing

404.1

Entity not found - Catalog test does not exist.

- A catalog 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.

put_acl Method (cat Object)
Description

Replace the entire catalog ACL.

Syntax
/api/v1/cat/put_acl?cat=catlog&owner=<owner>&acl=<ACLs>&vdc=controller-name
Arguments
cat

Name of the catalog

owner

A URL-encoded owner attribute of the grid ACL to the specified principal

acl

URL-encoded list of principals separated with a slash (/)

Transaction Type

synchronous

Request Type

GET

Examples

Replace the entire ACL for catalog test with an owner api@3tera.com

GET
http://192.168.123.200/api/v1/cat/put_acl?cat=/test&owner=local%3Auser%3Aapi%403tera.com&acl=&vdc=mygrid

Replace the entire ACL for catalog test with an owner api@3tera.com and principal local:user:api@3tera.com=full


GET
http://192.168.123.200/api/v1/cat/put_acl?cat=/test&owner=local%3Auser%3Aapi%403tera.com&acl= local%3Auser%3Aapi%403tera.com%3Dfull&vdc=mygrid

Replace the entire ACL for catalog 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/cat/put_acl?cat=/test&owner=local%3Auser%3Aapi%403tera.com&acl=local%3Auser%3Aapi%403tera.com%3Dfull%2Flocal%3Auser%3Atest%403tera.com%3Dconfigure&vdc=mygrid
Sample Output
JSON:

{
   "message" : ""
} 

XML:

<message></message>

HTTP Error Codes
400

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

400.4

Missing required arguments (cat)
- Argument cat=cat missing

Missing required arguments (owner)

- Argument owner=owner

Missing required arguments (acl)

- Argument acl=acl missing

404.1

Entity not found - Catalog test does not exist.

- A catalog was specified that does not exist on mygrid.

Entity not found - Failed to put catalog 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.

modify_acl Method (cat Object)
Description

Replace that portion of the catalog ACL which relates to the owner or a principal.

Syntax
/api/v1/cat/modify_acl?cat=catalog&acl=<ACLs>&vdc=controller-name
Arguments
cat

Name of the catalog

acl

URL-encoded list of principals separated with a slash (/)

Transaction Type

synchronous

Request Type

GET

Examples

Modify the ACL for catalog test by replacing the owner with api@3tera.com

GET
http://192.168.123.200/api/v1/cat/modify_acl?cat=/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/cat/modify_acl?cat=/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/cat/modify_acl?cat=/test&acl=local%3Auser%3Aapi%403tera.com%3Dconfigure%2Flocal%3Auser%3Atest%403tera.com%3Dread&vdc=mygrid
Sample Output
JSON:
{
   "message" : ""
} 

XML:

<message></message>

HTTP Error Codes
400

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

400.4

Missing required arguments (cat)
- Argument cat=cat missing

Missing required arguments (acl)

- Argument acl=acl missing

404.1

Entity not found - Catalog test does not exist.

- A catalog was specified that does not exist on mygrid.

Entity not found - Failed to put catalog 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.