ovpm
ovpm copied to clipboard
document rest and rpc api
Write a documentation for the ovpm REST and gRPC APIs. Put it up on the Wiki.
Was there any movement on this...? Or any documentation elsewhere that can be used...?
@j-cimb-barker Unfortunately detailed wiki document for APIs are currently missing. Nowadays I am super busy with another project within the company. I plan to get back to contributing to OVPM at the beginning of the new year.
Untill then you can do the following to reach to reference docs for REST API.
First you need to launch ovpmd as explained here and then you can access to the docs for each service by visiting the following url http://localhost:9090/api/docs/<service-name>
where
- auth
- user
- network
- vpn
gRPC API is similiar with the REST API. Proto files for the gRPC services can be examined here.
Thanks for getting back to me. I have had some success by following the code and have been able to authenticate and use the Rest api. :)
How can I submit the authentication token or username/password to the user/list endpoint once I authenticate ?
I mean what are the params I need to submit in my post request ?
@shyaminayesh
You should include an Authorization HTTP header in your request:
Authorization: Bearer <your_token>
How can I send a curl request for rest APIs.
I mean what are the params I need to submit in my get and post request?
Hi,
Now I am able to get REST API response using curl command through token as below,
curl -H "Accept: application/json" -H "Authorization: Bearer <Token>" MY_SERVER:8080/api/v1/auth/status
In my case, I want to do all the things with ca-certificates. Is it possible to prepare a public key and private key paring for communication? From where I can get ca-certificates of ovpmd server to generate certificate and key for the client.
@vvek82 Unfortunately OVPM does not export internal PKI parameters to users at this point.
Please add the doc links to the homepage :)