Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

No Format
http://data.oceannetworks.ca/api/scalardata


MethodDescriptionExample
51085890getByLocationReturns scalar data by given location code and device categorymethod=getByLocation
51085890getByDeviceReturns scalar data by given device code.method=getByDevice

...

ParameterTypeDescriptionExample
Required
tokenStringAll Web Services require a token. This can be generated at https://data.oceannetworks.ca/Profile. Click on the "Web Services" tab and click "Generate Token".token=YOUR_TOKEN_HERE
deviceCodeString

Return raw data of a specific Device Code.

  • Device Code must be valid and match exactly, including case.
  • Specific Device Codes can be found by simply running the service without this parameter to get a list of all devices.
deviceCode=ASLZAP1006
Optional

sensorCategoryCodes

StringA comma separated list of sensor code names. If missing, the system will return all search scalar data within the location code, device category pair, and propertyCode (if given).sensorCategoryCodes= pressure,borehole_pressure1,oxygen
dateFromString

Return raw data that has a timestamp on or after a specific date/time.

Accepted DateTime formats:

  • yyyy-MM-dd'T'HH:mm:ss.SSS'Z' (ISO 8601 Extended)
  • yyyy-MM-dd (ISO 8601 Extended)
  • PnYnMnDTnHnMnS (ISO 8601 Duration)

If not specified, the default value is the beginning of time.

  • DateTime is represented in Coordinated Universal Time (UTC).

  • ISO 8601 Extended format without a time will be assumed to mean midnight (T00:00:000.000Z).
  • Queries with both dateFrom and dateTo in the ISO 8601 Duration format will not be accepted.

dateFrom=2017-06-08T00:00:00.000Z

dateFrom=-P2Y11MT15H30M5S

dateToString

Return scalar data that has a timestamp before a specific date/time.

Accepted DateTime formats:

  • yyyy-MM-dd'T'HH:mm:ss.SSS'Z' (ISO 8601 Extended)
  • yyyy-MM-dd (ISO 8601 Extended)
  • PnYnMnDTnHnMnS (ISO 8601 Duration)

If not specified, the default value is the end of time.

  • DateTime is represented in Coordinated Universal Time (UTC).

  • ISO 8601 Extended format without a time will be assumed to mean midnight (T00:00:000.000Z).
  • Queries with both dateFrom and dateTo in the ISO 8601 Duration format will not be accepted.

dateTo=2017-06-08T01:00:00.000Z

dateTo=P1Y2M10DT2H30M

rowLimitIntegerThe limit on the number of scalar data readings to return. If not specified the row limit is 100,000.rowLimit=300
outputFormatString

There are two values:

  • Array (default or if missing) (case insensitive)
    • Data will be output as three arrays for a given device: a lineTypes array, a readings array, and a times array.
  • Object (case insensitive)
    • Data will be output as a list of objects for a given device. Inside each data object, there are lineType, scalarData, and sampleTime lists.
outputFormat=object
getLatestboolean

Specifies whether or not the latest scalar data readings should be returned first. 

getLatest = false: default

getLatest = true: readings are returned and pagination is done from latest to earliest.

getLatest=true
qualityControlstring

accepted values:

  • raw
    • returns raw scalar data
  • clean
    • returns clean scalar data

The default value when no qualityControl has been provided is: qualityControl = clean.

To get resampled data values: qualityControl = clean.

qualityControl=clean
resampleTypestring

accepted values:

  • avg
    • gets the average value in each resamplePeriod
  • avgMinMax
    • gets the average, minimum, and maximum values in each resample period
  • minMax
    • gets the minimum and maximum values in each resample period

The default value when no resampleType has been provided is: resampleType=avgMinMax.

The resmapleType option requires that a samplePeriod has been added

resampleType=avgMinMax
resamplePeriodinteger

To resample clean scalar data the resample period is set in seconds. The resamplePeriod parameter is required for the resampleType parameter.

accepted values:

  • 60 (1 Minute)
  • 600 (10 Minutes)
  • 900 (15 Minutes)
  • 3600 (1 Hour)
  • 86400 (1 Day)
resamplePeriod=3600
fillGapsbooleanif true fills scalar data gaps with NaN. By default data gaps are filled.fillGaps=true

...