Testing first on VyOS 1.2.5epa
vyos@vyos# show service https api { debug keys { id HTTP-API-ID { } id MY-HTTP-API-ID { key MY-HTTP-API-PLAINTEXT-KEY } } } listen-address 192.168.122.127 { }
From the requester machine I send
curl -k -X POST -F key=MY-HTTP-API-PLAINTEXT-KEY -Fdata='{"op": "add", "url": "https://downloads.vyos.io/rolling/current/amd64/vyos-rolling-latest.iso"}' https://192.168.122.127/image
And I can see in VyOS it establishes the connection
But I quickly get this message at the requester's console:
{"error": "Start service in configuration mode: set service https api"
I do the same test on VyOS 1.3-rolling-202002280217 and get:
<html> <head><title>504 Gateway Time-out</title></head> <body bgcolor="white"> <center><h1>504 Gateway Time-out</h1></center> <hr><center>nginx/1.14.2</center> </body> </html>
I was sometimes getting that same outcome when requesting to Crux.
When trying to delete an image I get the following:
<html> <head><title>301 Moved Permanently</title></head> <body bgcolor="white"> <center><h1>301 Moved Permanently</h1></center> <hr><center>nginx/1.14.2</center> </body> </html>
But nothing is deleted.
If I do the same to Crux
curl -k -X POST -F key=MY-HTTP-API-PLAINTEXT-KEY -Fdata='{"op": "delete", "url": "1.2.4"}' http://192.168.122.127/image
I get again
<html> <head><title>301 Moved Permanently</title></head> <body bgcolor="white"> <center><h1>301 Moved Permanently</h1></center> <hr><center>nginx/1.6.2</center> </body> </html>
But again nothing is deleted.