Exoprise CloudReady® Help
Search:     Advanced search

Sensor Data Export API

Article ID: 96
Last updated: 22 Jun, 2017
The CloudReady Sensor Data Export API enables admins to programmatically query for sensor or crowd data using a simple HTTP URL string invocation combined with a preconfigured 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.

Syntax

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

Arguments

Argument
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
type
If included, indicates that the response should return the crowd data for the specified sensor(s). If not included, the response will return data for the specified sensors.
 
Accepted value: crowd  

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

  2. Retrieve CROWD data for the last 30 days for SharePoint Online, Dropbox, and Box using the following sensors: Example SharePoint (# 1234), Example Dropbox (# 4567), and Example Box (# 9876).

    https://secure.exoprise.com/api/v1/sensors/export_data.csv?apikey=0fbdd7b4bb4a0c5439ea61e8e6331234&period=30d&ids=1234,5678,9876&type=crowd

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:
 
[crowd_]sensor_type:site_dsplay_name[:sensor_display_name]_series_name

Field
Description
crowd_
An optional prefix used when crowd data is returned
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
crowd_EMAIL:Boston (PROD):prodtestuser_logon_time
crowd_EMAIL:Boston (PROD):prodtestuser_mta_receive_time
crowd_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

Notes

  1. Although the API requires the specification of sensor ID’s, crowd data will be the same for all sensors of a given type. The API will allow crowd data to be requested for multiple sensor ID’s of the same type, and will return data for each sensor, but data in the columns will be identical across the sensors.
Also read
document Importing Sensor Data into Excel

Prev   Next
NT Event Log Format Description     Importing Sensor Data into Excel