Policy > Inventory > Groups > Group Members

Get groups for which the given VM is a member

Get policy groups for which the given VM is a member.
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/virtual-machine-group-associations
/policy/api/v1/global-infra/virtual-machine-group-associations
Request Headers:
n/a
Query Parameters:
VMGroupAssociationRequestParams+
Request Body:
n/a

Example Request:

GET https://<policy-mgr>/policy/api/v1/infra/virtual-machine-group-associations?vm_external_id=564de333-15ac-de52-da90-974fe099a17b&enforcement_point_path=/infra/sites/default/enforcement-points/ep1

Successful Response:

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

Example Response:

{ "result_count": 2, "results": [ { { "path" : "/infra/domains/domain1/groups/g1", "target_id" : "g1", "target_display_name" : "group-1", "target_type" : "DOMAIN_GROUP", "is_valid" : "true" }, { "path" : "/infra/domains/domain1/groups/g2", "target_id" : "g2", "target_display_name" : "group-2", "target_type" : "DOMAIN_GROUP", "is_valid" : "true" } } ] }

Required Permissions:

read

Feature:

policy_grouping

Additional Errors: