You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Description

The API deviceCategories service returns all the device categories defined in DMAS that meet a filter criteria.

A Device Category represents an instrument type classification such as CTD - Conductivity Temperature (and Depth Sensor) or BPR - Bottom Pressure Recorder. Devices from a category can record data for one or more properties (variables). 

The primary purpose of the deviceCategories service, is to find device category of the data you are interested in and use the deviceCategoryCode 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

http://dmas.uvic.ca/api/devicecategories
Method
Description
Example
getGet a list of files for a given station, and filtered by others optional parameters.method=get

 get

Get a list of device categories DMAS. 

Parameters

ParameterTypeDescriptionExample
Required
tokenstringAll Web Services require a token. This can be generated at http://dmas.uvic.ca/Profile. Click on the "Web Services" tab and click "Generate Token"token=5ba514e8-1203-428c-8835-879c8173e387
Optional
deviceCategoryCodestring

Return a single Device Category matching a specific Device Category Code

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

Return all of the Device Categories where the Device Category Name contains a keyword

  • Not case sensitive
  • Contains
deviceCategoryName=3D
descriptionstring

Return all of the Device Categories where the Description contains a keyword

  • Not case sensitive
  • Contains
description=Camera
locationCodestring

Return all Device Categories that are represented 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
propertyCodestring

Return all Device Categories that a device with a specific Property is a member of

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

Response

Example for request: http://dmas.uvic.ca/api/deviceCategories?method=get&token=[YOUR_TOKEN_HERE]&propertyCode=salinity

Success (HTTP 200)

Returns a list of device categories with values for Device Category Code, Device Category Name, Description and Long Description, ordered by Device Category Code

 

[
 {
    "description":"Conductivity Temperature (and Depth Sensor)",
    "deviceCategoryCode":"CTD",
    "deviceCategoryName":"CTD",
    "longDescription":" Conductivity Temperature Depth (CTD) is an abbreviated name for an instrument package that contains sensors for measuring the conductivity, temperature, and pressure of seawater. Salinity, sound velocity, and density are variables derived from sensor measurements. CTDs can carry additional instruments and sensors such as oxygen sensors, turbidity sensors and fluorometers. "
 },
 {
    "description":"Current Meter",
    "deviceCategoryCode":"CURRENTMETER",
    "deviceCategoryName":"Current Meter",
    "longDescription":" Acoustic Current Meters (ACM) use the Doppler Effect to measure current velocities in the ocean environment. The instrument transmits a short pulse of sound, and then listens to its echo to measure the change in pitch or frequency. The change in pitch can determine the velocity of the current.  Current metres are installed at many locations on Ocean Networks Canada observatories. Several current metres are installed on the Regional Circulation Moorings (RCM) at Endeavour. The instruments are spaced at various depths on the RCM moorings, and are used to study currents within the axial rift valley of Endeavour Ridge. Aquadopp current metres have a sensor head that contains 3 acoustic transducers, a tilt sensor, a temperature sensor and a pressure sensor."
 },
 {
    "description":"Thermosalinograph",
    "deviceCategoryCode":"TSG",
    "deviceCategoryName":"Thermosalinograph",
    "longDescription":" Thermosalinographs collect data about the sea surface via flow-through systems that move over water on a vessel. Often, they are mounted near the front of the vessel in order to minimize contamination. Primary variables measured are temperature and conductivity, and other variables like salinity and density are derived."
 },
 {
    "description":"Water Quality Monitor",
    "deviceCategoryCode":"WETLABS_WQM",
    "deviceCategoryName":"Water Quality Monitor",
    "longDescription":" Water Quality Monitors (WQM) have sensors to measure temperature, salinity, depth, dissolved oxygen, chlorophyll fluorescence, turbidity and backscattering data. The WQM incorporate technologies from two manufacturers, WET Labs and Sea-Bird. To reduce fouling and growth of marine organisms, WQM also have features such as a Bleach Injection System (BLIS), bio-wipers, and passive inhibitors that allow extended deployments up to one year. WQMs provide comprehensive data used to track subtle changes in coastal and inshore marine systems. WQM have been installed in local settings such as Mill Bay, as well as the frigid Arctic waters of Cambridge Bay."
 }
]
Property
Type
Description
Examples
deviceCategoryCode
string
The unique code for the device category.
"deviceCategoryCode":"ICE_BUOY"
deviceCategoryName
string
The name of the device category.
"deviceCategoryName":"Ice Buoy"
description
string
The short description of the device category.
"description":"Ice Buoy"
longDescription
string
The long description of the device category.
"longDescription":" Ice buoys are used in Arctic and Antarctic regions to track ice movement and collect environmental data. 
Ice buoys can be geographically located with the Argos system or other satellite navigation receivers (e.g. GPS)."

 

Bad Request (HTTP 400)

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 will be included in the "parameter" property
129Invalid parameter name

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

 

 Examples

  • Return a list of All of the Device Categories (no filters)

http://dmas.uvic.ca/api/deviceCategories?method=get&token=[YOUR_TOKEN_HERE]

 

  • Return the Device Category with the Code of 'ADCP1MHZ'

http://dmas.uvic.ca/api/deviceCategories?method=get&token=[YOUR_TOKEN_HERE]&deviceCategoryCode=ADCP1MHZ

 

  • Return a list of all of the Device Categories that have a Name which contains 'adcp'

http://dmas.uvic.ca/api/deviceCategories?method=get&token=[YOUR_TOKEN_HERE]&deviceCategoryName=adcp

 

  • Return a list of all of the Device Categories that have a Description which contains 'doppler'

http://dmas.uvic.ca/api/deviceCategories?method=get&token=[YOUR_TOKEN_HERE]&description=doppler

 

  • Return a list of all of the Device Categories that are available at a location with a Location Code of 'BACAX' ('Barkely Canyon Axis (POD1)')

http://dmas.uvic.ca/api/deviceCategories?method=get&token=[YOUR_TOKEN_HERE]&locationCode=BACAX

 

  • Return a list of all of the Device Categories which has devices with a specific Property Code of 'salinity'

http://dmas.uvic.ca/api/deviceCategories?method=get&token=[YOUR_TOKEN_HERE]&propertyCode=salinity

 

*NOTE: The http://dmas.uvic.ca/apiproxy/deviceCategories 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 deviceCategories endpoint from code, you must use the http://dmas.uvic.ca/api/deviceCateogies 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.

  • No labels