Policy > Inventory > Groups > Group Members

Get groups for which the given object is a member

Get policy groups for which the given object is a member.
In Federation environment, if the given object is a global entity
(eg: global segment) and if the entity is not stretched to the site
specified in the enforcement_point_path parameter,then the following is returned:-
1)If the entity is a member of any global group and that group is stretched
to the enforcement_point_path site,then the API returns an empty list.
2)If the entity is not a member of any global group,this API returns
an 'invalid path' error message.
3)If both the entity and its corresponding groups are stretched to the
enforcement_point_path site , then the API returns the groups list.
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/group-associations
/policy/api/v1/global-infra/group-associations
Request Headers:
n/a
Query Parameters:
IntentEnforcementPointListRequestParams+
Request Body:
n/a

Example Request:

GET https://<policy-mgr>/policy/api/v1/infra/group-associations?intent_path=/infra/segment/s1&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: