Page MenuHomeVyOS Platform

Define a high level HTTP API
Open, Requires assessmentPublic


Right now we have a low level HTTP API that allows creating/deleting config nodes with given paths. The bad thing is that the user needs to know the config syntax.
Config syntax isn't exactly constant either—we sometimes change it between LTS releases.

This is bad for development of management tools. Our plan for the local web GUI is to provide a simplified interface for novice users and helpdesk personnel, for example. Other people may want to develop tools similar in spirit but different in their look or behaviour.

It would be handy to have a more high level API that is relatively abstract and doesn't depend on precise config syntax. For example: /firewall/rule/create/ with abstract POST data.

We need to first define endpoints, then actually implement them.


Difficulty level
Unknown (require assessment)
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Feature (new functionality)

Event Timeline

Coming with a syntax which is not ultimately going to be as complex as the cli may be an impossible challenge. Changing the API to include in the XML what is path vs payload may indeed lead to indeed a better API tho. The example given use the word create in the path when REST would use POST.

Another way to not break precious API code may be to version the API, and have the migration code able to convert a request to the latest syntax.

A simple experiment using GraphQL to configure a DHCP server is here:

This requires support from:

cf. README.graphql in vyos-1x.

erkin set Issue type to Feature (new functionality).Aug 29 2021, 1:33 PM
erkin removed a subscriber: Active contributors.

+1; versioning the API is also a best practice.