Skip to content

REST Device Service

The REST Device Service allows third-party applications, such as Point of Sale (POS) systems and CV Analytics, to push data to Edge Xpert using the REST protocol.

Key Features

The REST Device Service supports the following key features:

  • One-way communication, pushing data to Edge Xpert
  • Asynchronous readings
  • POST requests
  • Parametrized endpoint

REST Endpoint Definition

The REST Device Service endpoint is defined in the following format:

/api/v2/resource/{deviceName}/{resourceName}
To use this format to reference the REST endpoint, you must do the following:

  • Replace {deviceName} with the name of the device managed by the REST Device Service
  • Replace {resouceName} with the name of the device resource defined in the device profile. The specified device resource must be associated with the device specified in {deviceName} in the device profile

Supported Data Types

The REST Device Service supports the following data types:

  • Bool
  • String
  • Uint8, Uint16, Uint32, Uint64
  • Int8, Int16, Int32, Int64
  • Float32, Float64
  • Binary

REST Device Profile

The device profile defines what resources are available on a particular device.The following profile attributes can be defined in the YAML file:

Attribute Description Required
valueType The data type Required
readWrite Defines whether the resource is read-only or write-only Optional
mediaType The HTTP content type of the resource, valid values are:
  • text/plain
  • application/JSON
  • image/jpeg
  • image/png
If the mediaType attribute is specified, the Content-Type in the HTTP requst header must match the specified value
Optional

Using the REST Device Service

An example of setting up and using devices with the Edge Xpert REST Device Service can be found at Rest Example.