The API dataProducts service returns all the data products defined in DMAS that meet a filter criteria.
Data Products are downloadable representations of ONC observation data, 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 (extensions) are available for the Locations, Devices, Device Categories or Properties of interest and use the dataProductCode and extension when requesting a data product using the dataProductDelivery web service.
For a list of available data product codes and extensions, along with help document links, see the Available Data Products page.
See the External Web Services for method and token usage and error messages.
http://dmas.uvic.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 | All Web Services require a token. This can be generated at http://dmas.uvic.ca/Profile. Click on the "Web Services" tab and click "Generate Token" | token=5ba514e8-1203-428c-8835-879c8173e387 |
Optional | |||
dataProductCode | string | Return all of the Data Product Extensions matching a specific Data Product Code
| dataProductCode=annotationfile |
extension | string | Return all of the Data Products that have a specific Extension
| extension=csv |
dataProductName | string | Return all of the Data Products where the Data Product Name contains a keyword
| dataProductName=Annotation |
locationCode | string | Return all of the Data Products that are available for a specific Location
| locationCode=BACAX |
deviceCategoryCode | string | Return all of the Data Products that are available for devices belonging to a specific Device Category
| deviceCategoryCode=ADCP2MHZ |
deviceCode | string | Return all Data Products that are available for a specific Device
| deviceCode=AandOpt0581 |
propertyCode | string | Return all of the Data Products that are available for a specific Property
| propertyCode=airdensity |
Example for request http://dmas.uvic.ca/api/dataProducts?method=get&token=[YOUR_TOKEN_HERE]&deviceCategoryCode=CTD&locationCode=BACAX
Returns a list of data product extensions with values for Data Product Code, Data Product Name, Extension and Help Document URL, ordered by Data Product Code
[ { "dataProductCode" : "AF" , "dataProductName" : "Annotation File" , "extension" : "an" , "helpDocument" : "https://wiki.oceannetworks.ca/display/DP/89" }, { "dataProductCode" : "LF" , "dataProductName" : "Log File" , "extension" : "txt" , "helpDocument" : "https://wiki.oceannetworks.ca/display/DP/4" }, { "dataProductCode" : "MSQAQCR" , "dataProductName" : "Manual Scalar QAQC Results" , "extension" : "qaqc" , "helpDocument" : "https://wiki.oceannetworks.ca/display/DP/106" }, { "dataProductCode" : "SBCTDRF" , "dataProductName" : "Sea-Bird CTD Raw Files" , "extension" : "hex" , "helpDocument" : "https://wiki.oceannetworks.ca/display/DP/78" }, { "dataProductCode" : "TSSCP" , "dataProductName" : "Time Series Staircase Plot" , "extension" : "pdf" , "helpDocument" : "https://wiki.oceannetworks.ca/display/DP/21" }, { "dataProductCode" : "TSSCP" , "dataProductName" : "Time Series Staircase Plot" , "extension" : "png" , "helpDocument" : "https://wiki.oceannetworks.ca/display/DP/21" }, { "dataProductCode" : "TSSD" , "dataProductName" : "Time Series Scalar Data" , "extension" : "json" , "helpDocument" : "https://wiki.oceannetworks.ca/display/DP/1" }, { "dataProductCode" : "TSSD" , "dataProductName" : "Time Series Scalar Data" , "extension" : "csv" , "helpDocument" : "https://wiki.oceannetworks.ca/display/DP/1" }, { "dataProductCode" : "TSSD" , "dataProductName" : "Time Series Scalar Data" , "extension" : "mat" , "helpDocument" : "https://wiki.oceannetworks.ca/display/DP/1" }, { "dataProductCode" : "TSSD" , "dataProductName" : "Time Series Scalar Data" , "extension" : "txt" , "helpDocument" : "https://wiki.oceannetworks.ca/display/DP/1" }, { "dataProductCode" : "TSSP" , "dataProductName" : "Time Series Scalar Plot" , "extension" : "pdf" , "helpDocument" : "https://wiki.oceannetworks.ca/display/DP/2" }, { "dataProductCode" : "TSSP" , "dataProductName" : "Time Series Scalar Plot" , "extension" : "png" , "helpDocument" : "https://wiki.oceannetworks.ca/display/DP/2" }] |
Property | Type | Description | Example |
---|---|---|---|
dataProductCode | string | Returns the data product code | "dataProductCode":"TSSD" |
dataProductName | string | Returns the name of the data product | "dataProductName":"Time Series Scalar Data" |
extension | string | Returns the extension for that data product | "extension":"json" |
helpDocument | string | Returns a Link URL to the ONC Help documentation for the specific Data Product | "helpDocument":"https://wiki.oceannetworks.ca/display/DP/1" |
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 used, but is not supported. |
http://dmas.uvic.ca/api/dataProducts?method=get&token=[YOUR_TOKEN_HERE]
http://dmas.uvic.ca/api/dataProducts?method=get&token=[YOUR_TOKEN_HERE]&dataProductCode=TSSD
http://dmas.uvic.ca/api/dataProducts?method=get&token=[YOUR_TOKEN_HERE]&extension=pdf
http://dmas.uvic.ca/api/dataProducts?method=get&token=[YOUR_TOKEN_HERE]&dataProductName=scalar
http://dmas.uvic.ca/api/dataProducts?method=get&token=[YOUR_TOKEN_HERE]&locationCode=BACAX
http://dmas.uvic.ca/api/dataProducts?method=get&token=[YOUR_TOKEN_HERE]&deviceCode=NORTEKAQDPRO8398
http://dmas.uvic.ca/api/dataProducts?method=get&token=[YOUR_TOKEN_HERE]&deviceCategoryCode=ADCP2MHZ
*NOTE: The http://dmas.uvic.ca/apiproxy/dataProducts url used in the above examples can be used in a browser for sharing or testing purposes; however, it can not be used from code, as it redirects to a login screen to capture your user id. In order to use the dataProducts endpoint from code, you must use the http://dmas.uvic.ca/api/dataProducts url along with a valid token. Attempting to use the apiproxy url from code will result html returned in the payload which may cause errors or unexpected behavior.