ves-io-schema-app_setting-API-Replace

Examples of replacing app_setting

Usecase:

Use replace to update app-setting to add ANOMALY_SERVICE_PER_SITE

Request using vesctl:

vesctl configuration replace app_setting -i app_setting.yaml

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

RequestJSON:

{"metadata":{"name":"app-setting","namespace":"documentation"},"spec":{"app_type_settings":[{"app_type_ref":[{"kind":"app_type","tenant":"acmecorp","namespace":"shared","name":"bookinfo"}],"timeseries_analyses_setting":{"metric_selectors":[{"metrics_source":"VIRTUAL_HOSTS","metric":["REQUEST_RATE"]}]}}]}} `

vesctl yaml response: None

Request using curl:

curl -X 'PUT' -d '{"metadata":{"name":"app-setting","namespace":"documentation"},"spec":{"app_type_settings":[{"app_type_ref":[{"kind":"app_type","tenant":"acmecorp","namespace":"shared","name":"bookinfo"}],"timeseries_analyses_setting":{"metric_selectors":[{"metrics_source":"VIRTUAL_HOSTS","metric":["REQUEST_RATE"]}]}}]}}' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build1372770011_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/documentation/app_settings/app-setting'

curl response:

HTTP/1.1 200 OK
Content-Length: 4
Content-Type: application/json
Date: Thu, 28 Jul 2022 12:09:35 GMT
Vary: Accept-Encoding

{

}