Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document rest and rpc api #31

Open
cad opened this issue Aug 29, 2017 · 9 comments
Open

document rest and rpc api #31

cad opened this issue Aug 29, 2017 · 9 comments
Assignees

Comments

@cad
Copy link
Owner

cad commented Aug 29, 2017

Write a documentation for the ovpm REST and gRPC APIs. Put it up on the Wiki.

@cad cad self-assigned this Aug 29, 2017
@cad cad changed the title document rest and rpc api and put up a guide on the wiki for the client developers document rest and rpc api Aug 29, 2017
@j-cimb-barker
Copy link

Was there any movement on this...? Or any documentation elsewhere that can be used...?

@cad
Copy link
Owner Author

cad commented Dec 10, 2017

@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 can be one of these:

  • auth
  • user
  • network
  • vpn

gRPC API is similiar with the REST API. Proto files for the gRPC services can be examined here.

@j-cimb-barker
Copy link

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. :)

@shyaminayesh
Copy link

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 ?

@cad
Copy link
Owner Author

cad commented Aug 31, 2018

@shyaminayesh

You should include an Authorization HTTP header in your request:

Authorization: Bearer <your_token>

@vvek82
Copy link

vvek82 commented Feb 4, 2020

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?

@vvek82
Copy link

vvek82 commented Feb 5, 2020

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 " 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.

@cad
Copy link
Owner Author

cad commented Feb 8, 2020

@vvek82 Unfortunately OVPM does not export internal PKI parameters to users at this point.

@cad cad closed this as completed Feb 8, 2020
@cad cad reopened this Feb 8, 2020
@artificialai223
Copy link

Please add the doc links to the homepage :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants