The create API uses the POST method to create a policy. You must provide authentication credentials by using the login API before creating a policy. For information about the authentication process, see Web services authentication.
The generic format of a URL for the create API is as follows:
Type of protocol to send the request. Infrastructure Management support both HTTP and HTTPS protocols.
Host name of the BMC TrueSight Infrastructure Management Server that has Central Monitoring Administration
Port number through which communication is established. The default port number is 80 if you use the HTTP protocol and 443 if you use the HTTPS protocol.
Type of policy that you want to create. The supported policy types are:
Input parameters in the JSON format to create a policy
When you provide input parameters for any web service request, you must specify the content-type parameter in the header of the web service request as follows:
The input parameters vary according to the policy you create. For information about the input parameters, see Example use case scenarios to create a blackout policy and Example use case scenarios to create a staging policy.
Sample input parameters in the JSON format are as follows:
Sample input parameters for the create API to create a blackout policy
The policy ID is generated through Infrastructure Management and cannot be created through the create API.
A sample JSON response is as follows: