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 alert_receiver.yaml has following contents (alert_receiver.ReplaceRequest):

RequestJSON:

{
    "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-build243329498_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: Fri, 23 Sep 2022 13:11:15 GMT
Vary: Accept-Encoding

{

}