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.


I’ve got this version image

but i get this issues :

My Command :

curl -X POST -F data=’{“op”: “showConfig”, “path”: [“interfaces”, “dummy”]}’ -F key=**** -k

I checked log server : i get a Connection Refused :


set service https api keys id REST key ‘****’
set service https api port ‘6443
set service https certificates system-generated-certificate lifetime ‘65535’
set service https listen-address * listen-port ‘6443

When i try with port 6443 :

$ curl -X POST -F data=’{“op”: “showConfig”, “path”: [“interfaces”, “dummy”]}’ -F key=***** -k
curl: (7) Failed to connect to port 6443: Connection refused

I reply to myself, i del dummy in data, it works !

But i’ve got a last question where is the documentation about REST API, i didn’t find it !

it not exists (just yet)
but it’s valid point, we need address this gap
@s.lorente want to take care on this and work with @dmbaturin and maybe @Dmitry

1 Like

Yes @syncer . We’ll get that documented.