...
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 |
locationCode | string | Return a list of files from a specific Location.
| locationCode=BACUS |
deviceCategoryCode | string | Return a list of files of a specific Device Category Code.
| deviceCategoryCode=JB |
Optional | |||
dateFrom | date | Return files that have 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 | date | Return files that have 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
|
dateArchivedFrom | date | Return files archived on or after a specific date/time. Accepted DateTime formats:
If not specified, the default value is the beginning of time.
| dateFromdateArchivedFrom=2010-07-27T00:00:00.000Z dateFromdateArchivedFrom=2010-07-27 dateFromdateArchivedFrom=-P1DT1H
|
dateArchivedTo | date | Return files archived before a specific date/time. Accepted DateTime formats:
If not specified, the default value is the end of time.
| dateTodateArchivedTo=2016-08-01T00:00:00.000Z dateTodateArchivedTo=2016-08-01 dateTodateArchivedTo=PT12H30M
|
fileExtension | String | Return files of a specific File Extension.
| png |
dataProductCode | String | Return files of a specific Data Product Code.
| HSD |
returnOptions | string | 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 |
rowLimit | integer | 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 |
page | integer | 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 |
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 |
...
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 |
deviceCode | string | Return a list of files of a specific Device Code.
| deviceCode=BC_POD2_JB |
Optional | |||
dateFrom | date | Return files that have 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 | date | Return files that have 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
|
dateArchivedFrom | date | Return files archived on or after a specific date/time. Accepted DateTime formats:
If not specified, the default value is the beginning of time.
| dateFromdateArchivedFrom=2010-07-27T00:00:00.000Z dateFromdateArchivedFrom=2010-07-27 dateFromdateArchivedFrom=-P1DT1H
|
dateArchivedTo | date | Return files archived before a specific date/time. Accepted DateTime formats:
If not specified, the default value is the end of time.
| dateTodateArchivedTo=2016-08-01T00:00:00.000Z dateTodateArchivedTo=2016-08-01 dateTodateArchivedTo=PT12H30M
|
fileExtension | String | Return files of a specific File Extension.
| png |
dataProductCode | String | Return files of a specific Data Product Code.
| HSD |
returnOptions | string | 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 |
rowLimit | integer | 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 |
page | integer | 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 |
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 |
...
- Return a list of files with extension png
- https://data.oceannetworks.ca/api/archivefiles?method=getListByDevice&token=TOKEN_HERE&deviceCode=IOS3HYDARR01&rowLimit=5&fileExtension=png
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"] } |
...
- Return a list of files with data product code HSD (Hydrophone Spectral Data)
- https://data.oceannetworks.ca/api/archivefiles?method=getListByDevice&token=TOKEN_HERE&deviceCode=IOS3HYDARR01&rowLimit=5&dataProductCode=HSD
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"] } |
...