Skip to content

Time Series Database

Craig Hesling edited this page Aug 20, 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 are two examples of exporting all time-series data from a transducer using the command line curl tool:

CSV Data Returned

curl -u ID:TOKEN -H "Content-Type: text/csv" https://api.openchirp.io/apiv1/device/DEVICE_ID/transducer/TRANSDUCER_NAME

JSON Data Returned

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

Typically ID is a User ID (someone@gmail.com) and TOKEN is the associated User Token. See the Generate User Token Tutorial for more detail. DEVICE_ID is the ID of the target device and TRANSDUCER_NAME is the name of the transducer you want data for, like temperature.

Parsing Timestamps

When data is returned as CSV, influx returns timestamps in nanoseconds since unix epoch.