Cannot update system image via API
set service https api keys id KID key 'foo' set service https api socket
Check that API works:
vyos@r1:~$ curl -k --location --request POST 'https://192.168.122.11/show' \ > --form data='{"op": "show", "path": ["system", "image"]}' \ > --form key='foo' {"success": true, "data": "The system currently has the following image(s) installed:\n\n 1: 1.4-rolling-202311020707 (default boot) (running image)\n 2: 1.3.4\n 3: 1.3.3\n\n", "error": null}
Update image:
vyos@r1:~$ curl -k --location --request POST 'https://192.168.122.11/image' \ > --form data='{"op": "add", "url": "http://192.168.122.11:8000/vyos-1.4-rolling-202311090309-amd64.iso"}' \ > --form key='foo' {"success": false, "error": "Trying to fetch ISO file from http://192.168.122.11:8000/vyos-1.4-rolling-202311090309-amd64.iso...\nDownloading...\nThe file is 439.000 MiB.\ntput: No value for $TERM and no -T specified\nUnable to download \"http://192.168.122.11:8000/vyos-1.4-rolling-202311090309-amd64.iso\": [Errno 25] Inappropriate ioctl for device\nDownload complete.\npre-3\nDone.\nChecking for digital signature file...\nDownloading...\nUnable to download \"http://192.168.122.11:8000/vyos-1.4-rolling-202311090309-amd64.iso.minisig\": 404 Client Error: File not found for url: http://192.168.122.11:8000/vyos-1.4-rolling-202311090309-amd64.iso.minisig\nDownload complete.\npre-3\nChecking digital signature...\nDigital signature is valid.\n\"/var/tmp/install-image.4591/vyos-1.4-rolling-202311090309-amd64.iso\" is not a valid ISO image file.\nExiting...\n", "data": null}
Note works fine in 1.3.4