Integrations

Integrations refer to the cloud side APIs for Drogue Cloud, which allow your application to access data coming from devices and schedule commands to devices.

Incoming events

Incoming events are streamed to applications in the form of Cloud Events. The message stream may contain telemetry events, as well as some infrastructure events.

The following events may contain additional attributes, not listed here. These are implementation details are should not be relied upon.

Also see:

Device events

All regular messages/events a device sends, will end up as a "device event".

Attributes

Attribute Type Required Description

Standard attributes

specversion

String

X

Always 1.0.

type

String

X

Always io.drogue.event.v1.

id

String

X

A unique event ID.

subject

String

X

The channel information.

time

String (RFC3339)

X

The time the event arrived in the system.

datacontenttype

String

X

The content type of the message.

dataschema

String

The schema of the payload, encoded in the format defined in datacontenttype.

Extensions

instance

String

X

A unique identifier of the Drogue Cloud instance on this connection.

application

String

X

The name of the application the device belonged to.

applicationuid

String

X

The unique ID of the application the device belonged to.

device

String

X

The name of the device the event originated from.

deviceuid

String

X

The unique ID of the device the event originated from.

sender

String

X

The name of the device which delivered the event to Drogue Cloud.

senderuid

String

X

The unique ID of the device which delivered the event to Drogue Cloud.

Payload

The payload is whatever the device sent as payload. Drogue Cloud, by default, doesn’t interpret the data in any way. It will only ensure that the data is well-formed JSON in the case the datacontenttype indicates a JSON mime type. The payload may also be empty.

Connection events

When a device connects through a connection oriented protocol (like MQTT), connection events will be issued by Drogue Cloud on behalf of the device.

Only devices which directly connect to Drogue Cloud will issue such events. Devices connected via another device, acting as gateway, do not.

Attributes

Attribute Type Required Description

Standard attributes

specversion

String

X

Always 1.0.

type

String

X

Always io.drogue.connection.v1.

id

String

X

A unique event ID.

subject

String

X

Always connection.

time

String (RFC3339)

X

The time the event was issues.

datacontenttype

String

X

Always application/json.

Extensions

instance

String

X

A unique identifier of the Drogue Cloud instance on this connection.

application

String

X

The name of the application the device belonged to.

applicationuid

String

X

The unique ID of the application the device belonged to.

device

String

X

The name of the device the event originated from.

deviceuid

String

X

The unique ID of the device the event originated from.

sender

String

X

The name of the device which delivered the event to Drogue Cloud.

senderuid

String

X

The unique ID of the device which delivered the event to Drogue Cloud.

Payload

The payload is defined by the following schema:

Schema of connection event payload
type: object
properties:
  connected:
    type: boolean
    description: Whether the device is connected or not
required:
  - connected
Example of connection event payload
{"connected": true}

Device registry events

Whenever a change is made to a device in the registry, a "device change event" is sent out.

Also see: * Synthetic data

Attributes

Attribute Type Required Description

Standard attributes

specversion

String

X

Always 1.0.

type

String

X

Always io.drogue.registry.v1.

id

String

X

A unique event ID.

subject

String

X

Always devices.

time

String (RFC3339)

X

The time the event was generated.

Extensions

instance

String

X

A unique identifier of the Drogue Cloud instance on this connection.

application

String

X

The name of the application the device belonged to.

applicationuid

String

X

The unique ID of the application the device belonged to.

device

String

X

The name of the device the event originated from.

deviceuid

String

X

The unique ID of the device the event originated from.

sender

String

X

The name of the device which delivered the event to Drogue Cloud.

senderuid

String

X

The unique ID of the device which delivered the event to Drogue Cloud.

Payload

The event doesn’t carry any payload. It is just an information that the device changed.

Commands

Commands are similar to evens coming from a device, just they are the other way round. Internally commands are also represented as Cloud Events.

But although internally commands are CloudEvents, current integrations only offer more opinionated APIs for commands. This can be changed in the future, if that is required. So there is current no common representation exposed to the user.

Also see: