Skip to end of metadata
Go to start of metadata

Description

The Oceans 2.0 API provides public access to Ocean Networks Canada's extensive data archive,  via a 5 discovery, 4 data delivery and 2 interoperability web services. The API provides programmatic access to the data, for the same collection of locations, device categories, devices and properties, in the form of distinct Data Products, as are available interactively using the Ocean's 2.0 Data Search interface. The API also provides direct access to scalar data, raw data for near-realtime applications.

Discovery Services

A collection of services which are intended to be used to obtain all of the codes needed to successfully request data, using the data delivery services. The services use reductive filtering to return a list, in json format, of all of the items that meet the filter criteria defined in the url parameters. Codes returned from one service can be used in another service to refine the selection, for example, a deviceCategoryCode obtained from the deviceCategories service can be used as a filter on the locations service to find all locations that have instruments of that device category.

  • locations - Find locations that have the data you are interested in and use the locationCode when requesting a data using the dataProductDelivery, scalardata or rawdata web services. (Development in progress)
  • devices - Find devices that have the data you are interested in and use the deviceCode when requesting a data using the dataProductDelivery web service. (Development in progress)
  • deviceCategories - Find the device category of the data you are interested in and use the deviceCategoryCode when requesting a data using the dataProductDelivery, scalardata or rawdata web services.  (Development in progress)
  • properties - Find devices that have the data you are interested in and use the deviceCode when requesting a data using the dataProductDelivery, scalardata or rawdata web services. (Development in progress)
  • dataProducts -  Find data products and formats (extensions) are available for the locations, devices, device categories or properties of interest and use the dataProductCode and extension when requesting a data product using the dataProductDelivery web service. (Development in progress)

Data Delivery Services

A collection of services which return data from the ONC archive. There are 3 types of services currently available. 1) An asynchronous service: The dataProductDelivery service allows for large amounts of customizable data to be delivered in a variety of formats. This delivery method is both flexible and scaleable, but requires additional processing time on the server. By utilizing the Task Queue framework, an asyncrhonous programming pattern of multiple service calls is used to return the data. 2) 2 synchronous services: The scalardata and rawdata services return data in the response payload, which allows for a synchronous pattern to be used and access to be in near real-time. Because this type of delivery method is optimized for speed, the services do not support resampling or aggregation and have a 100k record count limit. 3) Direct file access service: The archivefiles service returns archived files, using the filename, in the payload. 

  • dataProductDelivery -  Request, run and download Data Products for locations or devices (Development in progress)
  • scalardata - Gets the most recent scalar data, or scalar data between two given dates for stations (locations) and device categories.
  • rawdata - Gets the most recent raw data from an instrument, or raw data between two given dates for stations (locations) and device categories.
  • archivefiles -  Find archived files available for a station (location) and device category, between two given dates, and download the files.

Interoperability Services

Parameters

All of the services, with the exception of the interoperability services, require the use of a method and token. Only the scalardatarawdata and archivefiles services support the responseType optional parameter. 

Parameter

Type

Description

Example

Required

   

method

string

Each Web Service has 1 or more methods outlined in the documentation. The method name is case sensitive.

method=get

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=YOUR-TOKEN

Optional

   

responseType

string

Valid values are "json" and "jsonp". Defaults to "json".

ONLY AVAILABLE for scalardatarawdata and archivefiles services

responseType =jsonp

Request Format

http://dmas.uvic.ca/api/sample?method=methodName&token=[YOUR_TOKEN_HERE]

Examples

If you are planning to use our API with the Python programming language please have a look at open source library pyONC to get some ideas.

  • No labels