Http API for show


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.


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.


@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
{"success": true, "data": " /* So very dummy */\n dummy dum0 {\n     address\n     address\n     /* That is a description */\n     description \"Test interface\"\n }\n dummy dum1 {\n     address\n     address\n }\n", "error": null}

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

1 Like


Thanks for the update.