HTTP API
VyOS provide an HTTP API. You can use it to execute op-mode commands, update VyOS, set or delete config.
Please take a look at the VyOS API page for an detailed how-to.
Configuration
Only allow certain IP addresses or prefixes to access the https webserver.
Use DH parameters from PKI subsystem. Must be at least 2048 bits in length.
Select TLS version used.
This defaults to both 1.2 and 1.3.
Set the maximum request body size in megabytes. Default is 1MB.
API
Set a named api key. Every key has the same, full permissions on the system.
GraphQL
Note
Do not leave introspection enabled in production, it is a security risk.
Set the authentication type for GraphQL, default option is key. Available options are:
key
use API keys configured inservice https api keys
token
use JWT tokens.
Set the lifetime for JWT tokens in seconds. Default is 3600 seconds.
Example Configuration
Set an API-KEY is the minimal configuration to get a working API Endpoint.
set service https api keys id MY-HTTPS-API-ID key MY-HTTPS-API-PLAINTEXT-KEY