The following links are some examples of using the devices Discovery Service.  The token refers to your Web Services API token, which you can find in the Web Services API tab of your Ocean Networks Canada profile.

DescriptionURL
Return a list of All of the Devices (no filters)https://data.oceannetworks.ca/api/devices?method=get&token=YOUR_TOKEN_HERE
Return the Device with a Device Code of 'NORTEKADCP9917'https://data.oceannetworks.ca/api/devices?method=get&token=YOUR_TOKEN_HERE&deviceCode=NORTEKADCP9917
Return a list of all of the Devices that have a Device Name which contains 'JASCO'https://data.oceannetworks.ca/api/devices?method=get&token=YOUR_TOKEN_HERE&deviceName=JASCO
Return a list of all of the devices that have been deployed at a location with a Location Code of 'BACAX' ('Barkely Canyon Axis (POD1)')https://data.oceannetworks.ca/api/devices?method=get&token=YOUR_TOKEN_HERE&locationCode=BACAX
Return a list of all of the Devices with a Device Category of 'ADCP2MHZ'https://data.oceannetworks.ca/api/devices?method=get&token=YOUR_TOKEN_HERE&deviceCategoryCode=ADCP2MHZ
Return a list of all of the Devices with a Property Code of 'oxygen'https://data.oceannetworks.ca/api/devices?method=get&token=YOUR_TOKEN_HERE&propertyCode=oxygen
Return a list of all of the Devices with a Device Category of 'CTD' and Property Code of 'pressure'https://data.oceannetworks.ca/api/devices?method=get&token=YOUR_TOKEN_HERE&deviceCategoryCode=CTD&propertyCode=pressure
Return a list of all of the Devices that support the Data Product Code of 'IBPP' ('Ice Buoy Profile Plots')https://data.oceannetworks.ca/api/devices?method=get&token=YOUR_TOKEN_HERE&dataProductCode=IBPP
Return a list of all of the Devices that were Deployed Between July 1st 2010 and June 30th 2012https://data.oceannetworks.ca/api/devices?method=get&token=YOUR_TOKEN_HERE&dateFrom=2010-07-01T00:00:00.000Z&dateTo=2012-06-30T23:59:59.999Z
Return a list of all of the Devices Deployed Between July 1st 2010 and June 30th 2011, at a location with a Location Code of 'BACAX' ('Barkely Canyon Axis (POD1)')https://data.oceannetworks.ca/api/devices?method=get&token=YOUR_TOKEN_HERE&locationCode=BACAX&dateFrom=2010-07-01T00:00:00.000Z&dateTo=2011-06-30T23:59:59.999Z
Return a list of all of the Devices which have a Property Code of 'seawatertemperature',  at a location with a Location Code of 'BACAX' ('Barkely Canyon Axis (POD1)'), Deployed Between July 1st 2010 and June 30th 2011https://data.oceannetworks.ca/api/devices?method=get&token=YOUR_TOKEN_HERE&locationCode=BACAX&dateFrom=2010-07-01T00:00:00.000Z&dateTo=2011-06-30T23:59:59.999Z&propertyCode=seawatertemperature

The https://data.oceannetworks.ca/apiproxy/devices 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 devices endpoint from code, you must use the https://data.oceannetworks.ca/api/devices URL along with a valid token.

 


  • No labels