4. Components and APIs¶
4.1. Components¶
Component
|
Repository
/ Main site
|
Documentation
for Component
|
Component API
Documentation
|
---|---|---|---|
MongoDB |
|||
Postgres |
|||
Kong API gateway
(Community Edition)
|
|||
Redis |
|||
Zookeeper |
|||
Kafka |
|||
VerneMQ |
|||
Leshan |
|||
InfluxDB |
|||
Auth |
|||
Dojot Kong |
|||
History |
|||
Device Manager |
|||
Image Manager |
|||
GUI |
|||
GUI - V2 |
|||
Flowbroker |
|||
Databroker |
|||
IotAgent VerneMQ
(MQTT) - Default
|
|||
IotAgent Mosca
(MQTT) - Legacy
|
|||
IotAgent Leshan
(LWM2M)
|
|||
Data Manager |
|||
Cron |
|||
X.509 Identity Management |
|||
Kafka2Ftp |
|||
Kafka WS |
|||
InfluxDB Storer and Retriever |
4.2. Exposed APIs (API Gateway)¶
The API gateway used in dojot reroutes some of endpoints from component. The following table shows which Exposed endpoint by the API gateway is mapped to which component endpoint, its component endpoint Documentation and whether the endpoint needs authentication when used via API Gateway. See more about how using APIs in Using API interface.
Component
|
Exposed endpoint
by the API gateway
|
Component
Endpoint
|
Component
Endpoint
Documentation
|
Needs
Authentication
|
---|---|---|---|---|
GUI |
/ |
/ |
No |
|
Dashboard |
/v2 |
/ |
No |
|
Device Manager |
/device |
/device |
Yes |
|
Device Manager |
/template |
/template |
Yes |
|
Flowbroker |
/flows |
/ |
Yes |
|
Auth |
/auth |
/ |
No |
|
Auth |
/auth/revoke |
/revoke |
No |
|
Auth |
/auth/user |
/user |
Yes |
|
Auth |
/auth/pap |
/pap |
Yes |
|
History |
/history |
/ |
Yes |
|
Data Manager |
/import |
/import |
Yes |
|
Data Manager |
/export |
/export |
Yes |
|
Cron |
/cron |
/cron |
Yes |
|
Image Manager |
/fw-image |
/ |
Yes |
|
Data Broker |
/device/
{deviceID}
/latest
|
/device/
{deviceID}
/latest
|
Yes |
|
Data Broker |
/subscription |
/subscription |
Yes |
|
Data Broker |
/stream |
/stream |
Yes |
|
Data Broker |
/socket.io |
/socket.io |
No |
|
X.509 Identity Management |
/x509/v1 |
/api/v1 |
Yes |
|
Kafka WS |
/kafka-ws/v1/ticket |
/v1/ticket |
Yes |
|
Kafka WS |
/kafka-ws/v1 |
/v1 |
No |
|
InfluxDB Retriever |
/tss/v1/ |
/tss/v1/ |
Yes |
|
InfluxDB Retriever - Documentation |
/tss/v1/api-docs |
/tss/v1/api-docs |
No |
NOTE: Some of the components’ endpoints aren’t exposed, but are used internally.
In addition, the API gateway reroutes the endpoints with their ports from component, so that they become uniform: all of them are accessible through the same port (default is TCP port 8000), see the following table.
Component |
Original endpoint |
Gateway Endpoint |
---|---|---|
GUI |
host:80/ |
host:8000/ |
Dashboard |
host:80/ |
host:8000/v2 |
Device Manager |
host:5000/device |
host:8000/device |
Device Manager |
host:5000/template |
host:8000/template |
Flowbroker |
host:80/ |
host:8000/flows |
Auth |
host:5000/ |
host:8000/auth |
Auth |
host:5000/revoke |
host:8000/auth/revoke |
Auth |
host:5000/user |
host:8000/auth/user |
Auth |
host:5000/pap |
host:8000/auth/pap |
History |
host:8000/ |
host:8000/history |
Data Manager |
host:3000/import |
host:8000/import |
Data Manager |
host:3000/export |
host:8000/export |
Cron |
host:5000/cron |
host:8000/cron |
Image Manager |
host:5000/ |
host:8000/fw-image |
Data Broker |
host:80/device/{{deviceID}}/latest |
host:8000/device/{deviceID}/latest |
Data Broker |
host:80/subscription |
host:8000/subscription |
Data Broker |
host:80/stream |
host:8000/stream |
Data Broker |
host:80/socket.io |
host:8000/socket.io |
X.509 Identity Management |
host:3000/api/v1 |
host:8000/x509/v1 |
Kafka WS |
host:8080/v1/ticket |
host:8000/kafka-ws/v1/ticket |
Kafka WS |
host:8080/v1/topics |
host:8000/kafka-ws/v1/topics |
InfluxDB Retriever |
host:3000/tss/v1/ |
host:8000/tss/v1/ |
InfluxDB Retriever - Documentation |
host:3000/tss/v1/api-docs |
host:8000/tss/v1/api-docs |
4.3. Libraries¶
Dojot also has several libraries used in their own components. These libraries are listed below:
Components |
Language |
Libraries |
---|---|---|
Module |
Python |
|
Module |
Java |
|
Module |
Node JS |
|
IoT Agent |
Java |
|
IoT Agent |
Node JS |
|
Module Logger |
Node JS |
|
Helthcheck |
Node JS |
|
Microservice SDK |
Node JS |
4.4. Kafka messages¶
These are the messages sent by components and their subjects. If you are developing a new internal component (such as a new IoT agent), see API - data-broker to check how to receive messages sent by other components in dojot.
Component |
Message |
Subject |
---|---|---|
DeviceManager |
Device CRUD (Messages - DeviceManager) |
|
iotagent-mosca |
Device data update (Messages - iotagent-mosca) |
|
auth |
Tenants creation/removal (Messages - auth) |
|