...
http://data.oceannetworks.ca/api/rawdata
Method | Description | Example |
---|---|---|
getByStation51085963* | Retrieve raw data available at given station. | method=getByStation |
getByDevice51085963 | Retrieve raw data available for a given device within a time range | method=getByDevice |
getByLocation51085963 | Retrieve raw data for the specified location and date range. This method is replacing getByStation. | method=getByLocation |
...
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Retrieve raw data available at given station. Data can be most recent from instruments, or data that's been archived in a raw data file. Parameters
ResponseSuccess
|
|
Property | Type | Description | Example |
---|---|---|---|
data | array of objects | The array containing the requested data, including the sample time and the raw data for each reading time. | |
data.sampleTime | string | The sample time for a single reading time. ISO8601 Extended Format. | "2015-09-01T00:21:21.000Z" |
data.rawData | string | The string of raw data for the sampleTime | "\c:1441212680,C:776,s:P-Cumshewa*1E\!AIVDO,1,1,9,A,4030p;1uvA@kDnSi;fNJgk7008<8,0*47" |
metadata | object | The metadata for the query and data | |
metadata.queryMetadata | object | The metadata for the query | |
metadata.queryMetadata.stationCode | string | part of the query metadata. The station code (search tree node code) that was queried | "IONA" |
metadata.queryMetadata.deviceCategory | string | part of the query metadata. the device category requested. | "AISRECEIVER" |
metadata.queryMetadata.dateFrom | string | part of the query metadata. string date used in the query for the start time of the data | "2015-09-01T00:21:21.000Z" |
metadata.queryMetadata.dateTo | string | part of the query metadata. string ISO8601 date used in the query for the end time of the data. Can be null. | "2015-09-18T02:23:21.000Z" |
metadata.queryMetadata.rowLimit | integer | part of the query metadata. the value given, if any, in the query limiting the size of the data | 100000 |
metadata.dataMetadata | object | The metadata for the data itself | |
metadata.dataMetadata.numberOfData | integer | part of the data metadata. the number of rows of data returned in the query | 100000 |
metadata.dataMetadata.firstTimestamp | string | part of the data metadata. string ISO8601 representing the first timestamp returned | "2015-09-01T00:21:21.123Z" |
metadata.dataMetadata.lastTimestamp | string | part of the data metadata. string ISO8601 representing the last timestamp returned | "2015-09-01T03:22:18.908Z" |
metadata.dataMetadata.stationName | string | part of the data metadata. The name of the station (device) | "Iona Shore Station" |
metadata.dataMetadata.hasMoreDataInRange | boolean | part of the data metadata. Indicates whether all the data was returned with the query or whether more data is available in the requested range. | true |
Example
Get raw data from an AIS receiver at Iona Shore Station from the beginning of time to the present with the default 100,000-row limit:
Get data from AIS receiver at Iona Shore Station starting from September 1, 2015, at 21 minutes and 21 seconds after midnight:
|
...
Parameter | Type | Description | Example |
---|---|---|---|
Required | |||
token | String | All 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 |
deviceCode | String | Return raw data of a specific Device Code.
| deviceCode=ASLZAP1006 |
Optional | |||
dateFrom | String | Return raw data that has a timestamp on or after a specific date/time. Accepted DateTime formats:
If not specified, the default value is the beginning of time.
| dateFrom=2010-07-27T00:00:00.000Z dateFrom=2010-07-27 dateFrom=-P1DT1H
|
dateTo | String | Return scalar data that has a timestamp before a specific date/time. Accepted DateTime formats:
If not specified, the default value is the end of time.
| dateTo=2016-08-01T00:00:00.000Z dateTo=2016-08-01 dateTo=PT12H30M
|
rowLimit | Integer | The limit on the number of raw data readings to return. If not specified the row limit is 100,000. | rowLimit=300 |
sizeLimit | Integer | The limit on the size of raw data readings to return, specified in MB. If not specified the size limit is 250 MB. | sizeLimit=20 |
convertHexToDecimal | Boolean | Format of raw data readings. By default, binary data will be returned in decimal. When set to false, it will be returned in hexadecimal. | convertHexToDecimal=false |
outputFormat | String | There are two values:
| outputFormat=array outputFormat=object |
getLatest | Boolean | Specifies whether or not the latest raw data readings should be returned first. This is false by default. When set to true, readings are returned and pagination is done from latest to earliest. | getLatest=true |
skipErrors | Boolean | skipErrors=true will return all raw data with timestamps skipErrors=false (default) will return error message when there are some badly formatted raw data within requested time range |
Response
Success (outputFormat = Array)
...
Parameter | Type | Description | Example |
---|---|---|---|
Required | |||
token | String | All Web Services require a token. This can be generated at http://data.oceannetworks.ca/Profile. Click on the "Web Services" tab and click "Generate Token". | token=YOUR_TOKEN_HERE |
locationCode | String | Return raw data from a specific Location.
| locationCode=SCVIP |
deviceCategoryCode | String | Return raw data belonging to a specific Device Category Code.
| deviceCategoryCode=CTD |
Optional | |||
dateFrom | String | Return raw data that has a timestamp on or after a specific date/time. Accepted DateTime formats:
If not specified, the default value is the beginning of time.
| dateFrom=2010-07-27T00:00:00.000Z dateFrom=2010-07-27 dateFrom=-P1DT1H
|
dateTo | String | Return scalar data that has a timestamp before a specific date/time. Accepted DateTime formats:
If not specified, the default value is the end of time.
| dateTo=2016-08-01T00:00:00.000Z dateTo=2016-08-01 dateTo=PT12H30M
|
rowLimit | Integer | The limit on the number of raw data readings to return. If not specified the row limit is 100,000. | rowLimit=300 |
sizeLimit | Integer | The limit on the size of raw data readings to return specified in MB. If not specified the size limit is 250 MB. | sizeLimit=20 |
outputFormat | String | Array (default or if missing) (case insensitive) Object (case insensitive) | outputFormat= array outputFormat = object |
getLatest | Boolean | Specifies whether or not the latest raw data readings should be returned first. This is false by default. When set to true, readings are returned and pagination is done from latest to earliest. | getLatest=true |
skipErrors | Boolean | skipErrors=true will return all raw data with timestamps skipErrors=false (default) will return error message when there are some badly formatted raw data within requested time range |
Response
Success (outputFormat = Array)
...