Obtenir des canaux 2022-07-26

Overview

The Get Channels call will return a JSON object listing the metadata and last sensor data for every channel associated with a user. In the majority of cases each channel is a separate sensor device.

API URL

https://api.ubibot.com/channels?parameters

HTTP Method

GET

URL Parameters

NameTypeRequiredDescription
account_key or token_idStringRequiredSpecify the API write key or read key of the channel or the token_id obtained after the user logged in.

Response

An HTTP code of 200 is responded for each successful data requests. The message body contains a JSON object listing the metadata for all channels associated with the specified user.

Error: See the separate list of error codes for more details.

Useful Data Fields

  • last_values: contains JSON string of latest sensor readings of each individual field and recorded time.
  • name: channel name
  • field1, field2….field10:  corresponding sensor names
  • last_entry_date:  the time when the device last connected to the platform.
  • net:  0 -> offline,1 -> online,2 -> unknown,-1 -> manual sync

Examples

GET https://api.ubibot.com/channels?account_key=xxxxx-xxxxx-xxxxx-xxxx

The response is a JSON object containing a list of channels with their associated metadata. For example: