Previous Topic: get Method (group Object)Next Topic: get_newobj_acl Method (group Object)


info Method (group Object)
Description

Show group information. The information displayed includes: group name, ID, scope, description, and principal group members.

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

Name of the group

vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Examples

Get group information for group mygroup

GET
http://192.168.123.200/api/v1/group/info?group=mygroup&vdc=mygrid
Sample Output
JSON:

{
   "group" : {
      "members" : {
         "members[2]" : {
            "name" : "*",
            "id" : "f29c1426-10c1-4715-a763-b0bcc4b8b9d5",
            "type" : "user",
            "scope" : "local"
         },
         "members[0]" : {
            "name" : "apimig@3tera.com",
            "id" : "e1a5357f-204b-4cd3-9ca8-9e09f45b21c6",
            "type" : "user",
            "scope" : "local"
         },
         "members[1]" : {
            "name" : "api@3tera.com",
            "id" : "4f865f5b-e63a-410a-9d9a-96427c3ecfc7",
            "type" : "user",
            "scope" : "local"
         },
         "members[3]" : {
            "name" : "apoorva@3tera.com",
            "id" : "b543eff7-db88-4d79-a11c-4de22d5e6d3b",
            "type" : "user",
            "scope" : "local"
         }
      },
      "name" : "mygroup",
      "id" : "a5cb10bc-7291-4a86-84f8-74419fc9ae63",
      "description" : "us",
      "scope" : "local"
   }
}

XML:

[set the product group or family]
  <name>mygroup</name>
  <description>us</description>
  <id>a5cb10bc-7291-4a86-84f8-74419fc9ae63</id>
  <members>
    <name>apimig@3tera.com</name>
    <id>e1a5357f-204b-4cd3-9ca8-9e09f45b21c6</id>
    <scope>local</scope>
    <type>user</type>
  </members>
  <members>
    <name>api@3tera.com</name>
    <id>4f865f5b-e63a-410a-9d9a-96427c3ecfc7</id>
    <scope>local</scope>
    <type>user</type>
  </members>
  <members>
    <name>*</name>
    <id>f29c1426-10c1-4715-a763-b0bcc4b8b9d5</id>
    <scope>local</scope>
    <type>user</type>
  </members>
  <scope>local</scope>
</group>

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 (app).
- Argument group=group missing.

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

put Method (group Object)
Description

Replace a local group's description and entire membership.

Syntax
/api/v1/group/put?group=group&description=description&principal=principal&vdc=controller-name 
Arguments
group

Name of the group

description

A URL-encoded owner description of the group

principal

URL-encoded ‘/’ separated list of principals.

For example. local:user:api@3tera.com should be passed as local%3Auser%3Aapi%403tera.com

For example, local:user:api@3tera.com /local:user:test@3tera.com should be passed as local%3Auser%3Aapi%403tera.com%2Flocal%3Auser%3Atest%403tera.com

vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Examples

Replace the entire description with “API GROUP” and membership with single principal local:user:api@3tera.com for mygroup


GET
http://192.168.123.200/api/v1/group/put?group=mygroup&description=API%20Group&principal=local%3Auser%3Aapi%403tera.com&vdc=mygrid

Replace the entire description with “API GROUP” and membership with principals local:user:api@3tera.com and local:user:test@3tera.com for mygroup.


GET
http://192.168.123.200/api/v1/group/put?group=mygroup&description=API%20Group&principal=local%3Auser%3Aapi%403tera.com%2Flocal%3Auser%3Atest%403tera.com&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 (group)

- Argument group=group missing

Missing required arguments (description)

- Argument description=description

Missing required arguments (principal)

- Argument principal=principal missing

404.1

Entity not found – Group mygroup does not exist.

- A group 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 principal was specified

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

modify Method (group Object)
Description

Replace a local group's description or membership.

Syntax
/api/v1/group/modify?group=group&add_principal=add_principal&remove_principal=remove_principal&vdc=controller-name 
Arguments
group

Name of the group

add_principal

URL-encoded ‘/’ separated list of principals to be added to the group.

For example, local:user:api@3tera.com should be passed as local%3Auser%3Aapi%403tera.com

For example, local:user:api@3tera.com /local:user:test@3tera.com should be passed as local%3Auser%3Aapi%403tera.com%2Flocal%3Auser%3Atest%403tera.com

remove_principal

URL-encoded ‘/’ separated list of principals to be removed from the group.

For example, local:user:api@3tera.com should be passed as local%3Auser%3Aapi%403tera.com

For example, local:user:api@3tera.com /local:user:test@3tera.com should be passed as local%3Auser%3Aapi%403tera.com%2Flocal%3Auser%3Atest%403tera.com

vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Examples

Replace the entire description with “API GROUP” and but do not change the membership

                                                                                                                                   
GET
http://192.168.123.200/api/v1/group/modify?group=mygroup&description=API%20Group&add_principal=&remove_principal=&vdc=mygrid

Replace the entire description with “API GROUP” and add local:user:api@3tera.com to the membership and remove local:user:test@3tera.com from mygroup.


GET
http://192.168.123.200/api/v1/group/put?group=mygroup&description=API%20Group&add_principal=local%3Auser%3Aapi%403tera.com&remove_principal=local%3Auser%3Atest%403tera.com&vdc=mygrid

Replace the entire description with “API GROUP” and remove local:user:api@3tera.com and local:user:test@3tera.com from mygroup.


GET
http://192.168.123.200/api/v1/group/put?group=mygroup&description=API%20Group&remove_principal=local%3Auser%3Aapi%403tera.com%2Flocal%3Auser%3Atest%403tera.com&add_principal=&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 (add_principal, remove_principal, can_own or description).

404.1

Entity not found – Group mygroup does not exist.

- A group 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 principal was specified

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