POST sites/{id}/data

Send a list of values from different channels that belong to the site.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

The id of the corresponsing site

integer

Required

Body Parameters

The channels and their list of values

Collection of ChannelDataPointVM
NameDescriptionTypeAdditional information
ChannelId

The unique id of the channel

integer

None.

ChannelName

The name of the channel, unique only to a specific site

string

None.

DataPoints

The value and corresponding date time.

Collection of DataPointVM

None.

Request Formats

application/json, text/json

Sample:
[
  {
    "ChannelId": 1,
    "ChannelName": "sample string 1",
    "DataPoints": [
      {
        "DataValue": "sample string 1",
        "DataTime": "2022-07-01T20:17:05.2677843-08:00"
      },
      {
        "DataValue": "sample string 1",
        "DataTime": "2022-07-01T20:17:05.2677843-08:00"
      }
    ]
  },
  {
    "ChannelId": 1,
    "ChannelName": "sample string 1",
    "DataPoints": [
      {
        "DataValue": "sample string 1",
        "DataTime": "2022-07-01T20:17:05.2677843-08:00"
      },
      {
        "DataValue": "sample string 1",
        "DataTime": "2022-07-01T20:17:05.2677843-08:00"
      }
    ]
  }
]

application/xml, text/xml

Sample:
<ArrayOfChannelDataPointVM xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/FW.WebApi2.ViewModels">
  <ChannelDataPointVM>
    <ChannelId>1</ChannelId>
    <ChannelName>sample string 1</ChannelName>
    <DataPoints>
      <DataPointVM>
        <DataTime>2022-07-01T20:17:05.2677843-08:00</DataTime>
        <DataValue>sample string 1</DataValue>
      </DataPointVM>
      <DataPointVM>
        <DataTime>2022-07-01T20:17:05.2677843-08:00</DataTime>
        <DataValue>sample string 1</DataValue>
      </DataPointVM>
    </DataPoints>
  </ChannelDataPointVM>
  <ChannelDataPointVM>
    <ChannelId>1</ChannelId>
    <ChannelName>sample string 1</ChannelName>
    <DataPoints>
      <DataPointVM>
        <DataTime>2022-07-01T20:17:05.2677843-08:00</DataTime>
        <DataValue>sample string 1</DataValue>
      </DataPointVM>
      <DataPointVM>
        <DataTime>2022-07-01T20:17:05.2677843-08:00</DataTime>
        <DataValue>sample string 1</DataValue>
      </DataPointVM>
    </DataPoints>
  </ChannelDataPointVM>
</ArrayOfChannelDataPointVM>

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>