Create Slo

POST {{baseUrl}}/slo

  • This API will create SLO.

Payload

KeyValueExampleRequired
allocatederrorbudgetNumber (float)52559.6false
descriptionString“test”false
durationindaysNumber7false
end_timedate“2023-07-18T07:20:31.224Z”true
start_timedate2022-07-18T07:20:31.225Ztrue
nameStringtesttrue
owner_idString6284813de5b66bb4f729278btrue
remainingerrorbudgetNumber (float)52559.6false
service_idsArray of String[6284213de5b66bb4f729265b]true
slisArray of String[availability]true
slo_actionsArray of Object[{
service_id: ,
"type": "SERVICE"
},
{
"type": "USER",
"user_id":

}]
false
slomonitoringchecksArray of Objects[
{
is_checked: true,
name: is_unhealthy_slo
},
{
is_checked: true,
name: increased_false_positives_threshold
},
{
is_checked: true,
name: remaining_err_budget_threshold
}
]
false
target_sloNumber90false
timeintervaltypeStringfixed/optionaltrue
tagsObject{
Environment: abc,
Type: test
}
false

Requires access_token as a Bearer {{token}} in the Authorization header with user-write scope.

Request Body

{"allocated_error_budget"=>52559.6, "description"=>"test", "duration_in_days"=>7, "end_time"=>"2023-07-18T07:20:31.224Z", "start_time"=>"2022-07-18T07:20:31.225Z", "name"=>"test[punit]17", "owner_id"=>"6284813de5b66bb4f729278b", "remaining_error_budget"=>52559.6, "service_ids"=>["62b2c18bca440a666897233d"], "slis"=>["availability", "latency", "errors", "saturation"], "slo_actions"=>[{"service_id"=>"62b2c18bca440a666897233d", "type"=>"SERVICE"}, {"type"=>"USER", "user_id"=>"60f12dd3814bef0008c4036e"}], "slo_monitoring_checks"=>[{"is_checked"=>true, "name"=>"is_unhealthy_slo"}, {"is_checked"=>true, "name"=>"increased_false_positives_threshold"}, {"is_checked"=>true, "name"=>"remaining_err_budget_threshold"}], "target_slo"=>90, "time_interval_type"=>"fixed", "tags"=>{"Environment"=>"abc", "Type"=>"test"}}

HEADERS

KeyDatatypeRequiredDescription
Authorizationnull
Content-Typestring

RESPONSES

status: Created

{"data":{"slo":{"created_at":"2022-07-20T08:49:59.560079729Z","updated_at":"2022-07-20T08:49:59.560079729Z","deleted_at":null,"id":1144,"owner_type":"","owner_id":"6284813de5b66bb4f729278b","org_id":"60cb200bc9de4a0008d2fc41","name":"test[punit]112","description":"test","time_interval_type":"fixed","service_ids":["62b2c18bca440a666897233d"],"slis":["availability","latency","errors","saturation"],"target_slo":90,"start_time":"2022-07-18T07:20:31.225Z","end_time":"2023-07-18T07:20:31.224Z","duration_in_days":0,"is_active":false,"allocated_error_budget":52560.008,"tags":{"Environment":"abc","Type":"test"},"remaining_error_budget":52560.008,"slo_monitoring_checks":[{"created_at":"2022-07-20T08:49:59.562379146Z","updated_at":"2022-07-20T08:49:59.562379146Z","deleted_at":null,"id":1453,"owner_type":"","owner_id":"6284813de5b66bb4f729278b","org_id":"60cb200bc9de4a0008d2fc41","slo_id":1144,"name":"is_unhealthy_slo","threshold":0,"is_checked":true},{"created_at":"2022-07-20T08:49:59.562379146Z","updated_at":"2022-07-20T08:49:59.562379146Z","deleted_at":null,"id":1454,"owner_type":"","owner_id":"6284813de5b66bb4f729278b","org_id":"60cb200bc9de4a0008d2fc41","slo_id":1144,"name":"increased_false_positives_threshold","threshold":0,"is_checked":true},{"created_at":"2022-07-20T08:49:59.562379146Z","updated_at":"2022-07-20T08:49:59.562379146Z","deleted_at":null,"id":1455,"owner_type":"","owner_id":"6284813de5b66bb4f729278b","org_id":"60cb200bc9de4a0008d2fc41","slo_id":1144,"name":"remaining_err_budget_threshold","threshold":0,"is_checked":true}],"slo_actions":[{"created_at":"2022-07-20T08:49:59.564177Z","updated_at":"2022-07-20T08:49:59.564177Z","deleted_at":null,"id":1883,"owner_type":"","owner_id":"6284813de5b66bb4f729278b","org_id":"60cb200bc9de4a0008d2fc41","slo_id":1144,"type":"SERVICE","user_id":"","squad_id":"","service_id":"62b2c18bca440a666897233d"},{"created_at":"2022-07-20T08:49:59.564177Z","updated_at":"2022-07-20T08:49:59.564177Z","deleted_at":null,"id":1884,"owner_type":"","owner_id":"6284813de5b66bb4f729278b","org_id":"60cb200bc9de4a0008d2fc41","slo_id":1144,"type":"USER","user_id":"60f12dd3814bef0008c4036e","squad_id":"","service_id":""}]}}}