POST api/Geofence/PostGeofenceList

获取电子围栏列表接口

请求信息

URI 参数

None.

Body 参数

GetGeofenceListModel
参数名称备注说明数据类型附加信息
DeviceID

设备ID 可以从GetDeviceList接口获取

integer

None.

MapType

地图类型用于获取对应地图的经纬度 [谷歌、华为、高德、苹果原生地图传值google] [百度地图传值baidu] [天地图、OpenStreetMap传值tian]

string

None.

TimeZone

用户所在时区 国内统一为China Standard Time 即东八区时区,也可以为Login方法返回的用户设置时区值

string

None.

Token

Token 授权信息,第一次请求时该值为空

string

None.

Language

语言 中文:zh-cn 英文:en-us

string

None.

请求格式

application/json, text/json

Sample:
{
  "DeviceID": 1,
  "MapType": "sample string 2",
  "TimeZone": "sample string 3",
  "Token": "sample string 4",
  "Language": "sample string 5"
}

application/xml, text/xml

Sample:
<GetGeofenceListModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/OpenWebAPI.Models.ParModel">
  <Language>sample string 5</Language>
  <Token>sample string 4</Token>
  <DeviceID>1</DeviceID>
  <MapType>sample string 2</MapType>
  <TimeZone>sample string 3</TimeZone>
</GetGeofenceListModel>

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 'GetGeofenceListModel'.

响应信息

资源描述

GetGeofenceListResult
参数名称备注说明数据类型附加信息
Items

设备信息集合

Collection of GeofenceInfo

None.

State

返回值基类 0表示成功返回 -1表示接口异常

integer

None.

Remark

返回值说明 通常用于解释返回值情况,例如:接口成功返回、提交的鉴权信息匹配异常等解释说明 0:接口成功返回 -1:接口返回异常 999:鉴权失败 1:提交的鉴权信息匹配异常 2:提交的Token已过期,请重新获取Token 3:用户不存在 4:暂不支持设备IMEI登录 5:用户名下没有设备存在 6:没有获取到分组信息 7:设备不存在 8:没有获取到该时间段内的轨迹数据 9:没有获取到该设备的报警信息 10:用户不存在或密码不匹配 11:报警信息不存在 12:要删除的电子围栏不存在 13:没有获取到该设备的ACC数据 14:该区域内没有设备存在 15:无法获取到该设备的OBD信息 16:要修改的围栏不属于该设备

string

None.

响应格式

application/json, text/json

Sample:
{
  "Items": [
    {
      "GeofenceID": 1,
      "GeofenceName": "sample string 2",
      "GeofenceRemark": "sample string 3",
      "Latitude": "sample string 4",
      "Longitude": "sample string 5",
      "OLatitude": "sample string 6",
      "OLongitude": "sample string 7",
      "Radius": 8,
      "GeofenceType": 9,
      "AlarmType": 10,
      "CreateTime": "sample string 11"
    },
    {
      "GeofenceID": 1,
      "GeofenceName": "sample string 2",
      "GeofenceRemark": "sample string 3",
      "Latitude": "sample string 4",
      "Longitude": "sample string 5",
      "OLatitude": "sample string 6",
      "OLongitude": "sample string 7",
      "Radius": 8,
      "GeofenceType": 9,
      "AlarmType": 10,
      "CreateTime": "sample string 11"
    }
  ],
  "State": 1,
  "Remark": "sample string 2"
}

application/xml, text/xml

Sample:
<GetGeofenceListResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/OpenWebAPI.Models.ResModel">
  <Remark>sample string 2</Remark>
  <State>1</State>
  <Items xmlns:d2p1="http://schemas.datacontract.org/2004/07/OpenWebAPI.Models.ViewModel">
    <d2p1:GeofenceInfo>
      <d2p1:AlarmType>10</d2p1:AlarmType>
      <d2p1:CreateTime>sample string 11</d2p1:CreateTime>
      <d2p1:GeofenceID>1</d2p1:GeofenceID>
      <d2p1:GeofenceName>sample string 2</d2p1:GeofenceName>
      <d2p1:GeofenceRemark>sample string 3</d2p1:GeofenceRemark>
      <d2p1:GeofenceType>9</d2p1:GeofenceType>
      <d2p1:Latitude>sample string 4</d2p1:Latitude>
      <d2p1:Longitude>sample string 5</d2p1:Longitude>
      <d2p1:OLatitude>sample string 6</d2p1:OLatitude>
      <d2p1:OLongitude>sample string 7</d2p1:OLongitude>
      <d2p1:Radius>8</d2p1:Radius>
    </d2p1:GeofenceInfo>
    <d2p1:GeofenceInfo>
      <d2p1:AlarmType>10</d2p1:AlarmType>
      <d2p1:CreateTime>sample string 11</d2p1:CreateTime>
      <d2p1:GeofenceID>1</d2p1:GeofenceID>
      <d2p1:GeofenceName>sample string 2</d2p1:GeofenceName>
      <d2p1:GeofenceRemark>sample string 3</d2p1:GeofenceRemark>
      <d2p1:GeofenceType>9</d2p1:GeofenceType>
      <d2p1:Latitude>sample string 4</d2p1:Latitude>
      <d2p1:Longitude>sample string 5</d2p1:Longitude>
      <d2p1:OLatitude>sample string 6</d2p1:OLatitude>
      <d2p1:OLongitude>sample string 7</d2p1:OLongitude>
      <d2p1:Radius>8</d2p1:Radius>
    </d2p1:GeofenceInfo>
  </Items>
</GetGeofenceListResult>