Fetch all device data

🚧

Pro API

This API is not a part of the Free plan. To upgrade to Bolt Cloud Pro click here.

Command : fetchData

Description
API to return ALL the data collected by the device.

Pre-requisites

  • The device must be linked to a product.
  • The product must have a valid hardware configuration.

Parameters

  • deviceName: The name of the Bolt device that you want to fetch data.

Example:

https://cloud.boltiot.com/remote/44b2de6b-7e68-40e7-a27f-814b58afe008/fetchData?deviceName=BOLT13819450

Response

{
    "success": 1,
    "data_format": ["time_stamp", "ana0", "dig0", "dig3"],
    "data": [
        ["2019-03-20 08:02:53", "244", "1", "0"],
        ["2019-03-20 08:04:09", "245", "0", "1"],
        ["2019-03-20 08:04:27", "246", "1", "1"]
    ]
}

Response explanation:

  • status:
    • 1 - For success
    • 0 - For failure
  • data_format: List describing the hardware configuration names. This is the same name as your hardware configuration. "timestamp" is added by default.
  • data: List which contains the data points. Each entry in the data list is a list which contains the data for the device in the format as given by the data_format field.
    For example,
    data[0][1] in the above example refers to 244 which is the ana0 value.
    data[1][2] in the above example refers to 0 which is the dig0 value.
    * data[2][0] in the above example refers to "2019-03-20 08:04:27" which is the timestamp at which that data point was collected.

Did this page help you?