Description
The station service allows users to retrieve station information across all of the networks.
URL
Method |
Description |
Example |
---|---|---|
Get a hierarchical tree structure of stations, station codes, and their device categories. |
method=getTree |
getTree
Get a hierarchical tree structure of stations, station codes, and their device categories across all networks.
Parameters
Parameter |
Value |
Description |
Example |
---|---|---|---|
Required |
|||
There are no required parameters. |
|||
Optional |
|||
showHidden |
boolean |
Indicates if device category codes from devices that are currently not neptunesearchable (or searchable in the case of VENUS) should be returned. Defaults to false. |
showHidden=true |
Response
Success
[ { "deviceCategories": [], "els": [ { "description": "<div>Way up North</div>", // description property removed when description value is null "deviceCategories": [], "els": [ { "description": "<div>Instrumentation located at the end of a dock.</div>", "deviceCategories": [ "CTD", "ICEPROFILER", "METSTN" ], "els": [], "id": 88, "name": "Dock", "siteDeviceIds": [ 119202, 119199, 119200 ], "stationCode": "CBDCK", "type": 10 } ], "id": 84, "name": "Cambridge Bay", "siteDeviceIds": [], "stationCode": "CB", "type": 10 } ], "id": 82, "name": "Arctic Observatory by Location", "siteDeviceIds": [], "stationCode": "KRSTA", "type": 10 } ]
Property |
Type |
Description |
Example |
||
---|---|---|---|---|---|
description |
string |
A description of the station |
Cambridge Bay, Victoria Island, NU |
||
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="b8a985e1-0339-4be0-8205-5d5466e1789e"><ac:plain-text-body><![CDATA[ |
deviceCategories |
array |
An array of decive category code strings |
["CTD","ICEPROFILER","METSTN"] |
]]></ac:plain-text-body></ac:structured-macro> |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="574e9d18-9311-4809-a337-6c76bb9bca9d"><ac:plain-text-body><![CDATA[ |
els |
array |
Array of child nodes |
[JSONObject] |
]]></ac:plain-text-body></ac:structured-macro> |
id |
integer |
The resource ID of the node. |
123456 |
||
name |
string |
The name of the station. |
"Cambridge Bay" |
||
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="0713c9c6-3c2e-431d-bdb5-295316dc37b9"><ac:plain-text-body><![CDATA[ |
siteDeviceIds |
array |
An array of integers |
[119202,119199,119200] |
]]></ac:plain-text-body></ac:structured-macro> |
stationCode |
string |
The unique code for the station |
"CB" |
||
type |
integer |
The resource type of the node. All nodes in this structure are of type 10. |
10 |
Failure
See Extermal Web Services Standards
Example
Show all stations, with searchable devices
http://dmas.uvic.ca/api/stations?method=getTree&token=SAMPLETOKEN123456789
Show all stations, including devices flagged 'not searchable':
http://dmas.uvic.ca/api/stations?method=getTree&showHidden=true&token=SAMPLETOKEN123456789