Devices API

HTTP Attribute Path Description
GET <basePath>/devices Returns a list of Device objects managed by the current Edge Gateway Service instance. This API supports the following query parameters:
  • filter (string): Filtering by Device alternateId is supported. The related format is filter= alternateId eq entityalternateId

  • skip (integer), top (integer): used to implement pagination

GET <basePath>/devices/<deviceId> Returns the Device object having the specified "deviceId", if it exists and it is managed by the current Edge Gateway Service instance.
POST <basePath>/devices/commands Allows to create a Command object and dispatch it to a Device. The response status code, if the post is successful, is 202.

Device Object

The Device object is defined here:

Field Data Type Description
id String Unique identifier of the Device. The device id is generated by the SAP IoT Device Connectivity cloud component during the onboarding of the device.
online Boolean The connected status of the device (true if the device is online).
alternateId String Alternate identifier of the device. The device alternateId is chosen by the device owner.
name String The name of the device.
gatewayId String The id of the Gateway object representing the Edge Gateway Service instance that the device connects to.
sensors SensorBean[] The set of Sensor objects included in the Device.
customProperties CustomPropertyBean[] An array of key-value properties of the Device.

Example of a Device Object

Command Object

The Command Object is structured as described here:

Field Data Type Description
deviceId String Unique identifier of the Device that the command is addressed to. The device id is generated by the SAP IoT Device Connectivity cloud component during the onboarding of the device.
deviceAlternateId String Alternate identifier of the Device that the command is addressed to. The device alternateId is chosen by the device owner.
capabilityId String Unique id of the capability that describes the structure of the command payload.
capabilityAlternateId String Alternate identifier of the capability that describes the structure of the command payload.
command Command A set of key-value pairs where:
  • The key matches the name of a property within the capability specified by "capabilityAlternateId".

  • The value represents the value for the property.

Command has a maximum size of 10 KB.

sensorId String Unique identifier of the Sensor that the command is addressed to. The sensor id is generated by the SAP IoT Device Connectivity cloud component during the onboarding of the sensor.
sensorAlternateId String Alternate identifier of the Sensor that the command is addressed to. The sensor alternateId is chosen by the sensor owner.
sensorTypeAlternateId String Alternate identifier of the SensorType that the command is addressed to. The SensorType alternateId is chosen by the SensorType owner. The sensorTypeAlternateId must always be specified in case the capability is identified by the alternateId; on the other hand, it is not required if the capability is identified by its id (see the next examples).

This object may hold both id or alternateId semantics, to facilitate the dispatch of commands based on the set of device metadata that the client can better manage. If both alternateIds and Ids are present, alternateIds always take precedence over ids.

Here is an example of a Command object using the ids:
Here is an example of a Command object using the alternateIds: