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
Key | Datatype | Required | Description |
---|---|---|---|
Authorization | null | ||
Content-Type | string |
RESPONSES
status: Created
{"data":{"id":"5e905b9ffe3e978d6ac34cc9","created_at":"2020-04-10T11:42:23.646Z","updated_at":"2020-04-10T11:42:23.646Z","deleted_at":null,"service_id":"5e8edb24668e003cb0b18ba1","organization_id":"5d81d9187000fb6b9def7e32","rules":[{"expression":"re(current.labels.alertname, \"^CPUThrottlingHigh.*\") \u0026\u0026 re(past.labels.alertname, \"^CPUThrottlingHigh.*\")","time_window":300},{"expression":"re(current.labels.alertname, \"^DeploymentReplicasNotUpdated.*\") \u0026\u0026 re(past.labels.alertname, \"^DeploymentReplicasNotUpdated.*\")","time_window":300}]}}