Previous Topic: group ObjectNext Topic: get Method (group Object)


list Method (group Object)
Description

List groups in the grid controller's local directory service database and groups in the global directory service database (if the grid is configured to use such a service).

Syntax
/api/v1/group/list?vdc=controller-name 
Arguments
vdc (optional)

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Examples
List groups
GET
http://192.168.123.200/api/v1/group/list?vdc=mygrid

List local groups
GET
http://192.168.123.200/api/v1/group/list?local&vdc=mygrid

List global groups
GET
http://192.168.123.200/api/v1/group/list?global&vdc=mygrid

Sample Output
JSON:

{
   "group[0]" : {
      "name" : "admin",
      "description" : "us",
      "scope" : "local"
   },
   "group[1]" : {
      "name" : "mygroup",
      "description" : "",
      "scope" : "local"
   }
}

XML:

<opt>
  <group[0]>
    <name>admin</name>
    <description>us</description>
    <scope>local</scope>
  </group[0]>
  <group[1]>
    <name>mygroup</name>
    <description></description>
    <scope>local</scope>
  </group[1]>
</opt>
HTTP Error Codes
400

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

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