Create or Update Tagging Rules

POST {{baseUrl}}/services/:serviceID/tagging-rules

This endpoint creates or updates the tagging rules for the given service. If default rules not found it creates otherwise it updates the new rules. Requires access_token as a Bearer {{token}} in the Authorization header with write scope.

Request Body

{"rules"=>[{"expression"=>"<string>", "tags"=>{"key"=>{"value"=>"<string>", "color"=>"<string>"}}}, {"expression"=>"<string>", "tags"=>{"key"=>{"value"=>"<string>", "color"=>"<string>"}}}]}

HEADERS

KeyDatatypeRequiredDescription
Authorizationnull
Content-Typestring

RESPONSES

status: Created

{&quot;data&quot;:{&quot;id&quot;:&quot;5d8c7b6905f5b9cfbfd30816&quot;,&quot;created_at&quot;:&quot;2019-09-26T08:48:41.869Z&quot;,&quot;updated_at&quot;:&quot;2019-09-26T08:48:41.869Z&quot;,&quot;deleted_at&quot;:null,&quot;service_id&quot;:&quot;5d8c79cb3f00de06d5fed406&quot;,&quot;organization_id&quot;:&quot;5d81d9187000fb6b9def7e32&quot;,&quot;rules&quot;:[{&quot;expression&quot;:&quot;re(current.labels.alertname, \&quot;^CPUThrottlingHigh.*\&quot;) \u0026\u0026 re(past.labels.alertname, \&quot;^CPUThrottlingHigh.*\&quot;)&quot;,&quot;tags&quot;:{&quot;severity&quot;:{&quot;value&quot;:&quot;high&quot;,&quot;color&quot;:&quot;#ff0000&quot;}}}]}}