Versions Compared

Key

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

...

The API devices returns all the devices defined in Oceans 23.0 that meet a set of filter criteria.

...

Parameter

Type

Description

Example

Required


tokenstringAll Web Services require a token. This can be generated at https://data.oceannetworks.ca/Profile. Click on the "Web Services" tab and click "Generate Token".token=YOUR_TOKEN_HERE
Optional


deviceCodestring

Return a single Device matching a specific Device Code.

  • Device Code must be valid and match exactly, including case.
  • Specific Device Codes can be found by simply running the service without this parameter to get a list of all devices.
deviceCode=FSINXIC1622
deviceIdinteger

Return a single Device matching a specific Device ID.

  • Device ID must be valid.
  • Specific Device IDs can be found by simply running the service without this parameter to get a list of all devices.
deviceId=10301
deviceCategoryCodestring

Return all Devices belonging to a specific Device Category Code.

  • Device Category Code must be valid and match exactly, including case.
  • Specific Device Category Codes can be obtained using the deviceCategories service.
deviceCategoryCode=CTD
propertyCodestring

Return all Devices that have a sensor for a specific Property Code.

  • Property Code must be valid and match exactly, including case.
  • Specific Property Codes can be obtained using the properties service.
propertyCode=pressure
deviceNamestring

Return all of the Devices where the Device Name contains a keyword.

  • Not case sensitive.
deviceName=meter
locationCodestring

Return all Devices that are deployed at a specific Location.

  • Location Code must be valid and match exactly, including case.
  • Specific Location Codes can be obtained using the locations service.
locationCode=BACAX
dataProductCodeincludeChildrenstringboolean

Return all Devices that are deployed at a specific Location and sub-tree Locations.

  • Requires a valid Location Code
  • Valid values are either true or false
  • If not specified, the default value is false
includeChildren=true
dataProductCodestring

Return all Devices that have the ability to return a specific Data Product Code.

  • Data Product Code must be valid
have the ability to return a specific Data Product Code.
  • Data Product Code must be valid and match exactly, including case.
  • Specific Data Product Codes can be obtained from the dataProducts service.
dataProductCode=jpgfile
dateFromdatetime

Return all of the Devices that have a Deployment Beginning on or after a specific date/time.

Accepted DateTime formats:

  • yyyy-MM-dd'T'HH:mm:ss.SSS'Z' (ISO 8601 Extended)
  • yyyy-MM-dd (ISO 8601 Extended)
  • PnYnMnDTnHnMnS (ISO 8601 Duration)

If not specified, the default value is the beginning of time.

  • DateTime is represented in Coordinated Universal Time (UTC).

  • ISO 8601 Extended format without a time will be assumed to mean midnight (T00:00:000.000Z).
  • Queries with both dateFrom and dateTo in the ISO 8601 Duration format will not be accepted.

dateFrom=2010-07-27T00:00:00.000Z

dateFrom=2010-07-27

dateFrom=-P1DT1H

  • Previous 1 day and 1 hour, relative to the dateTo. Note the '-' before the P.
dateTodatetime

Return all of the Devices that have a Deployment Ending before a specific date/time.

Accepted DateTime formats:

  • yyyy-MM-dd'T'HH:mm:ss.SSS'Z' (ISO 8601 Extended)
  • yyyy-MM-dd (ISO 8601 Extended)
  • PnYnMnDTnHnMnS (ISO 8601 Duration)

If not specified, the default value is the end of time.

  • DateTime is represented in Coordinated Universal Time (UTC).

  • ISO 8601 Extended format without a time will be assumed to mean midnight (T00:00:000.000Z).
  • Queries with both dateFrom and dateTo in the ISO 8601 Duration format will not be accepted.

dateTo=2016-08-01T00:00:00.000Z

dateTo=2016-08-01

dateTo=PT12H30M

  • Next 12 hours and 30 minutes, relative to the dateFrom.

...

[
    {
        "cvTerm": {
            "device": [
                {
                    "uri":"http://vocab.nerc.ac.uk/collection/L22/current/TOOL0888/",
                    "vocabulary":"SeaVoX Device Catalogue"
                }
            ]
        },
        "dataRating": [
            {
                "dateFrom":"2010-05-27T19:27:04.000Z",
                "dateTo":null,
                "samplePeriod":10.000000,
                "sampleSize":1
            }
        ],
        "deviceCode":"BC_POD1_AD2M",
        "deviceId":11302,
               

        "deviceCategoryCode:"ADCP2MHZ",
        ""deviceLink":"http://data.oceannetworks.ca/DeviceListing?DeviceId=11302",
        "deviceName":"Nortek Aquadopp HR-Profiler 2965",
        "hasDeviceData":true
    },
    {
        "cvTerm": {
            "device":[]
        },
        "dataRating": [
            {
                "dateFrom":"2009-06-22T15:37:00.000Z",
                "dateTo":null,
                "samplePeriod":1.000000,
                "sampleSize":1
            }
        ],
        "deviceCode":"BC_POD1_JB",
        "deviceId":10011,

        "deviceCategoryCode:"ADCP2MHZ",
        "deviceLink":"http://data.oceannetworks.ca/DeviceListing?DeviceId=10011",
        "deviceName":"OceanWorks Junction Box JB-02 (BC Pod #1 Axis)",
        "hasDeviceData":true
    },
    {
        "cvTerm": {
            "device":[]
        },
        "dataRating": [
            {
                "dateFrom":"2008-11-01T00:00:00.000Z",
                "dateTo":null,
                "samplePeriod":60.000000,
                "sampleSize":0
            }
        ],
        "deviceCode":"BC_POD1_PTILTVIDEO",
        "deviceId":11303,

                  "deviceCategoryCode:"VIDEOCAM",
        "deviceLink":"http://data.oceannetworks.ca/DeviceListing?DeviceId=11303",
        "deviceName":"ROS 1060 Multi SeaCam  2186-T",
        "hasDeviceData":true
    },
    {
        "cvTerm": {
            "device":[]
        },
        "dataRating": [
            {
                "dateFrom":"2011-01-14T00:00:00.000Z",
                "dateTo":null,
                "samplePeriod":3600.000000,
                "sampleSize":1
            }
        ],
        "deviceCode":"BC_POD1_ROTSONAR",
        "deviceId":11301,

        "deviceCategoryCode:"IMGROTARYSONAR",
        "deviceLink":"http://data.oceannetworks.ca/DeviceListing?DeviceId=11301",
        "deviceName":"Kongsberg Mesotech Rotary Sonar 1071 (0711217)",
        "hasDeviceData":true
    },
    {
        "cvTerm": {
            "device":[]
        },
        "dataRating":[],
        "deviceCode":"CAMERALIGHTS58",
        "deviceId":12129,        "deviceLink":

"http        "deviceCategoryCode:"PTL",
        "deviceLink":"http://data.oceannetworks.ca/DeviceListing?DeviceId=12129",
        "deviceName":"ROS Pan/Tilt with Lights 3090",
        "hasDeviceData":true
    },
    {
        "cvTerm": {
            "device":[]
        },
        "dataRating":[],
        "deviceCode":"NAXYS_HYD_007",

        "deviceCategoryCode:"HYDROPHONE",
        "deviceId":11207,
        "deviceLink":"http://data.oceannetworks.ca/DeviceListing?DeviceId=11207",
        "deviceName":"Naxys Hydrophone 02345 (S/N 007)",
        "hasDeviceData":true
    }
]

...

Property

Type

Description

Example

deviceCodestringReturns the device code
"deviceCode":"BC_POD1_AD2M"
deviceIdintegerReturns the device id
"deviceId":11302
deviceCategoryCodestringReturns the device category code"deviceCategoryCode:"HYDROPHONE"
deviceNamestringReturns the device name
"deviceName":"Nortek Aquadopp HR-Profiler 2965"
deviceLinkurlReturns the a URL link to Device Listing page for the specific device
"deviceLink":"https://data.oceannetworks.ca/DeviceListing?DeviceId=11302"
dataRatinglist

Returns a list of data ratings and date from for each device–this list may be empty

Each data rating is made up of:

  1. Key : "samplePeriod", Value : "sample period in seconds"
  2. Key : "dateFrom", Value : "dateFrom of sample period"
  3. Key : "dateTo", Value : "dateTo of sample period"
  4. Key : "sampleSize", Value : "number of readings per sample period"
"dataRating": [
{
"dateFrom":"2009-06-22T15:37:00.000Z",
"dateTo":null,
"samplePeriod":1.000000,
"sampleSize":1
}
]
cvTermobject

The list of controlled vocabulary terms associated with the device and any device groups the device belongs to.

Each vocabulary term is made up of:

  1. Key : "vocabulary" Value : "title of the vocabulary term belongs to"
  2. Key : "uri" Value : "URL of the vocabulary term"
"cvTerm": {
"device": [
{
"uri":"http://vocab.nerc.ac.uk/collection/L22/current/TOOL0888/",
"vocabulary":"SeaVoX Device Catalogue"
}
]
}
hasDeviceDatabooleanhasDeviceData flag for devices with searchable device and siteDevice
"hasDeviceData":true

...

https://data.oceannetworks.ca/api/devices?method=get&token=YOUR_TOKEN_HERE&locationCode=BACAX&dateFrom=2010-07-01T00:00:00.000Z&dateTo=2011-06-30T23:59:59.999Z&propertyCode=seawatertemperature

  • Return a list of all of the devices that have been deployed at a location with a Location Code of 'BACCC' ('Barkely Canyon Coral Cliff') and children locations

https://data.oceannetworks.ca/api/devices?method=get&token=YOUR_TOKEN_HERE&locationCode=BACCC&includeChildren=true


API Proxy

The https://data.oceannetworks.ca/apiproxy/devicesURL 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 behavior. In order to use the deployments endpoint from code, you must use the https://data.oceannetworks.ca/api/devices url along with a valid token. 

...

Warning

Please report all issues with the web services, documentation, samples and client libraries to the Oceans 23.0 Help Centre