Skip to content

Commit

Permalink
Update and rename API.rst to api.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
OmariKing committed Jul 3, 2019
1 parent dcb2af1 commit d3d4628
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 19 deletions.
19 changes: 0 additions & 19 deletions docs/API.rst

This file was deleted.

34 changes: 34 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
API
===

The steps to obtain the API Token key and using the different curl commands are listen below.

Note: Make sure to to ssh into your serve to run these commands.

Getting Your Token
^^^^^^^^^^^^^^^^^^

::


cat /opt/dsiprouter/gui/settings.py | grep API_TOKEN
|
Executing Kamailio stats API
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
curl -H "Authorization: Bearer $DSIP_TOKEN" -X GET http://<addressOfYourInstance>:5000/api/v1/kamailio/stats
|
Executing Lease Point API
^^^^^^^^^^^^^^^^^^^^^^^^^
Getting the endlease
::
curl -H "Authorization: Bearer $DSIP_TOKEN" -H "Content-Type: application/json" -X GET "http://demo.dsiprouter.org:5000/api/v1/endpoint/lease?ttl=15&email=mack@dsiprouter.org"
|
Revoking and replacing with your own lease ID
::
curl -H "Authorization: Bearer $DSIP_TOKEN" -H "Content-Type: application/json" -X PUT "http://demo.dsiprouter.org:5000/api/v1/endpoint/lease/<leaseid>/revoke"
|

0 comments on commit d3d4628

Please sign in to comment.