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 ChannelDataPointOffsetVMName | 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 DataPointOffsetVM |
None. |
Request Formats
application/json, text/json
Sample:
[ { "ChannelId": 1, "ChannelName": "sample string 1", "DataPoints": [ { "DataValue": "sample string 1", "DataTime": "2024-09-20T06:58:16.3524187-08:00" }, { "DataValue": "sample string 1", "DataTime": "2024-09-20T06:58:16.3524187-08:00" } ] }, { "ChannelId": 1, "ChannelName": "sample string 1", "DataPoints": [ { "DataValue": "sample string 1", "DataTime": "2024-09-20T06:58:16.3524187-08:00" }, { "DataValue": "sample string 1", "DataTime": "2024-09-20T06:58:16.3524187-08:00" } ] } ]
application/xml, text/xml
Sample:
<ArrayOfChannelDataPointOffsetVM xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/FW.WebApi2.ViewModels"> <ChannelDataPointOffsetVM> <ChannelId>1</ChannelId> <ChannelName>sample string 1</ChannelName> <DataPoints> <DataPointOffsetVM> <DataTime xmlns:d5p1="http://schemas.datacontract.org/2004/07/System"> <d5p1:DateTime>2024-09-20T14:58:16.3524187Z</d5p1:DateTime> <d5p1:OffsetMinutes>-480</d5p1:OffsetMinutes> </DataTime> <DataValue>sample string 1</DataValue> </DataPointOffsetVM> <DataPointOffsetVM> <DataTime xmlns:d5p1="http://schemas.datacontract.org/2004/07/System"> <d5p1:DateTime>2024-09-20T14:58:16.3524187Z</d5p1:DateTime> <d5p1:OffsetMinutes>-480</d5p1:OffsetMinutes> </DataTime> <DataValue>sample string 1</DataValue> </DataPointOffsetVM> </DataPoints> </ChannelDataPointOffsetVM> <ChannelDataPointOffsetVM> <ChannelId>1</ChannelId> <ChannelName>sample string 1</ChannelName> <DataPoints> <DataPointOffsetVM> <DataTime xmlns:d5p1="http://schemas.datacontract.org/2004/07/System"> <d5p1:DateTime>2024-09-20T14:58:16.3524187Z</d5p1:DateTime> <d5p1:OffsetMinutes>-480</d5p1:OffsetMinutes> </DataTime> <DataValue>sample string 1</DataValue> </DataPointOffsetVM> <DataPointOffsetVM> <DataTime xmlns:d5p1="http://schemas.datacontract.org/2004/07/System"> <d5p1:DateTime>2024-09-20T14:58:16.3524187Z</d5p1:DateTime> <d5p1:OffsetMinutes>-480</d5p1:OffsetMinutes> </DataTime> <DataValue>sample string 1</DataValue> </DataPointOffsetVM> </DataPoints> </ChannelDataPointOffsetVM> </ArrayOfChannelDataPointOffsetVM>
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>