REST API proper documentation in README.md

This commit is contained in:
giomba 2021-03-06 17:23:06 +01:00
parent 58e303a7a2
commit 562f840eba
1 changed files with 10 additions and 4 deletions

View File

@ -1,8 +1,14 @@
# VPN GOLEM
endpoint | method | body | description
---------+--------+------+-------------
/users | GET | | get list of users
/users | POST | ```{ "name": "johndoe" }``` | create new user
## REST API endpoints
| endpoint | method | body | description |
|---------------------------|:---------:|-------------------------------|-----------------------|
| /users | GET | | get list of users |
| /users | POST | ```{ "name": "johndoe" }``` | create new user |
| /gateways | GET | | get list of gateways |
| /gateways | POST | ```{ "name": "fqdn.domain.tld", "user": "johndoe" }``` | create new gateway for user |
| /gateway/<fqdn> | GET | | get info about gateway |
| /gateway/<fqdn> | DELETE | | delete gateway |
| /gateway/<fqdn>/config | GET | | get client config file for gateway |