Create Slo
POST {{baseUrl}}/slo
- This API will create SLO.
Payload
Key | Value | Example | Required |
---|---|---|---|
allocatederrorbudget | Number (float) | 52559.6 | false |
description | String | “test” | false |
durationindays | Number | 7 | false |
end_time | date | “2023-07-18T07:20:31.224Z” | true |
start_time | date | 2022-07-18T07:20:31.225Z | true |
name | String | test | true |
owner_id | String | 6284813de5b66bb4f729278b | true |
remainingerrorbudget | Number (float) | 52559.6 | false |
service_ids | Array of String | [6284213de5b66bb4f729265b] | true |
slis | Array of String | [availability] | true |
slo_actions | Array of Object | [{ service_id: , }] | false |
slomonitoringchecks | Array 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_slo | Number | 90 | false |
timeintervaltype | String | fixed/ optional | true |
tags | Object | { 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
Key | Datatype | Required | Description |
---|---|---|---|
Authorization | null | ||
Content-Type | string |
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":""}]}}}