GET api/v1/devices/{deviceId}/measurements/channel/{channel}/field/{field}/latest

Gets latest measurement for specified field

Request Information

URI Parameters

NameDescriptionTypeAdditional information
deviceId

The device Id

globally unique identifier

Required

channel

The channel

integer

Required

field

The fieldname of the measurement.

string

Required

Body Parameters

None.

Response Information

Resource Description

SenMlMeasurementListDto
NameDescriptionTypeAdditional information
e

Collection of SenMlMeasurementDto

None.

bt

Base time offset for fields

integer

None.

bn

Base name for field names

string

None.

bu

Base unit

string

None.

ver

Version

integer

None.

Response Formats

application/json, text/json, application/senml+json

Sample:
{
  "e": [
    {
      "n": "sample string 1",
      "u": "sample string 2",
      "v": 1.0,
      "sv": "sample string 3",
      "bv": true,
      "s": 1.0,
      "t": 4.1,
      "ut": 1
    },
    {
      "n": "sample string 1",
      "u": "sample string 2",
      "v": 1.0,
      "sv": "sample string 3",
      "bv": true,
      "s": 1.0,
      "t": 4.1,
      "ut": 1
    }
  ],
  "bt": 1,
  "bn": "sample string 2",
  "bu": "sample string 3",
  "ver": 4
}

application/xml, text/xml

Sample:
<SenMlMeasurementListDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Measurements">
  <bn>sample string 2</bn>
  <bt>1</bt>
  <bu>sample string 3</bu>
  <e>
    <SenMlMeasurementDto>
      <bv>true</bv>
      <n>sample string 1</n>
      <s>1</s>
      <sv>sample string 3</sv>
      <t>4.1</t>
      <u>sample string 2</u>
      <ut>1</ut>
      <v>1</v>
    </SenMlMeasurementDto>
    <SenMlMeasurementDto>
      <bv>true</bv>
      <n>sample string 1</n>
      <s>1</s>
      <sv>sample string 3</sv>
      <t>4.1</t>
      <u>sample string 2</u>
      <ut>1</ut>
      <v>1</v>
    </SenMlMeasurementDto>
  </e>
  <ver>4</ver>
</SenMlMeasurementListDto>