Get Channels September 29, 2017

Overview

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

API URL

http://api.ubibot.io/channels?parameters

HTTP Method

GET

URL Parameters

Name Type Required Description
account_key or token_id String Required Specify the API write key or read key of the channel, or the token_id obtained after the user logged in.

Response

200 Success. 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
  • name: channel name
  • field1, field2….field10:  corresponding sensor names
  • last_entry_date:  the time when the device last connected to the platform.

Examples

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

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