Policy > Inventory > Groups > Groups

List Groups for a domain

List Groups for a domain. Groups can be filtered using member_types query parameter,
which returns the groups that contains the specified member types. Multiple member types
can be provided as comma separated values. The API also return groups having member
type that are subset of provided member_types.
This API is available when using VMware Cloud (AWS, Dell-EMC, Outpost, Hyperscalers) or VMware NSX-T.

Request:

Method:
GET
URI Path(s):
/policy/api/v1/infra/domains/<domain-id>/groups
/policy/api/v1/global-infra/domains/<domain-id>/groups
Request Headers:
n/a
Query Parameters:
GroupListRequestParameters+
Request Body:
n/a

Example Request:

GET https://<policy-mgr>/policy/api/v1/infra/domains/vmc/groups

Successful Response:

Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
GroupListResult+

Example Response:

{ "sort_ascending": true, "sort_by": "display_name", "result_count": 1, "results": [ { "resource_type": "Group", "description": "web group", "id": "webgroup", "display_name": "web group", "path": "/infra/domains/vmc/groups/webgroup", "parent_path": "/infra/domains/vmc", "relative_path": "webgroup", "expression": [ { "resource_type": "Condition", "member_type": "VirtualMachine", "value": "webvm", "key": "Tag", "operator": "EQUALS", "_protection": "NOT_PROTECTED" } ], "_create_user": "admin", "_create_time": 1517308749250, "_last_modified_user": "admin", "_last_modified_time": 1517308749250, "_system_owned": false, "_protection": "NOT_PROTECTED", "_revision": 0 } ] }

Required Permissions:

read

Feature:

policy_grouping

Additional Errors: