From dbf8a3e27e54e0f8a4138c8b08dffb1dff531fb5 Mon Sep 17 00:00:00 2001 From: Ganesh Vernekar <15064823+codesome@users.noreply.github.com> Date: Mon, 22 Feb 2021 19:43:55 +0530 Subject: [PATCH] Add id to POST /api/v1/silences (#9) Signed-off-by: Ganesh Vernekar --- pkg/api/alertmanager.go | 5 +++++ spec.json | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/pkg/api/alertmanager.go b/pkg/api/alertmanager.go index e0e0f234558..74efb8d5854 100644 --- a/pkg/api/alertmanager.go +++ b/pkg/api/alertmanager.go @@ -80,6 +80,11 @@ import ( // swagger:parameters RouteCreateSilence type CreateSilenceParams struct { + // ID of any existing silence to overwrite + // in:body + // required: false + Id string `json:"id"` + // in:body Body Silence } diff --git a/spec.json b/spec.json index 3a2e4b2da29..d9a4b8ad34a 100644 --- a/spec.json +++ b/spec.json @@ -549,6 +549,15 @@ ], "operationId": "RouteCreateSilence", "parameters": [ + { + "x-go-name": "Id", + "description": "ID of any existing silence to overwrite", + "name": "id", + "in": "body", + "schema": { + "type": "string" + } + }, { "name": "Body", "in": "body",