ves-io-schema-registration-CustomAPI-ListRegistrationsByState

Examples of performing registration CustomAPI ListRegistrationsByState

Usecase:

List registrations by state

Request:

Request using vesctl:

vesctl request rpc registration.CustomAPI.ListRegistrationsByState -i request.yaml --uri /public/namespaces/system/listregistrationsbystate --http-method POST

where file request.yaml has following contents:

namespace: system
state: APPROVED

vesctl yaml response:

items:
- labels:
    abc: def
  name: reg-ac85d5d4-8f06-4739-87f6-52d391f5e8a5
  namespace: system
  tenant: customer1
  uid: ac85d5d4-8f06-4739-87f6-52d391f5e8a5

Request using curl:

curl -X 'POST' -d '{"namespace":"system","state":"APPROVED"}' -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/register/namespaces/system/listregistrationsbystate'

curl response:

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

{
  "items": [
    {
      "tenant": "customer1",
      "namespace": "system",
      "name": "reg-ac85d5d4-8f06-4739-87f6-52d391f5e8a5",
      "uid": "ac85d5d4-8f06-4739-87f6-52d391f5e8a5",
      "labels": {
        "abc": "def"
      },
      "owner_view": null,
      "object": null,
      "get_spec": null
    }
  ]
}