​
Select Service
ves-io-schema-app_type-API-Create
Published April 5, 2023 | Last modified March 20, 2025
Examples of creating app_type
Usecase:
Create app_type "bookinfo" for bookinfo app so that service mesh of productpage, review, rating and details can be created by applying "ves.io/app-type=bookinfo" label to these microservices.
Request using vesctl:
vesctl configuration create app_type -i app_type.yaml
where file app_type.yaml has following contents (app_type.CreateRequest):
RequestJSON:
{
"metadata": {
"name": "bookinfo",
"namespace": "shared"
},
"spec": {
"features": [
{},
{
"type": "TIMESERIES_ANOMALY_DETECTION"
}
],
"business_logic_markup_setting": {
"disable": {}
}
}
}
Copied!
vesctl yaml response:
ResponseJSON:
{
"metadata": {
"name": "bookinfo",
"namespace": "shared",
"labels": {},
"annotations": {},
"description": "",
"disable": false
},
"system_metadata": {
"uid": "807f9415-6e88-4aeb-8dd2-a007a74124bd",
"creation_timestamp": "2025-03-11T00:55:37.023831Z",
"deletion_timestamp": null,
"modification_timestamp": null,
"initializers": null,
"finalizers": [],
"tenant": "acmecorp",
"creator_class": "examplesvc",
"creator_id": "examplesvc",
"object_index": 0,
"owner_view": null,
"labels": {}
},
"spec": {
"features": [
{
"type": "BUSINESS_LOGIC_MARKUP"
},
{
"type": "TIMESERIES_ANOMALY_DETECTION"
}
],
"business_logic_markup_setting": {
"disable": {},
"sensitive_data_detection_rules": null,
"discovered_api_settings": null
}
}
}
Copied!
Request using curl:
curl -X 'POST' -d '{"metadata":{"name":"bookinfo","namespace":"shared"},"spec":{"features":[{},{"type":"TIMESERIES_ANOMALY_DETECTION"}],"business_logic_markup_setting":{"disable":{}}}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_var_folders_q2_3kp8z3zs0x5_m7pk1bgb0_ph0000gp_T_go-build436303540_b001_apidocs.test/host=MTY6VVHQPH/svc=S:examplesvc/site=mytestce01' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/shared/app_types'
Copied!
curl response:
HTTP/1.1 200 OK
Content-Length: 908
Content-Type: application/json
Date: Tue, 11 Mar 2025 00:55:37 GMT
Vary: Accept-Encoding
{
"metadata": {
"name": "bookinfo",
"namespace": "shared",
"labels": {
},
"annotations": {
},
"description": "",
"disable": false
},
"system_metadata": {
"uid": "807f9415-6e88-4aeb-8dd2-a007a74124bd",
"creation_timestamp": "2025-03-11T00:55:37.023831Z",
"deletion_timestamp": null,
"modification_timestamp": null,
"initializers": null,
"finalizers": [
],
"tenant": "acmecorp",
"creator_class": "examplesvc",
"creator_id": "examplesvc",
"object_index": 0,
"owner_view": null,
"labels": {
}
},
"spec": {
"features": [
{
"type": "BUSINESS_LOGIC_MARKUP"
},
{
"type": "TIMESERIES_ANOMALY_DETECTION"
}
],
"business_logic_markup_setting": {
"disable": {
},
"sensitive_data_detection_rules": null,
"discovered_api_settings": null
}
}
}
Copied!