Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
psanders committed Apr 13, 2020
1 parent 05ed64b commit 6abcc88
Show file tree
Hide file tree
Showing 20 changed files with 123 additions and 68 deletions.
6 changes: 5 additions & 1 deletion docs/api/agents/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,9 @@ POST /api/v1beta1/agents
}

HTTP/1.1 201 Created
{ "status": "201", "message": "Created", "data": "ag3f77f6" }
{
"status": "201",
"message": "Created",
"data": "ag3f77f6"
}
```
5 changes: 4 additions & 1 deletion docs/api/agents/delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,8 @@ DELETE /api/v1beta1/agents/ag3f77f6
}

HTTP/1.1 200 OK
{"status": "200", "Successful request"}
{
"status": "200",
"message": "Successful request"
}
```
5 changes: 4 additions & 1 deletion docs/api/agents/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,8 @@ PUT /api/v1beta1/agents/ag3f77f6
}

HTTP/1.1 200 OK
{ "status": "200", "Successful request" }
{
"status": "200",
"message": "Successful request"
}
```
6 changes: 5 additions & 1 deletion docs/api/domains/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,9 @@ POST /api/v1beta1/domains
}

HTTP/1.1 201 Created
{ "status": "201", "message": "Created", "data": "dm6c87r2" }
{
"status": "201",
"message": "Created",
"data": "dm6c87r2"
}
```
5 changes: 4 additions & 1 deletion docs/api/domains/delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,8 @@ DELETE /api/v1beta1/domains/dm6c87r2
}

HTTP/1.1 200 OK
{ "status": "200", "Successful request" }
{
"status": "200",
"message": "Successful request"
}
```
5 changes: 4 additions & 1 deletion docs/api/domains/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,8 @@ PUT /api/v1beta1/domains/dm6c87r2
}

HTTP/1.1 200 OK
{ "status": "200", "Successful request" }
{
"status": "200",
"message": "Successful request"
}
```
6 changes: 5 additions & 1 deletion docs/api/gateways/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,9 @@ POST /api/v1beta1/gateways


HTTP/1.1 201 Created
{ "status": "201", "message": "Created", "data": "gw5c77t2" }
{
"status": "201",
"message": "Created",
"data": "gw5c77t2"
}
```
5 changes: 4 additions & 1 deletion docs/api/gateways/delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,8 @@ DELETE /api/v1beta1/gateways/gw5c77t2
}

HTTP/1.1 200 OK
{ "status": "200", "Successful request" }
{
"status": "200",
"message": "Successful request"
}
```
5 changes: 4 additions & 1 deletion docs/api/gateways/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,8 @@ PUT /api/v1beta1/gateways/gw5c77t2
}

HTTP/1.1 200 OK
{ "status": "200", "Successful request" }
{
"status": "200",
"message": "Successful request"
}
```
4 changes: 2 additions & 2 deletions docs/api/location/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ POST /api/{apiversion}/location/sip:guest@guest
}

HTTP/1.1 200 OK
{
{
"status": 200,
"message": "Added location entry."
"message": "Added location entry"
}
```
4 changes: 2 additions & 2 deletions docs/api/location/delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ DELETE /api/{apiversion}/location/sip:guest@guest
}

HTTP/1.1 200 OK
{
{
"status": 200,
"message": "Location entry evicted."
"message": "Location entry evicted"
}
```
6 changes: 5 additions & 1 deletion docs/api/numbers/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,9 @@ POST /api/v1beta1/numbers
}

HTTP/1.1 201 Created
{ "status": "201", "message": "Created", "data": "dd50baa4" }
{
"status": "201",
"message": "Created",
"data": "dd50baa4"
}
```
5 changes: 4 additions & 1 deletion docs/api/numbers/delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,8 @@ DELETE /api/v1beta1/numbers/dd50baa4
}

HTTP/1.1 200 OK
{ "status": "200", "Successful request" }
{
"status": "200",
"message": "Successful request"
}
```
5 changes: 4 additions & 1 deletion docs/api/numbers/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,8 @@ PUT /api/v1beta1/numbers/dd50baa4
}

HTTP/1.1 200 OK
{ "status": "200", "Successful request" }
{
"status": "200",
"message": "Successful request"
}
```
6 changes: 5 additions & 1 deletion docs/api/peers/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,9 @@ POST /api/v1beta1/peers
}

HTTP/1.1 201 Created
{ "status": "201", "message": "Created", "data": "pr2c77f4" }
{
"status": "201",
"message": "Created",
"data": "pr2c77f4"
}
```
5 changes: 4 additions & 1 deletion docs/api/peers/delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,8 @@ DELETE /api/v1beta1/peers/pr2c77f4
}

HTTP/1.1 200 OK
{ "status": "200", "Successful request" }
{
"status": "200",
"message": "Successful request"
}
```
5 changes: 4 additions & 1 deletion docs/api/peers/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,8 @@ PUT /api/v1beta1/peers/pr2c77f4
}

HTTP/1.1 200 OK
{ "status": "200", "Successful request" }
{
"status": "200",
"message": "Successful request"
}
```
90 changes: 47 additions & 43 deletions docs/api/sys/info.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,47 +29,51 @@ GET /api/v1beta1/system/info
}

HTTP/1.1 200 OK
{
"version":"v1.0",
"apiVersion":"v1beta1",
"apiPath":"/api/v1beta1",
"env":[
{
"var":"ROUTR_JAVA_OPTS",
"value":null
},
{
"var":"ROUTR_DS_PROVIDER",
"value":null
},
{
"var":"ROUTR_DS_PARAMETERS",
"value":null
},
{
"var":"ROUTR_CONFIG_FILE",
"value":null
},
{
"var":"ROUTR_SALT",
"value":null
},
{
"var":"ROUTR_EXTERN_ADDR",
"value":null
},
{
"var":"ROUTR_LOCALNETS",
"value":null
},
{
"var":"ROUTR_REGISTRAR_INTF",
"value":null
},
{
"var":"ROUTR_JS_ENGINE",
"value":null
}
]

{
"status":200,
"message":"Successful request",
"data":{
"version":"v1.0",
"apiVersion":"v1beta1",
"apiPath":"/api/v1beta1",
"env":[
{
"var":"ROUTR_JAVA_OPTS",
"value":null
},
{
"var":"ROUTR_DS_PROVIDER",
"value":null
},
{
"var":"ROUTR_DS_PARAMETERS",
"value":null
},
{
"var":"ROUTR_CONFIG_FILE",
"value":null
},
{
"var":"ROUTR_SALT",
"value":null
},
{
"var":"ROUTR_EXTERN_ADDR",
"value":null
},
{
"var":"ROUTR_LOCALNETS",
"value":null
},
{
"var":"ROUTR_REGISTRAR_INTF",
"value":null
},
{
"var":"ROUTR_JS_ENGINE",
"value":null
}
]
}
}
```
11 changes: 6 additions & 5 deletions docs/api/sys/status.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@ This method returns information about the server.

| Parameter Name | Type | Value | Description
| --- | :--------- | :--------- | :--------- |
| status | path | string | This accepts either `down` or `reload` parameters |

Note: A `down` value causes the server to shutdown. A `reload` value causes
the server to reload its configuration from file.
| status | path | string | This accepts either `down` or `restarting` parameters |
| filter | now | boolean | If set to `true` it will not wait for current calls to finish |

**Request body**

Expand All @@ -34,5 +32,8 @@ POST /api/v1beta1/system/status/reload
}

HTTP/1.1 200 OK
{ "status": "200", "message": "Reloaded configuration from file." }
{
"status": "200",
"message": "Request sent to server"
}
```
2 changes: 1 addition & 1 deletion mod/rest/rest.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class Rest {
const cmd = req.queryParams('now') === 'true' ? `${c}-now` : c
grpc.run(cmd)
res.status(200)
return '{"status": "200", "message":"Request sent to server."}'
return '{"status": "200", "message":"Request sent to server"}'
}

start () {
Expand Down

0 comments on commit 6abcc88

Please sign in to comment.