Versions Compared

Key

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

...

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
locationCodestring

Return a list of files from a specific Location.

  • Location Code must be valid and match exactly, including case.
  • Specific Location Codes can be obtained using the locations service.
locationCode=BACUS
deviceCategoryCodestring

Return a list of files of a specific Device Category Code.

  • Device Category Code must be valid and match exactly, including case.
  • Specific Device Category Codes can be obtained using the deviceCategories service.
deviceCategoryCode=JB
Optional
dateFromdate

Return files that have 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=2010-07-27T00:00:00.000Z

dateFrom=2010-07-27

dateFrom=-P1DT1H

  • Previous 1 day and 1 hour, relative to the dateTo. Note the '-' before the P.
dateTodate

Return files that have 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=2016-08-01T00:00:00.000Z

dateTo=2016-08-01

dateTo=PT12H30M

  • Next 12 hours and 30 minutes, relative to the dateFrom.
dateArchivedFromdate

Return files archived 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.

dateFromdateArchivedFrom=2010-07-27T00:00:00.000Z

dateFromdateArchivedFrom=2010-07-27

dateFromdateArchivedFrom=-P1DT1H

  • Previous 1 day and 1 hour, relative to the dateTo. Note the '-' before the P.
dateArchivedTodate

Return files archived 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.

dateTodateArchivedTo=2016-08-01T00:00:00.000Z

dateTodateArchivedTo=2016-08-01

dateTodateArchivedTo=PT12H30M

  • Next 12 hours and 30 minutes, relative to the dateFrom.
fileExtensionString

Return files of a specific File Extension.

  • file extension is not case sensitive
png
dataProductCodeString

Return files of a specific Data Product Code.

HSD
returnOptionsstring

If there is no value given, list of filenames will be returned.

If the value is "archiveLocation"  a list of filenames with their archiveLocation will be returned. Mostly used by www.oceannetworks.ca website.

If the value is "all" , more metadata information will be returned.

 *All results returned with serviceMetadata object. 


returnOptions=archiveLocation
rowLimitinteger

The maximum number of data to return, within the constraints of the service. Note this will limit the data starting at the dateFrom time and ending at the row limit, not necessarily at the dateTo time.

default row limit: 100000

rowLimit=100
pageinteger

The service will return data starting from a certain page. By default this value is 1.

If the data size is greater than rowLimit, results will be split into pages where each page contains at most rowLimit number of data.

This parameter is used to generate serviceMetadata.next parameter, which can be used to get the next set of data.

page=1
getLatestbooleanSpecifies 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

...

ParameterTypeDescriptionExample
Required
tokenstringAll 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
deviceCodestring

Return a list of files 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=BC_POD2_JB
Optional
dateFromdate

Return files that have 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=2010-07-27T00:00:00.000Z

dateFrom=2010-07-27

dateFrom=-P1DT1H

  • Previous 1 day and 1 hour, relative to the dateTo. Note the '-' before the P.
dateTodate

Return files that have 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=2016-08-01T00:00:00.000Z

dateTo=2016-08-01

dateTo=PT12H30M

  • Next 12 hours and 30 minutes, relative to the dateFrom.
dateArchivedFromdate

Return files archived 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.

dateFromdateArchivedFrom=2010-07-27T00:00:00.000Z

dateFromdateArchivedFrom=2010-07-27

dateFromdateArchivedFrom=-P1DT1H

  • Previous 1 day and 1 hour, relative to the dateTo. Note the '-' before the P.
dateArchivedTodate

Return files archived 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.

dateTodateArchivedTo=2016-08-01T00:00:00.000Z

dateTodateArchivedTo=2016-08-01

dateTodateArchivedTo=PT12H30M

  • Next 12 hours and 30 minutes, relative to the dateFrom.
fileExtensionString

Return files of a specific File Extension.

  • file extension is not case sensitive
png
dataProductCodeString

Return files of a specific Data Product Code.

HSD
returnOptionsstring

If there is no value given, list of filenames will be returned.

If the value is "archiveLocation"  a list of filenames with their archiveLocation will be returned.

If the value is "all" , more metadata information will be returned.

 *All results returned with serviceMetadata object. 


returnOptions=archiveLocation
rowLimitinteger

The maximum number of data to return, within the constraints of the service. Note this will limit the data starting at the dateFrom time and ending at the row limit, not necessarily at the dateTo time.

default row limit: 100000

rowLimit=100
pageinteger

The service will return data starting from a certain page. By default this value is 1.

If the data size is greater than rowLimit, results will be split into pages where each page contains at most rowLimit number of data.

This parameter is used to generate serviceMetadata.next parameter, which can be used to get the next set of data.

page=1
getLatestbooleanSpecifies 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

...

Code Block
{
	"next": {
		"parameters": {
			"method": "getListByDevice",
			"fileExtension": "png",
			"deviceCode": "IOS3HYDARR01",
			"rowLimit": "5",
			"page": "2",
			"token": "TOKEN_HERE"
		},
		"url": "https://data.oceannetworks.ca/api/archivefiles?method=getListByDevice&fileExtension=png&deviceCode=IOS3HYDARR01&rowLimit=5&page=2&token=TOKEN_HERE"
	},
	"queryUrl": "https://data.oceannetworks.ca/api/archivefiles?method=getListByDevice&token=TOKEN_HERE&deviceCode=IOS3HYDARR01&rowLimit=5&fileExtension=png",
	"files": ["IOS3HYDARR01_20060314T130754.000Z-spect-H3.png", "IOS3HYDARR01_20060314T130754.000Z-spect-H2.png", "IOS3HYDARR01_20060314T130754.000Z-spect-H1.png", "IOS3HYDARR01_20060314T131752.000Z-spect-H3.png", "IOS3HYDARR01_20060314T131752.000Z-spect-H2.png"]
}

...

Code Block
{
	"next": {
		"parameters": {
			"method": "getListByDevice",
			"dataProductCode": "HSD",
			"deviceCode": "IOS3HYDARR01",
			"rowLimit": "5",
			"page": "2",
			"token": "TOKEN_HERE"
		},
		"url": "https://data.oceannetworks.ca/api/archivefiles?method=getListByDevice&dataProductCode=HSD&deviceCode=IOS3HYDARR01&rowLimit=5&page=2&token=TOKEN_HERE"
	},
	"queryUrl": "https://data.oceannetworks.ca/api/archivefiles?method=getListByDevice&token=TOKEN_HERE&deviceCode=IOS3HYDARR01&rowLimit=5&dataProductCode=HSD",
	"files": ["IOS3HYDARR01_20060314T130754.000Z-spect-H3.png", "IOS3HYDARR01_20060314T130754.000Z-spect-H2.png", "IOS3HYDARR01_20060314T130754.000Z-spect-H1.png", "IOS3HYDARR01_20060314T130754.000Z-spect-H3.pdf", "IOS3HYDARR01_20060314T130754.000Z-spect-H2.pdf"]
}

...