Overview

Every API request made by devices to the server (except the Register Device and Register Child Device APIs) must authenticate with an unique private authentication key the device must store in its internal persistent storage.

The following Headers must be set:

HeaderValue
AuthorizationThe access_key that is returned by the provisioning server https://entry.xyte.io/v1/devices as a response to Register Device or Register Child Device.

Example

Given the following parameters returned during a Register Device API:

FieldValue
idd8083a34-22c8-4cd8-9acb-1912...
access_key2300742898f3ddc0e62e087ddc4a368c
hub_urlhttps://eu-1.endpoints.xyte.io

In this example all API calls should:

  1. Use https://eu-1.endpoints.xyte.io as the base URL
  2. Use the id as the "Device's ID"
  3. Add the following header to all requests: Authorization: 2300742898f3ddc0e62e087ddc4a368c

Sample Send Telemetry call:

curl https://eu-1.endpoints.xyte.io/v1/devices/d8083a34-22c8-4cd8-9acb-1912.../telemetry \
      -H "Content-Type: application/json" \
      -H "Authorization: 2300742898f3ddc0e62e087ddc4a368c" \
      -X POST \
      --data '{"status":"online","telemetries":{"fan_speed":5.5,"temp":30,"input":"hdmi"}}'