Policy > Security > Endpoint Protection > Rules

Create or update Endpoint policy

Create or update the Endpoint policy.
This API is available when using VMware Cloud (AWS, Dell-EMC, Outpost, Hyperscalers) or VMware NSX-T.

Request:

Method:
PUT
URI Path(s):
/policy/api/v1/infra/domains/<domain-id>/endpoint-policies/<endpoint-policy-id>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
EndpointPolicy+

Example Request:

PUT https://<policy-mgr>/policy/api/v1/infra/domains/gi_domain/endpoint-policies/map1 { "endpoint_rules": [ { "display_name": "gi-entry-1", "sequence_number": 0, "groups": [ "/infra/domains/gi_domain/groups/test_group" ], "service_profiles": [ "/infra/service-references/SR_1/service-profiles/SP_1" ] } ], "sequence_number": 1000, "_revision": 1 }

Successful Response:

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

Example Response:

{ "endpoint_rules": [ { "sequence_number": 0, "groups": [ "/infra/domains/gi_domain/groups/test_group" ], "service_profiles": [ "/infra/service-references/SR_1/service-profiles/SP_1" ], "resource_type": "EndpointRule", "id": "gi-entry-1", "display_name": "gi-entry-1", "path": "/infra/domains/gi_domain/endpoint-policies/map1/endpoint-rules/gi-entry-1", "relative_path": "gi-entry-1", "parent_path": "/infra/domains/gi_domain/endpoint-policies/map1", "marked_for_delete": false, "_create_user": "admin", "_create_time": 1542326971854, "_last_modified_user": "admin", "_last_modified_time": 1542840286603, "_system_owned": false, "_protection": "NOT_PROTECTED", "_revision": 3 } ], "sequence_number": 1000, "resource_type": "EndpointPolicy", "id": "map1", "display_name": "/infra/domains/gi_domain/endpoint-policies/map1", "path": "/infra/domains/gi_domain/endpoint-policies/map1", "relative_path": "map1", "parent_path": "/infra/domains/gi_domain", "marked_for_delete": false, "_create_user": "admin", "_create_time": 1542326971852, "_last_modified_user": "admin", "_last_modified_time": 1542840286582, "_system_owned": false, "_protection": "NOT_PROTECTED", "_revision": 2 }

Required Permissions:

crud

Feature:

policy_gi

Additional Errors: