Page tree

Versions Compared

Key

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

...

Code Block
languagejs
titleSample Response
{
  "next": {
    "parameters": {
      "method": "getByDevice",
      "dateTo": "2019-02-16T02:00:00.010Z",
      "deviceCode": "SBECTD19p7027",
      "rowLimit": "2",
      "dateFrom": "2019-02-16T00:40:39.319Z",
      "token": "ffffffff-ffff-ffff-ffff-ffffffffffff"
    },
    "url": "httphttps://127data.0.0.1:8080oceannetworks.ca/dmas/api/scalardata?method=getByDevice&dateTo=2019-02-16T02%3A00%3A00.010Z&deviceCode=SBECTD19p7027&rowLimit=2&dateFrom=2019-02-16T00%3A40%3A39.319Z&token=ffffffff-ffff-ffff-ffff-ffffffffffff"
  },
  "queryURL": "httphttps://127data.0.0.1:8080oceannetworks.ca/dmas/api/scalardata?method=getByDevice&token=ffffffff-ffff-ffff-ffff-ffffffffffff&deviceCode=SBECTD19p7027&dateFrom=2019-02-16T00:06:26.028Z&dateTo=2019-02-16T02:00:00.010Z&rowLimit=2",
  "sensorData": [
    {
      "data": {
        "qaqcFlags": [
          1,
          1
        ],
        "sampleTimes": [
          "2019-02-16T00:40:37.316Z",
          "2019-02-16T00:40:38.323Z"
        ],
        "values": [
          3.15891,
          3.15889
        ]
      },
      "sensorCategoryCode": "conductivity",
      "sensorCode": "cond",
      "sensorName": "Conductivity",
      "unitOfMeasure": "S/m"
    },
    {
      "data": {
        "qaqcFlags": [
          4,
          4
        ],
        "sampleTimes": [
          "2019-02-16T00:40:37.316Z",
          "2019-02-16T00:40:38.323Z"
        ],
        "values": [
          1033.216417644338,
          1033.216285819126
        ]
      },
      "sensorCategoryCode": "density",
      "sensorCode": "density",
      "sensorName": "Density",
      "unitOfMeasure": "kg/m3"
    },
    {
      "data": {
        "qaqcFlags": [
          4,
          4
        ],
        "sampleTimes": [
          "2019-02-16T00:40:37.316Z",
          "2019-02-16T00:40:38.323Z"
        ],
        "values": [
          1271.617,
          1271.62
        ]
      },
      "sensorCategoryCode": "pressure",
      "sensorCode": "Pressure",
      "sensorName": "Pressure",
      "unitOfMeasure": "decibar"
    },
    {
      "data": {
        "qaqcFlags": [
          4,
          4
        ],
        "sampleTimes": [
          "2019-02-16T00:40:37.316Z",
          "2019-02-16T00:40:38.323Z"
        ],
        "values": [
          34.303,
          34.3028
        ]
      },
      "sensorCategoryCode": "salinity",
      "sensorCode": "salinity",
      "sensorName": "Practical Salinity",
      "unitOfMeasure": "psu"
    },
    {
      "data": {
        "qaqcFlags": [
          4,
          4
        ],
        "sampleTimes": [
          "2019-02-16T00:40:37.316Z",
          "2019-02-16T00:40:38.323Z"
        ],
        "values": [
          27.334823592291514,
          27.33467289103237
        ]
      },
      "sensorCategoryCode": "sigma_t",
      "sensorCode": "sigmaT",
      "sensorName": "Sigma-t",
      "unitOfMeasure": "kg/m3"
    },
    {
      "data": {
        "qaqcFlags": [
          4,
          4
        ],
        "sampleTimes": [
          "2019-02-16T00:40:37.316Z",
          "2019-02-16T00:40:38.323Z"
        ],
        "values": [
          27.342687544595037,
          27.342536578750924
        ]
      },
      "sensorCategoryCode": "sigma_theta",
      "sensorCode": "SIGMA_THETA",
      "sensorName": "Sigma-theta (0 dbar)",
      "unitOfMeasure": "kg/m3"
    },
    {
      "data": {
        "qaqcFlags": [
          4,
          4
        ],
        "sampleTimes": [
          "2019-02-16T00:40:37.316Z",
          "2019-02-16T00:40:38.323Z"
        ],
        "values": [
          1482.157,
          1482.157
        ]
      },
      "sensorCategoryCode": "sound_speed",
      "sensorCode": "Sound_Speed",
      "sensorName": "Sound Speed",
      "unitOfMeasure": "m/s"
    },
    {
      "data": {
        "qaqcFlags": [
          1,
          1
        ],
        "sampleTimes": [
          "2019-02-16T00:40:37.316Z",
          "2019-02-16T00:40:38.323Z"
        ],
        "values": [
          2.932,
          2.9319
        ]
      },
      "sensorCategoryCode": "temperature",
      "sensorCode": "Temperature",
      "sensorName": "Temperature",
      "unitOfMeasure": "C"
    }
  ]
}

...

PropertyTypeDescriptionExample
nextObjectAn object containing information on how to make a scalardata call if the current call was unable to return all the data as a limit was exceeded. This is null if there is no more data in the requested range.

  • next.parameters
ObjectAn object containing the set of parameters making up the query to get the next set of data in the requested date range. The parameters will include all parameters passed into the original URL.

  • next.parameters.method
StringgetByDevice, as passed into the original call."getByDevice"
  • next.parameters.dateTo


StringAs passed into the original call
"2019-02-16T02:00:00.010Z"
  • next.parameters.deviceCode
StringAs passed into the original call"SBECTD19p7027"
  • next.parameters.rowLimit
StringAs passed into the original call"2"
  • next.parameters.dateFrom
StringThis is set to 1 millisecond more than the date of the last reading sent in the current call.
"2019-02-16T00:40:39.319Z"
  • next.parameters.token
StringAs passed into the original call"ffffffff-ffff-ffff-ffff-ffffffffffff"
  • next.url
StringThe complete URL that can be used to get the next set of data in the requested range.
"httphttps://127data.0.0.1:8080oceannetworks.ca/dmas/api/scalardata?method=getByDevice&dateTo=2019-02-16T02%3A00%3A00.010Z&deviceCode=SBECTD19p7027&rowLimit=2&dateFrom=2019-02-16T00%3A40%3A39.319Z&token=ffffffff-ffff-ffff-ffff-ffffffffffff"
queryUrlStringURL of current query
"httphttps://127data.0.0.1:8080oceannetworks.ca/dmas/api/scalardata?method=getByDevice&token=ffffffff-ffff-ffff-ffff-ffffffffffff&deviceCode=SBECTD19p7027&dateFrom=2019-02-16T00:06:26.028Z&dateTo=2019-02-16T02:00:00.010Z&rowLimit=2"
sensorDataArray of objectsData sets returned for all applicable sensors
  • sensorData.data
ObjectData sets returned for a single sensor
  • sensorData.data.qaqcFlags
Array of integers

QAQC test results of each data point–guidelines for what each number means:

  • 0 No quality control on data
  • 1 Data passed all tests
  • 2 Data probably good
  • 3 Data probably bad. Failed minor tests
  • 4 Data bad. Failed major tests
  • 7 Averaged value
  • 8 Interpolated value
  • 9 Missing data

[1,1]

  • sensorData.data.sampleTimes
Array of stringsSampling times of sensor data returned, formatted as
yyyy-MM-dd'T'HH:mm:ss.SSS'Z'

"2019-02-16T00:40:37.316Z","2019-02-16T00:40:38.323Z"]

  • sensorData.data.values
Array of doublesValues of sensor data returned, units of measurement are given in sensorData.unitOfMeasure

[3.15891,3.15889]

  • sensorData.sensorCategoryCode
StringCode of sensor, can be null"conductivity"
  • sensorData.sensorCode
String

Code of sensor, can be null

  • deprecated in favour of sensorCategoryCode
"cond"
  • sensorData.sensorName
StringName that denotes what the sensor measures
"Conductivity"
  • sensorData.unitOfMeasure
StringUnit of measurement or "NA" if none apply; temperature units of measure are "C" for degrees Celsius
"S/m"

...

Example (outputFormat object)

httphttps://127data.0.0.1:8080oceannetworks.ca/dmas/api/scalardata?method=getByDevice&token=ffffffff-ffff-ffff-ffffffffffff&deviceCode=SBECTD19p7027&dateFrom=2019-02-16T00:05:26.028Z&dateTo=2019-02-16T01:00:00.010Z&outputFormat=object

Code Block
languagejs
{
   "next": null,
   "queryURL": "httphttps://127data.0.0.1:8080oceannetworks.ca/dmas/api/scalardata?method=getByDevice&token=ffffffff-ffff-ffff-ffff-ffffffffffff&deviceCode=SBECTD19p7027&dateFrom=2019-02-16T00:05:26.028Z&dateTo=2019-02-17T00:00:00.010Z&outputFormat=object",
   "sensorData": [
       {
         "data": [
            {
               "qaqcFlag": 1,
               "sampleTime": "2019-02-16T00:40:37.316Z",
                "value": 3.15891
           },
          {
             "qaqcFlag": 1,
             "sampleTime": "2019-02-16T00:40:38.323Z",
             "value": 3.15889
          },
         {
             "qaqcFlag": 1,
             "sampleTime": "2019-02-16T00:40:39.319Z",
             "value": 3.15891
         },

         ],
        "sensorCategoryCode": "temperature",
        "sensorCode": "Temperature",
        "sensorName": "Temperature",
        "unitOfMeasure": "C"

      }

  ]

}

...

Code Block
languagejs
{
  "next": {
    "parameters": {
      "getLatest": "true",
      "method": "getByDevice",
      "dateTo": "2019-02-16T00:59:54.321Z",
      "deviceCode": "SBECTD19p7027",
      "rowLimit": "5",
      "dateFrom": "2019-02-16T00:06:26.028Z",
      "token": "ffffffff-ffff-ffff-ffff-ffffffffffff"
    },
    "url": "httphttps://127data.0.0.1:8080oceannetworks.ca/dmas/api/scalardata?getLatest=true&method=getByDevice&dateTo=2019-02-16T00%3A59%3A54.321Z&deviceCode=SBECTD19p7027&rowLimit=5&dateFrom=2019-02-16T00%3A06%3A26.028Z&token=ffffffff-ffff-ffff-ffff-ffffffffffff"
  },
  "queryURL": "httphttps://127data.0.0.1:8080oceannetworks.ca/dmas/api/scalardata?method=getByDevice&token=ffffffff-ffff-ffff-ffff-ffffffffffff&deviceCode=SBECTD19p7027&dateFrom=2019-02-16T00:06:26.028Z&dateTo=2019-02-16T01:00:00.010Z&getLatest=true&rowLimit=5",
  "sensorData": [
    {
      "data": {
        "qaqcFlags": [
          1,
          1,
          1,
          1,
          1
        ],
        "sampleTimes": [
          "2019-02-16T00:59:59.329Z",
          "2019-02-16T00:59:58.317Z",
          "2019-02-16T00:59:57.318Z",
          "2019-02-16T00:59:56.320Z",
          "2019-02-16T00:59:55.322Z"
        ],
        "values": [
          3.15887,
          3.15889,
          3.15887,
          3.15887,
          3.15887
        ]
      },
      "sensorCategoryCode": "conductivity",
      "sensorCode": "cond",
      "sensorName": "Conductivity",
      "unitOfMeasure": "S/m"
    },
    {
      "data": {
        "qaqcFlags": [
          4,
          4,
          4,
          4,
          4
        ],
        "sampleTimes": [
          "2019-02-16T00:59:59.329Z",
          "2019-02-16T00:59:58.317Z",
          "2019-02-16T00:59:57.318Z",
          "2019-02-16T00:59:56.320Z",
          "2019-02-16T00:59:55.322Z"
        ],
        "values": [
          1033.216109844531,
          1033.2163281809346,
          1033.2162239082807,
          1033.2161554700383,
          1033.2160189481963
        ]
      },
      "sensorCategoryCode": "density",
      "sensorCode": "density",
      "sensorName": "Density",
      "unitOfMeasure": "kg/m3"
    },
    {
      "data": {
        "qaqcFlags": [
          4,
          4,
          4,
          4,
          4
        ],
        "sampleTimes": [
          "2019-02-16T00:59:59.329Z",
          "2019-02-16T00:59:58.317Z",
          "2019-02-16T00:59:57.318Z",
          "2019-02-16T00:59:56.320Z",
          "2019-02-16T00:59:55.322Z"
        ],
        "values": [
          1271.616,
          1271.612,
          1271.641,
          1271.626,
          1271.636
        ]
      },
      "sensorCategoryCode": "pressure",
      "sensorCode": "Pressure",
      "sensorName": "Pressure",
      "unitOfMeasure": "decibar"
    },
    {
      "data": {
        "qaqcFlags": [
          4,
          4,
          4,
          4,
          4
        ],
        "sampleTimes": [
          "2019-02-16T00:59:59.329Z",
          "2019-02-16T00:59:58.317Z",
          "2019-02-16T00:59:57.318Z",
          "2019-02-16T00:59:56.320Z",
          "2019-02-16T00:59:55.322Z"
        ],
        "values": [
          34.3026,
          34.3029,
          34.3026,
          34.3026,
          34.3024
        ]
      },
      "sensorCategoryCode": "salinity",
      "sensorCode": "salinity",
      "sensorName": "Practical Salinity",
      "unitOfMeasure": "psu"
    },
    {
      "data": {
        "qaqcFlags": [
          4,
          4,
          4,
          4,
          4
        ],
        "sampleTimes": [
          "2019-02-16T00:59:59.329Z",
          "2019-02-16T00:59:58.317Z",
          "2019-02-16T00:59:57.318Z",
          "2019-02-16T00:59:56.320Z",
          "2019-02-16T00:59:55.322Z"
        ],
        "values": [
          27.334513191219912,
          27.334752740942577,
          27.334513191219912,
          27.334513191219912,
          27.334335494507968
        ]
      },
      "sensorCategoryCode": "sigma_t",
      "sensorCode": "sigmaT",
      "sensorName": "Sigma-t",
      "unitOfMeasure": "kg/m3"
    },
    {
      "data": {
        "qaqcFlags": [
          4,
          4,
          4,
          4,
          4
        ],
        "sampleTimes": [
          "2019-02-16T00:59:59.329Z",
          "2019-02-16T00:59:58.317Z",
          "2019-02-16T00:59:57.318Z",
          "2019-02-16T00:59:56.320Z",
          "2019-02-16T00:59:55.322Z"
        ],
        "values": [
          27.342376762326467,
          27.342616416723104,
          27.342376937935114,
          27.342376832569926,
          27.34219951187515
        ]
      },
      "sensorCategoryCode": "sigma_theta",
      "sensorCode": "SIGMA_THETA",
      "sensorName": "Sigma-theta (0 dbar)",
      "unitOfMeasure": "kg/m3"
    },
    {
      "data": {
        "qaqcFlags": [
          4,
          4,
          4,
          4,
          4
        ],
        "sampleTimes": [
          "2019-02-16T00:59:59.329Z",
          "2019-02-16T00:59:58.317Z",
          "2019-02-16T00:59:57.318Z",
          "2019-02-16T00:59:56.320Z",
          "2019-02-16T00:59:55.322Z"
        ],
        "values": [
          1482.157,
          1482.157,
          1482.157,
          1482.157,
          1482.157
        ]
      },
      "sensorCategoryCode": "sound_speed",
      "sensorCode": "Sound_Speed",
      "sensorName": "Sound Speed",
      "unitOfMeasure": "m/s"
    },
    {
      "data": {
        "qaqcFlags": [
          1,
          1,
          1,
          1,
          1
        ],
        "sampleTimes": [
          "2019-02-16T00:59:59.329Z",
          "2019-02-16T00:59:58.317Z",
          "2019-02-16T00:59:57.318Z",
          "2019-02-16T00:59:56.320Z",
          "2019-02-16T00:59:55.322Z"
        ],
        "values": [
          2.9319,
          2.9319,
          2.9319,
          2.9319,
          2.9321
        ]
      },
      "sensorCategoryCode": "temperature",
      "sensorCode": "Temperature",
      "sensorName": "Temperature",
      "unitOfMeasure": "C"
    }
  ]
}

...