We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
Extending the Admin API
Extending the Admin API
Is there a recommended approach to extending the admin API in Vesta?
For example, if I have another command line tool that I would like to make available through the Vesta admin api.
Any examples that I could perhaps take a look at or that would make a good starting point?
Thanks
For example, if I have another command line tool that I would like to make available through the Vesta admin api.
Any examples that I could perhaps take a look at or that would make a good starting point?
Thanks
Re: Extending the Admin API
For now you can put additional scripts in /usr/local/vesta/bin/ and they will become available via API. Unfortunately, such method isn't sustainable across updates.
I will think about how we can cover this in feature releases.
I will think about how we can cover this in feature releases.
Re: Extending the Admin API
Thanks skid. If I do add scripts now, do you think the updates will wipe them or just make them inoperable?skid wrote:For now you can put additional scripts in /usr/local/vesta/bin/ and they will become available via API. Unfortunately, such method isn't sustainable across updates.
I will think about how we can cover this in feature releases.
Re: Extending the Admin API
That's a good question. It all depends on system package manager and it seems like rpm doesn't wipe bin directory. Not sure about dpkg. I will check it later today.
Re: Extending the Admin API
Thanks. At the moment I'm not sure whether to put my additions somewhere else with their own API or try and integrate them with the Vesta API.
Re: Extending the Admin API
I have a good news, apt-get upgrade didn't wiped directory. So you are safe to go.
Re: Extending the Admin API
Fantastic. The approach I have taken so far has been to create additional v-xxxx-xxx-xxx commands. Works perfectly from the command line but I've yet to test it through the API.
Do you know if 'apt-get upgrade' does much to the 'skel' in the vesta templates?
Do you know if 'apt-get upgrade' does much to the 'skel' in the vesta templates?
Re: Extending the Admin API
Anything in /usr/local/vesta/data is beyond the apt or yum knowledge. Feel free to modify and change any file there.
Re: Extending the Admin API
:-) this just gets better and better.
Re: Extending the Admin API
API documentation and examples:
http://vestacp.com/docs/API.pdf
CLI commands list and descriptions:
http://vestacp.com/docs/CLI.txt
-> viewtopic.php?f=18&t=12610
http://vestacp.com/docs/API.pdf
CLI commands list and descriptions:
http://vestacp.com/docs/CLI.txt
-> viewtopic.php?f=18&t=12610