{"_id":"5714d59537b7e00e00de566c","parentDoc":null,"version":{"_id":"56d54a77075dfa0b00be98d8","__v":13,"project":"56d54a77075dfa0b00be98d5","createdAt":"2016-03-01T07:53:27.479Z","releaseDate":"2016-03-01T07:53:27.479Z","categories":["56d54a78075dfa0b00be98d9","56d6bbf046d19315000f8ea2","56d6bbfc46d19315000f8ea3","570cefd98da5b62b00d57e3c","571491a74007610e00c803ae","5714dcd837b7e00e00de5684","5715ea6ac016190e00f04272","5715f27fc016190e00f0429f","5715f7b9893cbe0e002d74da","5715f8c2c016190e00f042b8","5715fd49a9055c0e0015fbe7","57160c7e893cbe0e002d753a","5716136a893cbe0e002d7552"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"__v":9,"category":{"_id":"571491a74007610e00c803ae","project":"56d54a77075dfa0b00be98d5","version":"56d54a77075dfa0b00be98d8","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-04-18T07:49:59.276Z","from_sync":false,"order":10,"slug":"reporting","title":"Reporting"},"project":"56d54a77075dfa0b00be98d5","user":"56d548ba075dfa0b00be98d2","githubsync":"","updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-04-18T12:39:49.710Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":3,"body":"[block:html]\n{\n  \"html\": \"<h3>GetUnitHistory</h3>\"\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<h4><b>Parameters</b></h4>\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Name\",\n    \"h-1\": \"Data type\",\n    \"h-2\": \"Unit of measurement\",\n    \"h-3\": \"Note\",\n    \"0-0\": \"`unitId`<span style=\\\"color:red\\\">*</span>\",\n    \"0-1\": \"String\",\n    \"0-2\": \"N/A\",\n    \"0-3\": \"UnitId to request summary for.\",\n    \"1-0\": \"`from` <span style=\\\"color:red\\\">*</span>\",\n    \"1-1\": \"DateTime\",\n    \"1-2\": \"UTC\",\n    \"1-3\": \"The start date.\",\n    \"2-0\": \"`to` <span style=\\\"color:red\\\">*</span>\",\n    \"2-1\": \"DateTime\",\n    \"2-2\": \"UTC\",\n    \"2-3\": \"The end date.\"\n  },\n  \"cols\": 4,\n  \"rows\": 3\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<h4><b>Columns</b></h4>\"\n}\n[/block]\nRefer to the following table for description of columns:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Name\",\n    \"h-1\": \"Date type\",\n    \"h-2\": \"Unit of measurement\",\n    \"h-3\": \"Nullability\",\n    \"h-4\": \"Note\",\n    \"0-0\": \"`time`\",\n    \"0-1\": \"DateTime\",\n    \"0-2\": \"UTC\",\n    \"0-3\": \"TRUE\",\n    \"0-4\": \"Timestamp.\",\n    \"1-0\": \"`event`\",\n    \"1-1\": \"INT\",\n    \"1-2\": \"N/A\",\n    \"1-3\": \"TRUE\",\n    \"1-4\": \"2 is a timed transmit and 6 is based on an IO change\",\n    \"2-0\": \"`keyId`\",\n    \"2-1\": \"String\",\n    \"2-2\": \"N/A\",\n    \"2-3\": \"TRUE\",\n    \"3-0\": \"`location`\",\n    \"3-1\": \"Location\",\n    \"3-2\": \"N/A\",\n    \"3-3\": \"TRUE\",\n    \"4-0\": \"`address`\",\n    \"4-1\": \"Address\",\n    \"4-2\": \"N/A\",\n    \"4-3\": \"TRUE\",\n    \"5-0\": \"`heading`\",\n    \"5-1\": \"INT\",\n    \"5-2\": \"Degrees\",\n    \"5-3\": \"TRUE\",\n    \"6-0\": \"`speed`\",\n    \"6-1\": \"Double\",\n    \"6-2\": \"Km/h\",\n    \"6-3\": \"TRUE\",\n    \"7-0\": \"`Km`\",\n    \"7-1\": \"Double\",\n    \"7-2\": \"Km\",\n    \"7-3\": \"FALSE\",\n    \"8-0\": \"`run1`\",\n    \"9-0\": \"`run2`\",\n    \"10-0\": \"`run3`\",\n    \"11-0\": \"`run4`\",\n    \"8-1\": \"Double\",\n    \"9-1\": \"Double\",\n    \"10-1\": \"Double\",\n    \"11-1\": \"Double\",\n    \"8-2\": \"Seconds\",\n    \"9-2\": \"Seconds\",\n    \"10-2\": \"Seconds\",\n    \"11-2\": \"Seconds\",\n    \"8-3\": \"FALSE\",\n    \"9-3\": \"FALSE\",\n    \"10-3\": \"FALSE\",\n    \"11-3\": \"FALSE\",\n    \"12-0\": \"`runOdo`\",\n    \"12-1\": \"Double\",\n    \"12-2\": \"Seconds\",\n    \"12-3\": \"FALSE\",\n    \"13-0\": \"`temperature1`\",\n    \"13-1\": \"Double\",\n    \"13-2\": \"Degrees\",\n    \"13-3\": \"TRUE\",\n    \"14-0\": \"`temperature2`\",\n    \"14-1\": \"Double\",\n    \"14-2\": \"Degrees\",\n    \"14-3\": \"TRUE\",\n    \"15-0\": \"`input1`\",\n    \"16-0\": \"`input2`\",\n    \"17-0\": \"`input3`\",\n    \"18-0\": \"`input4`\",\n    \"19-0\": \"`input5`\",\n    \"20-0\": \"`input6`\",\n    \"21-0\": \"`input7`\",\n    \"22-0\": \"`input8`\",\n    \"23-0\": \"`input9`\",\n    \"24-0\": \"`input10`\",\n    \"15-1\": \"Bool\",\n    \"15-2\": \"N/A\",\n    \"15-3\": \"FALSE\",\n    \"16-1\": \"Bool\",\n    \"17-1\": \"Bool\",\n    \"18-1\": \"Bool\",\n    \"19-1\": \"Bool\",\n    \"20-1\": \"Bool\",\n    \"21-1\": \"Bool\",\n    \"22-1\": \"Bool\",\n    \"23-1\": \"Bool\",\n    \"24-1\": \"Bool\",\n    \"16-2\": \"N/A\",\n    \"17-2\": \"N/A\",\n    \"18-2\": \"N/A\",\n    \"19-2\": \"N/A\",\n    \"20-2\": \"N/A\",\n    \"21-2\": \"N/A\",\n    \"22-2\": \"N/A\",\n    \"23-2\": \"N/A\",\n    \"24-2\": \"N/A\",\n    \"16-3\": \"FALSE\",\n    \"17-3\": \"FALSE\",\n    \"18-3\": \"FALSE\",\n    \"19-3\": \"FALSE\",\n    \"20-3\": \"FALSE\",\n    \"21-3\": \"FALSE\",\n    \"22-3\": \"FALSE\",\n    \"23-3\": \"FALSE\",\n    \"24-3\": \"FALSE\",\n    \"25-0\": \"`output1`\",\n    \"26-0\": \"`output2`\",\n    \"27-0\": \"`output3`\",\n    \"28-0\": \"`output4`\",\n    \"29-0\": \"`output5`\",\n    \"25-1\": \"Bool\",\n    \"26-1\": \"Bool\",\n    \"27-1\": \"Bool\",\n    \"28-1\": \"Bool\",\n    \"29-1\": \"Bool\",\n    \"25-2\": \"N/A\",\n    \"26-2\": \"N/A\",\n    \"27-2\": \"N/A\",\n    \"28-2\": \"N/A\",\n    \"29-2\": \"N/A\",\n    \"25-3\": \"FALSE\",\n    \"26-3\": \"FALSE\",\n    \"27-3\": \"FALSE\",\n    \"28-3\": \"FALSE\",\n    \"29-3\": \"FALSE\",\n    \"30-0\": \"`analogInput1`\",\n    \"30-1\": \"Double\",\n    \"30-2\": \"N/A\",\n    \"30-3\": \"FALSE\",\n    \"31-0\": \"`analogInput2`\",\n    \"32-0\": \"`analogInput4`\",\n    \"31-1\": \"Double\",\n    \"31-2\": \"N/A\",\n    \"31-3\": \"FALSE\",\n    \"32-1\": \"Double\",\n    \"32-2\": \"N/A\",\n    \"32-3\": \"FALSE\",\n    \"33-0\": \"`Input1ChangeCounter`\",\n    \"34-0\": \"`Input2ChangeCounter`\",\n    \"35-0\": \"`Input3ChangeCounter`\",\n    \"36-0\": \"`Input4ChangeCounter`\",\n    \"33-1\": \"INT\",\n    \"34-1\": \"INT\",\n    \"35-1\": \"INT\",\n    \"36-1\": \"INT\",\n    \"33-2\": \"N/A\",\n    \"34-2\": \"N/A\",\n    \"35-2\": \"N/A\",\n    \"36-2\": \"N/A\",\n    \"33-3\": \"TRUE\",\n    \"34-3\": \"TRUE\",\n    \"35-3\": \"TRUE\",\n    \"36-3\": \"TRUE\",\n    \"33-4\": \"Number of input cycles on input 1\",\n    \"34-4\": \"Number of input cycles on input 2\",\n    \"35-4\": \"Number of input cycles on input 3\",\n    \"36-4\": \"Number of input cycles on input 4\",\n    \"37-0\": \"`batteryLevel`\",\n    \"37-1\": \"Double\",\n    \"37-2\": \"Percent\",\n    \"37-3\": \"TRUE\",\n    \"37-4\": \"Battery level (internal battery).\",\n    \"38-0\": \"`externalPower`\",\n    \"38-1\": \"Double\",\n    \"38-2\": \"Volts\",\n    \"38-3\": \"TRUE\",\n    \"38-4\": \"External power level\"\n  },\n  \"cols\": 5,\n  \"rows\": 39\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<h4><b>Request (example)</b></h4>\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"unitId\\\": \\\"46208\\\",\\n  \\\"from\\\": \\\"2014-09-01T07:12:00.0000000\\\",\\n  \\\"to\\\": \\\"2014-09-01T07:12:05.0000000\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<h4><b>Response</b></h4>\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n            \\\"list\\\": [\\n                {\\n                    \\\"accessKey\\\": \\\"\\\",\\n                    \\\"time\\\": \\\"2014-09-01T12:00:25.0000000Z\\\",\\n                    \\\"latitude\\\": 56.025915,\\n                    \\\"longitude\\\": 12.590625,\\n                    \\\"streetAddress\\\": \\\"Haderslevvej 18\\\",\\n                    \\\"postalCode\\\": \\\"3000\\\",\\n                    \\\"city\\\": \\\"Helsingør\\\",\\n                    \\\"country\\\": \\\"DK\\\",\\n                    \\\"heading\\\": 238,\\n                    \\\"speed\\\": 0,\\n                    \\\"km\\\": 80353,\\n                    \\\"run1\\\": 0,\\n                    \\\"run2\\\": 7314600,\\n                    \\\"runOdo\\\": 5609160,\\n                    \\\"input1\\\": false,\\n                    \\\"input2\\\": true,\\n                    \\\"output3\\\": false,\\n                    \\\"battery\\\": 4158,\\n                    \\\"batteryPercentage\\\": 95,\\n                    \\\"externalPower\\\": 13905\\n                },\\n                {\\n                    \\\"accessKey\\\": \\\"\\\",\\n                    \\\"time\\\": \\\"2014-09-01T12:02:00.0000000Z\\\",\\n                    \\\"latitude\\\": 56.0259133333333,\\n                    \\\"longitude\\\": 12.590645,\\n                    \\\"streetAddress\\\": \\\"Haderslevvej 18\\\",\\n                    \\\"postalCode\\\": \\\"3000\\\",\\n                    \\\"city\\\": \\\"Helsingør\\\",\\n                    \\\"country\\\": \\\"DK\\\",\\n                    \\\"heading\\\": 58,\\n                    \\\"speed\\\": 0,\\n                    \\\"km\\\": 80353,\\n                    \\\"run1\\\": 0,\\n                    \\\"run2\\\": 7314600,\\n                    \\\"runOdo\\\": 5609100,\\n                    \\\"input1\\\": false,\\n                    \\\"input2\\\": false,\\n                    \\\"output3\\\": false,\\n                    \\\"battery\\\": 4158,\\n                    \\\"batteryPercentage\\\": 95,\\n                    \\\"externalPower\\\": 13326\\n                }\\n            ]\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"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.\n\nURL Structure is:\n`https://api.trackunit.com/public/Report/UnitHistory`","slug":"unit-history","type":"basic","title":"Unit History"}

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`

[block:html] { "html": "<h3>GetUnitHistory</h3>" } [/block] [block:html] { "html": "<h4><b>Parameters</b></h4>" } [/block] [block:parameters] { "data": { "h-0": "Name", "h-1": "Data type", "h-2": "Unit of measurement", "h-3": "Note", "0-0": "`unitId`<span style=\"color:red\">*</span>", "0-1": "String", "0-2": "N/A", "0-3": "UnitId to request summary for.", "1-0": "`from` <span style=\"color:red\">*</span>", "1-1": "DateTime", "1-2": "UTC", "1-3": "The start date.", "2-0": "`to` <span style=\"color:red\">*</span>", "2-1": "DateTime", "2-2": "UTC", "2-3": "The end date." }, "cols": 4, "rows": 3 } [/block] [block:html] { "html": "<h4><b>Columns</b></h4>" } [/block] Refer to the following table for description of columns: [block:parameters] { "data": { "h-0": "Name", "h-1": "Date type", "h-2": "Unit of measurement", "h-3": "Nullability", "h-4": "Note", "0-0": "`time`", "0-1": "DateTime", "0-2": "UTC", "0-3": "TRUE", "0-4": "Timestamp.", "1-0": "`event`", "1-1": "INT", "1-2": "N/A", "1-3": "TRUE", "1-4": "2 is a timed transmit and 6 is based on an IO change", "2-0": "`keyId`", "2-1": "String", "2-2": "N/A", "2-3": "TRUE", "3-0": "`location`", "3-1": "Location", "3-2": "N/A", "3-3": "TRUE", "4-0": "`address`", "4-1": "Address", "4-2": "N/A", "4-3": "TRUE", "5-0": "`heading`", "5-1": "INT", "5-2": "Degrees", "5-3": "TRUE", "6-0": "`speed`", "6-1": "Double", "6-2": "Km/h", "6-3": "TRUE", "7-0": "`Km`", "7-1": "Double", "7-2": "Km", "7-3": "FALSE", "8-0": "`run1`", "9-0": "`run2`", "10-0": "`run3`", "11-0": "`run4`", "8-1": "Double", "9-1": "Double", "10-1": "Double", "11-1": "Double", "8-2": "Seconds", "9-2": "Seconds", "10-2": "Seconds", "11-2": "Seconds", "8-3": "FALSE", "9-3": "FALSE", "10-3": "FALSE", "11-3": "FALSE", "12-0": "`runOdo`", "12-1": "Double", "12-2": "Seconds", "12-3": "FALSE", "13-0": "`temperature1`", "13-1": "Double", "13-2": "Degrees", "13-3": "TRUE", "14-0": "`temperature2`", "14-1": "Double", "14-2": "Degrees", "14-3": "TRUE", "15-0": "`input1`", "16-0": "`input2`", "17-0": "`input3`", "18-0": "`input4`", "19-0": "`input5`", "20-0": "`input6`", "21-0": "`input7`", "22-0": "`input8`", "23-0": "`input9`", "24-0": "`input10`", "15-1": "Bool", "15-2": "N/A", "15-3": "FALSE", "16-1": "Bool", "17-1": "Bool", "18-1": "Bool", "19-1": "Bool", "20-1": "Bool", "21-1": "Bool", "22-1": "Bool", "23-1": "Bool", "24-1": "Bool", "16-2": "N/A", "17-2": "N/A", "18-2": "N/A", "19-2": "N/A", "20-2": "N/A", "21-2": "N/A", "22-2": "N/A", "23-2": "N/A", "24-2": "N/A", "16-3": "FALSE", "17-3": "FALSE", "18-3": "FALSE", "19-3": "FALSE", "20-3": "FALSE", "21-3": "FALSE", "22-3": "FALSE", "23-3": "FALSE", "24-3": "FALSE", "25-0": "`output1`", "26-0": "`output2`", "27-0": "`output3`", "28-0": "`output4`", "29-0": "`output5`", "25-1": "Bool", "26-1": "Bool", "27-1": "Bool", "28-1": "Bool", "29-1": "Bool", "25-2": "N/A", "26-2": "N/A", "27-2": "N/A", "28-2": "N/A", "29-2": "N/A", "25-3": "FALSE", "26-3": "FALSE", "27-3": "FALSE", "28-3": "FALSE", "29-3": "FALSE", "30-0": "`analogInput1`", "30-1": "Double", "30-2": "N/A", "30-3": "FALSE", "31-0": "`analogInput2`", "32-0": "`analogInput4`", "31-1": "Double", "31-2": "N/A", "31-3": "FALSE", "32-1": "Double", "32-2": "N/A", "32-3": "FALSE", "33-0": "`Input1ChangeCounter`", "34-0": "`Input2ChangeCounter`", "35-0": "`Input3ChangeCounter`", "36-0": "`Input4ChangeCounter`", "33-1": "INT", "34-1": "INT", "35-1": "INT", "36-1": "INT", "33-2": "N/A", "34-2": "N/A", "35-2": "N/A", "36-2": "N/A", "33-3": "TRUE", "34-3": "TRUE", "35-3": "TRUE", "36-3": "TRUE", "33-4": "Number of input cycles on input 1", "34-4": "Number of input cycles on input 2", "35-4": "Number of input cycles on input 3", "36-4": "Number of input cycles on input 4", "37-0": "`batteryLevel`", "37-1": "Double", "37-2": "Percent", "37-3": "TRUE", "37-4": "Battery level (internal battery).", "38-0": "`externalPower`", "38-1": "Double", "38-2": "Volts", "38-3": "TRUE", "38-4": "External power level" }, "cols": 5, "rows": 39 } [/block] [block:html] { "html": "<h4><b>Request (example)</b></h4>" } [/block] [block:code] { "codes": [ { "code": "{\n \"unitId\": \"46208\",\n \"from\": \"2014-09-01T07:12:00.0000000\",\n \"to\": \"2014-09-01T07:12:05.0000000\"\n}", "language": "json" } ] } [/block] [block:html] { "html": "<h4><b>Response</b></h4>" } [/block] [block:code] { "codes": [ { "code": "{\n \"list\": [\n {\n \"accessKey\": \"\",\n \"time\": \"2014-09-01T12:00:25.0000000Z\",\n \"latitude\": 56.025915,\n \"longitude\": 12.590625,\n \"streetAddress\": \"Haderslevvej 18\",\n \"postalCode\": \"3000\",\n \"city\": \"Helsingør\",\n \"country\": \"DK\",\n \"heading\": 238,\n \"speed\": 0,\n \"km\": 80353,\n \"run1\": 0,\n \"run2\": 7314600,\n \"runOdo\": 5609160,\n \"input1\": false,\n \"input2\": true,\n \"output3\": false,\n \"battery\": 4158,\n \"batteryPercentage\": 95,\n \"externalPower\": 13905\n },\n {\n \"accessKey\": \"\",\n \"time\": \"2014-09-01T12:02:00.0000000Z\",\n \"latitude\": 56.0259133333333,\n \"longitude\": 12.590645,\n \"streetAddress\": \"Haderslevvej 18\",\n \"postalCode\": \"3000\",\n \"city\": \"Helsingør\",\n \"country\": \"DK\",\n \"heading\": 58,\n \"speed\": 0,\n \"km\": 80353,\n \"run1\": 0,\n \"run2\": 7314600,\n \"runOdo\": 5609100,\n \"input1\": false,\n \"input2\": false,\n \"output3\": false,\n \"battery\": 4158,\n \"batteryPercentage\": 95,\n \"externalPower\": 13326\n }\n ]\n}", "language": "json" } ] } [/block]