The Simple IoT server currently provides both Http and NATS.io APIs. We've tried to keep the two APIs a similar as possible so it is easy to switch from one to the other. The Http API currently accepts JSON, and the NATS API uses protobuf.
NOTE, the Simple IoT API is not final and will continue to be refined in the coming months.
For details on data payloads, it is simplest to just refer to the Go types which have JSON tags.
Most APIs that do not return specific data (update/delete) return a StandardResponse
passwordas form values, and returns a JWT Auth token
NATS.io allows more complex and efficient interactions between various system components (device, cloud, and web UI). These three parts of the system make IoT systems inherently distributed. NATS focuses on simplicity and is written in Go which ensures the Go client is a 1st class citizen and also allows for interesting possibilities such as embedding in the NATS server in various parts of the system. This allows us to keep our one-binary deployment model.
siot binary embeds the NATS server, so there is no need to deploy and run
a separate NATS server.
For the NATS transport, protobuf encoding is used for all transfers and are defined here.
tombstonepoint type is used to track if a node has been deleted or not.