Skip to end of metadata
Go to start of metadata

GadgetKeeper API can be accessed using messaging protocols.

MQTT


The GadgetKeeper MQTT API is a simple way to interact with GadgetKeeper directly from any MQTT enabled client or device. More information about the protocol is at mqtt.org.

Connection

The GadgetKeeper MQTT API accepts the following incoming connections:

Server

Port

Comment

api.gadgetkeeper.com1883 
api.gadgetkeeper.com8883SSL-enabled connection, not supported now.

API topic

Note: API topic is both outcoming and incoming. You can send API request and grab API response from that topic.

It is a good idea to determine format of the topic name. Name must be assembled from an API versionAPI key and format of a message, like that:

For example:

API key grants you specific permissions for thing activities. It is a read, write and publish events actions for all or only one thing, depends on your requests for an API keys. You can create and configure API keys via GadgetKeeper Console.

Message

Format of a message depends on GadgetKeeper API which you want to call, but, generally it based on JSON-RPC 2.0 standard:

For example, the following method message is used to call a thing method:

And a response message follows JSON-RPC 2.0 standard as well

 

Example

In the example bellow we use Mosquitto MQTT publisher to get thing property value: 

And the response:

 

 

 

  • No labels