ves-io-schema-infraprotect_network-CustomAPI-List

Examples of performing infraprotect_network CustomAPI List

Usecase:

List prefixes and statuses

Request:

Request using vesctl:

vesctl request rpc infraprotect_network.CustomAPI.List -i request.yaml --uri /public/namespaces/system/infraprotect_networks --http-method GET

where file request.yaml has following contents:

namespace: system

vesctl yaml response:

items:
- mitigated: true
  prefix: 10.1.1.0/24

Request using curl:

curl -X 'GET' -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/infraprotect/namespaces/system/infraprotect_networks?namespace=system'

curl response:

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

{
  "items": [
    {
      "mitigated": true,
      "prefix": "10.1.1.0/24",
      "withdrawn": false
    }
  ]
}