Skip to content

Commit

Permalink
Update api.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
kingmalza committed Jan 26, 2019
1 parent 08d99f0 commit f2d8676
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,28 @@ Using the link in the main menu "**Schema API**" it will be possible to display

Here an example of a GET call from a GUI tools (postman) to the template description table

.. figure:: img/postman.png
.. figure:: img/postman.png
:scale: 50 %
:alt: Aida test keywords


.. code-block:: python
# importing the requests library
import requests
# api-endpoint
URL = "http://demo.myaida.io/temp_mainapi/"
# param defined here
user_name = "demo"
pass = "xxxxxxx"
# defining a params dict for the parameters to be sent to the API
PARAMS = {'username':user_name, 'password':pass}
# sending get request and saving the response as response object
r = requests.get(url = URL, params = PARAMS)
# extracting data in json format
data = r.json()

0 comments on commit f2d8676

Please sign in to comment.