POST sites/{id}/channels/{channelId}/data

Create new data points in the specified site and the specified channel, by passing a collection of data points.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

Site id of the site where the specified channel exists.

integer

Required

channelId

Channel id of the channel where these data points will be created.

integer

Required

Body Parameters

An array of data points to be created in the specified channel.

Collection of DataPointOffsetVM
NameDescriptionTypeAdditional information
DataValue

The recorded value at this moment in time.

string

None.

DataTime

The date and time this value was recorded. Expects an ISO-8601 formatted date.

date

None.

Request Formats

application/json, text/json

Sample:
[
  {
    "DataValue": "sample string 1",
    "DataTime": "2025-01-17T16:56:11.7093022-08:00"
  },
  {
    "DataValue": "sample string 1",
    "DataTime": "2025-01-17T16:56:11.7093022-08:00"
  }
]

application/xml, text/xml

Sample:
<ArrayOfDataPointOffsetVM xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/FW.WebApi2.ViewModels">
  <DataPointOffsetVM>
    <DataTime xmlns:d3p1="http://schemas.datacontract.org/2004/07/System">
      <d3p1:DateTime>2025-01-18T00:56:11.7093022Z</d3p1:DateTime>
      <d3p1:OffsetMinutes>-480</d3p1:OffsetMinutes>
    </DataTime>
    <DataValue>sample string 1</DataValue>
  </DataPointOffsetVM>
  <DataPointOffsetVM>
    <DataTime xmlns:d3p1="http://schemas.datacontract.org/2004/07/System">
      <d3p1:DateTime>2025-01-18T00:56:11.7093022Z</d3p1:DateTime>
      <d3p1:OffsetMinutes>-480</d3p1:OffsetMinutes>
    </DataTime>
    <DataValue>sample string 1</DataValue>
  </DataPointOffsetVM>
</ArrayOfDataPointOffsetVM>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

ResponseVM
NameDescriptionTypeAdditional information
ResultCode

FwApiResultCode

None.

ResultMessage

string

None.

Response Formats

application/json, text/json

Sample:
{
  "ResultCode": 0,
  "ResultMessage": "sample string 1"
}

application/xml, text/xml

Sample:
<ResponseVM xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/FW.WebApi2.ViewModels">
  <ResultCode>Ok</ResultCode>
  <ResultMessage>sample string 1</ResultMessage>
</ResponseVM>