In this chapter, we describe the basic matters required when to use the Servwatch API.
Device means the barematal server or cloud instances. The device basically manually activated, but it is also possible to activate automatically. Requires there to map the device to the channel in any case.
Manual create Case:Create from Management Console.
Automatically create Case:When you connect the device for the first time in Servwatch.
Channel is a logical channel that stores the data transmitted from the device. It is not to specify the channel directly from the device, you will be distributed from the device_id(device's serial). Channel is a timeseries database with schema less JSON objects, each stream can be specified labels and units.
All communication with ThingScale is performed over https(HTTP over TLS). This ensures that all communication between ThingScale and device is over an encrypted communication. HTTP/MQTT device connector can use plain-http and non-encrypted TCP communication for small memory footprint MCUs.(MCU:Micro Control Unit) HTTP/HTTPS both protocols have pros and cons, choosing the right one depend on your environment and security trade-off.
We STRONGLY RECOMMENDED HTTPS/MQTTS for secure connection.
Resource requirement for devices
Excellent(Avoid men-in-middle attack)
High(Use more memory and CPU cycles..)
Tokens are per-user unique authorize key for API/Device connector. In all cases you want to use the API token, it is strongly recommended that you use the HTTPS(TLS) connection.
API Token All RESTful API operation use API token.
Device Token For use only data sending from device to ThingScale with HTTP/MQTT connector.
Device token is not per-device, per-user. Reason as in order to reduce the configuration task at the time of device distribution.
fig.2 Token overview
Data-format and timestamps
All API requests and responses use the JSON payloads only. HTTP and MQTT device connector use the URL Encodeded payloads. All timestamps are relative to UTC.Timestamps format is ISO8601:2004 standard.
when stream retrieve,time range specified local timezone.(e.g. 'YYYY-MM-DD hh:mm')