The API properties service returns all the properties defined in DMAS that meet a filter criteria.
Properties are observable phenomenon (aka, variables) and are the common names given to sensor types (ie, oxygen, pressure, temperature, etc)
The primary purpose of the properties service, is to find the available properties of the data you are interested in and use the propertyCode when requesting a data product using the dataProductDelivery web service.
For a list of available property codes, along with names, descriptions and units of measure, see the Available Properties page.
See the External Web Services for method, token, and responseType usage and error messages.
http://dmas.uvic.ca/api/properties |
Method | Description | Example |
---|---|---|
get | Retrieve a list Property codes and descriptions |
|
The get method retrieves a list of property codes and descriptions
Parameter | Type | Description | Example |
---|---|---|---|
Required | |||
token | string | All 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 | |||
propertyCode | string | Return a single Property matching a specific Property Code
| propertyCode=beamposition |
propertyName | string | Return all of the Properties where the Property Name contains a keyword
| propertyName=Temp |
description | string | Return all of the Properties where the Description contains a keyword
| description=water |
locationCode | string | Return all of the Properties that are available at a specific Location
| locationCode=BACAX |
deviceCategoryCode | string | Return all of the Properties that have devices belonging to a specific Device Category
| deviceCategoryCode=CTD |
deviceCode | string | Return all of the Properties available on a specific Device.
| deviceCode=AandOpt0581 |
Example for request: http://dmas.uvic.ca/api/devices?method=get&token=[YOUR_TOKEN_HERE]&propertyCode=seawatertemperature
Returns a list of properties with values for Property Code, Property Name, Description and Units of Measure (UOM), ordered by Property Code
[ { "description" : "Time: Gregorian days since 19700101T000000Z" , "propertyCode" : "gregoriantime" , "propertyName" : "Gregorian Time" , "uom" : "Gregorian days since 19700101T000000Z" }, { "description" : "Magnetic Heading" , "propertyCode" : "magneticheading" , "propertyName" : "Magnetic Heading" , "uom" : "deg" }, { "description" : "Pitch" , "propertyCode" : "pitch" , "propertyName" : "Pitch" , "uom" : "deg" }, { "description" : "Pressure" , "propertyCode" : "pressure" , "propertyName" : "Pressure" , "uom" : "decibar" }, { "description" : "Roll" , "propertyCode" : "roll" , "propertyName" : "Roll" , "uom" : "deg" },{ "description" : "Temperature: sea water" , "propertyCode" : "seawatertemperature" , "propertyName" : "Sea Water Temperature" , "uom" : "C" },{ "description" : "Sound Speed: sound velocity sensor" , "propertyCode" : "soundspeed" , "propertyName" : "Sound Speed" , "uom" : "m/s" },{ "description" : "Voltage: voltage sensor" , "propertyCode" : "voltage" , "propertyName" : "Voltage" , "uom" : "V" }] |
Property | Type | Description | Example |
---|---|---|---|
description | string | Returns a description of the property | "description":"Pressure" |
propertyCode | string | Returns the property code | "propertyCode":"pressure" |
propertyName | string | Returns the property name. | "propertyName":"Pressure" |
uom | string | Returns the Unit Of Measure that the property measurements are in | "uom":"decibar" |
errorCode | errorMessage | Description |
---|---|---|
127 | Invalid parameter value | Occurs when an invalid code is used in the filter. Most filters require an exact match, otherwise this error will occur.
|
129 | Invalid parameter name | Occurs when a filter parameter is used, but is not supported. |
http://dmas.uvic.ca/api/properties?method=get&token=[YOUR_TOKEN_HERE]
http://dmas.uvic.ca/api/properties?method=get&token=[YOUR_TOKEN_HERE]&propertyName=pressure
http://dmas.uvic.ca/api/properties?method=get&token=[YOUR_TOKEN_HERE]&locationCode=BACAX
http://dmas.uvic.ca/api/properties?method=get&token=[YOUR_TOKEN_HERE]&deviceCode=NORTEKAQDPRO8398
http://dmas.uvic.ca/api/properties?method=get&token=[YOUR_TOKEN_HERE]&deviceCategoryCode=ADCP2MHZ
*NOTE: The http://dmas.uvic.ca/apiproxy/properties 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 properties endpoint from code, you must use the http://dmas.uvic.ca/api/properties 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.