4. Components and APIs

4.1. Components

Table 4.1 Components
Component
Repository
/ Main site
Documentation
for Component
Component API
Documentation

MongoDB

MongoDB site

MongoDB doc.

Postgres

PostgreSQL site

PostgreSQL doc.

Kong API gateway
(Community Edition)

Kong site

Kong doc.

Redis

Redis site

Redis doc.

Zookeeper

Zookeeper site

Zookeeper doc.

Kafka

Kafka site

Kafka doc.

VerneMQ

VerneMQ site

VerneMQ doc.

Leshan

Leshan site

Leshan doc.

Auth

GitHub - auth

API - auth

Dojot Kong

GitHub - Dojot Kong

History

GitHub - history

API - history

Device Manager

GitHub - DeviceManager

API - DeviceManager

Image Manager

GitHub - image-manager

API - image-manager

GUI

GitHub - GUI

GUI - V2

GitHub - V2

Flowbroker

GitHub - flowbroker

API - flowbroker

Databroker

GitHub - data-broker

API - data-broker

IotAgent VerneMQ
(MQTT) - Default

GitHub - iotagent-vernemq

IotAgent Mosca
(MQTT) - Legacy

GitHub - iotagent-mosca

IotAgent Leshan
(LWM2M)

GitHub - iotagent-leshan

Data Manager

GitHub - Data Manager

API - Data Manager

Cron

GitHub - Cron

API - Cron

X.509 Identity Management

GitHub - x509-identity-mgmt

API - x509-identity-mgmt

Kafka2Ftp

GitHub - Kafka2Ftp

Kafka WS

GitHub - Kafka WS

API - kafka-ws

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.

Table 4.2 Exposed endpoints
Component
Exposed endpoint
by the API gateway
Component
Endpoint
Component
Endpoint
Documentation
Needs
Authentication

GUI

/

/

No

Dashboard

/v2

/

No

Device Manager

/device

/device

API - DeviceManager

Yes

Device Manager

/template

/template

API - DeviceManager

Yes

Flowbroker

/flows

/

API - flowbroker

Yes

Auth

/auth

/

API - auth

No

Auth

/auth/revoke

/revoke

API - auth

No

Auth

/auth/user

/user

API - auth

Yes

Auth

/auth/pap

/pap

API - auth

Yes

History

/history

/

API - history

Yes

Data Manager

/import

/import

API - Data Manager

Yes

Data Manager

/export

/export

API - Data Manager

Yes

Cron

/cron

/cron

API - Cron

Yes

Image Manager

/fw-image

/

API - image-manager

Yes

Data Broker

/device/
{deviceID}
/latest
/device/
{deviceID}
/latest

API - data-broker

Yes

Data Broker

/subscription

/subscription

API - data-broker

Yes

Data Broker

/stream

/stream

API - data-broker

Yes

Data Broker

/socket.io

/socket.io

API - data-broker

No

X.509 Identity Management

/x509/v1

/api/v1

API - x509-identity-mgmt

Yes

Kafka WS

/kafka-ws/v1/ticket

/v1/ticket

Yes

Kafka WS

/kafka-ws/v1

/v1

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.

Table 4.3 Original endpoints to The API gateway

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

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.

Table 4.5 Original endpoints

Component

Message

Subject

DeviceManager

Device CRUD (Messages - DeviceManager)

dojot.device-manager.device

iotagent-mosca

Device data update (Messages - iotagent-mosca)

device-data

auth

Tenants creation/removal (Messages - auth)

dojot.tenancy