The API dataProducts service returns all data products defined in Oceans 3.0 that meet a filter criteria.
Data Products are downloadable representations of ONC observational data, provided in formats that can be easily ingested by analytical or visualization software.
The primary purpose of this service is to identify which Data Products and Formats (file extensions) are available for the Locations, Devices, Device Categories or Properties of interest. Use the dataProductCode and extension when requesting a data product via the dataProductDelivery web service.
https://data.oceannetworks.ca/api/dataProducts |
Method | Description | Example |
---|---|---|
get | Retrieve a list Data Products codes |
|
The get method retrieves a list of Data Product codes
Parameter | Type | Description | Example |
---|---|---|---|
Required | |||
token | string | ll Web Services require a token. Once logged in at https://data.oceannetworks.ca/login, your token can be retrieved or generated at https://data.oceannetworks.ca/Profile . Click on the "Web Services" tab, then click "Generate Token". | token=YOUR_TOKEN_HERE |
Optional | |||
dataProductCode | string | Return all Data Product Extensions matching a specific Data Product Code.
| dataProductCode=annotationfile |
extension | string | Return all Data Products that have a specific File Extension.
| extension=csv |
dataProductName | string | Return all Data Products where the Data Product Name contains a keyword.
| dataProductName=time |
locationCode | string | Return all Data Products available for a specific Location.
| locationCode=BACAX |
deviceCategoryCode | string | Return all Data Products available for devices belonging to a specific Device Category.
| deviceCategoryCode=ADCP2MHZ |
deviceCode | string | Return all Data Products available for a specific Device.
| deviceCode=AandOpt0581 |
propertyCode | string | Return all Data Products available for a specific Property.
| propertyCode=airdensity |
Example for request https://data.oceannetworks.ca/api/dataProducts?method=get&token=[YOUR_TOKEN_HERE]&dataProductCode=HSD&extension=png
Returns a list of data product extensions with values for Data Product Code, Data Product Name, Extension and Help Document URL, ordered alphabetically by Data Product Code
[ { "dataProductCode": "HSD", "dataProductName": "Hydrophone Spectral Data", "dataProductOptions": [ { "allowableRange": null, "allowableValues": [ "All", "LF", "HF" ], "documentation": [ "https://wiki.oceannetworks.ca/display/DP/Hydrophone+Data+Acquisition+and+Diversion+Mode" ], "option": "dpo_hydrophoneAcquisitionMode", "suboptions": null }, { "allowableRange": null, "allowableValues": [ "All", "H1", "H2", "H3" ], "documentation": [ "https://wiki.oceannetworks.ca/display/DP/Hydrophone+Channel" ], "option": "dpo_hydrophoneChannel", "suboptions": null }, { "allowableRange": null, "allowableValues": [ "All", "LPF", "OD", "HPF" ], "documentation": [ "https://wiki.oceannetworks.ca/display/DP/Hydrophone+Data+Acquisition+and+Diversion+Mode" ], "option": "dpo_hydrophoneDataDiversionMode", "suboptions": null }, { "allowableRange": { "lowerBound": "-160", "onlyIntegers": false, "unitOfMeasure": null, "upperBound": "140" }, "allowableValues": [ "-1000" ], "documentation": [ "https://wiki.oceannetworks.ca/display/DP/Spectrogram+Plot+Options" ], "option": "dpo_lowerColourLimit", "suboptions": null }, { "allowableRange": null, "allowableValues": [ "0", "1", "2", "3", "4", "5" ], "documentation": [ "https://wiki.oceannetworks.ca/display/DP/Spectrogram+Plot+Options" ], "option": "dpo_spectrogramColourPalette", "suboptions": null }, { "allowableRange": null, "allowableValues": [ "Adjacent", "Daily", "Weekly", "None" ], "documentation": [ "https://wiki.oceannetworks.ca/display/DP/Spectrogram+Concatenation" ], "option": "dpo_spectrogramConcatenation", "suboptions": null }, { "allowableRange": { "lowerBound": "100", "onlyIntegers": true, "unitOfMeasure": "Hz", "upperBound": "500000" }, "allowableValues": [ "-1", "1000", "10000" ], "documentation": [ "https://wiki.oceannetworks.ca/display/DP/Spectrogram+Plot+Options" ], "option": "dpo_spectrogramFrequencyUpperLimit", "suboptions": null }, { "allowableRange": null, "allowableValues": [ "WAVFLAC", "FFT", "MIX" ], "documentation": [ "https://wiki.oceannetworks.ca/display/DP/Spectrogram+Source" ], "option": "dpo_spectrogramSource", "suboptions": null }, { "allowableRange": { "lowerBound": "-160", "onlyIntegers": false, "unitOfMeasure": null, "upperBound": "140" }, "allowableValues": [ "-1000" ], "documentation": [ "https://wiki.oceannetworks.ca/display/DP/Spectrogram+Plot+Options" ], "option": "dpo_upperColourLimit", "suboptions": null } ], "extension": "png", "hasDeviceData": true, "hasPropertyData": false, "helpDocument": "https://wiki.oceannetworks.ca/display/DP/45" } ] |
Property | Type | Description | Example | |
---|---|---|---|---|
dataProductCode | string | Returns the data product code. | "dataProductCode":"HSD" | |
dataProductName | string | Returns the name of the data product. | "dataProductName":"Hydrophone Spectral Data" | |
extension | string | Returns the file extension for the data product. | "extension":"png" | |
hasDeviceData | boolean | Returns whether at least one device and/or sensor with this data product is NEPTUNE searchable | "hasDeviceData":true | |
hasPropertyData | boolean | Returns whether at least one sensor with this data product is a NEPTUNE-searchable primary sensor | "hasPropertyData":false | |
helpDocument | string | Returns a Link URL to the Oceans 3.0 Help documentation for the specific data product. | "helpDocument":"https://wiki.oceannetworks.ca/display/DP/45" | |
dataProductOptions | array of objects | Array of all the data product options that can be applied to the specific data product | ||
dataProductOptions.AllowableRange | object | object describing the range of values for the specific data product option | ||
dataProductOptions.AllowableRange.lowerBound | String | The lower bound for the data product option | "lowerBound": "100" | |
dataProductOptions.AllowableRange.onlyIntegers | boolean | false if the number can be floating point | "onlyIntegers": true | |
dataProductOptions.AllowableRange.unitOfMeasure | String | The unit of measure for the data product option | "unitOfMeasure": "Hz" | |
dataProductOptions.AllowableRange.upperBound | String | The upper bound for the data product option | "upperBound": "500000" | |
dataProductOptions.allowableValues | Array of strings | The allowable values for the dataproduct option. If there is an allowable range these values are in addition to the range. | "allowableValues": ["All","LPF","OD","HPF"] | |
dataProductOptions.documentation | Array of strings | List of all the documentation for a data product option | "documentation": ["https://wiki.oceannetworks.ca/display/DP/Hydrophone+Data+Acquisition+and+Diversion+Mode"] | |
dataProductOptions.option | String | name of the data product option | "option": "dpo_hydrophoneDataDiversionMode" | |
dataProductOptions.suboptions | Array of DataProductOptions | some data product options have children that become required when you select the parent, for example when you select the "resample" option you must specific the type of resample: avg, minmax, minmaxavg. |
|
errorCode | errorMessage | Description |
---|---|---|
127 | Invalid parameter value | Occurs when an invalid code is used in the filter. Most filters require an exact match, otherwise this error will occur.
|
129 | Invalid parameter name | Occurs when a filter parameter is in the query but is not supported.
|
https://data.oceannetworks.ca/api/dataProducts?method=get&token=[YOUR_TOKEN_HERE]
https://data.oceannetworks.ca/api/dataProducts?method=get&token=[YOUR_TOKEN_HERE]&extension=pdf
https://data.oceannetworks.ca/api/dataProducts?method=get&token=[YOUR_TOKEN_HERE]&locationCode=BACAX
The https://data.oceannetworks.ca/apiproxy/dataProducts URL link in the above examples can be used in a browser for sharing or testing purposes; however, it can not be accessed from code. Calls to the apiproxy server are redirected to a login screen to capture your user id. Accessing the apiproxy URL from code will return html in the payload, which may cause errors or unexpected behaviour. In order to use the dataProducts endpoint from code, you must use the https://data.oceannetworks.ca/api/dataProducts url along with a valid token.
Please report all issues with the web services, documentation, samples and client libraries to the Oceans 3.0 Help Centre |