POST api/TemperatureObservations

Request Information

URI Parameters

None.

Body Parameters

TemperatureObservation
NameDescriptionTypeAdditional information
RecordId

integer

None.

DateAndTime

date

None.

Temperature

decimal number

None.

Request Formats

application/json, text/json

Sample:
{
  "RecordId": 1,
  "DateAndTime": "2020-02-15T07:21:50.0605807+00:00",
  "Temperature": 3.1
}

application/xml, text/xml

Sample:
<TemperatureObservation xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APL.Models">
  <DateAndTime>2020-02-15T07:21:50.0605807+00:00</DateAndTime>
  <RecordId>1</RecordId>
  <Temperature>3.1</Temperature>
</TemperatureObservation>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'TemperatureObservation'.

Response Information

Resource Description

TemperatureObservation
NameDescriptionTypeAdditional information
RecordId

integer

None.

DateAndTime

date

None.

Temperature

decimal number

None.

Response Formats

application/json, text/json

Sample:
{
  "RecordId": 1,
  "DateAndTime": "2020-02-15T07:21:50.0605807+00:00",
  "Temperature": 3.1
}

application/xml, text/xml

Sample:
<TemperatureObservation xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APL.Models">
  <DateAndTime>2020-02-15T07:21:50.0605807+00:00</DateAndTime>
  <RecordId>1</RecordId>
  <Temperature>3.1</Temperature>
</TemperatureObservation>