<script src="https://wiki.oceannetworks.ca/download/attachments/75170291/docs-client-libraries.js"></script> |
Discovery methods can be used to search for available locations, deployments, device categories, devices, properties, and data products. They support numerous filters and might resemble an "advanced search" function for ONC data sources.
Use discovery methods to:
- Obtain the identification codes required to use other API services
- Explore what's available in a certain location or device
- Obtain the deployment dates for a device
- List available data products for download in a particular device or location
Note that from the ONC API perspective: - Locations can contain other locations (i.e. "Cambridge bay" may contain separate children locations for its underwater network and shore station)
- Locations can contain device categories, which contain devices, which contain properties
- You can also perform searches without considering the hierarchy mentioned above (i.e. search for locations with data on a specific property or search for all properties in a specific location)
|
Summary
Method | Description |
---|
getLocations (filters)
| Returns a filtered list of locations | link |
getLocationHierarchy (filters)
| Returns a filtered tree of locations with their children | link |
getDeployments (filters)
| Returns a filtered list of deployments | link |
getDeviceCategories (filters)
| Returns a filtered list of device categories | link |
getDevices (filters)
| Returns a filtered list of devices | link |
getProperties (filters)
| Returns a filtered list of properties | link |
getDataProducts (filters)
| Returns a filtered list of data products | link |
getLocations
Returns a list of locations that meet the filters provided.
Visit Locations Discovery Service for more information on filter usage.
Parameter | Type | Description | Example |
---|
filters | | A group of filters that configure the locations' search request. Supported filters: When excluded, the method will return all locations available. |
{'locationCode':'BACAX'} | struct('locationCode','BACAX') | list('locationCode' = 'BACAX') |
|
Example: Print locations in North East Pacific with Hydrophones |
from onc.onc import ONC onc = ONC('YOUR_TOKEN_HERE')
filters = { 'locationCode': 'NEP', 'deviceCategoryCode': 'HYDROPHONE', 'includeChildren': 'true' # Include child locations } result = onc.getLocations(filters) onc.print(result) |
|
Returns |
A list of locations represented as dictionaries, as in the following example: [
{
"locationCode": "BACAX",
"locationName": "Axis",
"deployments": 50,
"depth": 984.3076,
"bbox": {
"maxDepth": 987,
"maxLat": 48.316837,
"maxLon": -126.050125,
"minDepth": 981,
"minLat": 48.316517,
"minLon": -126.05087
},
"description": "Canyon axis: benthic processes, biodiversity(...).",
"hasDeviceData": True,
"lon": -126.05033,
"hasPropertyData": True,
"lat": 48.31669,
"dataSearchURL": "https://data.oceannetworks.ca/DataSearch?location=BACAX"
}
] |
| A vector of locations represented as structs, as in the following example: [
struct(
locationCode: 'BACAX'
locationName: 'Axis '
deployments: 3
depth: 981.933
bbox: struct(
maxDepth: 982.4
maxLat: 48.3168
maxLon: -126.05
minDepth: 981
minLat: 48.3166
minLon: -126.05
)
description: 'Canyon axis: benthic processes, biodiversity(...).'
hasDeviceData: true
lon: -126.05
hasPropertyData: false
lat: 48.3167
dataSearchURL: 'http://data.oceannetworks.ca/DataSearch?location=BACAX'
),
(...)
] |
| A list of locations represented as named lists, as in the following example: [
[
locationCode: "BACAX",
locationName: "Axis ",
deployments: 3,
depth: 981.933333,
bbox: [
maxDepth: 982.4,
maxLat: 48.316758,
maxLon: -126.050142,
minDepth: 981,
minLat: 48.31664,
minLon: -126.050292
],
description: "Canyon axis: benthic processes, biodiversity, sediment(...)",
hasDeviceData: TRUE,
lon: -126.050205,
hasPropertyData: FALSE,
lat: 48.31671,
dataSearchURL: "http://data.oceannetworks.ca/DataSearch?location=BACAX"
],
(...)
] |
|
|
Each location in the returned list has the following structure: Property | Type | Description | Example |
---|
locationCode | string | A code that uniquely identifies a location. | "BACAX"
| locationName | string | The full name of the location. | "Axis (POD 1)"
| description | string | The description of the location. | "Canyon axis: benthic processes, biodiversity(...)"
| deployments | integer | The number of instrument deployments that meet the filter criteria. | 10 | lat | double | The average latitude of the deployments. | 48.47672 | lon | double | The average longitude of the deployments. | - 123.294902 | depth | double | The average depth of the deployments. | 75
| bbox | ^dictionary | A structure that describes the bounding box (see below) |
| hasDeviceData | boolean | Indicates that data products can be requested using a device category for the location. | True
| hasPropertyData | boolean | Indicates that data products can be requested using property code for the location. | True
| dataSearchUrl | string | The location-specific Data Search web page URL. | "https://data.oceannetworks.ca/DataSearch?(...)"
|
The property "bbox " holds the bounding box information and contains the properties: Property | Type | Description | Example |
---|
maxDepth | double | The maximum depth of the deployments | 100 | maxLat | double | The maximum Latitude of the bounding box of the deployments | 48.476740 | maxLon | double | The maximum Longitude of the bounding box of the deployments | - 123.294904 | minDepth | double | The minimum Depth of the deployments | 50 | minLat | double | The minimum Latitude of the bounding box of the deployments | 48.47670 | minLon | double | The minimum Longitude of the bounding box of the deployments | - 123.294900 |
|
getLocationHierarchy
Returns a hierarchical tree of locations where the root location matches to the provided "locationCode
" filter.
Visit the locations service's getTree method documentation for more information on filter usage.
Parameter | Type | Description | Example |
---|
filters | ^dictionary | A set of filters that includes locationCode. If excluded, a tree of all available locations is returned. |
{'locationCode':'BACAX'} | struct('locationCode','BACAX') | list('locationCode' = 'BACAX') |
|
Example - Print children of location with code STR01 |
from onc.onc import ONC onc = ONC('YOUR_TOKEN_HERE')
filters = { 'locationCode': 'STR01' } result = onc.getLocationHierarchy(filters)
onc.print(result) |
|
Returns |
A list of locations as dictionaries, each including a "children" property with a list of locations, recursively repeated. [
{
"locationName": "Neutrino Project Mooring 01 (Yellow)",
"description": "TBD",
"hasDeviceData": true,
"locationCode": "STR01",
"hasPropertyData": false,
"children": [
{
"locationName": "POCAM 110 mab",
"children": null,
"description": "",
"hasDeviceData": true,
"locationCode": "STR01.PO1",
"hasPropertyData": false
},
{
"locationName": "POCAM 50 mab",
"children": null,
"description": "",
"hasDeviceData": true,
"locationCode": "STR01.PO2",
"hasPropertyData": false
}
]
}
] |
| A location structure (the root) that includes a "children" property with a vector of locations, recursively repeated. struct(
locationCode: 'STR01'
locationName: 'Neutrino Project Mooring 01 (Yellow)'
description: 'TBD'
hasDeviceData: true
hasPropertyData: false
children: [
struct(
locationCode: 'STR01.PO1'
locationName: 'POCAM 110 mab'
children: []
description: ''
hasDeviceData: true
hasPropertyData: false
),
struct(
locationCode: 'STR01.PO2'
locationName: 'POCAM 50 mab'
children: []
description: ''
hasDeviceData: true
hasPropertyData: false
),
(...)
]
) |
| A list of locations as named lists, each including a "children" element with a list of locations, recursively repeated. [
[
locationCode: "STR01",
locationName: "Neutrino Project Mooring 01 (Yellow)",
children: [
[
locationCode: "STR01.PO1",
locationName: "POCAM 110 mab",
children: NULL,
description: "",
hasDeviceData: TRUE,
hasPropertyData: FALSE
],
[
locationCode: "STR01.PO2",
locationName: "POCAM 50 mab",
children: NULL,
description: "",
hasDeviceData: TRUE,
hasPropertyData: FALSE
],
(...)
],
description: "TBD",
hasDeviceData: TRUE,
hasPropertyData: FALSE
]
] |
|
|
Each location returned is a ^dictionary with the following properties: Property | Type | Description | Example |
---|
locationCode | string | A code that uniquely identifies a location. | "BACAX"
| locationName | string | The full name of the location. | "Axis (POD 1)"
| description | string | The description of the location. | "Canyon axis: benthic processes, biodiversity, sediment dynamics."
| hasDeviceData | boolean | Indicates that data products can be requested using a device category for the location. | True
| hasPropertyData | boolean | Indicates that data products can be requested using property code for the location. | True
| children | ^list | A set of locations contained in this location. If this location doesn't have any children, this property will be ^null | empty | NULL. |
|
|
getDeployments
Returns a list of device deployments that meet the filters provided.
Visit Deployments Discovery Service for more information on filter usage.
Parameter | Type | Description | Example |
---|
filters | ^dictionary | A group of filters that configure the device deployments' search request. Supported filters: When excluded, the method will return all device deployments. |
{'deviceCode':'NORTEKADCP9917'} | struct('deviceCode', 'NORTEKADCP9917') | list('deviceCode' = 'NORTEKADCP9917') |
|
Example - Get all deployments for a device |
from onc.onc import ONC
onc = ONC('YOUR_TOKEN_HERE')
filters = {
'deviceCode': 'NORTEKADCP9917'
}
result = onc.getDeployments(filters)
onc.print(result) |
|
onc = Onc(YOUR_TOKEN_HERE);
filters = {
'deviceCode', 'NORTEKADCP9917'
};
result = onc.getDeployments(filters);
onc.print(result); |
|
library(onc)
onc <- Onc(YOUR_TOKEN_HERE)
filters <- list(
'deviceCode' = 'NORTEKADCP9917'
)
result <- onc$getDeployments(filters)
onc$print(result) |
|
|
Returns |
A list of device deployments represented as dictionaries, as in the following example: [
{
"deviceCode": "NORTEKADCP9917",
"locationCode": "BACWL",
"begin": "2012-05-31T20:46:05.000Z",
"end": "2014-05-10T01:40:00.000Z",
"hasDeviceData": true,
"lat": 48.311743,
"lon": -126.065378,
"depth": 860.0,
"heading": null,
"pitch": null,
"roll": null
}
]
|
| A vector of device deployments represented as structs, as in the following example: [
struct(
deviceCode: 'NORTEKADCP9917'
locationCode: 'BACWL'
begin: '2012-05-31T20:46:05.000Z'
end: '2014-05-10T01:40:00.000Z'
hasDeviceData: true
depth: 860
lat: 48.3117
lon: -126.065
heading: []
pitch: []
roll: []
),
(...)
] |
| A list of device deployments represented as named lists, as in the following example: [
[
deviceCode: "NORTEKADCP9917",
locationCode: "BACWL",
begin: "2012-05-31T20:46:05.000Z",
end: "2014-05-10T01:40:00.000Z",
hasDeviceData: FALSE,
depth: 860,
lat: 48.311743,
lon: -126.065378,
heading: NULL,
pitch: NULL,
roll: NULL
],
(...)
] |
|
|
Each deployment in the returned list is a ^dictionary with the following properties: Property | Type | Description | Example |
---|
locationCode | string | The locationCode for the deployment location. | "BACAX"
| deviceCode | string | The deviceCode for the deployed device. | "SBECTD19p6813"
| begin | string | The beginning datetime string of the deployment (UTC). | "2010-07-27T00:00:00.000Z"
| end | string | The ending datetime string of the deployment (UTC). If this deployment is still active, the end value is null. | "2016-08-01T00:00:00.000Z"
| hasDeviceData | boolean | Indicates that data products can be requested using a device category code for the deployment. | True
| depth | double | The depth of the device deployment. | 982
| lat | double | The latitude of the device deployment. | 48.31658
| lon | double | The longitude of the device deployment. | - 126.0508
| heading | double | The heading of the device deployment. | 244
| pitch | double | The pitch of the device deployment (if available). | null
| roll | double | The roll of the device deployment (if available). | null
|
|
getDeviceCategories
Returns a list of device categories that meet the filters provided.
Visit DeviceCategories Discovery Service for more information on filter usage.
Parameter | Type | Description | Example |
---|
filters | ^dictionary | A group of filters that configure the device categories' search request. Supported filters: When excluded, the method will return all device categories available. |
{'locationCode':'BACAX'} | struct('locationCode','BACAX') | list('locationCode' = 'BACAX') |
|
Example - Get device categories available in a location |
from onc.onc import ONC
onc = ONC('YOUR_TOKEN_HERE')
filters = { 'locationCode': 'NCBC' }
result = onc.getDeviceCategories(filters)
onc.print(result) |
|
onc = Onc(YOUR_TOKEN_HERE);
filters = { 'locationCode', 'NCBC' };
result = onc.getDeviceCategories(filters);
onc.print(result); |
|
library(onc)
onc <- Onc(YOUR_TOKEN_HERE)
filters <- list('locationCode' = 'NCBC')
result <- onc$getDeviceCategories(filters)
onc$print(result) |
|
|
Returns |
A list of device categories represented as dictionaries, with their detailed information. [
{
"deviceCategoryCode": "CTD",
"deviceCategoryName": "CTD",
"description": "Conductivity Temperature (and Depth Sensor)",
"longDescription": " Conductivity Temperature Depth (CTD) is (...)",
"hasDeviceData": "true",
"cvTerm": {
"deviceCategory": [
{
"uri": "http://vocab.nerc.ac.uk/collection/L05/current/130/",
"vocabulary": "SeaDataNet device categories"
}
]
}
}
] |
| A vector of device categories represented as structs, with their detailed information. [
struct(
deviceCategoryCode: 'ADCP75KHZ'
deviceCategoryName: 'Acoustic Doppler Current Profiler 75 kHz'
description: '75 kHz Acoustic Doppler Current Profiler'
longDescription: 'Acoustic Doppler Current Profilers (ADCP) are (...)
hasDeviceData: true
cvTerm: struct(
deviceCategory: struct(
uri: 'http://vocab.nerc.ac.uk/collection/L05/current/115/'
vocabulary: 'SeaDataNet device categories'
)
)
),
(...)
] |
| A list of device categories represented as named lists, with their detailed information. [
[
deviceCategoryCode: "ADCP75KHZ",
deviceCategoryName: "Acoustic Doppler Current Profiler 75 kHz",
description: "75 kHz Acoustic Doppler Current Profiler",
longDescription: "Acoustic Doppler Current Profilers (ADCP) are (...)",
hasDeviceData: TRUE,
cvTerm: [
deviceCategory: [
[
uri: "http://vocab.nerc.ac.uk/collection/L05/current/115/",
vocabulary: "SeaDataNet device categories"
]
]
]
],
(...)
] |
|
|
Each device category in the returned list has the following structure: Key | Type | Description | Example |
---|
deviceCategoryCode | string | A code to uniquely identify a device category. | "CTD"
| deviceCategoryName | string | The name of the device category. | "CTD"
| description | string | The short description of the device category. | "Conductivity Temperature (and Depth Sensor)"
| longDescription | string | The long description of the device category. | "A n instrument package that contains sensors (...)"
| hasDeviceData | boolean | Indicates that data products can be requested using the device category for a location. | True
| cvTerm | ^dictionary | A dictionary of controlled vocabulary terms (see below). |
|
The "cvTerm" element is a ^dictionary that describes the vocabulary term associated with this result and has the following structure: Key | Type | Description | Example |
---|
deviceCategory | ^list | A list of dictionaries of controlled vocabulary term information for the device category. |
| deviceCategory[].uri | string | The URI of the controlled vocabulary term, where the user can find more information. | "http://vocab.nerc.ac.uk/collection/L05/current/130/"
| deviceCategory[].vocabulary | string | The name of the controlled vocabulary to which the term belongs. | "SeaDataNet device categories"
|
|
getDevices
Returns a list of devices that meet the filters provided.
Visit Devices Discovery Service for more information on filter usage.
Parameter | Type | Description | Example |
---|
filters | ^dictionary | A group of filters that configure the devices' search request. Supported filters: When excluded, all devices are returned. |
{'deviceCode':'NORTEKADCP9917'} | struct('deviceCode','NORTEKADCP9917') | list('deviceCode' = 'NORTEKADCP9917') |
|
Example - Get all devices deployed at a location in a time range |
from onc.onc import ONC
onc = ONC('YOUR_TOKEN_HERE')
filters = {
'locationCode': 'BACAX',
'dateFrom': '2016-06-01T00:00:00.000Z',
'dateTo': '2017-05-31T23:59:59.999Z'
}
result = onc.getDevices(filters)
onc.print(result)
|
|
onc = Onc(YOUR_TOKEN_HERE);
filters = {
'locationCode', 'BACAX',
'dateFrom', '2016-06-01T00:00:00.000Z',
'dateTo', '2017-05-31T23:59:59.999Z'
};
result = onc.getDevices(filters);
onc.print(result);
|
|
library(onc)
onc <- Onc(YOUR_TOKEN_HERE)
filters <- list(
'locationCode' = 'BACAX',
'dateFrom' = '2016-06-01T00:00:00.000Z',
'dateTo' = '2017-05-31T23:59:59.999Z'
)
result <- onc$getDevices(filters)
onc$print(result)
|
|
|
Returns |
A list of devices represented as dictionaries, with their detailed information. [
{
"deviceCode": "BC_POD1_AD2M",
"deviceId": 11302,
"deviceName": "Nortek Aquadopp HR-Profiler 2965",
"deviceLink": "https://data.oceannetworks.ca/DeviceListing?DeviceId=11302",
"cvTerm": {
"device": [
{
"uri": "http://vocab.nerc.ac.uk/collection/L22/current/TOOL0888/",
"vocabulary": "SeaVoX Device Catalogue"
}
]
},
"dataRating": [
{
"dateFrom": "2008-11-01T00:00:00.000Z",
"dateTo": "2010-05-27T19:27:04.000Z",
"samplePeriod": 1,
"sampleSize": 1
},
(...)
]
}
] |
| A vector of devices represented as structs, with their detailed information. [
struct(
deviceCode: 'BC_POD1_AD2M'
deviceId: 11302
deviceName: 'Nortek Aquadopp HR-Profiler 2965'
deviceLink: 'http://data.oceannetworks.ca/DeviceListing?DeviceId=11302'
hasDeviceData: true
cvTerm: struct(
device: struct(
uri: 'http://vocab.nerc.ac.uk/collection/L22/current/TOOL0888/'
vocabulary: 'SeaVoX Device Catalogue'
)
)
dataRating: [
struct(
dateFrom: '2016-05-01T11:56:13.000Z'
dateTo: '2016-08-04T21:14:34.000Z'
samplePeriod: 600
sampleSize: 1
),
(...)
]
),
(...)
] |
| A list of devices represented as named lists, with their detailed information. [
[
deviceCode: "BC_POD1_AD2M",
deviceId: 11302,
deviceName: "Nortek Aquadopp HR-Profiler 2965",
hasDeviceData: FALSE,
deviceLink: "http://data.oceannetworks.ca/DeviceListing?DeviceId=11302",
dataRating: [
[
dateFrom: "2010-05-27T19:27:04.000Z",
dateTo: NULL,
samplePeriod: 10,
sampleSize: 1
],
(...)
],
cvTerm: [
device: [
[
uri: "http://vocab.nerc.ac.uk/collection/L22/current/TOOL0888/",
vocabulary: "SeaVoX Device Catalogue"
]
]
]
],
(...)
] |
|
|
Each device returned is a ^dictionary with the following structure: Key | Type | Description | Example |
---|
deviceCode | string | A code that uniquely identifies a device. | "BC_POD1_AD2M"
| deviceId | int | A numeric id that uniquely identifies a device. | 11302
| deviceName | string | The name of the device. | "Nortek Aquadopp HR-Profiler 2965"
| deviceLink | string | The URL link to the Devices Listing page for the specific device. | "https://data.oceannetworks.ca/DeviceListing?DeviceId=11302"
| cvTerm | ^dictionary | A dictionary of controlled vocabulary terms (see below). |
| dataRating | ^list | A list of data rating dictionaries (see below). |
|
The "cvTerm " element is a ^dictionary that describes the vocabulary term associated with this result and has the following structure: Key | Type | Description | Example |
---|
device | ^list | A ^list of controlled vocabulary term information for the device, each represented as a ^dictionary. |
[ {
"uri": "http://vocab.nerc.ac.uk/collection/cur(...)", "vocabulary": "SeaVoX Device Catalogue" } ]
| [ struct(
"uri", "http://vocab.nerc.ac.uk/collection/cur(...)", "vocabulary": "SeaVoX Device Catalogue" ) ]
| [ [
"uri" = "http://vocab.nerc.ac.uk/collection/cur(...)", "vocabulary" = "SeaVoX Device Catalogue" ] ]
|
| device[].uri | string | The URI of the controlled vocabulary term. | "http://vocab.nerc.ac.uk/collection/L22/current/TOOL0888/"
| device[].vocabulary | string | The name of the controlled vocabulary to which the term belongs. | "SeaVoX Device Catalogue"
|
The "dataRating " element holds a ^list of dictionaries | vector of structs | list of named lists with the data ratings for this device, each with the following structure: Key | Type | Description | Example |
---|
dateFrom | string | The starting datetime (UTC) for a data rating. | "2008-11-01T00:00:00.000Z"
| dateTo | string | The ending datetime (UTC) for a data rating. | "2010-05-27T19:27:04.000Z"
| samplePeriod | double | The sample period, in seconds, for the data rating. | 1
| sampleSize | int | The size of the data sample for the data rating. | 1
|
|
getProperties
Returns a list of properties that meet the filters provided.
Visit Properties Discovery Service for more information on filter usage.
Parameter | Type | Description | Example |
---|
filters | ^dictionary | A group of filters that configure the properties' search request. Supported filters: When excluded, the method will return all properties available. |
{'propertyCode': 'seawatertemperature'} | struct('propertyCode', 'seawatertemperature'} | list('propertyCode' = 'seawatertemperature') |
|
Example - Get all properties available for a specific device |
from onc.onc import ONC
onc = ONC('YOUR_TOKEN_HERE')
filters = { 'deviceCode': 'BC_POD1_AD2M' }
result = onc.getProperties(filters)
onc.print(result)
|
|
onc = Onc(YOUR_TOKEN_HERE);
filters = { 'deviceCode', 'BC_POD1_AD2M' };
result = onc.getProperties(filters);
onc.print(result);
|
|
library(onc)
onc <- Onc(YOUR_TOKEN_HERE)
filters = list('deviceCode' = 'BC_POD1_AD2M');
result = onc$getProperties(filters);
onc$print(result)
|
|
|
Returns |
A list of properties represented as dictionaries, with their detailed information. [
{
"propertyCode": "soundspeed",
"propertyName": "Sound Speed",
"description": "Sound Speed: sound velocity sensor",
"uom": "m/s",
"hasDeviceData": true,
"hasPropertyData": false,
"cvTerm": {
"property": [],
"uom": [
{
"uri": "http://vocab.nerc.ac.uk/collection/P06/current/UVAA/",
"vocabulary": "BODC data storage units"
}
]
}
},
(...)
] |
| A vector of properties represented as structs, with their detailed information. [
struct(
propertyCode: 'magneticheading'
propertyName: 'Magnetic Heading'
description: 'Magnetic Heading'
uom: 'deg'
hasDeviceData: true
hasPropertyData: false
cvTerm: struct(
property: []
uom: struct(
uri: 'http://vocab.nerc.ac.uk/collection/P06/current/UAAA/'
vocabulary: 'BODC data storage units'
)
)
),
(...)
] |
| A list of properties represented as named lists, with their detailed information. [
[
propertyCode: "magneticheading",
propertyName: "Magnetic Heading",
description: "Magnetic Heading",
uom: "deg",
hasDeviceData: TRUE,
hasPropertyData: FALSE,
cvTerm: [
property: [],
uom: [
[
uri: "http://vocab.nerc.ac.uk/collection/P06/current/UAAA/",
vocabulary: "BODC data storage units"
]
]
]
],
(...)
] |
|
|
Each property in the returned list is a dictionary with the following keys: Key | Type | Description | Example |
---|
propertyCode | string | A code that uniquely identifies the property. | "pressure"
| propertyName | string | The name of the property. | "Pressure"
| description | string | The short description of the device category. | "Sound Speed: sound velocity sensor"
| uom | string | The Unit of Measure used for property measurements. | "decibar"
| hasDeviceData | boolean | Indicates that data products can be requested using the property code, along with a device category for a location. | True
| hasPropertyData | boolean | Indicates that data products can be requested using the property code for a location. | True
| cvTerm | ^dictionary | A dictionary of controlled vocabulary terms (see below). |
|
The "cvTerm " element is a (dictionary | struct | named list) that describes the vocabulary term associated with this result and has the following structure: Key | Type | Description | Example |
---|
property | ^list | A ^list of controlled vocabulary term information for the property, each represented as a ^dictionary. |
[ { "uri": "http://vocab.nerc.ac.uk/collection/(...)", "vocabulary": "SeaVoX Device Catalogue" } ]
| [ struct( "uri", "http://vocab.nerc.ac.uk/collection/(...)", "vocabulary", "SeaVoX Device Catalogue" ) ]
| [ [ "uri" = "http://vocab.nerc.ac.uk/collection/(...)", "vocabulary" = "SeaVoX Device Catalogue" ] ]
|
| property[].uri | string | The URI of the controlled vocabulary term. | "http://vocab.nerc.ac.uk/collection/L22/current/TOOL0888/"
| property[].vocabulary | string | The name of the controlled vocabulary to which the term belongs. | "SeaVoX Device Catalogue"
| uom | ^list | A ^list of dictionaries | vector of structs | list of named lists of controlled vocabulary term information for the unit of measure. |
[ { "uri": "http://vocab.nerc.ac.uk/collection/(...)", "vocabulary": "BODC data storage units" } ] | [ struct( "uri", "http://vocab.nerc.ac.uk/collection/(...)", "vocabulary", "BODC data storage units" ) ] | [ [ "uri" = "http://vocab.nerc.ac.uk/collection/(...)", "vocabulary" = "BODC data storage units" ] ] |
| uom[].uri | string | The Uri of the controlled vocabulary term. | "http://vocab.nerc.ac.uk/collection/P06/current/UPDB"
| uom[].vocabulary | string | The name of the controlled vocabulary to which the term belongs. | "BODC data storage units"
|
|
getDataProducts
Returns a list of data products that meet the filters provided.
Visit DataProducts Discovery Service for more information on filter usage.
Data products can be downloaded using Delivery Services (requires the data product's code and extension).
Parameter | Type | Description | Example |
---|
filters | ^dictionary | struct OR cell array | named list | A group of filters that configure the data products' search request. Supported filters: When excluded, the method will return all data products available. |
{
'dataProductCode':'TSSD',
'extension':'json' } | {
'dataProductCode', 'TSSD',
'extension', 'json' } | list(
'dataProductCode' = 'TSSD',
'extension' = 'json' )
|
|
Example - Get data products with .mat extension in a location |
from onc.onc import ONC
onc = ONC('YOUR_TOKEN_HERE')
filters = {
'locationCode': 'PHYD',
'extension': 'mat'
}
result = onc.getDataProducts(filters)
onc.print(result)
|
|
onc = Onc(YOUR_TOKEN_HERE);
filters = {
'locationCode', 'PHYD',
'extension', 'mat'
};
result = onc.getDataProducts(filters);
onc.print(result);
|
|
library(onc)
onc <- Onc(YOUR_TOKEN_HERE)
filters = list(
'locationCode' = 'PHYD',
'extension' = 'mat'
)
result = onc$getDataProducts(filters);
onc$print(result)
|
|
|
Returns |
A list of data product descriptions represented as dictionaries, with their detailed information. [
{
"dataProductCode": "TSSD",
"dataProductName": "Time Series Scalar Data",
"extension": "json",
"hasDeviceData": true,
"hasPropertyData": true,
"helpDocument": "https://wiki.oceannetworks.ca/display/DP/1"
},
(...)
] |
| A vector of data product descriptions represented as structs, with their detailed information. [
struct(
dataProductCode: 'HSD'
dataProductName: 'Hydrophone Spectral Data'
extension: 'mat'
hasDeviceData: true
hasPropertyData: false
helpDocument: 'https://wiki.oceannetworks.ca/display/DP/45'
),
(...)
] |
| A list of data product descriptions represented as named lists, with their detailed information. [
[
dataProductCode: "HSD",
dataProductName: "Hydrophone Spectral Data",
extension: "mat",
hasDeviceData: FALSE,
hasPropertyData: FALSE,
helpDocument: "https://wiki.oceannetworks.ca/display/DP/45"
],
(...)
] |
|
|
Each data product description returned has the following structure: Property | Type | Description | Example |
---|
dataProductCode | string | A code that uniquely identifies a data product. | "TSSD"
| dataProductName | string | The name of the data product. | "Time Series Scalar Data"
| extension | string | The file name extension for a data product. | "json"
| hasDeviceData | boolean | Indicates that the data product can be requested using a device category code and a location code. | True
| hasPropertyData | boolean | Indicates that the data product can be requested using a property code and a location code or device code. | True
| helpDocument | string | A Link URL to the Oceans 2.0 Help documentation for the specific Data Product. | "https://wiki.oceannetworks.ca/display/DP/1"
|
|