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:
errors: []
items:
- annotations: {}
labels:
abc: def
name: reg-1ab44fbe-a686-478f-94c6-5f98639c6735
namespace: system
tenant: customer1
uid: 1ab44fbe-a686-478f-94c6-5f98639c6735
Request using curl:
curl -X 'POST' -d '{"namespace":"system","state":"APPROVED"}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build1372770011_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: 476
Content-Type: application/json
Date: Thu, 28 Jul 2022 12:11:34 GMT
Vary: Accept-Encoding
{
"items": [
{
"tenant": "customer1",
"namespace": "system",
"name": "reg-1ab44fbe-a686-478f-94c6-5f98639c6735",
"uid": "1ab44fbe-a686-478f-94c6-5f98639c6735",
"description": "",
"disabled": false,
"labels": {
"abc": "def"
},
"annotations": {
},
"owner_view": null,
"metadata": null,
"system_metadata": null,
"object": null,
"get_spec": null
}
],
"errors": [
]
}