Page MenuHomeVyOS Platform

HTTPS API for /generate not working properly for wireguard interface
Open, NormalPublicBUG

Description

I am on vyos VyOS 2025.11.04-0019-rolling using the https api. I have a simple python script to generate me a wireguard interface with its keys. when I run the code I get what looks like the correct response.

 python
import os
import json
import urllib3
urllib3.disable_warnings()
from pyvyos import VyDevice
from dotenv import load_dotenv
load_dotenv()

hostname = os.getenv('VYDEVICE_HOSTNAME')
apikey = os.getenv('VYDEVICE_APIKEY')
port = os.getenv('VYDEVICE_PORT')
protocol = os.getenv('VYDEVICE_PROTOCOL')
verify_ssl = os.getenv('VYDEVICE_VERIFY_SSL')

verify = verify_ssl.lower() == "true" if verify_ssl else True

# Initialize VyDevice and store in app context
device = VyDevice(hostname=hostname, apikey=apikey, port=port, protocol=protocol, verify=verify)

data = device.generate(path=["pki", "wireguard", "key-pair", "install", "interface", "wg0"])

print(data.result)

Response:

1 value(s) installed. Use "compare" to see the pending changes, and "commit" to apply.
Corresponding public-key to use on peer system is: '+Nsm/cgOysi6za5TeRoEPRU5iPpitKVgTbuNX8h0Bmk='

As pointed out by jestabro, there was a regression in the forum thread.

Details

Version
VyOS 2025.11.04-0019-rolling
Is it a breaking change?
Public API change
Issue type
Bug (incorrect behavior)
Forum thread
https://forum.vyos.io/t/https-api-for-generate-not-working-properly-for-wireguard-interface/17099