Compare commits
1 Commits
c3f3b3eba1
...
c71e605abd
| Author | SHA1 | Date | |
|---|---|---|---|
|
c71e605abd
|
13
README.md
13
README.md
@@ -44,6 +44,11 @@ JSON_REQUEST_BODY='{
|
|||||||
"public_ip": false
|
"public_ip": false
|
||||||
}'
|
}'
|
||||||
http post $API_SERVER/admin/client $API_KEY <<< $JSON_REQUEST_BODY
|
http post $API_SERVER/admin/client $API_KEY <<< $JSON_REQUEST_BODY
|
||||||
|
|
||||||
|
# Alternatively using query strings (be sure to encode special characters in the param values)
|
||||||
|
API_KEY='X-API-Key=MdSUxrQQ.d5d40cd9.e2s1BsQEqmSE5MqyHYbDBVxGr/KY4BYIV5QkdjiCOF0='
|
||||||
|
CLIENT_PARAMS='name=clientA&description=Client+across+the+river&permission=rw&public_ip=false'
|
||||||
|
http post "$API_SERVER/admin/client?$API_KEY&$CLIENT_PARAMS"
|
||||||
```
|
```
|
||||||
Updating a write client's `ipv4`:
|
Updating a write client's `ipv4`:
|
||||||
```bash
|
```bash
|
||||||
@@ -67,7 +72,7 @@ API_SERVER=http://localhost:3000/rynDNS
|
|||||||
API_KEY=X-API-Key:zW3If4s5.28aef5cb.d502cb94ba0802c6363f95ecb3a70de7e2e4b889779e435b7c033f2c72ed4f20
|
API_KEY=X-API-Key:zW3If4s5.28aef5cb.d502cb94ba0802c6363f95ecb3a70de7e2e4b889779e435b7c033f2c72ed4f20
|
||||||
CLIENT_NAME=write_client
|
CLIENT_NAME=write_client
|
||||||
|
|
||||||
http get $API_SERVER/clients/$CLIENT_NAME $ API_KEY
|
http get $API_SERVER/clients/$CLIENT_NAME $API_KEY
|
||||||
|
|
||||||
# returns clients name and ipv4 as json
|
# returns clients name and ipv4 as json
|
||||||
#{
|
#{
|
||||||
@@ -80,6 +85,8 @@ A detailed and interactive specification can be found in the [demo](https://demo
|
|||||||
|
|
||||||
All requests except for `/public/*` require a valid `X-API-Key` header with appropriate permission.
|
All requests except for `/public/*` require a valid `X-API-Key` header with appropriate permission.
|
||||||
|
|
||||||
|
**Experimental:** All parameters (including `X-API-Key`) can be passed as query string.
|
||||||
|
|
||||||
The following is a quick overview of the available commands.
|
The following is a quick overview of the available commands.
|
||||||
|
|
||||||
### Admin
|
### Admin
|
||||||
@@ -131,5 +138,7 @@ RAILS_DEMO_RESET: 60m
|
|||||||
## Roadmap
|
## Roadmap
|
||||||
|
|
||||||
* `Public Mode` - to allow for quick deployment without having to create clients/api-keys in a trusted environment (see #1)
|
* `Public Mode` - to allow for quick deployment without having to create clients/api-keys in a trusted environment (see #1)
|
||||||
* Support Query Strings - as alternative to api key in header and json body
|
* ~~Support Query Strings - as alternative to api key in header and json body~~ (merged 297016e799)
|
||||||
|
* add full test coverage for query strings (considered experimental until then)
|
||||||
|
* add query strings to `api.yml` and additional examples
|
||||||
* DNS Server in Docker container - resolve `client_name`s via DNS server
|
* DNS Server in Docker container - resolve `client_name`s via DNS server
|
||||||
|
|||||||
Reference in New Issue
Block a user