Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: update begin/end to dateFrom/dateTo in URL Examples

...

  • 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
integerA Run Id that can be used to download the data product when processing is complete.
"dpRunId":4521400
fileCountintegerThe number of files available for download.
"fileCount":5
statusstringThe current status of the data product request. Valid values are ("cancelled", "queued", "error", "running" and "complete").
"status": "complete"

...

Property
Type
Description
Example
dpRunId
integerA Run Id that can be used to download the data product when processing is complete.
"dpRunId":4521400
fileCountintegerThe number of files available for download.
"fileCount":5
statusstringThe current status of the data product request. Valid values are ("cancelled", "queued", "error", "running" and "complete").
"status": "complete"

...

errorCode
errorMessage
Description
127Invalid parameter value

Occurs when an invalid code is used in the query.

  • The name of the filter parameter will be included in the "parameter" property
127

Invalid search header ID

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

127Search header has already runOccurs when the same run request is made.
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.

  • The name of the filter parameter will be included in the "parameter" property

...

Parameter
Type
Description
Example
Required   
tokenstringAll 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 integerThe dpRunId returned from the run method. dpRunId=5968038
indexinteger / 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

127Invalid parameter value

Occurs when an invalid code is used in the query.

  • The name of the filter parameter will be included in the "parameter" property
127Index must be greater than 0Occurs when index value is less than or equal to zero
127Metadata file not valid for data productOccurs when data product does not have metadata file
127Invalid data product run IDOccurs when invalid dpRunId is used in the query.
128Missing parameter

Occurs when multiple parameters are needed, but not all are present.

  • The names of the required filter parameters will be included in the "parameter" property separated by /
129Invalid parameter name

Occurs when a filter parameter is in the query but is not supported.

  • The name of the filter parameter will be included in the "parameter" property


...