Creating and updating a configuration policy by using REST Administration APIs
System administrators can create and update configuration policies by using REST Administration APIs.
You can create or update a configuration policy by using a REST Administration API, or by using the Amlen WebUI. For more information about using the Amlen WebUI to create or update a configuration policy, see Configuring the admin endpoint by using the Amlen WebUI.
You can use the Eclipse Amlen REST API POST method to create or update one or more configuration policy objects. If the configuration policy that is specified in the request does not exist in the configuration table, then the configuration policy is created. Otherwise the configuration policy configuration is updated.
The following example shows a POST method to create a configuration policy called "MyConfigurationPolicy" by using cURL:
curl -X POST \
-H 'Content-Type: application/json' \
-d '{
"ConfigurationPolicy": {
"MyConfigurationPolicy": {
"Description": "Demonstration configuration policy ",
"ActionList": "Configure,View,Monitor,Manage",
"GroupID": "Group1",
"ClientAddress": "9.3.179.*",
"UserID": "IMAUser"
}
}
}
' \
http://127.0.0.1:9089/ima/v1/configuration/
The following example shows an example response to the POST method:
{
"Version": "v1",
"Code": "CWLNA6011",
"Message": "The requested configuration change has completed successfully."
}