Deleting a Maintenance Policy

Use this API to delete a maintenance policy configured in the eG manager.

URL: http://<eG manager IP:port>/api/eg/orchestration/deletemaintenancepolicy

Method: POST

Content-Type: application/json

Inputs to be Specified
Parameters Key values Example

Headers

managerurl: Base URL of the eG Manager i.e., http://<IP address of the eG console:Port>

user: eG username or domain/eG username

pwd: Base64 encoded password

{

"policyname":"QMP1,QMP2"

}

Body

Default:

{

"policyname":"comma-separated list of maintenance policies"

}

 

Success Response
Type Code Content

JSON

200

{

"Succeed": "Maintenance policy deleted successfully."

}

 

Failure Response
Type Code Content

JSON

401 UNAUTHORIZED

{

"Error": "Maintenance policy does not exist."

}

Deleting Maintenance Policy Using Postman REST Client

Figure 1 : Example to delete a maintenance policy using Postman REST Client

Deleting a Maintenance Policy using cURL

To delete a maintenance policy through the REST API using cURL, the command should be specified in the following format:

curl --location --request POST "http://<eG Manager IP:Port>/api/eg/orchestration/deletemaintenancepolicy" -H "managerurl:http://<eG Manager IP:Port>" -H "user:<eG username or domain/eG username>" -H "pwd:Base64 encoded password" -H "Content-Type: application/json" --data-raw "{'policyname':'comma-separated list of maintenance policies'}"

Figure 2 shows an example of deleting a maintenance policy using cURL.

Deleting Maintenance Policy Using cURL

Figure 2 : Deleting a maintenance policy using cURL