POST api/v1/senml
Submit a new sensor measurement or multiple sensor measurements.
Request Information
URI Parameters
None.
Body Parameters
SenML formatted measurements document
AddMeasurementsDtoName | Description | Type | Additional information |
---|---|---|---|
e |
Measurements to add. |
Collection of AddMeasurementDto |
None. |
bt |
Base time. |
integer |
None. |
bn |
Base name. |
string |
None. |
bu |
Base units |
string |
None. |
ver |
Version |
integer |
None. |
Request 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 }, { "n": "sample string 1", "u": "sample string 2", "v": 1.0, "sv": "sample string 3", "bv": true, "s": 1.0, "t": 4 } ], "bt": 1, "bn": "sample string 2", "bu": "sample string 3", "ver": 4 }
application/xml, text/xml
Sample:
<AddMeasurementsDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.SenML"> <bn>sample string 2</bn> <bt>1</bt> <bu>sample string 3</bu> <e> <AddMeasurementDto> <bv>true</bv> <n>sample string 1</n> <s>1</s> <sv>sample string 3</sv> <t>4</t> <u>sample string 2</u> <v>1</v> </AddMeasurementDto> <AddMeasurementDto> <bv>true</bv> <n>sample string 1</n> <s>1</s> <sv>sample string 3</sv> <t>4</t> <u>sample string 2</u> <v>1</v> </AddMeasurementDto> </e> <ver>4</ver> </AddMeasurementsDto>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
Returns HTTP Created (201) on success. Does not include location of the created model, or the model.
MeasurementIdDtoName | Description | Type | Additional information |
---|---|---|---|
Id | globally unique identifier |
None. |
Response Formats
application/json, text/json, application/senml+json
Sample:
{ "Id": "21ca002d-5d5a-4d56-8a24-dd806e9119ca" }
application/xml, text/xml
Sample:
<MeasurementIdDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers"> <Id>21ca002d-5d5a-4d56-8a24-dd806e9119ca</Id> </MeasurementIdDto>