​
Select Service
ves-io-schema-views-app_api_group-API-Create
Published April 5, 2023 | Last modified September 19, 2025
Examples of creating app_api_group
Usecase:
Create "read-only" app_api_group
Request using vesctl:
vesctl configuration create app_api_group -i app_api_group.yaml
where file app_api_group.yaml has following contents (app_api_group.CreateRequest):
RequestJSON:
{
    "metadata": {
        "name": "read-only",
        "namespace": "documentation",
        "labels": {
            "ves.io/api-scope": "ves-io-part"
        }
    },
    "spec": {
        "elements": [
            {
                "methods": [
                    "GET"
                ],
                "path_regex": "^/api/config/namespaces/([a-z]([-a-z0-9]*[a-z0-9])?)/advertise_policys$"
            }
        ],
        "http_loadbalancer": {
            "http_loadbalancer": {
                "tenant": "acmecorp",
                "namespace": "documentation",
                "name": "app-1"
            }
        },
        "api_group_builder": {
            "metadata": {
                "name": "sensitive"
            },
            "path_filter": "/abc/.*"
        }
    }
}
Copied!
vesctl yaml response:
ResponseJSON:
{
    "metadata": {
        "name": "read-only",
        "namespace": "documentation",
        "labels": {
            "ves.io/api-scope": "ves-io-part"
        },
        "annotations": {},
        "description": "",
        "disable": false
    },
    "system_metadata": {
        "uid": "aa6488cd-a395-4b95-8509-8bea609833f4",
        "creation_timestamp": "2025-09-19T02:03:11.267598Z",
        "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": {
        "elements": [
            {
                "methods": [
                    "GET"
                ],
                "path_regex": "^/api/config/namespaces/([a-z]([-a-z0-9]*[a-z0-9])?)/advertise_policys$"
            }
        ],
        "http_loadbalancer": {
            "http_loadbalancer": {
                "tenant": "acmecorp",
                "namespace": "documentation",
                "name": "app-1"
            }
        },
        "api_group_builder": {
            "metadata": {
                "name": "sensitive",
                "description": "",
                "disable": false
            },
            "path_filter": "/abc/.*",
            "label_filter": null,
            "included_operations": [],
            "excluded_operations": []
        },
        "api_endpoints_count": 0
    }
}
Copied!
Request using curl:
curl -X 'POST' -d '{"metadata":{"name":"read-only","namespace":"documentation","labels":{"ves.io/api-scope":"ves-io-part"}},"spec":{"elements":[{"methods":["GET"],"path_regex":"^/api/config/namespaces/([a-z]([-a-z0-9]*[a-z0-9])?)/advertise_policys$"}],"http_loadbalancer":{"http_loadbalancer":{"tenant":"acmecorp","namespace":"documentation","name":"app-1"}},"api_group_builder":{"metadata":{"name":"sensitive"},"path_filter":"/abc/.*"}}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_var_folders_q2_3kp8z3zs0x5_m7pk1bgb0_ph0000gp_T_go-build2850427035_b001_apidocs.test/host=MTY6VVHQPH/svc=S:examplesvc/site=mytestce01' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/documentation/app_api_groups'
Copied!
curl response:
HTTP/1.1 200 OK
Content-Length: 1313
Content-Type: application/json
Date: Fri, 19 Sep 2025 02:03:11 GMT
Vary: Accept-Encoding
{
  "metadata": {
    "name": "read-only",
    "namespace": "documentation",
    "labels": {
      "ves.io/api-scope": "ves-io-part"
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "aa6488cd-a395-4b95-8509-8bea609833f4",
    "creation_timestamp": "2025-09-19T02:03:11.267598Z",
    "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": {
    "elements": [
      {
        "methods": [
          "GET"
        ],
        "path_regex": "^/api/config/namespaces/([a-z]([-a-z0-9]*[a-z0-9])?)/advertise_policys$"
      }
    ],
    "http_loadbalancer": {
      "http_loadbalancer": {
        "tenant": "acmecorp",
        "namespace": "documentation",
        "name": "app-1"
      }
    },
    "api_group_builder": {
      "metadata": {
        "name": "sensitive",
        "description": "",
        "disable": false
      },
      "path_filter": "/abc/.*",
      "label_filter": null,
      "included_operations": [
      ],
      "excluded_operations": [
      ]
    },
    "api_endpoints_count": 0
  }
}
Copied!