Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: remove link to "External Web Services", scrub token, change cross-links to external wiki

...

The API devices returns all the devices defined in DMAS Oceans 2.0 that meet a set of filter criteria.

...

The primary purpose of the devices service is to find devices that have the data you are interested in and use the deviceCode when requesting a data product using the dataProductDelivery web service.

See the External Web Services for method, token, and responseType usage and error messages.


URL

https://data.oceannetworks.ca/api/devices

...

Parameter

Type

Description

Example

Required   
tokenstringAll Web Services require a token. This can be generated at https://data.oceannetworks.ca/Profile. Click on the "Web Services" tab and click "Generate Token"token=5ba514e8-1203-428c-8835-879c8173e387YOUR_TOKEN_HERE
Optional   
deviceCodestring

Return a single Device matching a specific Device Code

  • Device Code must be valid and match exactly, including case
  • Specific Device Codes can be found by simply running the service without this parameter to get a list of all devices
deviceCode=FSINXIC1622
deviceIdinteger

Return a single Device matching a specific Device ID

  • Device ID must be valid
  • Specific Device IDs can be found by simply running the service without this parameter to get a list of all devices
deviceId= 10301
deviceCategoryCodestring

Return all Devices belonging to a specific Device Category Code

  • Device Category Code must be valid and match exactly, including case
  • Specific Device Category Codes can be obtained using the deviceCategories service
deviceCategoryCode=CTD
propertyCodestring

Return all Devices that have a sensor for a specific Property Code

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

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

  • Not case sensitive
  • Contains
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
dataProductCodestring

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

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

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

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

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

dateTodatetime

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

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

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

...

Response

Example for request: https://data.oceannetworks.ca/api/devices?method=get&token=9aa154c9-06dc-40f2-8989-70c85a90bb53YOUR_TOKEN_HERE&locationCode=BACAX&dateFrom=2010-07-01T00:00:00.000Z&dateTo=2011-06-30T23:59:59.999Z

Success (HTTP 200)

Returns a list of devices with values for Device Code, Device Id, Device Name and Device Link URL, ordered by Device Code

...

  • Return a list of All of the Devices (no filters)

https://data.oceannetworks.ca/api/devices?method=get&token=9aa154c9-06dc-40f2-8989-70c85a90bb53YOUR_TOKEN_HERE

 

  • Return the Device with a Device Code of 'NORTEKADCP9917'

https://data.oceannetworks.ca/api/devices?method=get&token=9aa154c9-06dc-40f2-8989-70c85a90bb53YOUR_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=9aa154c9-06dc-40f2-8989-70c85a90bb53YOUR_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=9aa154c9-06dc-40f2-8989-70c85a90bb53YOUR_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=9aa154c9-06dc-40f2-8989-70c85a90bb53YOUR_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=9aa154c9-06dc-40f2-8989-70c85a90bb53YOUR_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=9aa154c9-06dc-40f2-8989-70c85a90bb53YOUR_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=9aa154c9-06dc-40f2-8989-70c85a90bb53YOUR_TOKEN_HERE&dataProductCode=IBPP

 

  • Return a list of all of the Devices that were Deployed Between July 1st 2010 and June 30th 2012

https://data.oceannetworks.ca/api/devices?method=get&token=9aa154c9-06dc-40f2-8989-70c85a90bb53YOUR_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=9aa154c9-06dc-40f2-8989-70c85a90bb53YOUR_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 2011

https://data.oceannetworks.ca/api/devices?method=get&token=9aa154c9-06dc-40f2-8989-70c85a90bb53YOUR_TOKEN_HERE&locationCode=BACAX&dateFrom=2010-07-01T00:00:00.000Z&dateTo=2011-06-30T23:59:59.999Z&propertyCode=seawatertemperature

 


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

...