{"_id":"5714cfca12b19c0e00ec16f6","githubsync":"","parentDoc":null,"__v":10,"user":"56d548ba075dfa0b00be98d2","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","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"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-04-18T12:15:06.662Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"[block:html]\n{\n  \"html\": \"<h3>GetKeyHistory</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\": \"`keyId`<span style=\\\"color:red\\\">*</span>\",\n    \"0-1\": \"String\",\n    \"0-2\": \"N/A\",\n    \"0-3\": \"KeyId 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\": \"Data type\",\n    \"h-2\": \"Unit of measurement\",\n    \"h-3\": \"Nullability\",\n    \"0-0\": \"`unitId`\",\n    \"0-1\": \"String\",\n    \"0-2\": \"UTC\",\n    \"h-4\": \"Note\",\n    \"0-3\": \"TRUE\",\n    \"1-0\": \"`time`\",\n    \"1-1\": \"DateTime\",\n    \"1-2\": \"UTC\",\n    \"1-3\": \"TRUE\",\n    \"1-4\": \"Timestamp.\",\n    \"2-0\": \"`location`\",\n    \"2-1\": \"Location\",\n    \"2-2\": \"N/A\",\n    \"2-3\": \"TRUE\",\n    \"3-0\": \"`address`\",\n    \"3-1\": \"Address\",\n    \"3-2\": \"N/A\",\n    \"3-3\": \"TRUE\",\n    \"4-0\": \"`heading`\",\n    \"4-1\": \"INT\",\n    \"4-2\": \"Degrees\",\n    \"4-3\": \"TRUE\",\n    \"4-4\": \"Unit heading (when moving).\",\n    \"5-0\": \"`speed`\",\n    \"5-1\": \"Double\",\n    \"5-2\": \"Km/h\",\n    \"5-3\": \"TRUE\",\n    \"5-4\": \"Unit speed.\",\n    \"6-0\": \"`km`\",\n    \"6-1\": \"Double\",\n    \"6-2\": \"Km\",\n    \"6-3\": \"FALSE\",\n    \"7-0\": \"`run1`\",\n    \"7-1\": \"Double\",\n    \"7-2\": \"Seconds\",\n    \"7-3\": \"FALSE\",\n    \"8-0\": \"`run2`\",\n    \"8-1\": \"Double\",\n    \"8-2\": \"Seconds\",\n    \"8-3\": \"FALSE\",\n    \"9-0\": \"`temperature1`\",\n    \"9-1\": \"Double\",\n    \"9-2\": \"Degrees\",\n    \"9-3\": \"TRUE\",\n    \"10-0\": \"`temperature2`\",\n    \"10-1\": \"Double\",\n    \"10-2\": \"Degrees\",\n    \"10-3\": \"TRUE\",\n    \"11-0\": \"`input1`\",\n    \"11-1\": \"Bool\",\n    \"11-2\": \"N/A\",\n    \"11-3\": \"FALSE\",\n    \"12-0\": \"`input2`\",\n    \"12-1\": \"Bool\",\n    \"12-2\": \"N/A\",\n    \"12-3\": \"FALSE\",\n    \"13-0\": \"`output3`\",\n    \"13-1\": \"Book\",\n    \"13-2\": \"N/A\",\n    \"13-3\": \"FALSE\",\n    \"14-0\": \"`batteryLevel`\",\n    \"14-1\": \"Double\",\n    \"14-2\": \"Percent\",\n    \"14-3\": \"TRUE\",\n    \"14-4\": \"Battery level (internal battery).\",\n    \"15-0\": \"`externalPower`\",\n    \"15-1\": \"Double\",\n    \"15-2\": \"Mili Volts\",\n    \"15-3\": \"TRUE\",\n    \"15-4\": \"External power level.\"\n  },\n  \"cols\": 5,\n  \"rows\": 16\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\\\": \\\"57899\\\",\\n      \\\"from\\\": \\\"2014-09-02T13:00:00.0000000\\\",\\n      \\\"to\\\": \\\"2014-09-02T14:05:00.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                    \\\"unitId\\\": \\\"57899\\\",\\n                    \\\"time\\\": \\\"2014-09-02T13:59:09.0000000Z\\\",\\n                    \\\"location\\\": {\\n                        \\\"latitude\\\": 48.7669866666667,\\n                        \\\"longitude\\\": 13.046835\\n                    },\\n                    \\\"address\\\": {\\n                        \\\"country\\\": \\\"DE\\\",\\n                        \\\"zipCode\\\": \\\"94491\\\",\\n                        \\\"city\\\": \\\"Hengersberg\\\",\\n                        \\\"streetAddress\\\": \\\"Donaustraße 7\\\"\\n                    },\\n                    \\\"heading\\\": 0,\\n                    \\\"speed\\\": 0,\\n                    \\\"km\\\": 231.7,\\n                    \\\"run1\\\": 2760840,\\n                    \\\"run2\\\": 2760840,\\n                    \\\"runOdo\\\": 27600,\\n                    \\\"input1\\\": true,\\n                    \\\"input2\\\": true,\\n                    \\\"output3\\\": false,\\n                    \\\"batteryLevel\\\": 100,\\n                    \\\"externalPower\\\": 13.8\\n                },\\n                {\\n                    \\\"unitId\\\": \\\"57899\\\",\\n                    \\\"time\\\": \\\"2014-09-02T13:59:11.0000000Z\\\",\\n                    \\\"location\\\": {\\n                        \\\"latitude\\\": 48.7669833333333,\\n                        \\\"longitude\\\": 13.0468433333333\\n                    },\\n                    \\\"address\\\": {\\n                        \\\"country\\\": \\\"DE\\\",\\n                        \\\"zipCode\\\": \\\"94491\\\",\\n                        \\\"city\\\": \\\"Hengersberg\\\",\\n                        \\\"streetAddress\\\": \\\"Donaustraße 7\\\"\\n                    },\\n                    \\\"heading\\\": 0,\\n                    \\\"speed\\\": 0,\\n                    \\\"km\\\": 231.7,\\n                    \\\"run1\\\": 2760840,\\n                    \\\"run2\\\": 2760840,\\n                    \\\"runOdo\\\": 27600,\\n                    \\\"input1\\\": true,\\n                    \\\"input2\\\": true,\\n                    \\\"output3\\\": false,\\n                    \\\"batteryLevel\\\": 100,\\n                    \\\"externalPower\\\": 13.6\\n                },\\n                {\\n                    \\\"unitId\\\": \\\"57899\\\",\\n                    \\\"time\\\": \\\"2014-09-02T14:01:05.0000000Z\\\",\\n                    \\\"location\\\": {\\n                        \\\"latitude\\\": 48.7670466666667,\\n                        \\\"longitude\\\": 13.0471833333333\\n                    },\\n                    \\\"address\\\": {\\n                        \\\"country\\\": \\\"DE\\\",\\n                        \\\"zipCode\\\": \\\"94491\\\",\\n                        \\\"city\\\": \\\"Hengersberg\\\",\\n                        \\\"streetAddress\\\": \\\"Donaustraße 9\\\"\\n                    },\\n                    \\\"heading\\\": 38,\\n                    \\\"speed\\\": 1,\\n                    \\\"km\\\": 231.7,\\n                    \\\"run1\\\": 2760960,\\n                    \\\"run2\\\": 2760960,\\n                    \\\"runOdo\\\": 27600,\\n                    \\\"input1\\\": true,\\n                    \\\"input2\\\": true,\\n                    \\\"output3\\\": false,\\n                    \\\"batteryLevel\\\": 100,\\n                    \\\"externalPower\\\": 13.6\\n                }\\n            ]\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"Provides a log of all access key activity for the selected period of time. Access key activity is defined by unit operated, location, timestamp, movement (if any) with heading and speed, external power level etc.\n\nURL Structure is:\n`https://api.trackunit.com/public/Report/KeyHistory`","slug":"keyhistory","type":"basic","title":"Key History"}

Key History

Provides a log of all access key activity for the selected period of time. Access key activity is defined by unit operated, location, timestamp, movement (if any) with heading and speed, external power level etc. URL Structure is: `https://api.trackunit.com/public/Report/KeyHistory`

[block:html] { "html": "<h3>GetKeyHistory</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": "`keyId`<span style=\"color:red\">*</span>", "0-1": "String", "0-2": "N/A", "0-3": "KeyId 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": "Data type", "h-2": "Unit of measurement", "h-3": "Nullability", "0-0": "`unitId`", "0-1": "String", "0-2": "UTC", "h-4": "Note", "0-3": "TRUE", "1-0": "`time`", "1-1": "DateTime", "1-2": "UTC", "1-3": "TRUE", "1-4": "Timestamp.", "2-0": "`location`", "2-1": "Location", "2-2": "N/A", "2-3": "TRUE", "3-0": "`address`", "3-1": "Address", "3-2": "N/A", "3-3": "TRUE", "4-0": "`heading`", "4-1": "INT", "4-2": "Degrees", "4-3": "TRUE", "4-4": "Unit heading (when moving).", "5-0": "`speed`", "5-1": "Double", "5-2": "Km/h", "5-3": "TRUE", "5-4": "Unit speed.", "6-0": "`km`", "6-1": "Double", "6-2": "Km", "6-3": "FALSE", "7-0": "`run1`", "7-1": "Double", "7-2": "Seconds", "7-3": "FALSE", "8-0": "`run2`", "8-1": "Double", "8-2": "Seconds", "8-3": "FALSE", "9-0": "`temperature1`", "9-1": "Double", "9-2": "Degrees", "9-3": "TRUE", "10-0": "`temperature2`", "10-1": "Double", "10-2": "Degrees", "10-3": "TRUE", "11-0": "`input1`", "11-1": "Bool", "11-2": "N/A", "11-3": "FALSE", "12-0": "`input2`", "12-1": "Bool", "12-2": "N/A", "12-3": "FALSE", "13-0": "`output3`", "13-1": "Book", "13-2": "N/A", "13-3": "FALSE", "14-0": "`batteryLevel`", "14-1": "Double", "14-2": "Percent", "14-3": "TRUE", "14-4": "Battery level (internal battery).", "15-0": "`externalPower`", "15-1": "Double", "15-2": "Mili Volts", "15-3": "TRUE", "15-4": "External power level." }, "cols": 5, "rows": 16 } [/block] [block:html] { "html": "<h4><b>Request (example)</b></h4>" } [/block] [block:code] { "codes": [ { "code": " {\n \"unitId\": \"57899\",\n \"from\": \"2014-09-02T13:00:00.0000000\",\n \"to\": \"2014-09-02T14:05:00.0000000\"\n }", "language": "json" } ] } [/block] [block:html] { "html": "<h4><b>Response</b></h4>" } [/block] [block:code] { "codes": [ { "code": "{\n \"list\": [\n {\n \"unitId\": \"57899\",\n \"time\": \"2014-09-02T13:59:09.0000000Z\",\n \"location\": {\n \"latitude\": 48.7669866666667,\n \"longitude\": 13.046835\n },\n \"address\": {\n \"country\": \"DE\",\n \"zipCode\": \"94491\",\n \"city\": \"Hengersberg\",\n \"streetAddress\": \"Donaustraße 7\"\n },\n \"heading\": 0,\n \"speed\": 0,\n \"km\": 231.7,\n \"run1\": 2760840,\n \"run2\": 2760840,\n \"runOdo\": 27600,\n \"input1\": true,\n \"input2\": true,\n \"output3\": false,\n \"batteryLevel\": 100,\n \"externalPower\": 13.8\n },\n {\n \"unitId\": \"57899\",\n \"time\": \"2014-09-02T13:59:11.0000000Z\",\n \"location\": {\n \"latitude\": 48.7669833333333,\n \"longitude\": 13.0468433333333\n },\n \"address\": {\n \"country\": \"DE\",\n \"zipCode\": \"94491\",\n \"city\": \"Hengersberg\",\n \"streetAddress\": \"Donaustraße 7\"\n },\n \"heading\": 0,\n \"speed\": 0,\n \"km\": 231.7,\n \"run1\": 2760840,\n \"run2\": 2760840,\n \"runOdo\": 27600,\n \"input1\": true,\n \"input2\": true,\n \"output3\": false,\n \"batteryLevel\": 100,\n \"externalPower\": 13.6\n },\n {\n \"unitId\": \"57899\",\n \"time\": \"2014-09-02T14:01:05.0000000Z\",\n \"location\": {\n \"latitude\": 48.7670466666667,\n \"longitude\": 13.0471833333333\n },\n \"address\": {\n \"country\": \"DE\",\n \"zipCode\": \"94491\",\n \"city\": \"Hengersberg\",\n \"streetAddress\": \"Donaustraße 9\"\n },\n \"heading\": 38,\n \"speed\": 1,\n \"km\": 231.7,\n \"run1\": 2760960,\n \"run2\": 2760960,\n \"runOdo\": 27600,\n \"input1\": true,\n \"input2\": true,\n \"output3\": false,\n \"batteryLevel\": 100,\n \"externalPower\": 13.6\n }\n ]\n}", "language": "json" } ] } [/block]