POST api/Location/History

Get history location data for a device in a time range

Request Information

Body Parameters

HistoryModel
NameDescriptionTypeAdditional information
DeviceId

device id

integer

None.

StartTime

starting time

date

None.

EndTime

ending time

date

None.

ShowLbs

1:display lbs 2:display wifi

integer

None.

MapType

map style

string

None.

SelectCount

Return quantity

integer

None.

PositionType

integer

None.

Token

Get it after logging in Token

string

None.

Language

Language Option

string

None.

AppId

APP Application Identifier

string

None.

Request Formats

application/json, text/json

Sample:
{
  "DeviceId": 1,
  "StartTime": "2018-12-19T05:10:11.9963672+08:00",
  "EndTime": "2018-12-19T05:10:11.9963672+08:00",
  "ShowLbs": 4,
  "MapType": "sample string 5",
  "SelectCount": 6,
  "PositionType": 7,
  "Token": "sample string 8",
  "Language": "sample string 9",
  "AppId": "sample string 10"
}

application/xml, text/xml

Sample:
<HistoryModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ParModel">
  <AppId>sample string 10</AppId>
  <Language>sample string 9</Language>
  <Token>sample string 8</Token>
  <DeviceId>1</DeviceId>
  <EndTime>2018-12-19T05:10:11.9963672+08:00</EndTime>
  <MapType>sample string 5</MapType>
  <PositionType>7</PositionType>
  <SelectCount>6</SelectCount>
  <ShowLbs>4</ShowLbs>
  <StartTime>2018-12-19T05:10:11.9963672+08:00</StartTime>
</HistoryModel>

Response Information

Resource Description

State status code
0. Indicates success

HistoryResult
NameDescriptionTypeAdditional information
State

status

integer

None.

LastLocationId

final id

integer

None.

LastDeviceUtcDate

Final time

string

None.

Items

data

Collection of HistoryInfo

None.

ItemsCount

Remove the number of stops before you stop

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "State": 1,
  "LastLocationId": 2,
  "LastDeviceUtcDate": "sample string 3",
  "Items": [
    {
      "LocationId": 1,
      "Time": "sample string 2",
      "Lat": 3.0,
      "Lng": 4.0,
      "Speed": 5.0,
      "Course": 6.0,
      "IsStop": 7,
      "StopTime": 8,
      "Icon": "sample string 9",
      "DataType": 10,
      "StopTimeStr": "sample string 11",
      "EndTime": "sample string 12",
      "Battery": 13
    },
    {
      "LocationId": 1,
      "Time": "sample string 2",
      "Lat": 3.0,
      "Lng": 4.0,
      "Speed": 5.0,
      "Course": 6.0,
      "IsStop": 7,
      "StopTime": 8,
      "Icon": "sample string 9",
      "DataType": 10,
      "StopTimeStr": "sample string 11",
      "EndTime": "sample string 12",
      "Battery": 13
    }
  ],
  "ItemsCount": 4
}

application/xml, text/xml

Sample:
<HistoryResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ResModel">
  <Items xmlns:d2p1="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ViewModel">
    <d2p1:HistoryInfo>
      <d2p1:Battery>13</d2p1:Battery>
      <d2p1:Course>6</d2p1:Course>
      <d2p1:DataType>10</d2p1:DataType>
      <d2p1:EndTime>sample string 12</d2p1:EndTime>
      <d2p1:Icon>sample string 9</d2p1:Icon>
      <d2p1:IsStop>7</d2p1:IsStop>
      <d2p1:Lat>3</d2p1:Lat>
      <d2p1:Lng>4</d2p1:Lng>
      <d2p1:LocationId>1</d2p1:LocationId>
      <d2p1:Speed>5</d2p1:Speed>
      <d2p1:StopTime>8</d2p1:StopTime>
      <d2p1:StopTimeStr>sample string 11</d2p1:StopTimeStr>
      <d2p1:Time>sample string 2</d2p1:Time>
    </d2p1:HistoryInfo>
    <d2p1:HistoryInfo>
      <d2p1:Battery>13</d2p1:Battery>
      <d2p1:Course>6</d2p1:Course>
      <d2p1:DataType>10</d2p1:DataType>
      <d2p1:EndTime>sample string 12</d2p1:EndTime>
      <d2p1:Icon>sample string 9</d2p1:Icon>
      <d2p1:IsStop>7</d2p1:IsStop>
      <d2p1:Lat>3</d2p1:Lat>
      <d2p1:Lng>4</d2p1:Lng>
      <d2p1:LocationId>1</d2p1:LocationId>
      <d2p1:Speed>5</d2p1:Speed>
      <d2p1:StopTime>8</d2p1:StopTime>
      <d2p1:StopTimeStr>sample string 11</d2p1:StopTimeStr>
      <d2p1:Time>sample string 2</d2p1:Time>
    </d2p1:HistoryInfo>
  </Items>
  <ItemsCount>4</ItemsCount>
  <LastDeviceUtcDate>sample string 3</LastDeviceUtcDate>
  <LastLocationId>2</LastLocationId>
  <State>1</State>
</HistoryResult>