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
Key | Datatype | Required | Description |
---|---|---|---|
Authorization | null | ||
Content-Type | string |
RESPONSES
status: Created
{"data":{"id":"5d8c7b6905f5b9cfbfd30816","created_at":"2019-09-26T08:48:41.869Z","updated_at":"2019-09-26T08:48:41.869Z","deleted_at":null,"service_id":"5d8c79cb3f00de06d5fed406","organization_id":"5d81d9187000fb6b9def7e32","rules":[{"expression":"re(current.labels.alertname, \"^CPUThrottlingHigh.*\") \u0026\u0026 re(past.labels.alertname, \"^CPUThrottlingHigh.*\")","tags":{"severity":{"value":"high","color":"#ff0000"}}}]}}