Versions Compared

Key

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

Table of Contents

Description

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

Devices are instruments that have with one or more sensors that observe a property or phenomenon with a goal of producing an estimate of the value of a property. Properties Devices are uniquely identified by a device code and can be deployed at multiple locations during their lifespan.

The primary purpose of the devices this service , is to find devices that have the data you are interested in and use the deviceCode when requesting want to access; the service provides the deviceCode that can be used to request a data product using via the dataProductDelivery web service.

...

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

URL

No Format
http://data.oceannetworks.ca/api/devices

...

Parameter
Type
Description
Example
Required   
tokenstringAll Web Services require a token. This can be . Once logged in at http://data.oceannetworks.ca/login, your token can be retrieved or generated at http://dmasdata.uvicoceannetworks.ca/Profile . Click on the "Web Services" tab and , 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
  • Specific Device Codes can be found by simply running 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 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
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

  • Requires deploymentEndWhen 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

  • Requires deploymentBeginWhen 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

...

Property
Type
Description
Example
deviceCodestringReturns the device code
"deviceCode":"BC_POD1_AD2M"
deviceIdintegerReturns the device id
"deviceId":11302
deviceNamestringReturns the device name "deviceName":"Nortek Aquadopp HR-Profiler 2965"
deviceLinkurlReturns the a URL link to the Device Listing page for the specific device"deviceLink":"http://dmasdata.uvicoceannetworks.ca/DeviceListing?DeviceId=11302"
dataRatinglist

Returns a list of data ratings and date from for each device

Each data rating is made up of:

  1. Key : "samplePeriod", Value : sample period in seconds
  2. Key : "dateFrom", Value : "dateFrom of sample period"
"dataRating" : [
  {
    "samplePeriod" 1.0,
    "dateFrom" "2013-08-01 00:00:00"
  }
]
cvTermlist

The list of controlled vocabulary terms associated with the device and any device groups the device belongs to.

Each vocabulary term is made up of:

  1. Key : "vocabulary" Value : "title of the vocabulary term belongs to"
  2. Key : "uri" Value : "URL of the vocabulary term"
"cvTerm": [
    {
      "device": [
        {
          "vocabulary""SeaVoX Device Catalogue",
        }
      ]
    }
]

...

errorCode
errorMessage
Description
23

Invalid Time Range, Start Time is greater

that

than End Time or start time is not provided

Occurs when the deploymentEnd is before the deploymentBegin date/time.

  • The name of both of the datetime filters will be is included in the "parameter" property
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 will be is included in the "parameter" property
128Missing parameter

Occurs when multiple parameters are needed, but not all are present. Occurs when deploymentBegin is used without deploymentEnd

  • The names of the required filter parameters will be is included in the "parameter" property separated by /
129Invalid parameter name

Occurs when a filter parameter is used, but is not supported.

 

 URL Examples

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

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

...

http://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'

http://data.oceannetworks.ca/api/devices?method=get&token=[YOUR_TOKEN_HERE]&deviceName=JASCO

 

  • Return a list of all of the devices Devices that have been deployed at a location with Location Code of  'BACAX' ('Barkely Canyon Axis (POD1)')

http://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'

http://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'

http://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'

http://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')

...

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

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

...

  • Return a list of all of the Devices Deployed Between July 1st  1 July 2010 and 30 June 30th 2011, at a location with a Location Code of 'BACAX' ('Barkely Canyon Axis (POD1)')

...

  • Return a list of all of the Devices which have a Property Code of 'seawatertemperature',  at a location with Location Code of  'BACAX' ('Barkely Canyon Axis (POD1)'), Deployed Between July 1st  1 July 2010 and 30 June 30th 2011

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

*NOTE: The http://data.oceannetworks.ca/apiproxy/devices 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 devices endpoint from code, you must use the http://data.oceannetworks.ca/api/devices 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.

...