ves-io-schema-virtual_site-API-Create

Examples of creating virtual_site

Usecase:

Create virtual-site-1

Request using vesctl:

vesctl configuration create virtual_site -i virtual_site.yaml

where file virtualsite.yaml has following contents (virtualsite.CreateRequest):

metadata:
  name: virtual-site-1
  namespace: documentation
spec:
  siteType: CUSTOMER_EDGE

vesctl yaml response:

metadata:
  annotations: {}
  labels: {}
  name: virtual-site-1
  namespace: documentation
spec:
  siteType: CUSTOMER_EDGE
systemMetadata:
  creationTimestamp: "2020-07-02T15:53:42.049262900Z"
  creatorClass: examplesvc.ves.io
  finalizers: []
  tenant: acmecorp
  uid: 2e85c96c-0016-48bc-8427-cdc89bc93400

Request using curl:

curl -X 'POST' -d '{"metadata":{"name":"virtual-site-1","namespace":"documentation"},"spec":{"siteType":"CUSTOMER_EDGE"}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build743694289_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/documentation/virtual_sites'

curl response:

HTTP/1.1 200 OK
Content-Length: 655
Content-Type: application/json
Date: Thu, 02 Jul 2020 15:53:42 GMT
Vary: Accept-Encoding

{
  "metadata": {
    "name": "virtual-site-1",
    "namespace": "documentation",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "2e85c96c-0016-48bc-8427-cdc89bc93400",
    "creation_timestamp": "2020-07-02T15:53:42.049262900Z",
    "deletion_timestamp": null,
    "modification_timestamp": null,
    "initializers": null,
    "finalizers": [
    ],
    "tenant": "acmecorp",
    "creator_class": "examplesvc.ves.io",
    "creator_id": "",
    "object_index": 0,
    "owner_view": null
  },
  "spec": {
    "site_selector": null,
    "site_type": "CUSTOMER_EDGE"
  }
}