Page MenuHomeVyOS Platform

HTTP-API show configuration request does not work on Crux and not as expected on Rolling
Closed, ResolvedPublicBUG

Description

VyOS 1.2.5epa1

When I do

curl -k -X POST -F key=MY-HTTP-API-PLAINTEXT-KEY -Fdata='{"op": "showConfig", "path": ["interfaces", "dummy"], "configFormat": "json"}' https://192.168.122.127/retrieve

I get

{"error": null, "data": null, "success": true}

But I cannot see anything, nothing is printed on the screen.

VyOS 1.3-rolling-202002280217

It does work with Rolling, it shows the configuration printed on the screen, but not with the same format as the example at https://blog.vyos.io/vyos-project-2019-october-update.

curl -k -X POST -F key=MY-HTTP-API-PLAINTEXT-KEY -Fdata='{"op": "showConfig", "path": ["interfaces", "dummy"], "configFormat": "json"}' https://192.168.122.131/retrieve
{"success": true, "data": {"dummy": {"dum1": {"address": "203.0.113.76/32"}}}, "error": null}

Details

Difficulty level
Unknown (require assessment)
Version
VyOS 1.2.5epa1, VyOS 1.3 Rolling
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)

Event Timeline

Unknown Object (User) created this task.Mar 3 2020, 12:35 PM

The 'showConfig' op is not considered ready for 1.2.5, and specifically json configFormat is not yet backported to crux. Regarding the output in the blog, see the line following the screen shot: "In reality that output is not pretty-printed, though we may add a flag for it. "

Unknown Object (User) added a comment.Mar 3 2020, 5:44 PM

Thank you @jestabro. I see now, I didn't get that sentence. So then I guess this task can be closed?