The create API uses the POST method to create an SLO. You must provide authentication credentials by using the login API before accessing the data. For information about the authentication process, see Web services authentication.
Note
You cannot create nested SLOs by using the web service API.
The generic format of the URL to create an SLO is as follows:
http|https://<serverHost>:<port>/bppmws/api/slo/create?filtertype=device
&filterid=<filterID>&filteridtype=<filterIDType>
Entry | Description |
---|---|
http|https | Type of protocol to send the request. BMC ProactiveNet web services support both HTTP and HTTPS protocols. |
serverHost | Host name of the BMC ProactiveNet Server |
port | 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. |
filtertype=device | Specifies the type of filter that the web service request uses. The supported filter type is device. |
filterid | Specifies the identifier for the filter that the web service request uses. The supported filter types are as follows:
|
filteridtype | Specifies the identifier type for the filter that the web service request uses. The supported type of filter identifiers are as follows:
The default value is name. |
You can provide the following parameters for the SLO in the JSON format along with the URL.
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:
content-type application/json
Attributes | Description |
---|---|
name | Name for the SLO that you want to create. A valid name cannot have any special characters in it. This parameter is mandatory. |
owner | Name of the user who owns the SLO. This parameter is mandatory. |
contactinfo | Phone number, email address, or any other contact information of the SLO owner |
content | Type of objects that comprise the SLO. The supported content type is instances. |
type | Type of SLO based on the groups to which it is associated. Basic SLO types that are available are as follows:
Using the web services, you cannot create any custom SLO types, but you can use the custom SLO types that are already present. |
compliancerangeset | Default or any other customized compliance range set for the SLO |
complianceobjective | Percentage of compliance or non-compliance (as indicated and based on the SLO type) that the SLO must obtain. It ranges between 1% and 100%. This parameter is mandatory. |
schedules | Schedule for SLO monitoring. The supported schedule types are as follows:
The web services do not support multiple schedules. The default schedule is 24x7. |
The sample input parameters in the JSON format are as follows:
{ "name": "slo100", "owner": "admin", "contactinfo": "contact1", "content": "instances", "type": "Availability", "compliancerangeset": "Default", "complianceobjective": "100", "schedules": [ { "name": "24x7" } ] }
A sample JSON response is as follows:
{ "response": { "detailedStatusMessage": "Successfully created the requested SLO", "slo": { "URI": "vm-w23-rds529:6", "name": "SLO Test", "sloid": "6" } }, "statusCode": "200", "statusMsg": "OK", "responseTimeStamp": "2012-03-09T11:16:07" }
Note
BMC recommends you to note the URI of the SLO from the JSON response. It will be helpful when you have duplicate SLOs with the same name, and you can use the URI of the SLO as the identifier.