ves-io-schema-alert_receiver-API-Replace

Examples of replacing alert_receiver

Usecase:

Replace alert_receiver "receiver1" with different email id

Request using vesctl:

vesctl configuration replace alert_receiver -i alert_receiver.yaml

where file alertreceiver.yaml has following contents (alertreceiver.ReplaceRequest):

metadata:
  name: receiver1
  namespace: documentation
spec:
  email:
    email: xyz.new@abc.com

vesctl yaml response: None

Request using curl:

curl -X 'PUT' -d '{"metadata":{"name":"receiver1","namespace":"documentation"},"spec":{"email":{"email":"xyz.new@abc.com"}}}' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build970361017_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/documentation/alert_receivers/receiver1'

curl response:

HTTP/1.1 200 OK
Content-Length: 4
Content-Type: application/json
Date: Wed, 25 Aug 2021 09:02:31 GMT
Vary: Accept-Encoding

{

}