Versions Compared

Key

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

...

Parameter
Type
Description
Example
Required   
tokenstringAll Web Services require a token. Once logged in at http://data.oceannetworks.ca/login, your token can be retrieved or generated at http://data.oceannetworks.ca/Profile . Click on the "Web Services" tab, then click "Generate Token".token=5ba514e8-1203-428c-8835-879c8173e387
Optional   
deviceCodestring

Return a single Device matching a specific Device Code

  • Device Code must be valid and match exactly, including case
  • Run the service without this parameter to get a list of all devices
deviceCode=FSINXIC1622
deviceNamestring

Return all of the Devices where the Device Name contains a keyword

  • Not Filter is not case sensitiveContains, treating meter, Meter and METER as the same word.
  • Filter will find partial words. Using the filter deviceCategoryName=adcp will return "ADCP 55 kHz, "ADCP 75 kHz", "ADCP 150 kHz", "ADCP 300 kHz", "ADCP 400 kHz, "ADCP 1200 kHz", "ADCP 1 MHz", "ADCP 2 MHz" and "ADCP 600 kHz"
deviceName=meter
locationCodestring

Return all Devices that are deployed at 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 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=CTD
propertyCodestring

Return all Devices that have a sensor 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=pressure
dataProductCodestring

Return all Devices that have the ability to return a specific Data Product

  • Data Product Code must be valid and match exactly, including case
  • Specific Data Product Codes can be obtained from the dataProducts service
dataProductCode=jpgfile
deploymentBegindatetime

Return all of the Devices that have a Deployment Beginning on or after a specific date/time

  • When the depolymentBegin filter is included, the deploymentEnd filter must also be included

Date Time format: yyyy-MM-dd'T'HH:mm:ss.SSS'Z'

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

deploymentEnddatetime

Return all of the Devices that have a Deployment Ending on or before a specific date/time

  • When the deploymentEnd filter is included, the deploymentBegin filter must also be included

Date Time format: yyyy-MM-dd'T'HH:mm:ss.SSS'Z'

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

...

http://data.oceannetworks.ca/api/devices?method=get&token=[YOUR_TOKEN_HERE]&locationCode=BACAX&deploymentBegin=2010-07-01T00:00:00.000Z&deploymentEnd=2011-06-30T23:59:59.999Z&propertyCode=seawatertemperature 

API Proxy

The http://data.oceannetworks.ca/apiproxy/devices url used deviceCategories URL link in the above examples can be used in a browser for sharing or testing purposes; however, it can not be used accessed from code, as it redirects . Calls to the apiproxy server are redirected to a login screen to capture your user id. In . Accessing the apiproxy URL from code will return html in the payload, which may cause errors or unexpected behaviour. In order to use the devices deviceCategories endpoint from code, you must use the http://data.oceannetworks.ca/api/devicesdeviceCateogies 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. 

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-devices