Unit History

Provides a log of all unit activity for the selected period of time. Unit activity is defined by location, timestamp, movement (if any) with heading and speed, external power level etc.

URL Structure is:
https://api.trackunit.com/public/Report/UnitHistory

GetUnitHistory

Parameters

NameData typeUnit of measurementNote
unitId*StringN/AUnitId to request summary for.
from *DateTimeUTCThe start date.
to *DateTimeUTCThe end date.

Columns

Refer to the following table for description of columns:

NameDate typeUnit of measurementNullabilityNote
timeDateTimeUTCTRUETimestamp.
eventINTN/ATRUE2 is a timed transmit and 6 is based on an IO change
keyIdStringN/ATRUE
locationLocationN/ATRUE
addressAddressN/ATRUE
headingINTDegreesTRUE
speedDoubleKm/hTRUE
KmDoubleKmFALSE
run1DoubleSecondsFALSE
run2DoubleSecondsFALSE
run3DoubleSecondsFALSE
run4DoubleSecondsFALSE
runOdoDoubleSecondsFALSE
temperature1DoubleDegreesTRUE
temperature2DoubleDegreesTRUE
input1BoolN/AFALSE
input2BoolN/AFALSE
input3BoolN/AFALSE
input4BoolN/AFALSE
input5BoolN/AFALSE
input6BoolN/AFALSE
input7BoolN/AFALSE
input8BoolN/AFALSE
input9BoolN/AFALSE
input10BoolN/AFALSE
output1BoolN/AFALSE
output2BoolN/AFALSE
output3BoolN/AFALSE
output4BoolN/AFALSE
output5BoolN/AFALSE
analogInput1DoubleN/AFALSE
analogInput2DoubleN/AFALSE
analogInput4DoubleN/AFALSE
Input1ChangeCounterINTN/ATRUENumber of input cycles on input 1
Input2ChangeCounterINTN/ATRUENumber of input cycles on input 2
Input3ChangeCounterINTN/ATRUENumber of input cycles on input 3
Input4ChangeCounterINTN/ATRUENumber of input cycles on input 4
batteryLevelDoublePercentTRUEBattery level (internal battery).
externalPowerDoubleVoltsTRUEExternal power level

Request (example)

{
  "unitId": "46208",
  "from": "2014-09-01T07:12:00.0000000",
  "to": "2014-09-01T07:12:05.0000000"
}

Response

{
            "list": [
                {
                    "accessKey": "",
                    "time": "2014-09-01T12:00:25.0000000Z",
                    "latitude": 56.025915,
                    "longitude": 12.590625,
                    "streetAddress": "Haderslevvej 18",
                    "postalCode": "3000",
                    "city": "Helsingør",
                    "country": "DK",
                    "heading": 238,
                    "speed": 0,
                    "km": 80353,
                    "run1": 0,
                    "run2": 7314600,
                    "runOdo": 5609160,
                    "input1": false,
                    "input2": true,
                    "output3": false,
                    "battery": 4158,
                    "batteryPercentage": 95,
                    "externalPower": 13905
                },
                {
                    "accessKey": "",
                    "time": "2014-09-01T12:02:00.0000000Z",
                    "latitude": 56.0259133333333,
                    "longitude": 12.590645,
                    "streetAddress": "Haderslevvej 18",
                    "postalCode": "3000",
                    "city": "Helsingør",
                    "country": "DK",
                    "heading": 58,
                    "speed": 0,
                    "km": 80353,
                    "run1": 0,
                    "run2": 7314600,
                    "runOdo": 5609100,
                    "input1": false,
                    "input2": false,
                    "output3": false,
                    "battery": 4158,
                    "batteryPercentage": 95,
                    "externalPower": 13326
                }
            ]
}