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

Name

Data type

Unit of measurement

Note

unitId*

String

N/A

UnitId to request summary for.

from *

DateTime

UTC

The start date.

to *

DateTime

UTC

The end date.

Columns

Refer to the following table for description of columns:

Name

Date type

Unit of measurement

Nullability

Note

time

DateTime

UTC

TRUE

Timestamp.

event

INT

N/A

TRUE

2 is a timed transmit and 6 is based on an IO change

keyId

String

N/A

TRUE

location

Location

N/A

TRUE

address

Address

N/A

TRUE

heading

INT

Degrees

TRUE

speed

Double

Km/h

TRUE

Km

Double

Km

FALSE

run1

Double

Seconds

FALSE

run2

Double

Seconds

FALSE

run3

Double

Seconds

FALSE

run4

Double

Seconds

FALSE

runOdo

Double

Seconds

FALSE

temperature1

Double

Degrees

TRUE

temperature2

Double

Degrees

TRUE

input1

Bool

N/A

FALSE

input2

Bool

N/A

FALSE

input3

Bool

N/A

FALSE

input4

Bool

N/A

FALSE

input5

Bool

N/A

FALSE

input6

Bool

N/A

FALSE

input7

Bool

N/A

FALSE

input8

Bool

N/A

FALSE

input9

Bool

N/A

FALSE

input10

Bool

N/A

FALSE

output1

Bool

N/A

FALSE

output2

Bool

N/A

FALSE

output3

Bool

N/A

FALSE

output4

Bool

N/A

FALSE

output5

Bool

N/A

FALSE

analogInput1

Double

N/A

FALSE

analogInput2

Double

N/A

FALSE

analogInput4

Double

N/A

FALSE

Input1ChangeCounter

INT

N/A

TRUE

Number of input cycles on input 1

Input2ChangeCounter

INT

N/A

TRUE

Number of input cycles on input 2

Input3ChangeCounter

INT

N/A

TRUE

Number of input cycles on input 3

Input4ChangeCounter

INT

N/A

TRUE

Number of input cycles on input 4

batteryLevel

Double

Percent

TRUE

Battery level (internal battery).

externalPower

Double

Volts

TRUE

External 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
                }
            ]
}