POST api/v1/measurements

Submit a new measurement. Use SenML Post in preference to this api to allow for better naming of fields.

Request Information

URI Parameters

None.

Body Parameters

MeasurementDto
NameDescriptionTypeAdditional information
Channel

The channel. By default use Channel 0.

integer

None.

Field1

First field data.

string

None.

Field2

Additional field data.

string

None.

Field3

Additional field data.

string

None.

Field4

Additional field data.

string

None.

Field5

Additional field data.

string

None.

Field6

Additional field data.

string

None.

Field7

Additional field data.

string

None.

Field8

Additional field data.

string

None.

Field9

Additional field data.

string

None.

Field10

Additional field data.

string

None.

Field11

Additional field data.

string

None.

Field12

Additional field data.

string

None.

Tags

Comma separated list of tags.

string

None.

SampleId

The sample identifier.

string

None.

Latitude

Location Latitude

decimal number

None.

Longitude

Location Longitude

decimal number

None.

Elevation

Location Elevation

decimal number

None.

Date

UTC Date time of the measurement.

date

None.

Lite

Set Lite to true to return a minimal response (excludes the object added, returns only object location)

boolean

None.

OperatorId

The operator (human) making the measurement.

string

None.

BatteryLevelPercentage

Percentage level (integer only) of the battery level.

integer

None.

RfStrength

Percentage level (integer only) of the RF Strength

integer

None.

Request Formats

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

Sample:
{
  "Channel": 1,
  "Field1": "sample string 2",
  "Field2": "sample string 3",
  "Field3": "sample string 4",
  "Field4": "sample string 5",
  "Field5": "sample string 6",
  "Field6": "sample string 7",
  "Field7": "sample string 8",
  "Field8": "sample string 9",
  "Field9": "sample string 10",
  "Field10": "sample string 11",
  "Field11": "sample string 12",
  "Field12": "sample string 13",
  "Tags": "sample string 14",
  "SampleId": "sample string 15",
  "LocationId": "25666c89-7302-4067-a741-0e0fd1922954",
  "LocationName": "sample string 17",
  "Latitude": 1.1,
  "Longitude": 1.1,
  "Elevation": 1.1,
  "Date": "2017-06-26T17:13:05.8283491+00:00",
  "Lite": true,
  "OperatorId": "sample string 19",
  "BatteryLevelPercentage": 1,
  "RfStrength": 1
}

application/xml, text/xml

Sample:
<addMeasurementDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Measurements">
  <BatteryLevelPercentage>1</BatteryLevelPercentage>
  <Channel>1</Channel>
  <Date>2017-06-26T17:13:05.8283491+00:00</Date>
  <Elevation>1.1</Elevation>
  <Field1>sample string 2</Field1>
  <Field10>sample string 11</Field10>
  <Field11>sample string 12</Field11>
  <Field12>sample string 13</Field12>
  <Field2>sample string 3</Field2>
  <Field3>sample string 4</Field3>
  <Field4>sample string 5</Field4>
  <Field5>sample string 6</Field5>
  <Field6>sample string 7</Field6>
  <Field7>sample string 8</Field7>
  <Field8>sample string 9</Field8>
  <Field9>sample string 10</Field9>
  <Latitude>1.1</Latitude>
  <Lite>true</Lite>
  <LocationId>25666c89-7302-4067-a741-0e0fd1922954</LocationId>
  <LocationName>sample string 17</LocationName>
  <Longitude>1.1</Longitude>
  <OperatorId>sample string 19</OperatorId>
  <RfStrength>1</RfStrength>
  <SampleId>sample string 15</SampleId>
  <Tags>sample string 14</Tags>
</addMeasurementDto>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

MeasurementResponseDto
NameDescriptionTypeAdditional information
Id

globally unique identifier

None.

Url

Do not use. Use Links["self"]

string

None.

PostedOn

date

None.

MeasurementDate

date

None.

MeasurementFields

Collection of fields for this measurement point.

Collection of FieldDto

None.

MeasurementDateEpoch

Used for charting.

decimal number

None.

Links

Collection of links associated with the measurement.

Collection of LinkDto

None.

Actions

Actionable links for the measurement (e.g. delete, tag)

Collection of LinkDto

None.

Tags

Freeform Tags assigned to the measurement (e.g. Calibration or QC)

Collection of string

None.

SampleId

Sample Id assigned to the measurement.

string

None.

Location

Location the measurement was taken.

LocationDto

None.

OperatorId

Operator Id taking the measurement

string

None.

BatteryLevelPercentage

Battery level recorded with the measurement. If Appropriate.

integer

None.

RfStrength

RF Signal strength recorded with the measurement. If Appropriate.

integer

None.

Response Formats

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

Sample:
{
  "Id": "83337462-964b-4d6d-9e21-4b894af45bdc",
  "Url": "sample string 2",
  "PostedOn": "2017-06-26T17:13:05.8439754+00:00",
  "MeasurementDate": "2017-06-26T17:13:05.8439754+00:00",
  "Field1": "sample string 5",
  "Field2": "sample string 6",
  "Field3": "sample string 7",
  "Field4": "sample string 8",
  "Field5": "sample string 9",
  "Field6": "sample string 10",
  "Field7": "sample string 11",
  "Field8": "sample string 12",
  "Field9": "sample string 13",
  "Field10": "sample string 14",
  "Field11": "sample string 15",
  "Field12": "sample string 16",
  "Fields": [],
  "MeasurementFields": [],
  "MeasurementDateEpoch": 1498497185.8439753,
  "Links": [
    {
      "Href": "sample string 1",
      "Rel": "sample string 2",
      "Action": "sample string 3"
    },
    {
      "Href": "sample string 1",
      "Rel": "sample string 2",
      "Action": "sample string 3"
    }
  ],
  "Actions": [
    {
      "Href": "sample string 1",
      "Rel": "sample string 2",
      "Action": "sample string 3"
    },
    {
      "Href": "sample string 1",
      "Rel": "sample string 2",
      "Action": "sample string 3"
    }
  ],
  "Tags": [
    "sample string 1",
    "sample string 2"
  ],
  "SampleId": "sample string 17",
  "Location": {
    "Name": "sample string 1",
    "Latitude": 2.1,
    "Longitude": 3.1,
    "Elevation": 4.1,
    "WellKnownLocationId": "27bfbe86-6015-4f8a-8efd-ea6bccea9096",
    "LastUpdated": "2017-06-26T17:13:05.8439754+00:00"
  },
  "OperatorId": "sample string 18",
  "BatteryLevelPercentage": 1,
  "RfStrength": 1
}

application/xml, text/xml

Sample:
<MeasurementResponseDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Measurements">
  <Actions xmlns:d2p1="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Shared">
    <d2p1:LinkViewModel>
      <d2p1:Action>sample string 3</d2p1:Action>
      <d2p1:Href>sample string 1</d2p1:Href>
      <d2p1:Rel>sample string 2</d2p1:Rel>
    </d2p1:LinkViewModel>
    <d2p1:LinkViewModel>
      <d2p1:Action>sample string 3</d2p1:Action>
      <d2p1:Href>sample string 1</d2p1:Href>
      <d2p1:Rel>sample string 2</d2p1:Rel>
    </d2p1:LinkViewModel>
  </Actions>
  <BatteryLevelPercentage>1</BatteryLevelPercentage>
  <Field1>sample string 5</Field1>
  <Field10>sample string 14</Field10>
  <Field11>sample string 15</Field11>
  <Field12>sample string 16</Field12>
  <Field2>sample string 6</Field2>
  <Field3>sample string 7</Field3>
  <Field4>sample string 8</Field4>
  <Field5>sample string 9</Field5>
  <Field6>sample string 10</Field6>
  <Field7>sample string 11</Field7>
  <Field8>sample string 12</Field8>
  <Field9>sample string 13</Field9>
  <Fields />
  <Id>83337462-964b-4d6d-9e21-4b894af45bdc</Id>
  <Links xmlns:d2p1="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Shared">
    <d2p1:LinkViewModel>
      <d2p1:Action>sample string 3</d2p1:Action>
      <d2p1:Href>sample string 1</d2p1:Href>
      <d2p1:Rel>sample string 2</d2p1:Rel>
    </d2p1:LinkViewModel>
    <d2p1:LinkViewModel>
      <d2p1:Action>sample string 3</d2p1:Action>
      <d2p1:Href>sample string 1</d2p1:Href>
      <d2p1:Rel>sample string 2</d2p1:Rel>
    </d2p1:LinkViewModel>
  </Links>
  <Location xmlns:d2p1="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Shared">
    <d2p1:Elevation>4.1</d2p1:Elevation>
    <d2p1:LastUpdated>2017-06-26T17:13:05.8439754+00:00</d2p1:LastUpdated>
    <d2p1:Latitude>2.1</d2p1:Latitude>
    <d2p1:Longitude>3.1</d2p1:Longitude>
    <d2p1:Name>sample string 1</d2p1:Name>
    <d2p1:WellKnownLocationId>27bfbe86-6015-4f8a-8efd-ea6bccea9096</d2p1:WellKnownLocationId>
  </Location>
  <MeasurementDate>2017-06-26T17:13:05.8439754+00:00</MeasurementDate>
  <MeasurementFields xmlns:d2p1="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Measurements.V2" />
  <OperatorId>sample string 18</OperatorId>
  <PostedOn>2017-06-26T17:13:05.8439754+00:00</PostedOn>
  <RfStrength>1</RfStrength>
  <SampleId>sample string 17</SampleId>
  <Tags xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </Tags>
  <Url>sample string 2</Url>
</MeasurementResponseDto>