Adding Maintenance Policies

This API helps administrators add maintenance policies to the eG manager.

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

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":"QMPPolicy",

"timefrequency":" Thursday=10:15-11:15"

}

Body

Default:

{

"policyname":"Policy name",

"timefrequency":"[Daily]/[First day of month]/[Last day of month]/[Sunday/Monday/Tuesday/Wednesday/

Thursday/Friday/

Saturday]/

Start Date-End Date]=Start Time-End Time"

}

 

Note:

The format for Start Date and End Date is MM/DD/YYYY

The format for Start Time and End Time is Hours:Minutes

 

Success Response
Type Code Content

JSON

200

{

"Succeed": "Maintenance policy added successfully."

}

 

Failure Response
Type Code Content

JSON

401 UNAUTHORIZED

{

"Error": "Invalid Time frequency."

}

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

Adding Maintenance Policies using cURL

To add 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/addmaintenancepolicy" -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', 'timefrequency': '[Daily]/[First day of month]/[Last day of month]/[Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday]/Start Date-End Date]=Start Time-End Time'}"

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

Figure 2 : Adding a maintenance policy using cURL