/policyengine/v1/policies/<policy_name>: DELETE

Deletes a policy.

The /policyengine/v1/policies/<policy_name>: DELETE endpoint deletes the specified policy. The following table shows which roles can access this REST API endpoint:
Table 1. Access by role
Data admin Data user Collection Admin Admin Service user
X Χ Χ
Important: You cannot delete the "Collection" and "Temperature" tags.

Synopsis of the request URL

curl -k -H 'Authorization: Bearer <token>' 
https://<spectrum_discover_host>/policyengine/v1/policies/pol2 -X DELETE

Supported request types and response formats

Supported request types:
  • DELETE
Supported response formats:
  • JSON

Examples

  1. The following example deletes a policy named pol2:
    1. Issue the following request on one line:
      curl -k -H 'Authorization: Bearer <token>' 
      https://<spectrum_discover_host>/policyengine/v1/policies/<policy_name> -X POST
    2. The following response is returned:
      Deleted policy pol2
    To verify that the policy is deleted, issue a GET request to list the information about the specified policy or about all the policies in the system. For more information, see /policyengine/v1/policies: GET and /policyengine/v1/policies/<policy_name>: GET.