Http API for show

Hi,

i am trying the http api was able to set and delete using the same, how to do show for any command.

also wanted to know if the same is only available with automatic rolling release, as when i tried to compile vyos from git source the same was not getting started.

Regards
senthil

Hi Senthil,
We haven’t included the show operation because the default config format is not at all machine-friendly, and we thought no one will want it. There’s /retrieve endpoint that allows retrieving a single value, like cli-shell-api returnValue

We are planning to add JSON export, and it will be easy to add an option for raw config export when we have it.

1 Like

Hi ,

By when JSON export will be released.

Regards
senthil

@senthil.naidu I’ve added the operation for retrieving raw configs, it will be in tomorrow’s nightly build.

# curl -X POST -F data='{"op": "showConfig", "path": ["interfaces", "dummy"]}' -F key=qwerty http://127.0.0.1:8080/retrieve
{"success": true, "data": " /* So very dummy */\n dummy dum0 {\n     address 192.168.168.1/32\n     address 192.168.168.2/32\n     /* That is a description */\n     description \"Test interface\"\n }\n dummy dum1 {\n     address 203.0.113.76/32\n     address 203.0.113.79/32\n }\n", "error": null}

JSON will take a bit longer, but it definitely will be in the 1.3.0 release.

1 Like

@dmbaturin

Thanks for the update.