Previous Topic: Valid Web API ObjectsNext Topic: get_acl Method (vdc Object)


vdc Object

Use this object to view details of one or more VDC Virtual Data Centers managed by the 'WS_API'.

Method

Description

info

Retrieve grid information

info_verbose

Retrieve detailed grid information

list

Retrieve grids configured to work with the WS_API

get

Retrieve grid configuration parameter(s)

get_acl

Retrieve grid ACL (or portion of grid ACL) relating to a particular principal

set

Set grid configuration parameter(s)

put_acl

Replace the entire grid ACL

modify_acl

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

reboot

Reboot a grid.

shutdown

Shut a grid down.

power_cycle

power-cycle a grid.

info Method (vdc Object)
Description

Retrieve grid information

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

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Examples

Get information.

GET http://192.168.123.200/api/v1/vdc/info?vdc=mygrid 
Sample Output
XML:
<grid> 
   <name>mygrid</name> 
   <app_running>2</app_running> 
   <bw_alloc>570000000</bw_alloc> 
   <bw_free>1430000000</bw_free> 
   <bw_reserved>0</bw_reserved> 
   <bw_total>2000000000</bw_total> 
   <controller_uptime>1496456</controller_uptime> 
   <cpu_alloc>1.94</cpu_alloc> 
   <cpu_free>1.96</cpu_free> 
   <cpu_load>0.03</cpu_load> 
   <cpu_reserved>0.00</cpu_reserved> 
   <cpu_total>4.00</cpu_total> 
   <description></description> 
   <disk_free>1148779407545</disk_free> 
   <disk_n>1</disk_n> 
   <disk_reserved>10737418240</disk_reserved> 
   <disk_total>1493697126400</disk_total> 
   <ha_state>checking...</ha_state> 
   <last_failed_srv>srv1</last_failed_srv> 
   <last_srv_failure_time>270003032</last_srv_failure_time> 
   <mem_alloc>2147483648</mem_alloc> 
   <mem_free>679477248<mem_free> 
   <mem_reserved>1431306240</mem_reserved> 
   <mem_service>34603008</mem_service> 
   <mem_total>4292870144</mem_total> 
   <srv_enabled>1</srv_enabled> 
   <srv_running>1</srv_running> 
   <srv_total>1</srv_total> 
   <system_uptime>1496636</system_uptime> 
   <version>2.8.9 hf3561 e3624</version> 
</grid>
JSON:
{ 
   "disk_n" : "1", 
   "cpu_total" : "4.00", 
   "cpu_alloc" : "1.94", 
   "last_srv_failure_time" : "1270003032", 
   "mem_alloc" : "2147483648", 
   "app_running" : "2", 
   "srv_running" : "1", 
   "bw_total" : "2000000000", 
   "cpu_reserved" : "0.00", 
   "version" : "2.8.9 hf3561 e3624", 
   "mem_total" : "4292870144", 
   "name" : "mygrid", 
   "disk_reserved" : "10737418240", 
   "disk_total" : "1493697126400", 
   "system_uptime" : "1496641", 
   "srv_enabled" : "1", 
   "cpu_free" : "1.96", 
   "description" : "", 
   "mem_reserved" : "1431306240", 
   "mem_service" : "34603008", 
   "controller_uptime" : "1496462", 
   "bw_free" : "1430000000", 
   "disk_free" : "1148779407545", 
   "ha_state" : "checking...", 
   "srv_total" : "1", 
   "last_failed_srv" : "srv1", 
   "bw_reserved" : "0", 
   "cpu_load" : "0.42", 
   "mem_free" : "679477248", 
   "bw_alloc" : "570000000" 
} 
HTTP Error Codes
404

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

info_verbose Method (vdc Object)

Note: This method has been deprecated and is included here for compatibility with existing user scripts. New users should use the option flag &verbose.

Description

Retrieve detailed grid information

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

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Examples

Get grid information.

GET http://192.168.123.200/api/v1/vdc/info_verbose?vdc=mygrid 
Sample Output
XML:
<grid> 
   <name>mygrid</name> 
   <app_running>2</app_running> 
   <bw_alloc>570000000</bw_alloc> 
   <bw_free>1430000000</bw_free> 
   <bw_reserved>0</bw_reserved> 
   <bw_total>2000000000</bw_total> 
   <controller_uptime>1496456</controller_uptime> 
   <cpu_alloc>1.94</cpu_alloc> 
   <cpu_free>1.96</cpu_free> 
   <cpu_load>0.03</cpu_load> 
   <cpu_reserved>0.00</cpu_reserved> 
   <cpu_total>4.00</cpu_total> 
   <description></description> 
   <disk_free>1148779407545</disk_free> 
   <disk_n>1</disk_n> 
   <disk_reserved>10737418240</disk_reserved> 
   <disk_total>1493697126400</disk_total> 
   <ha_state>checking...</ha_state> 
   <last_failed_srv>srv1</last_failed_srv> 
   <last_srv_failure_time>270003032</last_srv_failure_time> 
   <mem_alloc>2147483648</mem_alloc> 
   <mem_free>679477248<mem_free> 
   <mem_reserved>1431306240</mem_reserved> 
   <mem_service>34603008</mem_service> 
   <mem_total>4292870144</mem_total> 
   <srv_enabled>1</srv_enabled> 
   <srv_running>1</srv_running> 
   <srv_total>1</srv_total> 
   <system_uptime>1496636</system_uptime> 
   <version>2.8.9 hf3561 e3624</version> 
</grid>
JSON:
{ 
   "disk_n" : "1", 
   "cpu_total" : "4.00", 
   "cpu_alloc" : "1.94", 
   "last_srv_failure_time" : "1270003032", 
   "mem_alloc" : "2147483648", 
   "app_running" : "2", 
   "srv_running" : "1", 
   "bw_total" : "2000000000", 
   "cpu_reserved" : "0.00", 
   "version" : "2.8.9 hf3561 e3624", 
   "mem_total" : "4292870144", 
   "name" : "mygrid", 
   "disk_reserved" : "10737418240", 
   "disk_total" : "1493697126400", 
   "system_uptime" : "1496641", 
   "srv_enabled" : "1", 
   "cpu_free" : "1.96", 
   "description" : "", 
   "mem_reserved" : "1431306240", 
   "mem_service" : "34603008", 
   "controller_uptime" : "1496462", 
   "bw_free" : "1430000000", 
   "disk_free" : "1148779407545", 
   "ha_state" : "checking...", 
   "srv_total" : "1", 
   "last_failed_srv" : "srv1", 
   "bw_reserved" : "0", 
   "cpu_load" : "0.42", 
   "mem_free" : "679477248", 
   "bw_alloc" : "570000000" 
} 
HTTP Error Codes
404

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

list Method (vdc Object)
Description

Retrieve grids configured to work with the WS_API

Syntax
/api/v1/vdc/list 
Arguments

None

Transaction Type

synchronous

Request Type

GET

Examples

List grids.

GET http://192.168.123.200/api/v1/vdc/list 
Sample Output
XML:
<vdcs> 
   <vdc> 
      <name>mygrid</name> 
      <default>1</default> 
      <host>72.233.72.121</host> 
      <location>Dallas, TX, USA</location> 
   </vdc> 
</vdcs>
JSON:
{ 
   "vdc" : [ 
      { 
      "location" : "Dallas, TX, USA", 
      "name" : "mygrid", 
      "default" : 1, 
      "host" : "72.233.72.121" 
      } 
   ] 
} 
get Method (vdc Object)
Description

Retrieve grid configuration parameter(s)

Syntax
/api/v1/vdc/get?vdc=controller-name&prop=property-name
/api/v1/vdc/get?vdc=controller-name&all 
Arguments
vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Examples

Get all grid configuration information.

GET http://192.168.123.200/api/v1/vdc/get?vdc=mygrid&all
Sample Output
XML:
<configuration> 
  <recovery_password></recovery_password> 
</configuration> 
JSON:
{ 
   "configuration" : { 
      "recovery_password" : "" 
   } 
}

HTTP Error Codes
404

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

set Method (vdc Object)
Description

Set grid configuration parameter(s)

Syntax
/api/v1/vdc/set?vdc=controller-name&property-name=value
Arguments
property-name

Name of the property to set

vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Examples

Set or change the recovery_password on grid mygrid

GET http://192.168.123.200/api/v1/vdc/set?vdc=mygrid&recovery_password=test12345
Sample Output
XML:
<message>Please reboot the grid controller for the password change to take effect.</message> 
JSON:
{ 
 "message" : "Please reboot the grid controller for the password change to take effect." 
}

HTTP Error Codes
404

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

404.1

Entity not found - Network HA-related settings may only be modified by a grid maintainer.

Notes

Most properties require maintainer access to set.