Previous Topic: vdc ObjectNext Topic: srv Object


get_acl Method (vdc Object)
Description

Display the grid ACL, or display that portion of the grid ACL which relates to a particular principal.

Syntax
/api/v1/vdc/get_acl?vdc=controller-name 
Arguments
vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Example: Display ACL for vdc mygrid

GET http://192.168.123.200/api/v1/vdc/get_acl?vdc=mygrid
Sample Output
JSON:
{
   "acl" : {
      "owner" : {
         "id" : "a5cb10bc-7291-4a86-84f8-74419fc9ae63"
      },
      "entries" : {
         "entries[0]" : {
            "app_developer" : 1,
            "id" : "4f865f5b-e63a-410a-9d9a-96427c3ecfc7"
         },
         "entries[2]" : {
            "grid_administrator" : 1,
            "id" : "a5cb10bc-7291-4a86-84f8-74419fc9ae63"
         },
         "entries[1]" : {
            "app_developer" : 1,
            "id" : "e1a5357f-204b-4cd3-9ca8-9e09f45b21c6"
         }
      }
   }
}

XML:
<acl>
  <entries>
    <name>entries[0]</name>
    <app_developer>1</app_developer>
    <id>4f865f5b-e63a-410a-9d9a-96427c3ecfc7</id>
  </entries>
  <entries>
    <name>entries[1]</name>
    <app_developer>1</app_developer>
    <id>e1a5357f-204b-4cd3-9ca8-9e09f45b21c6</id>
  </entries>
  <entries>
    <name>entries[2]</name>
    <grid_administrator>1</grid_administrator>
    <id>a5cb10bc-7291-4a86-84f8-74419fc9ae63</id>
  </entries>
  <owner>
    <id>a5cb10bc-7291-4a86-84f8-74419fc9ae63</id>
  </owner>
</acl>

Example: Display the ACL data for principal local:user:api@3tera.com for vdc mygrid

GET http://192.168.123.200/api/v1/vdc/get_acl?principal=local%3Auser%3Aapi%403tera.com&vdc=mygrid
Sample Output
JSON
{
   "acl" : {
      "entries" : {
         "entries[0]" : {
            "app_developer" : 1,
            "id" : "4f865f5b-e63a-410a-9d9a-96427c3ecfc7"
         }
      }
   }
}
XML:
<acl>
  <entries>
    <name>entries[0]</name>
    <app_developer>1</app_developer>
    <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.

404.1

Entity not found - Failed to retrieve application ACL - ACL does not contain principal local user 'test@3tera.com'.

- An invalid principal was specified

Notes

This API is available with WS_API_r6-1.0.6-1 and above.

put_acl Method (vdc Object)
Description

Replace the entire grid ACL.

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

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

acl

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

vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Examples

Replace the entire ACL for vdc mygrid with an owner api@3tera.com

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

Replace the entire ACL for vdc mygrid with an owner api@3tera.com and principal local:user:api@3tera.com=app_developer


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

Replace the entire ACL for vdc mygrid with an owner api@3tera.com and principal local:user:api@3tera.com=app_developer/local:user:test@3tera.com=monitor.

GET
http://192.168.123.200/api/v1/vdc/put_acl?owner=local%3Auser%3Aapi%403tera.com&acl=local%3Auser%3Aapi%403tera.com%3Dapp_developer%2Flocal%3Auser%3Atest%403tera.com%3Dmonitor&vdc=mygrid
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 (owner)

- Argument owner=owner

Missing required arguments (acl)

- Argument acl=acl missing

404.1

Entity not found - Failed to put grid ACL - invalid principal data - principal local user 'test@3tera.com' does not exist.

- An invalid owner or acl was specified

Sample Output
JSON:
{
   "message" : ""
} 
XML:

<message></message>
Notes

This API is available with WS_API_r6-1.0.6-1 and above.

modify_acl Method (vdc Object)
Description

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

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

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

vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Examples

Replace that portion of the grid ACL which relates to the local user 'api@3tera.com', providing grid_administrator access level permissions to this user

GET
http://192.168.123.200/api/v1/vdc/modify_acl?acl=local%3Auser%3Aapi%403tera.com%3Dgrid_administrator&vdc=mygrid
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 (acl)

- Argument acl=acl missing

404.1

Entity not found - Failed to modify ACL - invalid principal data - principal local user 'test@3tera.com' does not exist.

- An invalid acl was specified

Sample Output
JSON:
{
   "message" : ""
} 
XML:

<message></message>
Notes

This API is available with WS_API_r6-1.0.6-1 and above.

reboot Method (vdc Object)
Description

Reboot a grid

Syntax

/api/v1/vdc/reboot?&vdc=controller-name

Arguments
vdc

Name of the target virtual data center

Options
reason

Reason why the grid is being rebooted.

Transaction Type

asynchronous

Request Type

GET

Examples

Reboot grid mygrid.

GET http://aux/api/v1/vdc/reboot?&vdc=mygrid&reason=maintenance
Sample Output
XML:
<job>be805915-76b2-48c8-b8a0-b881cca66d10</job>
JSON:
{
   "job" : "be805915-76b2-48c8-b8a0-b881cca66d10"
}

HTTP Error Codes
404

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

shutdown Method (vdc Object)
Description

Shut a grid down

Syntax

/api/v1/vdc/shutdown?&vdc=controller-name

Arguments
vdc

Name of the virtual data center to shutdown

Options
reason

Reason why the grid is being shutdown.

Transaction Type

asynchronous

Request Type

GET

Examples

Shut the grid mygrid down.

GET http://aux/api/v1/vdc/shutdown?&vdc=mygrid&reason=maintenance
Sample Output
XML:
<job>be805915-76b2-48c8-b8a0-b881cca66d11</job>
JSON:
{
   "job" : "be805915-76b2-48c8-b8a0-b881cca66d11"
}

HTTP Error Codes
404

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

power_cycle Method (vdc Object)
Description

Power cycle a grid

Syntax

/api/v1/vdc/power_cycle?&vdc=controller-name

Arguments
vdc

Name of the target virtual data center

Transaction Type

asynchronous

Request Type

GET

Examples

Power cycle the grid mygrid

GET http://192.168.123.200/api/v1/vdc/power_cycle?vdc=mygrid 
Sample Output
XML:
<job>be805915-76b2-48c8-b8a0-b881cca66d12</job>
JSON:
{
   "job" : "be805915-76b2-48c8-b8a0-b881cca66d12"
}

HTTP Error Codes
404

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

Notes

Only valid when "Power Control" is enabled.