Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Attempts to download a file at an index. If the file at that index is not ready for download at the time of the download request, the service returns information about the status of the process. The client application must continue to request the download until the file is ready, or an error is encountered.

URL

No Format
httphttps://data.oceannetworks.ca/api/dataProductDelivery

...

ParameterTypeDescriptionExample
Required
tokenstringAll Web Services require a token. Once logged in at httphttps://data.oceannetworks.ca/login, your token can be retrieved or generated at httphttps://data.oceannetworks.ca/Profile . Click on the "Web Services" tab, then click "Generate Token".token=5ba514e8-1203-428c-8835-879c8173e387
dataProductCodestring

Request a Data Product for a specific Data Product Code

dataProductCode=TSSD
extensionstring

Request a Data Product for a specific File Format Extension

  • Extension must be valid and match exactly, including case
  • Extensions available for specific Data Product Codes can be obtained programatically from the dataProducts service or interactively from the Available Data Products page
extension=csv
begindatetime

Request a Data Product starting at a specific date/time

Date Time format: yyyy-MM-dd'T'HH:mm:ss'.'SSS'Z'

begin=2016-07-25T00:00:00.000Z
enddatetime

Request a Data Product ending at a specific date/time

Date Time format: yyyy-MM-dd'T'HH:mm:ss'.'SSS'Z'

end=2016-07-29T00:00:00.000Z

Conditionally Required

locationCodestring

Request a Data Product from a specific Location

  • Location Code must be valid and match exactly, including case
  • Specific Location Codes can be obtained programatically from the locations service or interactively from the Available Locations page
locationCode=BACAX
deviceCategoryCodestring

Request a Data Product from devices belonging to a specific Device Category

deviceCategoryCode=ADCP2MHZ
deviceCodestring

Request a Data Product from a specific Device

  • Device Code must be valid and match exactly, including case
  • Specific Device Codes can be obtained programatically from the devices service or interactively from the Available Devices page
deviceCode=AandOpt0581
propertyCodestring

Request a Data Product for a specific Property

  • Property Code must be valid and match exactly, including case
  • Specific Property Codes can be obtained programatically from the properties service or interactively from the Available Properties page
property=pressure
Data Product Optionsstring

Each Data Product Extension may have required data product options that determine how to process or package the data.

  • Data Product Options include and are not limited to:
    • Quality Control
    • Resampling
    • Data Gaps
    • Hydrophone Data Diversion Mode
  • Data Product Options and usage information for each Data Product, can be found on the Data Product Options page

dpo_qualityControl=1

dpo_resample=average

dpo_average=600

...

  • Request a 'Log File' data product in 'txt' format, using Data Product Code 'LF' and Extension 'txt' for Device Category Code 'ADCP2MHZ' at the Location Code 'BACAX', Between 25-28 July 2016.

httphttps://data.oceannetworks.ca/api/dataProductDelivery?method=request&token=[YOUR_TOKEN_HERE]&locationCode=BACAX&deviceCategoryCode=ADCP2MHZ&dataProductCode=LF&extension=txt&begin=2016-07-25T00:00:00.000Z&end=2016-07-29T00:00:00.000Z

 

  • Request a 'Time Series Scalar Data' data product in 'csv' format, using Data Product Code 'TSSD' and Extension 'csv' for Property Code 'salinity' at 'Barkley Canyon Axis (Pod 1) location using Location Code 'BACAX', Between 1-12 July 2017.

httphttps://data.oceannetworks.ca/api/dataProductDelivery?method=request&token=[YOUR_TOKEN_HERE]&locationCode=BACAX&propertyCode=salinity&dataProductCode=TSSD&extension=csv&begin=2017-01-01T00:00:00.000Z&end=2017-01-13T00:00:00.000Z&dpo_qualityControl=1&dpo_resample=none&dpo_dataGaps=0

run

The run method runs the data product created by a call to the request method.

...

errorCode
errorMessage
Description
127

Invalid search header ID

Occurs when an invalid Request ID is used in the dpRequestId parameters.

128Missing parameter

Occurs when multiple parameters are needed, but not all are present. Occurs when begin is used without end.

  • The names of the required filter parameters, separated by /, are included in the parameter property,
129Invalid parameter name

Occurs when an unsupported filter parameter is used.

 

Example

httphttps://data.oceannetworks.ca/api/dataProductDelivery?method=run&token=[YOUR_TOKEN_HERE]&dpRequestId=[YOUR_REQUEST_ID_HERE]

...

Parameter
Type
Description
Example
Required   
tokenstringAll Web Services require a token. Once logged in at httphttps://data.oceannetworks.ca/login, your token can be retrieved or generated at httphttps://data.oceannetworks.ca/Profile . Click on the "Web Services" tab, then click "Generate Token".token=5ba514e8-1203-428c-8835-879c8173e387
dpRunId integerThe dpRunId returned from the run method. 
indexintegerThe index of the file to be downloaded, valid values are 1 to the number of result files. If the index is greater than the number of result files a response code of 204 is returned, indicating no file at that index. 

...

The following is an example of the return for a data product that is still being processed, note that the response code in this case is 202.

httphttps://data.oceannetworks.ca/api/dataProductDelivery?method=download&token=[YOUR_TOKEN_HERE]&dpRunId=[YOUR_RUN_ID_HERE]&index=[YOUR_INDEX_#_HERE]

...