Description
The deployments discovery web service returns all deployments defined in Oceans 3.0 which meet the filter criteria, where a deployment is the installation of a device at a location. The deployments service assists in knowing when and where specific types of data are available.
The primary purpose for the deployments service is to find the dates and locations of deployments and use the dateFrom and dateTo datetimes when requesting a data product using the dataProductDelivery web service.
URL
https://data.oceannetworks.ca/api/deployments
get | Retrieve a flat list deployments metadata. |
|
Method | Description | Example |
---|
get
The get method retrieves a list of deployments including location code, device code, deployment begin and end dates and spatial information.
Parameters
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 |
Optional | |||
locationCode | string | Return all Deployments at a specific Location Code.
| locationCode=BACAX |
deviceCategoryCode | string | Return all Deployments that have devices belonging to a specific Device Category.
| deviceCategoryCode=CTD |
deviceCode | string | Return all Deployments of a specific Device.
| deviceCode=AandOpt0581 |
propertyCode | string | Return all Deployments that have devices with a sensor for a specific Property.
| propertyCode=differentialtemperature |
dateFrom | datetime | Return all of the Deployments that have a Deployment Beginning on or after a specific date/time. Accepted DateTime formats:
If not specified, the default value is the beginning of time.
| dateFrom=2010-07-27T00:00:00.000Z dateFrom=2010-07-27 dateFrom=-P1DT1H
|
dateTo | datetime | Return all of the Deployments that have a Deployment Ending before a specific date/time. Accepted DateTime formats:
If not specified, the default value is the end of time.
| dateTo=2016-08-01T00:00:00.000Z dateTo=2016-08-01 dateTo=PT12H30M
|
Parameter | Type | Description | Example |
Response
Example for request: https://data.oceannetworks.ca/api/deployments?method=get&token=[YOUR_TOKEN_HERE]&locationCode=BACAX&deviceCategoryCode=CTD
Success (HTTP 200)
Returns a list of locations with values for Location Code, Location Name, Description, Device Data indicator, Property Data indicator, and Data Search Link URL, ordered by Location Code
[ |
locationCode | string | The locationCode for the deployment location. | "locationCode":"BACAX" |
deviceCode | string | The deviceCode for a deployed device. | "deviceCode":"SBECTD19p6813" |
deviceCategoryCode | String | the deviceCategoryCode for a deployed device. | "deviceCategoryCode": "CTD" |
begin | datetime | The beginning datetime of the deployment. Date Time format: yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
| "begin":2010-07-27T00:00:00.000Z |
end | datetime | The ending datetime of the deployment.
Date Time format: yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
| "end":2016-08-01T00:00:00.000Z |
hasDeviceData | string | Indicates that data products can be requested using a device category code for the deployment. | "hasDeviceData":"true |
depth | double | The depth of the device deployment. | "depth" :982 |
lat | double | The latitude of the device deployment. | "lat" : 48.31658 |
lon | double | The longitude of the device deployment. | "lon" :- 126.0508 |
heading | double | The heading of the device deployment. | "heading" :244 |
pitch | double | The pitch of the device deployment. | "pitch" :null |
roll | double | The pitch of the device deployment. | "roll" :null |
Property | Type | Description | Example |
---|
Bad Request (HTTP 400)
23 | Invalid Time Range, Start Time is greater than End Time or start time is not provided | Occurs when the end is before the begin date/time.
|
127 | Invalid parameter value | Occurs when an invalid code is used in the filter. Most filters require an exact match, otherwise this error will occur.
|
128 | Missing parameter | Occurs when multiple parameters are needed, but not all are present. Occurs when deploymentBegin is used without deploymentEnd.
|
129 | Invalid parameter name | Occurs when a filter parameter is used, but is not supported. |
errorCode | errorMessage | Description |
---|
URL Examples
- Return a list of All Deployments (no filters)
https://data.oceannetworks.ca/api/deployments?method=get&token=[YOUR_TOKEN_HERE]
- Return a list of all Deployments with a Location Code of 'BACAX' ('Barkely Canyon Axis (POD1)')
https://data.oceannetworks.ca/api/deployments?method=get&token=[YOUR_TOKEN_HERE]&locationCode=BACAX
- Return a list of all Deployments that have devices with the Device Category 'ADCP2MHZ'
- Return a list of all Deployments with the Property Code 'differentialtemperature'
- Return a list of all Deployments with the Device Category 'CTD' and Property Code 'pressure'
- Return a list of all Deployments of a device with the Device Code 'NORTEKAQDPRO8398'
- Return a list of all of the Deployments Between 1 July 2010 and 30 June 2012
- Return a list of all Deployments Between 1 July 2010 and 30 June 2011 with the sensor Property Code 'seawatertemperature'
API Proxy
The https://data.oceannetworks.ca/apiproxy/deployments URL link in the above examples can be used in a browser for sharing or testing purposes; however, it can not be accessed from code. Calls to the apiproxy server are redirected to a login screen to capture your user id. Accessing the apiproxy URL from code will return html in the payload, which may cause errors or unexpected behaviour. In order to use the deployments endpoint from code, you must use the https://data.oceannetworks.ca/api/deployments url along with a valid token.
Code Examples
Title | Creator | Modified |
---|---|---|
Client Libraries | Dany A Cabrera | 12-Apr-24 |
Ouranos Use Case | Allan Rempel | 26-Feb-22 |
Bird Studies Canada Use Case | Allan Rempel | 26-Feb-22 |
Internal Use Case | Ryan Ross | 26-Feb-22 |
Research Use Case | Ryan Ross | 26-Feb-22 |
Please report all issues with the web services, documentation, samples and client libraries to the Oceans 3.0 Help Centre