POST api/GeoSites/CreateFromPlaceId

Creates a geosite from google places API place_id information.

Request Information

URI Parameters

None.

Body Parameters

CreatePlaceIdGeoSiteRequest
NameDescriptionTypeAdditional information
Name

the name of the site. If null, the site name will be based on the place_id details eg. place_name or place_formatted_addres

string

Min length: 3

Radius

Radius in meters. If the place search returns a precise location (such as a street address or a premise), this radius will be applied to the GeoSite. Otherwise the radius will be ignored. Note: GeoSites that are very small (<200m) can cause problems with triangulating units. Note: GeoSites that are overly large (>20000m) can overlap other geosites and cause informational confusion.

integer32

Required

Range: inclusive between 100 and 100000

PlaceId

The google place search PlaceId to create a GeoSite from

string

None.

UserGroupId

The id if the UserGroup the GeoSite should be created in

integer32

Required

Range: inclusive between 0 and 2147483647

VisibleChildren

Indicates if this GeoSite is accessible from child groups and available to units in child groups

boolean

Required

RegisterUnitsOnMove

Indicates if devices are automatically registered for this geosite when they gain access to it (on device or group move) (optional, default is false).

boolean

None.

RegisterUnitsForAlarmsOnMove

Indicates if all devices that are automatically registered for this geosite should also be registered for alarms based on this geosite when they gain access to it (on device or group move) (optional, default is false). If RegisterUnitsOnMove is false, this must also be set false.

boolean

None.

RegisterUnits

Indicates if all devices that will have access to the new GeoSite should be registered to this site upon creation

boolean

Required

RegisterForAlarms

Indicates if all devices that will have access to the new GeoSite should be registered for alarms based on this geosite upon creation If RegisterUnits is false, this must also be set false.

boolean

Required

Request Formats

application/json, text/json

Sample:
{
  "Name": "sample string 1",
  "Radius": 2,
  "PlaceId": "sample string 3",
  "UserGroupId": 4,
  "VisibleChildren": true,
  "RegisterUnitsOnMove": true,
  "RegisterUnitsForAlarmsOnMove": true,
  "RegisterUnits": true,
  "RegisterForAlarms": true
}

application/xml, text/xml

Sample:
<CreatePlaceIdGeoSiteRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebAPI.Models.GeoSites">
  <RegisterForAlarms>true</RegisterForAlarms>
  <RegisterUnits>true</RegisterUnits>
  <RegisterUnitsForAlarmsOnMove>true</RegisterUnitsForAlarmsOnMove>
  <RegisterUnitsOnMove>true</RegisterUnitsOnMove>
  <UserGroupId>4</UserGroupId>
  <VisibleChildren>true</VisibleChildren>
  <Name>sample string 1</Name>
  <PlaceId>sample string 3</PlaceId>
  <Radius>2</Radius>
</CreatePlaceIdGeoSiteRequest>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

Creates a geosite from google places API place_id information.

CreatedNegotiatedContentResultOfGeoSiteInfoModel
NameDescriptionTypeAdditional information
Location

URI

None.

Content

GeoSiteInfoModel

None.

ContentNegotiator

IContentNegotiator

None.

Request

HttpRequestMessage

None.

Formatters

Collection of MediaTypeFormatter

None.

Response Formats

application/json, text/json

Sample:

Sample not available.