1. Home
  2. Integrations
  3. Sensor Data Export API

Sensor Data Export API

The Sensor Data Export API enables administrators to programmatically query for sensor data using a simple HTTP URL string invocation combined with a pre-configured key that enables secure access to the data without requiring the manual entry of username and password.

When invoked, the API will return a CSV-formatted file containing the data for the specified sensors. The API can be used to automate periodic data downloads for integration into existing documents, spreadsheets, 3rd party tools, or other reporting mechanisms.

API Syntax

https://secure.exoprise.com/api/v1/sensors/export_data.csv?apikey=acct_api_key&period=period&ids=sensor_id_list

Arguments

Argument
c

Description
apikey
The unique secure account identifier obtained by going to the account’s profile page (https://secure.exoprise.com/profile)
period
The look-back period for the query.
Accepted values are: 3h, 6h, 12h, 1d, 7d, 30d, and 90d
ids
A comma-separated list of one or more sensor id’s.  For any given sensor, you can obtain the sensor ID from the URL displayed while on the sensor detail page.
In the example URL below, the sensor ID would be in place of 1234.
https://secure.exoprise.com/email_sensors/1234#/7/logon/1/3
im

 
Include additional meta-data for each row. This enables easy pivoting of sensor data. Meta-data that included is:
  • Sensor ID
  • Sensor Type
  • Site ID
  • Site Name

To add additional meta-data to each export row, pass &im=true on the export line.

tc
Title concatenation. We made a recent change that removes and improves some of the sensor title concatenation in each column. If you want to put back sensor title concatenation for each column, then pass &tc=true.

Examples

  1. Retrieve sensor data for the last 3 hours three sensors, Example EWS 1 (# 1234), Example EWS 2 (# 5678), and Example EWS 3 (# 9876).
    https://secure.exoprise.com/api/v1/sensors/export_data.csv?apikey=0fbdd7b4bb4a0c5439ea61e8e6331234&period=3h&ids=1234,5678,9876

Export File Format

The API will return results as csv-formatted data (which most web browsers will provide as a .csv file). The file will contain one header row, plus one row for each measurement point during the designated time period. The total number of rows returned is uniform across sensor types, however the number varies depending on the time period specified.

The first column of the returned file is labeled created_at, with each cell containing a timestamp entry for the row. The remaining columns contain sensor data. Column headings are in the following format:

sensor_type:site_dsplay_name[:sensor_display_name]_series_name

Field
Description
sensor_type
Specifies the type of sensor (e.g. ADFS, BOX, DNS, EMAIL, WMON, etc.)
site_display_name
The display name for the site as specified in Site Settings.  If no display name has been set, this will display the default value for the machine name hosting the site.
sensor_display_name
The display name for the sensor as specified in Sensor Settings.  If no display name has been set, this field is omitted.
series_name
The name of the particular data series displayed in the column.  The number of available series as well as the series names vary by sensor type.
Sensor data is grouped together by sensor, in the order specified in the request.
Example (subset of rows and columns):
created_at
EMAIL:Boston (PROD):prodtestuser_logon_time
EMAIL:Boston (PROD):prodtestuser_mta_receive_time
EMAIL:Boston (PROD):prodtestuser_incoming_latency
2015-01-01 21:00:00 UTC
3288
7785
76.66929
2015-01-01 22:00:00 UTC
3306
7758
73.89908
2015-01-01 23:00:00 UTC
3363
7643
73.2838
2015-01-02 00:00:00 UTC
3098
7496
74.84083
2015-01-02 01:00:00 UTC
3431
8174
71.88194
2015-01-02 02:00:00 UTC
3213
8259
74.91374
2015-01-02 03:00:00 UTC
3507
8260
82.56295
2015-01-02 04:00:00 UTC
3386
7948
80.41726
2015-01-02 05:00:00 UTC
3321
9447
82.98525

Related Articles