...
- 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.
https://data.oceannetworks.ca/api/dataProductDelivery?method=request&token=[YOUR_TOKEN_HERE]&locationCode=BACAX&deviceCategoryCode=ADCP2MHZ&dataProductCode=LF&extension=txt&begindateFrom=2016-07-25T00:00:00.000Z&enddateTo=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.
https://data.oceannetworks.ca/api/dataProductDelivery?method=request&token=[YOUR_TOKEN_HERE]&locationCode=BACAX&propertyCode=salinity&dataProductCode=TSSD&extension=csv&begindateFrom=2017-01-01T00:00:00.000Z&enddateTo=2017-01-13T00:00:00.000Z&dpo_qualityControl=1&dpo_resample=none&dpo_dataGaps=0
status
The status method returns data about the status of the request.
...
Property | Type | Description | Example |
---|---|---|---|
dpRunId | integer | A Run Id that can be used to download the data product when processing is complete. | "dpRunId":4521400 |
fileCount | integer | The number of files available for download. | "fileCount":5 |
status | string | The current status of the data product request. Valid values are ("cancelled", "queued", "error", "running" and "complete"). | "status": "complete" |
...
Property | Type | Description | Example |
---|---|---|---|
dpRunId | integer | A Run Id that can be used to download the data product when processing is complete. | "dpRunId":4521400 |
fileCount | integer | The number of files available for download. | "fileCount":5 |
status | string | The current status of the data product request. Valid values are ("cancelled", "queued", "error", "running" and "complete"). | "status": "complete" |
...
errorCode | errorMessage | Description |
---|---|---|
127 | Invalid parameter value | Occurs when an invalid code is used in the query.
|
127 | Invalid search header ID | Occurs when an invalid Request ID is used in the dpRequestId parameters. |
127 | Search header has already run | Occurs when the same run request is made. |
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.
|
...
Parameter | Type | Description | Example |
---|---|---|---|
Required | |||
token | string | All Web Services require a token. Once logged in at https://data.oceannetworks.ca/login, your token can be retrieved or generated at https://data.oceannetworks.ca/Profile . Click on the "Web Services" tab, then click "Generate Token". | token=YOUR_TOKEN_HERE |
dpRunId | integer | The dpRunId returned from the run method. | dpRunId=5968038 |
index | integer / string | 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. If index is string meta, metadata file will be downloaded | index=2 index=meta |
Response
Success
HTTP status code 200 is returned in the HTTP header and the requested file is downloaded.
Bad Request (HTTP 400)
errorCode | errorMessage | Description |
---|---|---|
127 | Invalid parameter value | Occurs when an invalid code is used in the query.
|
127 | Index must be greater than 0 | Occurs when index value is less than or equal to zero |
127 | Metadata file not valid for data product | Occurs when data product does not have metadata file |
127 | Invalid data product run ID | Occurs when invalid dpRunId is used in the query. |
128 | Missing parameter | Occurs when multiple parameters are needed, but not all are present.
|
129 | Invalid parameter name | Occurs when a filter parameter is in the query but is not supported.
|
...