Skip to content

Time Series Database

Craig Hesling edited this page Jun 3, 2018 · 10 revisions

Overview

You can use the REST interface to request time series data from transducers as described here:

https://openchirp.github.io/api_doc/#get-values-from-a-transducer

Below is an example for exporting all time series data from a transducer using the command line curl tool:

curl -u ID:TOKEN -G https://api.openchirp.io/apiv1/device/DEVICE_ID/transducer/TRANSDUCER_ID

where ID is either a user (someone@gmail.com), device or service ID and TOKEN is the associated token. User tokens can be generated from the profile page and device tokens from the device's security tab. DEVICE_ID / TRANSDUCER_ID are the IDs of the target device and transducer.

Just as a reminder, transducerID can easily be found from a device using:

curl -u ID:TOKEN -G https://api.openchirp.io/apiv1/device/DEVICE_ID

JSON Data Request

curl -u ID:TOKEN https://api.openchirp.io/apiv1/device/DEVICE_ID/transducer/TRANSDUCER_ID

CSV Data Request

curl -u ID:TOKEN -H "Content-Type: text/csv" https://api.openchirp.io/apiv1/device/DEVICE_ID/transducer/TRANSDUCER_ID
Clone this wiki locally