Policy >
Inventory
>
Groups
>
Groups
Add or Remove path based members from/to a Group
It will add or remove the specified members having path for a given expression of a group.
This API is available when using VMware Cloud (AWS, Dell-EMC, Outpost, Hyperscalers) or VMware NSX-T.
Request:
Method:
POST
URI Path(s):
/policy/api/v1/infra/domains/<domain-id>/groups/<group-id>/path-expressions/<expression-id>
Request Headers:
n/a
Query Parameters:
GroupMemberActionParameters
+
GroupMemberActionParameters
(
schema
)
Name
Description
Type
Notes
action
Add or Remove group members.
Action parameter determines whether to add or remove the group members.
string
Required
Enum: add, remove
Request Body:
GroupMemberList
+
GroupMemberList
(
schema
)
Name
Description
Type
Notes
members
Groups members collection
This array contains group members of similar types.
array of string
Required
Minimum items: 1
Maximum items: 4000
Example Request:
POST /infra/domains/default/groups/NestedGroup/path-expressions/pathexp?action=add { "members": [ "/infra/domains/default/groups/GroupTag", "/infra/domains/default/groups/VMGroup" ] } POST /infra/domains/default/groups/NestedGroup/path-expressions/pathexp?action=remove { "members": [ "/infra/domains/default/groups/GroupTag", "/infra/domains/default/groups/VMGroup" ] }
Successful Response:
Response Code:
200 OK
Response Headers:
n/a
Response Body:
n/a
Example Response:
200 OK
Required Permissions:
crud
Feature:
policy_grouping
Additional Errors:
404 Not Found
301 Moved Permanently
307 Temporary Redirect
400 Bad Request
403 Forbidden
409 Conflict
500 Internal Server Error
503 Service Unavailable