Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
psanders committed Jul 5, 2019
1 parent 5a2e4bb commit 34877ef
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 4 deletions.
41 changes: 41 additions & 0 deletions docs/api/location/create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
Adds an entry into the location table

**URL**

`/location/{addressOfRecord}`

**Method**

`POST`

**Parameters**

| Parameter Name | Type | Value | Description
| --- | :--------- | :--------- | :--------- |
| addressOfRecord | path | string | Address of record for the new entry|

**Request body**

Supply a json containing an address, port, expires, user values.

**Response**

This method adds an entry to the location table. Useful for end-to-end testing.

**Sample Call**

```json
POST /api/{apiversion}/location/sip:guest@guest
{
"user": "guest",
"address": "192.168.1.149",
"port": 5080,
"expires": 3600
}

HTTP/1.1 200 OK
{
"status": 200,
"message": "Added location entry."
}
```
38 changes: 38 additions & 0 deletions docs/api/location/delete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
Evicts an entry from the location table

**URL**

`/location/{addressOfRecord}`

**Method**

`DELETE`

**Parameters**

| Parameter Name | Type | Value | Description
| --- | :--------- | :--------- | :--------- |
| addressOfRecord | path | string | Address of record for the entry|

**Request body**

Do not supply a request body with this method.

**Response**

This method removes and entry for the give address of record

**Sample Call**

```json
DELETE /api/{apiversion}/location/sip:guest@guest
{

}

HTTP/1.1 200 OK
{
"status": 200,
"message": "Location entry evicted."
}
```
File renamed without changes.
8 changes: 6 additions & 2 deletions docs/api/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@ A JWT token is used to authenticate the server. To obtain the token, use the `/a
To obtain the token

```bash
curl -k -u "admin:changeit" https://localhost:4567/api/v1beta1/credentials
curl -k -u "admin:changeit" https://localhost:4567/api/v1beta1/token

# Resulted in
eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiJ9.O7hC-ta225epRQlJZO44WC-l2cWohKnJ8lkmlOQpw8Z_xYiwJ6-qDUhHeJEZH9DmwIwz_jD77sj1kQUkXHsbOg
{
"status":200,
"message":"Successful request",
"result":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiJ9.TZZ4kp5xIdYzs5RRt6_qVxJcOiLdk1IEHFMBSZ7SRENx6kyVhwfAlm-oeM4L2XFIr4evlTCxKEIKc0fZKwPcjw"
}
```

To use the token
Expand Down
2 changes: 1 addition & 1 deletion docs/configuration/general.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ can be provided using the file `config/config.yml` located at the root of your R
| spec.localnets | Local networks. Use in combination with spec.externAddr | No |
| spec.recordRoute | Stay within the signaling path | No |
| spec.useToAsAOR | Use the TO header instead of Request URI | No |
| spec.registrarIntf | Force to use received & rport for registration| No |
| spec.registrarIntf | `Internal` will cause the server to use the IP and port it sees(received & rport) from a device attempting to register. Default is `External` | No |
| spec.addressInfo.[*] | Custom tag with the DID information | No |
| spec.accessControlList.deny.[*] | Deny incoming traffic from network list | No |
| spec.accessControlList.allow.[*] | Allow incoming traffic from network list | No |
Expand Down
5 changes: 4 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ nav:
- Rest API:
- Overview: api/overview.md
- Credentials: api/credentials.md
- Location: api/location.md
- Location:
- create: api/location/create.md
- delete: api/location/delete.md
- list: api/location/list.md
- Registry: api/registry.md
- Agents:
- create: api/agents/create.md
Expand Down

0 comments on commit 34877ef

Please sign in to comment.