Create or Update Deduplication Rules

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

This endpoint creates or updates the deduplication 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>", "time_window"=>"<string>"}, {"expression"=>"<string>", "time_window"=>"<string>"}]}

HEADERS

KeyDatatypeRequiredDescription
Authorizationnull
Content-Typestring

RESPONSES

status: Created

{&quot;data&quot;:{&quot;id&quot;:&quot;5e905b9ffe3e978d6ac34cc9&quot;,&quot;created_at&quot;:&quot;2020-04-10T11:42:23.646Z&quot;,&quot;updated_at&quot;:&quot;2020-04-10T11:42:23.646Z&quot;,&quot;deleted_at&quot;:null,&quot;service_id&quot;:&quot;5e8edb24668e003cb0b18ba1&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;time_window&quot;:300},{&quot;expression&quot;:&quot;re(current.labels.alertname, \&quot;^DeploymentReplicasNotUpdated.*\&quot;) \u0026\u0026 re(past.labels.alertname, \&quot;^DeploymentReplicasNotUpdated.*\&quot;)&quot;,&quot;time_window&quot;:300}]}}