Skip to content

Commit fb95b19

Browse files
Merge pull request #45 from OS2iot/feature/Add_Swagger_API_key_docs
added api key docs
2 parents b3651a0 + 692cfd1 commit fb95b19

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

source/installation-guide/installation-guide.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,10 @@ OS2IoT-backend takes several environment variables as configuration, if these ar
259259
+-------------------------------+------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------+
260260
| CHIRPSTACK_API_KEY | The API key (Bearer token) created in Chirpstack. | :code:`apikey` |
261261
+-------------------------------+------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------+
262+
| CHIRPSTACK_HOSTNAME | Hostname for Chirpstack | :code:`localhost` |
263+
+-------------------------------+------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------+
264+
| CHIRPSTACK_PORT | Chirpstack port | :code:`8080` |
265+
+-------------------------------+------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------+
262266
263267
Logs levels
264268
"""""""""""""""

source/internal-interface-design/internal-interface-design.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,12 @@ a new login must be performed as described above.
4242
Using Swagger with authorization
4343
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4444

45-
To use Swagger with protected endpoints, you must first login, and then add the JWT to Swagger.
45+
To use Swagger with protected endpoints you must first login, and provide either a API key or JWT to Swagger.
4646
This is done by pressing the "Authorize" button near the top right.
47-
To test your login, the ``/api/v1/auth/profile`` endpoint can be called, it will return the contents of the JWT payload,
48-
which is explained below.
4947

48+
To test your login with JWT, the ``/api/v1/auth/profile`` endpoint can be called, it will return the contents of the JWT payload.
49+
50+
To test your login with an API-key, the GET ``/api/v1/application`` endpoint can be called. It will return all applications that this API-key gave you permission to.
5051

5152
Authorization (Permissions)
5253
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

source/iot-data-handling/iot-data-handling.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ OS2IoT supports two kinds of MQTT devices. An MQTT external broker and an MQTT i
6767
OS2IoT supports two kinds of authorization for MQTT devices: Username/password and certificate.
6868

6969
MQTT external broker
70-
~~~~~~~~~~~~~~
70+
~~~~~~~~~~~~~~~~~~~~~~~~
7171

7272
When an MQTT external broker is created, the credentials for connecting to the internal MQTT-broker are generated.
7373
These consists of a URL, a port and a topic for the device to send data to.
@@ -77,7 +77,7 @@ When a known MQTT external broker sends data to the topic assigned to it, the me
7777
If a device attempts to send to a different topic the message will be discarded.
7878

7979
MQTT internal broker
80-
~~~~~~~~~~~~~~~
80+
~~~~~~~~~~~~~~~~~~~~~
8181

8282
When an MQTT internal broker is created a connection to the external broker is made using the entered credentials.
8383
When a message is received by the external broker on the topic configured, OS2IoT will also receive the message and further process it.

0 commit comments

Comments
 (0)