Page tree

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.

URL to create an SLO

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>

Example

http://bppmwsserver:80/bppmws/api/slo/create?filtertype=device
&filterid=device1&filteridtype=name

EntryDescription
http|httpsType of protocol to send the request. BMC ProactiveNet web services support both HTTP and HTTPS protocols.
serverHostHost name of the BMC ProactiveNet Server
portPort 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=deviceSpecifies 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:

  • Host name of the device
  • IP address of the device
filteridtype

Specifies the identifier type for the filter that the web service request uses. The supported type of filter identifiers are as follows:

  • name
  • IPAddress

The default value is name.

Input parameters in the JSON format to create an SLO

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
AttributesDescription
nameName for the SLO that you want to create. A valid name cannot have any special characters in it. This parameter is mandatory.
ownerName of the user who owns the SLO. This parameter is mandatory.
contactinfoPhone number, email address, or any other contact information of the SLO owner
contentType 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:

  • Availability
  • Response Time
  • System Performance

Using the web services, you cannot create any custom SLO types, but you can use the custom SLO types that are already present.

compliancerangesetDefault or any other customized compliance range set for the SLO
complianceobjectivePercentage 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:

  • 24x7
  • Business Hours

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"
        }
    ]
}

JSON response to the create API

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.