Delete a security policy
You can delete a security policy using either the F5 NGINX Instance Manager web interface or the REST API.
To delete a policy in the web interface:
- Log in to NGINX Instance Manager.
- From the Launchpad, select NGINX Instance Manager.
- In the left menu, select WAF > Policies.
- On the Security Policies page, locate the policy you want to delete.
- Select the Actions menu (…) and choose Delete.
To delete a policy using the REST API:
-
Retrieve the policy’s UID by sending a
GETrequest to the Security Policies endpoint:shell curl -X GET https://<NIM_FQDN>/api/platform/v1/security/policies \ -H "Authorization: Bearer <ACCESS_TOKEN>"Replace
<NIM_FQDN>with the fully qualified domain name (FQDN) of your NGINX Instance Manager host and<ACCESS_TOKEN>with your access token. -
Use the policy UID in a
DELETErequest:
| Method | Endpoint |
|---|---|
| DELETE | /api/platform/v1/security/policies/{policy_uid} |
Example:
curl -X DELETE https://<NIM_FQDN>/api/platform/v1/security/policies/{policy_uid} \
-H "Authorization: Bearer <ACCESS_TOKEN>"Replace {policy_uid} with the unique identifier (UID) of the security policy.