Examples of using the REST API to manage service level objects
This section lists a few use case scenarios for the REST API that manage SLOs. Each scenario is explained using a sample URL and its subsequent response details.
Creating an SLO
URL
http://bppmwsserver:80/bppmws/api/slo/create?filtertype=device&
filterid=device1&filteridtype=name
Input parameters in the JSON format
The input parameters that are sent in the JSON format are as follows:
{
"name": "slo12",
"owner": "admin",
"contactinfo": "contact1",
"content": "instances",
"type": "Availability",
"compliancerangeset": "Default",
"complianceobjective": "100",
"schedules": [
{
"name": "24x7"
}
]
}
Response
The slo12 SLO is created.
Getting the URI information of an SLO
URL
http://bppmwsserver:80/bppmws/api/slo/slo11/metadata?idtype=name
Response
The metadata information of the SLO is retrieved. The uri
parameter displays the URI information of the SLO.
Editing the contact information of an SLO
URL
http://bppmwsserver:80/bppmws/api/slo/slo11/metadata?idtype=name
Input parameters in the JSON format
The contact information that you want to update is provided in the JSON format as follows:
{
"name": "slo4",
"contactinfo": "newContactInfo12"
}
Response
The contact information of the SLO with ID as slo4 is updated.
Deleting an SLO
URL
http://bppmwsserver:80/bppmws/api/slo/slo133/delete?idtype=name
Response
The slo133 SLO is deleted.
Was this page helpful? Yes No
Submitting...
Thank you
Comments
Log in or register to comment.