The ONC Python client library contains a number of classes and functions that make access to the ONC data, through the Oceans 2.0 API, quick and easy to use.
Requires
2.7 or Higher
3.6 or Higher Recommended
Installation
The ONC Python client library can be installed using the python pip module found in your python install.
[python install]$python -m pip install onc or [python install]\Scripts$pip install onc
If you have a previous version of the ONC Python Client Library installed, and need to get the latest version use the following:
[python install]$python -m pip install onc --upgrade or [python install]\Scripts$pip install onc --upgrade
Opening the command prompt with 'Run As Administrator' may be required for some Windows installs.
Additional Python package install information can be found at https://packaging.python.org/tutorials/installing-packages/
Version History
version | Date | Description | Package | Source |
---|---|---|---|---|
1.0 | 6/9/2017 | Beta version | onc-1.0.tar.gz | |
1.1 | 6/12/2017 | Rename onc.dap.DAP class to onc.dap.ERDDAP | onc-1.1.tar.gz | |
1.11 | 6/13/2017 | Removed unused numpy dependency. Added python-dateutil dependency to package. | onc-1.11.tar.gz | |
1.12 | 6/23/2017 | Refactored scalar and raw data access methods. Removed print methods for testing services. Renamed private functions. Added numpy references | onc-1.12.tar.gz | onc-1.12-source.zip |
1.13 | 7/31/2017 | Renamed getJsonFromUrl function to decodeJsonFromUrl | onc-1.13.tar.gz | onc-1.13-source.zip |
1.14 | 8/01/2017 | Resolved issue with getDataProductUrls method | onc-1.14.tar.gz | onc-1.14-source.zip |
1.15 | 8/3/2017 | Updated production url from http://dmas.uvic.ca/ to http://data.oceannetworks.ca | onc-1.15.tar.gz | onc-1.15-source.zip |
To download an attachment, please right click on the link and select Save Link As, Save Target As or a similar option provided by your browser. This will open a 'Save' dialog.
Classes
class | import | description |
---|---|---|
ONC | from onc.onc import ONC | A wrapper class for access to Oceans 2.0 API web services |
SOS | from onc.sos import SOS | A wrapper class for access to ONC's implementation of Sensor Observation Service (SOS) |
ERDDAP | from onc.dap import ERDDAP | A wrapper class for access to datasets published on ONC's ERDDAP (OPeNDAP) server http://qadap.onc.uvic.ca/erddap/index.html |
NERC | from onc.nerc import NERC | A wrapper class for access to controlled vocabularies stored on the NERC vocabulary server http://vocab.nerc.ac.uk/ |
ONC Class
Description
This class provides a wrapper for some for the most common Oceans 2.0 API requests, including the discovery services (locations, devices, deviceCategories, properties) and delivery (dataProductDelivery, scalardata and rawdata).
Constructor
ONC()
ONC(token, production=True, showInfo=False, outPath='c:/temp')
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 | |||
production | boolean | Indicates if the ONC Production server URL is used for service requests.
| True or False |
showInfo | boolean | Indicates if verbose script messages are displayed, such as request url and processing time information.
| True or False |
outPath | string | The path that downloaded files are saved to.
| 'c:/ONC/Download' |
Usage
from onc.onc import ONC onc = ONC('YOUR_TOKEN_HERE')
or
from onc.onc import ONC isProduction = True showInfo = False outPath = 'c:/ONC/Data' onc = ONC('YOUR_TOKEN_HERE',isProduction,showInfo,outPath)
Discovery methods
getLocations()
getLocations(parameters={})
Returns a list of locations, as a list of dictionary objects.
Parameter | Type | Description | Example |
---|---|---|---|
Optional | |||
parameters | dictionary | A dictionary of parameters, used to filter data from the ONC devices endpoint.
| {'locationCode':'BACAX'} |
getDevices()
getDevices(parameters={})
Returns a list of devices, as a list of dictionary objects.
Parameter | Type | Description | Example |
---|---|---|---|
Optional | |||
parameters | dictionary | A dictionary of parameters, used to filter data from the ONC devices endpoint.
| {'deviceCode':'NORTEKADCP9917'} |
getDeviceCategories()
getDeviceCategories(parameters={})
Returns a list of deviceCategories, as a list of dictionary objects.
Parameter | Type | Description | Example |
---|---|---|---|
Optional | |||
parameters | dictionary | A dictionary of parameters, used to filter data from the ONC deviceCategories endpoint.
| {'deviceCategoryCode':'HYDROPHONE'} |
getProperties()
getProperties(parameters={})
Returns a list of properties, as a list of dictionary objects.
Parameter | Type | Description | Example |
---|---|---|---|
Optional | |||
parameters | dictionary | A dictionary of parameters, used to filter data from the ONC properties endpoint.
| {'propertyCode':'seawatertemperature'} |
getDataProducts()
getDataProducts(parameters={})
Returns a list of data products as a list of dictionary objects.
Parameter | Type | Description | Example |
---|---|---|---|
Optional | |||
parameters | dictionary | A dictionary of parameters, used to filter data from the ONC dataProducts endpoint.
| {'dataProductCode':'TSSD','extension':'json'} |
Data Product Download methods
orderDataProduct()
orderDataProduct(parameters={}, maxRetries=100, downloadResultsOnly=False, includeMetadataFile=True)
Requests a data product and downloads the generated files to the class's outPath.
This method performs the complete data product download workflow by calling additional methods to perform the following steps:
1. Request a data product, which includes estimates for download size and time.
2. Run a requested data product, which kicks off a process on the task machine to generate the data product.
3. Download the data product to disk. The process will continue to poll the web service to determine if the product is ready to download. If it is not ready, status messages will be provided. Once it is ready, it will download the data product to disk
Parameter | Type | Description | Example |
---|---|---|---|
Required | |||
parameters | dictionary | A dictionary of parameters, used to request data as a data product from the ONC dataProductDelivery endpoint.
| {'locationCode':'BACAX', |
Option | |||
maxRetries | int | The number of times to retry the service before the function aborts.
| 10 |
downloadResultsOnly | boolean | Indicates if the files will be downloaded or if only the url to the file will be returned
| True |
includeMetadataFile | boolean | Indicates if the metadata file associated with the data product request will be downloaded
| True |
Returns
A dictionary of download results and run time statistics
{'downloadResults': [ { 'url': 'http://data.oceannetworks.ca/api/dataProductDelivery?method=download&token=<YOUR_TOKEN>&dpRunId=<YOUR_RUN_ID>&index=1', 'message': [ 'Running', 'Transferring (BarkleyCanyon_Axis_ADCP2MHz_20160727T000005Z_20160731T235958Z-clean.csv) to the FTP server' ], 'queuingTime': 0, 'runningTime': 1.567234, 'transferringTime': 59.616635, 'downloadingTime': 0.295575, 'requestCount': 40, 'status': 'complete', 'size': 3060227.0, 'file': 'c:/ONC/data/BarkleyCanyon_Axis_ADCP2MHz_20160727T000005Z_20160731T235958Z-clean.csv', 'index': 1, 'downloaded': True}, { 'url': 'http://data.oceannetworks.ca/api/dataProductDelivery?method=download&token=<YOUR_TOKEN>&dpRunId=<YOUR_RUN_ID>&index=meta', 'message': [], 'queuingTime': 0, 'runningTime': 0, 'transferringTime': 0, 'downloadingTime': 0.132616, 'requestCount': 1, 'status': 'complete', 'size': 27502.0, 'file': 'c:/temp/doctest/BarkleyCanyon_Axis_ADCP2MHz_20160727T000005Z_20160731T235958Z-clean_CSV_META.pdf', 'index': 1, 'downloaded': True } ], 'stats': { 'requestRequestTime': 0.328399, 'runRequestTime': 1.060785, 'queuingTime': 0, 'runningTime': 1.567234, 'transferringTime': 59.616635, 'downloadingTime': 0.428191 } }
Property | Type | Description |
---|---|---|
downloadResults | list | A list of download results dictionaries. |
downloadResults[].url | string | The URL used to make the download request. |
downloadResults[].message | list | A list of the messages that were returned from the dataProductDelivery download method when it was polled. |
downloadResults[].queuingTime | float | The time duration, in seconds, between the first and last service request, that indicated that the task was queued. |
downloadResults[].runningTime | float | The time duration, in seconds, between the first request that returned a status message that it was running and the time that the request returned that it was transferring or complete. |
downloadResults[].transferringTime | float | The time duration, in seconds, between the first request that returned a status message that it was transferring. |
downloadResults[].downloadingTime | float | The time duration, in seconds, between the start and completion of the file download. |
downloadResults[].requestCount | integer | The number of web service request that were made before the download was complete. This includes all of the requests that returned run task status messages. |
downloadResults[].status | string | The status of the download process at the request. Possible values are:
|
downloadResults[].size | float | The actual size of the file in bytes. |
downloadResults[].file | string | The full path of the file that was downloaded. |
downloadResults[].index | string | The index of the file downloaded. The index can either be a number 1-* or "meta" for the data product metadata file. |
downloadResults[].downloaded | boolean | Indicates if the file was downloaded. If the filter downloadResultsOnly=True is used, the data product is not downloaded and the value will be False |
stats | list | A summary of individual result statistics. |
stats.requestRequestTime | float | The time to complete the request request for the requested data product. |
stats.runRequestTime | float | The time to complete the run request for the requested data product. |
stats.queuingTime | float | A sum of the queueTime times from all of the run requests for the requested data product. |
stats.runningTime | float | A sum of the runningTime times from all of the run requests for the requested data product. |
stats.transferringTime | float | A sum of the transferringTime times from all of the run requests for the requested data product. |
stats.downloadingTime | float | A sum of the downloadTime times from all of the run requests for the requested data product. |
requestDataProduct()
requestDataProduct(parameters={}, returnError=False)
Requests a data product using the dataProductDelivery service and provides request information so that the calling function can decide if should run the data product.
The dictionary of information it returns includes a requestID, which is used to run the data product, and estimates of the expected download times and file sizes.
Parameter | Type | Description | Example |
---|---|---|---|
Required | |||
parameters | dictionary | A dictionary of parameters, used to request data as a data product from the ONC dataProductDelivery endpoint.
| {'locationCode':'BACAX', |
Option | |||
returnError | boolean | Indicates if error messages from the dataProductDelivery service should be returned.
| True |
Returns
returns a data product request dictionary
for archived files (AD):
{ "dpRequestId":2046404, "compressedFileSize":12563408, "fileSize":70766230, "numFiles":4, "downloadTimes":{"10Mbps":7.076623,"50Mbps":1.4153247,"150Mbps":0.47177488} }
for generated files:
{ "dpRequestId":2046404, "estimatedFileSize":8348187, "estimatedProcessingTime":16 }
Property | Type | Description | Example |
---|---|---|---|
Always contains | |||
dpRequestId | int | A unique id for a data product request |
|
May contain | |||
compressedFileSize | int | The compressed size of the known file(s) in bytes. | "compressedFileSize" :12563408 |
fileSize | int | The size of known file(s) in bytes. | "fileSize" :70766230 |
numFiles | int | The number of files. | "numFiles" :4 |
downloadTimes | dict | A dictionary of estimated download times | "downloadTimes" :{ "10Mbps" :7.076623, "50Mbps" :1.4153247, "150Mbps" :0.47177488} |
estimatedFileSize | int | The estimated file size of generated data product | "estimatedFileSize":8348187 |
estimatedProcessingTime | int | The estimated time, in seconds, that it will take to run the data product request. | "estimatedProcessingTime":16 |
runDataProduct()
runDataProduct(requestId)
Runs a data product request using the dataProductDelivery service with a Request Id and returns a list of run ids
Parameter | Type | Description | Example |
---|---|---|---|
Required | |||
requestId | int | A dataProductDelivery dpRequestId, which is returned by the dataProductDelivery service request method, or as the 'dpRequestId' property in the dpRequest returned by the requestDataProduct() method. | 2046404 |
Returns
a list of runIds
[ 4629218, 4629219 ]
downloadDataProduct()
downloadDataProduct(runId, fileCount=0, estimatedProcessingTime=1, maxRetries=100, downloadResultsOnly=False, includeMetadataFile=False, multiThreadMessages=False)
Polls the dataProductDelivery service until data product generation task is complete and downloads all of the files and/or retrieves the file information (url, file and download status).
Parameter | Type | Description | Example |
---|---|---|---|
Required | |||
runId | int | A dataProductDelivery dpRunId, which is returned by the dataProductDelivery service run method, or as the dpRunId property in the list returned by the runDataProduct() method. | 4629218 |
Option | |||
fileCount | int | The actual or estimated file count, which is returned from the dataProductDelivery request method
| 1 |
estimatedProcessingTime | int | The estimated time in seconds, that it should take to run the request on the task machine.
| 2 |
maxRetries | int | The number of times to retry the service before the function aborts.
| 10 |
downloadResultsOnly | boolean | Determines if the files will be downloaded or if only the url to the file will be returned
| True |
includeMetadataFile | boolean | Indicates if the metadata file associated with the data product request will be downloaded
| True |
multiThreadMessages | boolean | Determines how the method and called method should print messages to the console. If downloading data products in a multi-threaded pattern, messages written to the console can overlap and progress dots can be written out of context
| True |
Returns
returns a list of download results dictionaries
[ { 'url': 'http://data.oceannetworks.ca/api/dataProductDelivery?method=download&token=<YOUR_TOKEN>&dpRunId=<YOUR_RUN_ID>&index=1', 'message': [ 'Running', 'Transferring (BarkleyCanyon_Axis_ADCP2MHz_20160727T000005Z_20160731T235958Z-clean.csv) to the FTP server' ], 'queuingTime': 0, 'runningTime': 1.567234, 'transferringTime': 59.616635, 'downloadingTime': 0.295575, 'requestCount': 40, 'status': 'complete', 'size': 3060227.0, 'file': 'c:/ONC/data/BarkleyCanyon_Axis_ADCP2MHz_20160727T000005Z_20160731T235958Z-clean.csv', 'index': 1, 'downloaded': True}, { 'url': 'http://data.oceannetworks.ca/api/dataProductDelivery?method=download&token=<YOUR_TOKEN>&dpRunId=<YOUR_RUN_ID>&index=meta', 'message': [], 'queuingTime': 0, 'runningTime': 0, 'transferringTime': 0, 'downloadingTime': 0.132616, 'requestCount': 1, 'status': 'complete', 'size': 27502.0, 'file': 'c:/temp/doctest/BarkleyCanyon_Axis_ADCP2MHz_20160727T000005Z_20160731T235958Z-clean_CSV_META.pdf', 'index': 'meta', 'downloaded': True } ]
Property | Type | Description |
---|---|---|
url | string | The URL used to make the download request. |
message | list | A list of the messages that were returned from the dataProductDelivery download method when it was polled. |
queuingTime | float | The time duration, in seconds, between the first and last service request, that indicated that the task was queued. |
runningTime | float | The time duration, in seconds, between the first request that returned a status message that it was running and the time that the request returned that it was transferring or complete. |
transferringTime | float | The time duration, in seconds, between the first request that returned a status message that it was transferring. |
downloadingTime | float | The time duration, in seconds, between the start and completion of the file download. |
requestCount | integer | The number of web service request that were made before the download was complete. This includes all of the requests that returned run task status messages. |
status | string | The status of the download process at the request. Possible values are:
|
size | float | The actual size of the file in bytes. |
file | string | The full path of the file that was downloaded. |
index | string | The index of the file downloaded. The index can either be a number 1-* or "meta" for the data product metadata file. |
downloaded | boolean | Indicates if the file was downloaded. If the filter downloadResultsOnly=True is used, the data product is not downloaded and the value will be False |
getDataProdutUrls()
getDataProductUrls(parameters, maxRetries=100)
Orders a data product and return only the urls, for download at a later time. Urls can be used with the downloadFile() or getJsonFromUrl() methods
Parameter | Type | Description | Example |
---|---|---|---|
Required | |||
parameters | dictionary | A dictionary of parameters, used to request data as a data product from the ONC dataProductDelivery endpoint.
| {'locationCode':'BACAX', |
Option | |||
maxRetries | int | The number of times to retry the service before the function aborts.
| 10 |
Returns
returns a list of urls
[ 'http://data.oceannetworks.ca/api/dataProductDelivery?method=download&token=<YOUR_TOKEN>&dpRunId=<YOUR_RUN_ID>&index=1', 'http://data.oceannetworks.ca/api/dataProductDelivery?method=download&token=<YOUR_TOKEN>&dpRunId=<YOUR_RUN_ID>&index=2' ]
downloadFile()
downloadFile(url, file, multiThreadMessages=False)
Downloads a file from a URL, write it to a file and return download results information (url, file, message and download status).
Parameter | Type | Description | Example |
---|---|---|---|
Required | |||
url | string | The url to be downloaded | http://data.oceannetworks.ca/api/dataProductDelivery?method=download&token=<YOUR_TOKEN_HERE> &dpRunId=<YOUR_RUN_ID_HERE>&index=<YOUR_INDEX_HERE> |
file | string | The fulll path of the file to be downloaded to. | c:/temp/myDownload.csv |
Option | |||
multiThreadMessages | boolean | Determines how the method and called method should print messages to the console. If downloading data products in a multi-threaded pattern, messages written to the console can overlap and progress dots can be written out of context
| True |
returns a downloadResults dictionary
{ 'url': 'http://data.oceannetworks.ca/api/dataProductDelivery?method=download&token=<YOUR_TOKEN>&dpRunId=<YOUR_RUN_ID>&index=1', 'file': 'c:/temp/myDownload.json', 'message': [], 'downloaded': True, 'downloadingTime': 0.641304 }
Property | Type | Description |
---|---|---|
url | string | The URL used to make the download request. |
file | string | The full path of the file that was downloaded. |
message | list | A list of the messages that were returned from the dataProductDelivery download method when it was polled. |
downloaded | boolean | Indicates if the file was downloaded. |
downloadingTime | float | The time duration, in seconds, between the start and completion of the file download. |
decodeJsonFromUrl()
decodeJsonFromUrl(url)
Returns a dictionary from the JSON returned from a URL
Parameter | Type | Description | Example |
---|---|---|---|
Required | |||
url | string | The url to a JSON data product delivery result | http://data.oceannetworks.ca/api/dataProductDelivery?method=download&token=<YOUR_TOKEN_HERE>&dpRunId=<YOUR_RUN_ID_HERE>&index=<YOUR_INDEX_HERE> |
Near Real-Time data product methods
getDirectScalar()
getDirectScalar(parameters={}, outputFormat='Object', metadata='Full', rowLimit=None)
Returns scalar data, in JSON Object or Array format, in the response payload.
Parameter | Type | Description | Example |
---|---|---|---|
Required | |||
parameters | dictionary | A dictionary of parameters, used to request data as a data product from the ONC dataProductDelivery endpoint.
| { |
Option | |||
outputFormat | string | The encoding of the response output.
| "outputFormat":"Array" |
metadata | string | The amount of metadata detail that is included in the response output.
| "metadata":"Full" |
rowLimit | integer | The maximum number of rows of scalar data that will be returned for each sensor
| "rowLimit":5000 |
Returns
A dictionary that contains sensor data that matches the filter criteria defined in the input parameters, metadata and service metadata.
{ 'metadata': { 'bbox': { 'maxDepth': 3.0, 'maxLat': 49.080909946666665, 'maxLon': -123.37824890666667, 'minDepth': 3.0, 'minLat': 49.080909946666665, 'minLon': -123.37824890666667 }, 'depth': 3.0, 'deviceCategoryName': 'TSG', 'latitude': 49.080909946666665, 'longitude': -123.37824890666667, 'begin': '2016-09-01T00:00:00.000Z', 'end': '2016-09-01T00:00:30.000Z', 'locationCode': 'TWDP' }, 'sensorData': [ { 'actualSamples': 1, 'data': [ { 'qaqcFlag': 1, 'sampleTime': '2016-09-01T00:00:07.037Z', 'value': 3.44294 } ], 'sensor': 'Conductivity', 'sensorName': 'Conductivity', 'unitOfMeasure': 'S/m' }, { 'actualSamples': 1, 'data': [ { 'qaqcFlag': 1, 'sampleTime': '2016-09-01T00:00:07.037Z', 'value': 28.9096 } ], 'sensor': 'salinity', 'sensorName': 'Practical Salinity', 'unitOfMeasure': 'psu' }, {...} ], 'serviceMetadata': { 'metadata': 'Full', 'nextDateFrom': '2016-09-01T00:00:17.041Z', 'outputFormat': 'Object', 'rowLimit': None, 'sensors': None, 'totalActualSamples': 3, 'begin': '2016-09-01T00:00:00.000Z', 'end': '2016-09-01T00:00:10.000Z', 'deviceCategoryCode': 'TSG', 'locationCode': 'TWDP' } }
Property | Type | Description |
---|---|---|
metadata | dictionary | A dictionary of metadata, if metadata='Full' input parameter is used |
metadata.bbox | dictionary | A Bounding Box dictionary |
metadata.bbox.maxDepth | float | The maximum depth of the instruments contributing to the results |
metadata.bbox.maxLat | float | The maximum Latitude of bounding box of the instruments contributing to the results |
metadata.bbox.maxLon | float | The maximum Longitude of the bounding box of the instruments contributing to the results |
metadata.bbox.minDepth | float | The minimum Depth of the instruments contributing to the results |
metadata.bbox.minLat | float | The minimum Latitude of bounding box of the instruments contributing to the results |
metadata.bbox.minLon | float | The minimum Longitude of the bounding box of the instruments contributing to the results |
sensorData | list | A list of sensor dictionaries |
sensorData[].acutalSamples | int | The number of samples in the data list |
sensorData[].data | list | A list of observation dictionaries |
sensorData[].data[].qaqcFlag | int | The QAQC Flag for the observation |
sensorData[].data[].sampleTime | datetime string | The recorded time of the observation
|
sensorData[].data[].value | float | The value of the observation |
sensorData[].sensor | string | The code of the sensor that is being observed |
sensorData[].sensorName | string | The name of the sensor that is being observed |
sensorData[].unitOfMeasure | string | The unit of measure of the observation |
serviceMetadata | dictionary | A dictionary of the metadata for the service request |
serviceMetadata.metadata | string | The requested metadata filter |
serviceMetadata.nextDataFrom | datetime string | The begin date for next reading in yyyy-MM-ddTHH:mm:ss.SSSZ format |
serviceMetadata.outputFormat | string | The requested JSON output format |
serviceMetadata.rowLimit | int | The requested row limit per sensor |
serviceMetadata.sensors | string | A comma separated list of the requested sensors |
serviceMetadata.totalActualSamples | int | The number of observations expected for all of the sensors |
serviceMetadata.begin | datetime string | The begin date of the request in yyyy-MM-ddTHH:mm:ss.SSSZ format |
serviceMetadata.end | datetime string | The end date of the request in yyyy-MM-ddTHH:mm:ss.SSSZ format |
serviceMetadata.deviceCategoryCode | string | The Device Category Code of the request. See Available Device Categories for further details |
serviceMetadata.locationCode | string | The Location Code of the request. See Available Locations for further details. |
getDirectRaw()
getDirectRaw(parameters={}, rowLimit=None)
Returns raw data from an instrument in the payload, in JSON format.
Parameter | Type | Description | Example |
---|---|---|---|
Required | |||
parameters | dictionary | A dictionary of parameters, used to request data as a data product from the ONC dataProductDelivery endpoint.
| { |
Option | |||
rowLimit | integer | The maximum number of rows of raw data that will be returned
| "rowLimit":5000 |
Returns
A dictionary that contains sensor data that matches the filter criteria defined in the input parameters, metadata and service metadata.
{ 'data': [ { 'rawData': '!AIVDM,1,1,,A,14eI18gP00G<JMPL<IaCNOv62D1C,0*43', 'sampleTime': '2017-06-23T17:18:04.645Z' }, { 'rawData': '!AIVDM,1,1,,A,34eGo=P009G;qPJL:kiv3I6800li,0*5C', 'sampleTime': '2017-06-23T17:18:04.698Z' } ], 'metadata': { 'dataMetadata': { 'firstTimestamp': '2017-06-23T17:18:04.645Z', 'hasMoreDataInRange': True, 'lastTimestamp': '2017-06-23T17:18:04.698Z', 'numberOfData': 2, 'locationCode': 'Iona Shore Station' }, 'queryMetadata': { 'rowLimit': 2, 'stationCode': 'IONA', 'begin': None, 'end': None, 'deviceCategoryCode': 'AISRECEIVER' } } }
Property | Type | Description |
---|---|---|
metadata | dictionary | A dictionary of metadata, if metadata='Full' input parameter is used |
metadata.bbox | dictionary | A Bounding Box dictionary |
metadata.bbox.maxDepth | float | The maximum depth of the instruments contributing to the results |
metadata.bbox.maxLat | float | The maximum Latitude of bounding box of the instruments contributing to the results |
metadata.bbox.maxLon | float | The maximum Longitude of the bounding box of the instruments contributing to the results |
metadata.bbox.minDepth | float | The minimum Depth of the instruments contributing to the results |
metadata.bbox.minLat | float | The minimum Latitude of bounding box of the instruments contributing to the results |
metadata.bbox.minLon | float | The minimum Longitude of the bounding box of the instruments contributing to the results |
sensorData | list | A list of sensor dictionaries |
sensorData[].acutalSamples | int | The number of samples in the data list |
sensorData[].data | list | A list of observation dictionaries |
sensorData[].data[].qaqcFlag | int | The QAQC Flag for the observation |
sensorData[].data[].sampleTime | datetime string | The recorded time of the observation
|
sensorData[].data[].value | float | The value of the observation |
sensorData[].sensor | string | The code of the sensor that is being observed |
sensorData[].sensorName | string | The name of the sensor that is being observed |
sensorData[].unitOfMeasure | string | The unit of measure of the observation |
serviceMetadata | dictionary | A dictionary of the metadata for the service request |
serviceMetadata.metadata | string | The requested metadata filter |
serviceMetadata.nextDataFrom | datetime string | The begin date for next reading in yyyy-MM-ddTHH:mm:ss.SSSZ format |
serviceMetadata.outputFormat | string | The requested JSON output format |
serviceMetadata.rowLimit | int | The requested row limit per sensor |
serviceMetadata.sensors | string | A comma separated list of the requested sensors |
serviceMetadata.totalActualSamples | int | The number of observations expected for all of the sensors |
serviceMetadata.begin | datetime string | The begin date of the request in yyyy-MM-ddTHH:mm:ss.SSSZ format |
serviceMetadata.end | datetime string | The end date of the request in yyyy-MM-ddTHH:mm:ss.SSSZ format |
serviceMetadata.deviceCategoryCode | string | The Device Category Code of the request. See Available Device Categories for further details |
serviceMetadata.locationCode | string | The Location Code of the request. See Available Locations for further details. |