Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

User can also interact with 'UsbAccess' plugins using JSON-RPC 

1) Create Link:

2) Clear Link:

  • Method:  $ curl -d '{"jsonrpc":"2.0","id":"3","method":"org.rdk.UsbAccess.1.clearLink","params":{}}' http://127.0.0.1:9998/jsonrpc
  • Response:  {"jsonrpc":"2.0","id":3,"result":{"success":true}}

3) Get File list:

  • Method: $ curl -d '{"jsonrpc":"2.0","id":"3","method":"org.rdk.UsbAccess.1.getFileList","params":{"path":"www"}}' http://127.0.0.1:9998/jsonrpc
  • Response: {"jsonrpc":"2.0","id":3,"result":{"contents":[{"name":"var","t":"f"},{"name":"..","t":"d"},{"name":"pages","t":"d"},{"name":"logs","t":"f"},{"name":".","t":"d"}],"success":true}}

...