POST api/Geofence/AddGeofence

Request Information

URI Parameters

None.

Body Parameters

Geofence
NameDescriptionTypeAdditional information
GeofenceId

integer

None.

GeofenceName

string

None.

GeofenceDescription

string

None.

GeofenceTypeName

string

None.

GeofenceTypeID

integer

None.

Latitude

decimal number

None.

Longitude

decimal number

None.

Radius

decimal number

None.

HasNewGroup

boolean

None.

NewGroupName

string

None.

MultiGroupIds

string

None.

GeofenceWKT

string

None.

GeofenceGroupId

integer

None.

GeofenceGroupName

string

None.

GeofenceGroupIds

string

None.

UserId

integer

None.

FillColor

string

None.

BorderColor

string

None.

IsGeofenceHazard

boolean

None.

GeofenceType

integer

None.

GeofenceGroups

Collection of GeofenceGroup

None.

Request Formats

application/json, text/json

Sample:
{
  "GeofenceId": 1,
  "GeofenceName": "sample string 2",
  "GeofenceDescription": "sample string 3",
  "GeofenceTypeName": "sample string 4",
  "GeofenceTypeID": 5,
  "Latitude": 6.1,
  "Longitude": 7.1,
  "Radius": 1.1,
  "HasNewGroup": true,
  "NewGroupName": "sample string 9",
  "MultiGroupIds": "sample string 10",
  "GeofenceWKT": "sample string 11",
  "GeofenceGroupId": 12,
  "GeofenceGroupName": "sample string 13",
  "GeofenceGroupIds": "sample string 14",
  "UserId": 15,
  "FillColor": "sample string 16",
  "BorderColor": "sample string 17",
  "IsGeofenceHazard": true,
  "GeofenceType": 18,
  "GeofenceGroups": [
    {
      "GeofenceGroupId": 1,
      "GeofenceGroupName": "sample string 2"
    },
    {
      "GeofenceGroupId": 1,
      "GeofenceGroupName": "sample string 2"
    }
  ]
}

application/xml, text/xml

Sample:
<Geofence xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TWViewModel">
  <BorderColor>sample string 17</BorderColor>
  <FillColor>sample string 16</FillColor>
  <GeofenceDescription>sample string 3</GeofenceDescription>
  <GeofenceGroupId>12</GeofenceGroupId>
  <GeofenceGroupIds>sample string 14</GeofenceGroupIds>
  <GeofenceGroupName>sample string 13</GeofenceGroupName>
  <GeofenceGroups>
    <GeofenceGroup>
      <GeofenceGroupId>1</GeofenceGroupId>
      <GeofenceGroupName>sample string 2</GeofenceGroupName>
    </GeofenceGroup>
    <GeofenceGroup>
      <GeofenceGroupId>1</GeofenceGroupId>
      <GeofenceGroupName>sample string 2</GeofenceGroupName>
    </GeofenceGroup>
  </GeofenceGroups>
  <GeofenceId>1</GeofenceId>
  <GeofenceName>sample string 2</GeofenceName>
  <GeofenceType>18</GeofenceType>
  <GeofenceTypeID>5</GeofenceTypeID>
  <GeofenceTypeName>sample string 4</GeofenceTypeName>
  <GeofenceWKT>sample string 11</GeofenceWKT>
  <HasNewGroup>true</HasNewGroup>
  <IsGeofenceHazard>true</IsGeofenceHazard>
  <Latitude>6.1</Latitude>
  <Longitude>7.1</Longitude>
  <MultiGroupIds>sample string 10</MultiGroupIds>
  <NewGroupName>sample string 9</NewGroupName>
  <Radius>1.1</Radius>
  <UserId>15</UserId>
</Geofence>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'Geofence'.

Response Information

Resource Description

Object

None.

Response Formats

application/json, text/json

Sample:
{}

application/xml, text/xml

Sample:
<z:anyType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" />