POST sites
Creates a new site based on a site definition passed in the body of the request.
Request Information
URI Parameters
None.
Body Parameters
A site object containing the full definition of the site to be created.
CreateSiteVM| Name | Description | Type | Additional information |
|---|---|---|---|
| DisplaySiteName |
The site name as displayed in FlowWorks. |
string |
None. |
| InternalSiteName |
The internal site name or device name that is used to when ingesting data from outside FlowWorks. |
string |
None. |
| SiteType |
The type of site. Supported types include:
|
string |
None. |
| Longitude |
Longitude coordinate of the site. |
decimal number |
None. |
| Latitude |
Latitude coordinate of the site. |
decimal number |
None. |
| Address |
The street address or description of where this site is located. |
string |
None. |
| UnitsMode |
The type of measurement units that this site is expected to use. Supported values are: 'US Standard' or 'Metric'.
|
string |
None. |
| TimeZone |
A number representing the UTC timezone offset where this site is located. For example, -5, -6, -7, or -8 to represent EST, CST, MST, and PST timezones respectively. |
decimal number |
None. |
| ExpectedSchedule |
The number of minutes representing how frequently this site will received data in FlowWorks. This is used to mark the site as Late (yellow icon) in various places in FlowWorks. |
integer |
None. |
| Channels |
An array of channel objects. Each item defines a channel to be created on the site. |
Collection of CreateChannelVM |
None. |
Request Formats
application/json, text/json
{
"DisplaySiteName": "sample string 1",
"InternalSiteName": "sample string 2",
"SiteType": "sample string 3",
"Longitude": 1.1,
"Latitude": 1.1,
"Address": "sample string 4",
"UnitsMode": "sample string 5",
"TimeZone": 6.1,
"ExpectedSchedule": 1,
"Channels": [
{
"ChannelName": "sample string 1",
"Unit": "sample string 2",
"ChannelType": "sample string 3",
"IsVisible": true,
"IsRainfallEnabled": true
},
{
"ChannelName": "sample string 1",
"Unit": "sample string 2",
"ChannelType": "sample string 3",
"IsVisible": true,
"IsRainfallEnabled": true
}
]
}
application/xml, text/xml
<CreateSiteVM xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/FW.WebApi2.ViewModels">
<Address>sample string 4</Address>
<Channels>
<CreateChannelVM>
<ChannelName>sample string 1</ChannelName>
<ChannelType>sample string 3</ChannelType>
<IsRainfallEnabled>true</IsRainfallEnabled>
<IsVisible>true</IsVisible>
<Unit>sample string 2</Unit>
</CreateChannelVM>
<CreateChannelVM>
<ChannelName>sample string 1</ChannelName>
<ChannelType>sample string 3</ChannelType>
<IsRainfallEnabled>true</IsRainfallEnabled>
<IsVisible>true</IsVisible>
<Unit>sample string 2</Unit>
</CreateChannelVM>
</Channels>
<DisplaySiteName>sample string 1</DisplaySiteName>
<ExpectedSchedule>1</ExpectedSchedule>
<InternalSiteName>sample string 2</InternalSiteName>
<Latitude>1.1</Latitude>
<Longitude>1.1</Longitude>
<SiteType>sample string 3</SiteType>
<TimeZone>6.1</TimeZone>
<UnitsMode>sample string 5</UnitsMode>
</CreateSiteVM>
application/x-www-form-urlencoded
Sample not available.
Response Information
Resource Description
ResponseVMOfSiteVM| Name | Description | Type | Additional information |
|---|---|---|---|
| Resources | Collection of SiteVM |
None. |
|
| ResultCode | FwApiResultCode |
None. |
|
| ResultMessage | string |
None. |
Response Formats
application/json, text/json
{
"Resources": [
{
"Id": 1,
"Name": "sample string 2",
"InternalName": "sample string 3",
"Longitude": "sample string 4",
"Latitude": "sample string 5",
"Channels": [
{
"Id": 1,
"Name": "sample string 2",
"Unit": "sample string 3",
"ChannelType": "sample string 4",
"IsVisible": true,
"IsRainfallEnabled": true
},
{
"Id": 1,
"Name": "sample string 2",
"Unit": "sample string 3",
"ChannelType": "sample string 4",
"IsVisible": true,
"IsRainfallEnabled": true
}
]
},
{
"Id": 1,
"Name": "sample string 2",
"InternalName": "sample string 3",
"Longitude": "sample string 4",
"Latitude": "sample string 5",
"Channels": [
{
"Id": 1,
"Name": "sample string 2",
"Unit": "sample string 3",
"ChannelType": "sample string 4",
"IsVisible": true,
"IsRainfallEnabled": true
},
{
"Id": 1,
"Name": "sample string 2",
"Unit": "sample string 3",
"ChannelType": "sample string 4",
"IsVisible": true,
"IsRainfallEnabled": true
}
]
}
],
"ResultCode": 0,
"ResultMessage": "sample string 1"
}
application/xml, text/xml
<ResponseVMOfSiteVMFXJgzlgx 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>
<Resources>
<SiteVM>
<Channels>
<ChannelVM>
<ChannelType>sample string 4</ChannelType>
<Id>1</Id>
<IsRainfallEnabled>true</IsRainfallEnabled>
<IsVisible>true</IsVisible>
<Name>sample string 2</Name>
<Unit>sample string 3</Unit>
</ChannelVM>
<ChannelVM>
<ChannelType>sample string 4</ChannelType>
<Id>1</Id>
<IsRainfallEnabled>true</IsRainfallEnabled>
<IsVisible>true</IsVisible>
<Name>sample string 2</Name>
<Unit>sample string 3</Unit>
</ChannelVM>
</Channels>
<Id>1</Id>
<InternalName>sample string 3</InternalName>
<Latitude>sample string 5</Latitude>
<Longitude>sample string 4</Longitude>
<Name>sample string 2</Name>
</SiteVM>
<SiteVM>
<Channels>
<ChannelVM>
<ChannelType>sample string 4</ChannelType>
<Id>1</Id>
<IsRainfallEnabled>true</IsRainfallEnabled>
<IsVisible>true</IsVisible>
<Name>sample string 2</Name>
<Unit>sample string 3</Unit>
</ChannelVM>
<ChannelVM>
<ChannelType>sample string 4</ChannelType>
<Id>1</Id>
<IsRainfallEnabled>true</IsRainfallEnabled>
<IsVisible>true</IsVisible>
<Name>sample string 2</Name>
<Unit>sample string 3</Unit>
</ChannelVM>
</Channels>
<Id>1</Id>
<InternalName>sample string 3</InternalName>
<Latitude>sample string 5</Latitude>
<Longitude>sample string 4</Longitude>
<Name>sample string 2</Name>
</SiteVM>
</Resources>
</ResponseVMOfSiteVMFXJgzlgx>