ves-io-schema-route-API-Get
On This Page:
Examples of getting route
Usecase:
Get route-1
Request using vesctl:
vesctl configuration get route route-1 --namespace documentation
vesctl yaml response:
metadata:
annotations: {}
labels: {}
name: route-1
namespace: documentation
resourceVersion: "700"
spec:
routes:
- match:
- headers: []
path:
regex: (.*?)
queryParams: []
requestHeadersToAdd: []
requestHeadersToRemove: []
responseHeadersToAdd: []
responseHeadersToRemove: []
routeDestination:
autoHostRewrite: false
destinations:
- cluster:
- kind: cluster
name: cluster-1
namespace: documentation
tenant: acmecorp
endpointSubsets: {}
endpointSubsets: {}
hashPolicy: []
status: []
systemMetadata:
creationTimestamp: "2021-03-31T08:29:47.428914100Z"
creatorClass: examplesvc
creatorId: examplesvc
finalizers: []
tenant: acmecorp
uid: 9ee14feb-f586-4912-ac16-0e82135d3b16
Request using curl:
curl -X 'GET' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build318584715_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/documentation/routes/route-1?response_format=0'
curl response:
HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 31 Mar 2021 08:29:47 GMT
Vary: Accept-Encoding
{
"object": null,
"create_form": null,
"replace_form": null,
"resource_version": "700",
"metadata": {
"name": "route-1",
"namespace": "documentation",
"labels": {
},
"annotations": {
},
"description": "",
"disable": false
},
"system_metadata": {
"uid": "9ee14feb-f586-4912-ac16-0e82135d3b16",
"creation_timestamp": "2021-03-31T08:29:47.428914100Z",
"deletion_timestamp": null,
"modification_timestamp": null,
"initializers": null,
"finalizers": [
],
"tenant": "acmecorp",
"creator_class": "examplesvc",
"creator_id": "examplesvc",
"object_index": 0,
"owner_view": null
},
"spec": {
"routes": [
{
"match": [
{
"path": {
"regex": "(.*?)"
},
"headers": [
],
"query_params": [
],
"http_method": "ANY"
}
],
"route_destination": {
"destinations": [
{
"cluster": [
{
"kind": "cluster",
"uid": "",
"tenant": "acmecorp",
"namespace": "documentation",
"name": "cluster-1"
}
],
"weight": 0,
"endpoint_subsets": {
}
}
],
"prefix_rewrite": "",
"auto_host_rewrite": false,
"timeout": 0,
"retry_policy": null,
"endpoint_subsets": {
},
"mirror_policy": null,
"web_socket_config": null,
"buffer_policy": null,
"cors_policy": null,
"hash_policy": [
],
"priority": "DEFAULT",
"spdy_config": null
},
"disable_custom_script": false,
"service_policy": null,
"request_headers_to_add": [
],
"response_headers_to_add": [
],
"request_headers_to_remove": [
],
"response_headers_to_remove": [
],
"waf_type": null,
"disable_location_add": false
}
]
},
"status": [
]
}