Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Fonoster Team committed Jun 2, 2019
1 parent 56add90 commit d9a01b1
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 20 deletions.
59 changes: 42 additions & 17 deletions docs/api/System/info.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,47 @@ GET /api/v1beta1/system/info
}

HTTP/1.1 200 OK
{
"status": "200",
"message": "Successful request",
"result" : {
"apiVersion": "v1beta1",
"kind": "Peer",
"metadata": {
"name": "Asterisk PBX",
"ref": "pr2c77f4"
},
"spec": {
"credentials": {
"username": "ast",
"secret": "1234"
}
}
}
{
"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_PATH",
"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
}
]
}
```
38 changes: 38 additions & 0 deletions docs/api/System/status.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
This method returns information about the server.

**URL**

`/system/status/{status}`

**Method**

`POST`

**Parameters**

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

**Request body**

Do not supply a request body with this method.

**Response**

If successful this method causes the server to change its status.

**Sample Call**

```json
GET /api/v1beta1/system/status/reload
{

}

HTTP/1.1 200 OK
{"status": "200", "message": "Reloaded configuration from file."}
```
7 changes: 4 additions & 3 deletions docs/api/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ The endpoint for the API is:
## Authentication

Routr's API is authenticated with a JWT token. To obtain the token use the
`/api/{apiversion}/credentials` endpoint with basic authentication present
in the [User](/configuration/user) resource. You must them append the `token`
as a query parameter.
`/api/{apiversion}/credentials` endpoint with basic authentication. Use the information
from the [User](/configuration/user) resource.

> You must append the `token` to all requests as a query parameter.
**Sample call**

Expand Down

0 comments on commit d9a01b1

Please sign in to comment.