...
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 |
...
Parameter | Type | Description | Example |
---|---|---|---|
Required | |||
token | string | All 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 |
dataProductCode | string | Request a Data Product for a specific Data Product Code
| dataProductCode=TSSD |
extension | string | Request a Data Product for a specific File Format Extension
| extension=csv |
begin | datetime | 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 |
end | datetime | 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 | |||
locationCode | string | Request a Data Product from a specific Location
| locationCode=BACAX |
deviceCategoryCode | string | Request a Data Product from devices belonging to a specific Device Category
| deviceCategoryCode=ADCP2MHZ |
deviceCode | string | Request a Data Product from a specific Device
| deviceCode=AandOpt0581 |
propertyCode | string | Request a Data Product for a specific Property
| property=pressure |
Data Product Options | string | Each Data Product Extension may have required data product options that determine how to process or package the data.
| 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.
- 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.
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. |
128 | Missing parameter | Occurs when multiple parameters are needed, but not all are present. Occurs when begin is used without end.
|
129 | Invalid parameter name | Occurs when an unsupported filter parameter is used. |
Example
...
Parameter | Type | Description | Example |
---|---|---|---|
Required | |||
token | string | All 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 | integer | The dpRunId returned from the run method. | |
index | integer | The 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.
...