Description
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 and token usage and error messages.
URL
http://data.oceannetworks.ca/api/properties
Method | Description | Example |
---|---|---|
get | Retrieve a list Property codes and descriptions |
|
get
The get method retrieves a list of property codes and descriptions
Parameters
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 |
Response
Example for request: http://data.oceannetworks.ca/api/devices?method=get&token=[YOUR_TOKEN_HERE]&propertyCode=seawatertemperature
Success (HTTP 200)
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" |
Bad Request (HTTP 400)
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. |
URL Examples
- Return a list of All of the Properties (no filters)
http://data.oceannetworks.ca/api/properties?method=get&token=[YOUR_TOKEN_HERE]
- Return the Property with a Property Code of 'seawatertemperature'
- Return a list of all of the Properties that have a Name which contains 'pressure'
http://data.oceannetworks.ca/api/properties?method=get&token=[YOUR_TOKEN_HERE]&propertyName=pressure
- Return a list of all of the Properties that are available at a location with a Location Code of 'BACAX' ('Barkely Canyon Axis (POD1)')
http://data.oceannetworks.ca/api/properties?method=get&token=[YOUR_TOKEN_HERE]&locationCode=BACAX
- Return a list of all of the Properties that are available for a device with a Device Code of 'NORTEKAQDPRO8398'
- Return a list of all of the Properties that are available for instruments with a Device Category of '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://data.oceannetworks.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.
Code Examples
How-to article
Provide step-by-step guidance for completing a task.