Versions Compared

Key

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

...

The API dataProducts service returns all data products defined in Oceans 23.0 that meet a filter criteria.

...

Parameter
Type
Description
Example
Required   


tokenstringll 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   


dataProductCodestring

Return all Data Product Extensions matching a specific Data Product Code.

  • Data Product Code must be valid and match exactly, including case.
dataProductCode=annotationfile
extensionstring

Return all Data Products that have a specific File Extension.

  • Extension must be valid and match exactly, including case.
extension=csv
dataProductNamestring

Return all Data Products where the Data Product Name contains a keyword.

  • Filter is not case sensitive, treating time, Time and TIME as the same word.
  • Filter will find partial words. The filter dataProductName=time returns "Time Series Scalar Data", "Time Series Scalar Profile Plot", "Nortek Time Series", "ASL Acoustic Profiler Time Series" and more.
dataProductName=time
locationCodestring

Return all Data Products available for a specific Location.

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

Return all Data Products available for devices belonging to a specific Device Category.

  • Device Category Code must be valid and match exactly, including case.
  • Specific Device Category Codes can be obtained using the deviceCateogries service.
deviceCategoryCode=ADCP2MHZ
deviceCodestring

Return all Data Products available for a specific Device.

  • Device Code must be valid and match exactly, including case.
  • Specific Device Codes can be obtained from the devices service.
deviceCode=AandOpt0581
propertyCodestring

Return all Data Products available for a specific Property.

  • Property Code must be valid and match exactly, including case.
  • Specific Property Codes can be obtained using the properties service.
propertyCode=airdensity

...

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":"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
dataProductCodestringReturns the data product code.
"dataProductCode":"TSSD"
dataProductName
stringReturns the name of the data product.
"dataProductName":"Time Series Scalar Data"
extension
stringReturns the file extension for the data product.
"extension":"json"
hasDeviceDatabooleanReturns whether at least one device and/or sensor with this data product is NEPTUNE searchable"hasDeviceData":true
hasPropertyDatabooleanReturns whether at least one sensor with this data product is a NEPTUNE-searchable primary sensor"hasPropertyData":false
helpDocument
stringReturns a Link URL to the Oceans 23.0 Help documentation for the specific Data Product.
"helpDocument":"https://wiki.oceannetworks.ca/display/DP/1"

...

errorCode
errorMessage
Description
127Invalid parameter value

Occurs when an invalid code is used in the filter. Most filters require an exact match, otherwise this error will occur.

  • The name of the filter parameter is included in the "parameter" property.
129Invalid parameter name

Occurs when a filter parameter is in the query but is not supported.

  • The name of the filter parameter is included in the "parameter" property.

 


 URL Examples

  • Return a list of All Data Product Extensions (no filters)

https://data.oceannetworks.ca/api/dataProducts?method=get&token=[YOUR_TOKEN_HERE] 


  • Return a list of all Data Product Extensions available for Data Product Code 'TSSD' (Time Series Scalar Data)

https://data.oceannetworks.ca/api/dataProducts?method=get&token=[YOUR_TOKEN_HERE]&dataProductCode=TSSD 


  • Return a list of all Data Products Extensions available for the Extension 'pdf'

https://data.oceannetworks.ca/api/dataProducts?method=get&token=[YOUR_TOKEN_HERE]&extension=pdf 


  • Return a list of all Data Products Extensions available for Data Product Code 'TSSD' (Time Series Scalar Data) and Extension of 'csv'

https://data.oceannetworks.ca/api/dataProducts?method=get&token=[YOUR_TOKEN_HERE]&dataProductCode=TSSD&extension=csv

 


  • Return a list of all Data Product Extension with a Data Product Name containing 'scalar'

https://data.oceannetworks.ca/api/dataProducts?method=get&token=[YOUR_TOKEN_HERE]&dataProductName=scalar

 


  • Return a list of all Data Product Extensions available for instruments at the location with Location Code 'BACAX'

https://data.oceannetworks.ca/api/dataProducts?method=get&token=[YOUR_TOKEN_HERE]&locationCode=BACAX

 


  • Return a list of all Data Products with the Extension 'mat' that are available for instruments at the location with Location Code 'BACAX'

https://data.oceannetworks.ca/api/dataProducts?method=get&token=[YOUR_TOKEN_HERE]&extension=mat&locationCode=BACAX 


  • Return a list of all Data Product Extensions available for the device with Device Code 'NORTEKAQDPRO8398'

https://data.oceannetworks.ca/api/dataProducts?method=get&token=[YOUR_TOKEN_HERE]&deviceCode=NORTEKAQDPRO8398 


  • Return a list of all Data Product Extensions available for instruments with the Device Category 'ADCP2MHZ'

https://data.oceannetworks.ca/api/dataProducts?method=get&token=[YOUR_TOKEN_HERE]&deviceCategoryCode=ADCP2MHZ 


  • Return a list of all Data Products Extensions available for the Property Code 'seawatertemperature'

https://data.oceannetworks.ca/api/dataProducts?method=get&token=[YOUR_TOKEN_HERE]&propertyCode=seawatertemperature

API Proxy

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. 

Code Examples

Content Report Table
blueprintModuleCompleteKeycom.atlassian.confluence.plugins.confluence-knowledge-base:kb-how-to-article-blueprint
contentBlueprintId5fdbc098-f47d-4b1d-bd32-eb876051b73b
analyticsKeykb-how-to-article
blankDescriptionProvide step-by-step guidance for completing a task.
blankTitleHow-to article
spacesO2A
createButtonLabelAdd how-to article
labelssample-code-data-products

 

 



Warning

Please report all issues with the web services, documentation, samples and client libraries to the Oceans 23.0 Help Centre