ves-io-schema-operate-usb-CustomPublicAPI-List

Examples of performing operate_usb CustomPublicAPI List

Usecase:

List connected USB devices

Request:

Request using vesctl:

vesctl request rpc operate_usb.CustomPublicAPI.List -i request.yaml --uri /public/namespaces/system/sites/site1/vpm/usb/master-0/list --http-method GET

where file request.yaml has following contents:

namespace: system
node: master-0
site: site1

vesctl yaml response:

usb:
- idProduct: 1d6b
  idVendor: "0003"
- idVendor: 05e3

Request using curl:

curl -X 'GET' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build823219857_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/operate/namespaces/system/sites/site1/vpm/usb/master-0/list?namespace=system&node=master-0&site=site1'

curl response:

HTTP/1.1 200 OK
Content-Length: 968
Content-Type: application/json
Date: Wed, 23 Sep 2020 09:53:45 GMT
Vary: Accept-Encoding

{
  "namespace": "",
  "site": "",
  "node": "",
  "usb": [
    {
      "bus": 0,
      "address": 0,
      "port": 0,
      "description": "",
      "vendor_name": "",
      "product_name": "",
      "i_serial": "",
      "id_vendor": "0003",
      "id_product": "1d6b",
      "i_manufacturer": "",
      "speed": "",
      "bcd_usb": "",
      "bcd_device": "",
      "b_device_class": "",
      "b_device_sub_class": "",
      "b_device_protocol": "",
      "b_max_packet_size": 0,
      "i_product": ""
    },
    {
      "bus": 0,
      "address": 0,
      "port": 0,
      "description": "",
      "vendor_name": "",
      "product_name": "",
      "i_serial": "",
      "id_vendor": "05e3",
      "id_product": "",
      "i_manufacturer": "",
      "speed": "",
      "bcd_usb": "",
      "bcd_device": "",
      "b_device_class": "",
      "b_device_sub_class": "",
      "b_device_protocol": "",
      "b_max_packet_size": 0,
      "i_product": ""
    }
  ]
}