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-fc9e11ec-19dc-41ee-ab50-428eb1a4dc4b
namespace: system
tenant: customer1
uid: fc9e11ec-19dc-41ee-ab50-428eb1a4dc4b
Request using curl:
curl -X 'POST' -d '{"namespace":"system","state":"APPROVED"}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_var_folders_2__8qnt6fwd5dvglr1xqq6l8b7w0000gp_T_go-build3109416560_b001_apidocs.test/host=C02FN35BMD6R/svc=S:examplesvc/site=mytestce01' '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, 21 Mar 2024 14:06:46 GMT
Vary: Accept-Encoding
{
"items": [
{
"tenant": "customer1",
"namespace": "system",
"name": "reg-fc9e11ec-19dc-41ee-ab50-428eb1a4dc4b",
"uid": "fc9e11ec-19dc-41ee-ab50-428eb1a4dc4b",
"description": "",
"disabled": false,
"labels": {
"abc": "def"
},
"annotations": {
},
"owner_view": null,
"metadata": null,
"system_metadata": null,
"object": null,
"get_spec": null
}
],
"errors": [
]
}