POST sites/{id}/data
Send a list of values from different channels that belong to the site.
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
id |
The id of the corresponsing site |
integer |
Required |
Body Parameters
The channels and their list of values
Collection of ChannelDataPointVMName | Description | Type | Additional 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": "2023-02-03T11:08:20.776449-08:00" }, { "DataValue": "sample string 1", "DataTime": "2023-02-03T11:08:20.776449-08:00" } ] }, { "ChannelId": 1, "ChannelName": "sample string 1", "DataPoints": [ { "DataValue": "sample string 1", "DataTime": "2023-02-03T11:08:20.776449-08:00" }, { "DataValue": "sample string 1", "DataTime": "2023-02-03T11:08:20.776449-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>2023-02-03T11:08:20.776449-08:00</DataTime> <DataValue>sample string 1</DataValue> </DataPointVM> <DataPointVM> <DataTime>2023-02-03T11:08:20.776449-08:00</DataTime> <DataValue>sample string 1</DataValue> </DataPointVM> </DataPoints> </ChannelDataPointVM> <ChannelDataPointVM> <ChannelId>1</ChannelId> <ChannelName>sample string 1</ChannelName> <DataPoints> <DataPointVM> <DataTime>2023-02-03T11:08:20.776449-08:00</DataTime> <DataValue>sample string 1</DataValue> </DataPointVM> <DataPointVM> <DataTime>2023-02-03T11:08:20.776449-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
ResponseVMName | Description | Type | Additional 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>