OpenVPN Rest Api

Post Reply
thomas7
OpenVpn Newbie
Posts: 2
Joined: Tue May 07, 2019 2:32 pm

OpenVPN Rest Api

Post by thomas7 » Tue May 07, 2019 4:36 pm

We have set up an access server and I have been trying to get some useful data with rest queries.
I am using this: https://openvpn.net/images/pdf/REST_API.pdf as a documentation where the request is of the form:

Code: Select all

curl -u USERNAME:PASSWORD https://ACCESS_SERVER:CWS_PORT/rest/METHOD
Everything works fine but I would like to learn if there is a fully documented list of the METHODs available. I have only found documentation for GetUserlogin, GetAutologin and GetGeneric, and I would like to know if there are any other methods available and their form.

novaflash
I should be on the dev team.
Posts: 1017
Joined: Fri Apr 13, 2012 8:43 pm

Re: OpenVPN Rest Api

Post by novaflash » Tue May 07, 2019 4:57 pm

That's pretty much all there is for REST. All other remote procedure calls must be done through XML-RPC - with the information on this page anything that you can do on the command line can also be done with remote procedure calls;
https://openvpn.net/vpn-server-resource ... -interface

thomas7
OpenVpn Newbie
Posts: 2
Joined: Tue May 07, 2019 2:32 pm

Re: OpenVPN Rest Api

Post by thomas7 » Wed May 08, 2019 9:04 am

novaflash wrote:
Tue May 07, 2019 4:57 pm
That's pretty much all there is for REST. All other remote procedure calls must be done through XML-RPC - with the information on this page anything that you can do on the command line can also be done with remote procedure calls;
https://openvpn.net/vpn-server-resource ... -interface
Thank you very much for your answer!
So it is not possible, for instance to create new users or connect to the VPN via some rest queries, right?
Is this possible only via command line?

novaflash
I should be on the dev team.
Posts: 1017
Joined: Fri Apr 13, 2012 8:43 pm

Re: OpenVPN Rest Api

Post by novaflash » Wed May 08, 2019 5:02 pm

Via REST, no, you cannot create users. But you can obtain profiles for existing users using REST, using rest/getAutologin and rest/GetUserlogin.

To create users, you can use either the web interface, the command line interface, or the XMl-RPC interface. But not REST.

Post Reply