ves-io-schema-app_type-API-Replace

Examples of replacing app_type

Usecase:

Replace app-type bookinfo to update features to enable per req anomaly detection

Request using vesctl:

vesctl configuration replace app_type -i app_type.yaml

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

metadata:
  name: bookinfo
  namespace: shared
spec:
  features:
  - {}
  - type: TIMESERIES_ANOMALY_DETECTION
  - type: PER_REQ_ANOMALY_DETECTION

vesctl yaml response: None

Request using curl:

curl -X 'PUT' -d '{"metadata":{"name":"bookinfo","namespace":"shared"},"spec":{"features":[{},{"type":"TIMESERIES_ANOMALY_DETECTION"},{"type":"PER_REQ_ANOMALY_DETECTION"}]}}' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build970361017_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/shared/app_types/bookinfo'

curl response:

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

{

}