Page MenuHomeVyOS Platform

Define a high level HTTP API
Open, Requires assessmentPublic

Description

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.

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible

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.

pasik added a subscriber: pasik.Aug 7 2020, 3:41 PM