API documentation for ovpn

Hi I’m triying to use the API for setting up an GL-AR150 which is running 3.017 firmware.

The api documentation at https://dev.gl-inet.com/router-api/1/#api-ovpn-PostOvpnClientAddnew says “Generate an new OVPN client for the configure files uploaded recently” but I haven’t found any api call to upload files to the router.

Can you help me?, please.
Thanks in advance.

Hi
Please user this api :api/ovpn/client/upload

I haven’t found that entry on the API v1 documentation, can you provide additional info about the parameters?
The API v2 reference doesn’t talk about the parameters, is it supposed to store the request body as the uploaded file? It uses the last file uploaded on the same session or the last uploaded file of all sessions?

Hi
V2 version of the API requires firmware above 3.025, upload interface parameters reference screenshot below:

Thanks for your answer, but, while AR150 interface doesn’t show 3.025 as an update for the firmware, I’m working with the 3.017 version, which remains on v1 API.

Download the latest version here:
https://dl.gl-inet.com/firmware/ar150/testing/

Thanks, I was aware of those testing versions, but I need to work with the versions we get from our suppliers here in Spain.

Hi
3.017 API

1 Like

Hi, i need help about using APIs to configure Openvpn remotely.
If someone can please share the complete APis needed and how to build the commands.

mi AR150 is running 3.0.24 FW.

i built the command like this but i am getting error regarding savepath

curl -H “Authorization: WVtVHCZfDlV6DuzmO8F5vX7ftiOA8hFM” --cookie “QSESSIONID=12b11242400e070000” 10.102.0.21/api/ovpn/client/upload -F “name=VPN”;“filename=c:\curl\cert2.zip” -v

and i get this error
{“code”:-5,“msg”:“failed to find savepath”}* Connection #0 to host 10.102.0.21 left intact

Please if someone can help.
Thanks in advance.