Modifying a Maintenance Policy

Use this API to modify the details of an existing maintenance policy.

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

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

Example with both Default and Optional key values:

{

"policyname":"QMP1",

"addtimefrequency":"Daily=13:30-14:30",

"rmtimefrequency":"Daily=10:15-11:15"

}

Body

Default:

{

"policyname":"Policy name"

}

Optional:

{

"addtimefrequency":"[Daily]/[First day of month]/

[Last day of month]/

[Sunday/Monday/Tuesday/Wednesday
/Thursday/Friday/Saturday]/[MM/DD/YYYY-MM/DD/YYYY]=HH:MM-HH:MM",

"rmtimefrequency":"[Daily]/[First day of month]/

[Last day of month]/

[Sunday/Monday/Tuesday/Wednesday
/Thursday/Friday/Saturday]/[MM/DD/YYYY-MM/DD/YYYY]=HH:mm-HH:MM"

}

 

Success Response
Type Code Content

JSON

200

{

"Succeed": "Maintenance policy modified successfully."

}

 

Failure Response
Type Code Content

JSON

401 UNAUTHORIZED

{

"Error": "One or more time frequencies you are trying to remove do not exist."

}

Modifying Maintenance Policy Using Postman REST Client

Figure 1 : Example to modify the details of an existing maintenance policy using Postman REST Client

Modifying a Maintenance Policy using cURL

To modify the details of an existing 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/modifymaintenancepolicy" -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':'Policy name', 'addtimefrequency':'[Daily]/[First day of month]/[Last day of month]/[Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday]/[MM/DD/YYYY-MM/DD/YYYY]=HH:MM-HH:MM', 'rmtimefrequency':'[Daily]/[First day of month]/[Last day of month]/[Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday]/[MM/DD/YYYY-MM/DD/YYYY]=HH:mm-HH:MM'}"

Note that the command specified above contains both the Default and Optional key values. Figure 2 shows an example of modifying the details of an existing maintenance policy using cURL.

Modifying Maintenance Policy Using cURL

Figure 2 : Modifying the details of an existing maintenance policy using cURL