{"action":"opened","issue":{"url":"https://api.github.com/repos/powtac/Autarc_LAN_User_Stats/issues/56","labels_url":"https://api.github.com/repos/powtac/Autarc_LAN_User_Stats/issues/56/labels{/name}","comments_url":"https://api.github.com/repos/powtac/Autarc_LAN_User_Stats/issues/56/comments","events_url":"https://api.github.com/repos/powtac/Autarc_LAN_User_Stats/issues/56/events","html_url":"https://github.com/powtac/Autarc_LAN_User_Stats/issues/56","id":63424289,"number":56,"title":"New URLs for web service","user":{"login":"powtac","id":36167,"avatar_url":"https://avatars.githubusercontent.com/u/36167?v=3","gravatar_id":"","url":"https://api.github.com/users/powtac","html_url":"https://github.com/powtac","followers_url":"https://api.github.com/users/powtac/followers","following_url":"https://api.github.com/users/powtac/following{/other_user}","gists_url":"https://api.github.com/users/powtac/gists{/gist_id}","starred_url":"https://api.github.com/users/powtac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/powtac/subscriptions","organizations_url":"https://api.github.com/users/powtac/orgs","repos_url":"https://api.github.com/users/powtac/repos","events_url":"https://api.github.com/users/powtac/events{/privacy}","received_events_url":"https://api.github.com/users/powtac/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-21T16:23:22Z","updated_at":"2015-03-21T16:23:22Z","closed_at":null,"body":"#### Required APIs on web service\r\n(See https://github.com/powtac/Autarc_LAN_User_Stats/issues/10#issuecomment-55624432)\r\n1. Receive Requests\r\n2. Return vendor/manufacture for a given MAC address / Return name for an device by MAC address \r\n3. List all scanners\r\n4. List the stats for a single scanner\r\n5. Set the name for a device\r\n\r\n### `POST  [network_name]/ping_result/add`\r\n```JSON\r\n{\r\n\t\"network_name\": \"Fischergasse\",\r\n\t\"online\": [\r\n\t\t{\"ip\": \"10.0.1.12\", \"t\": 0, \"mac\": \"111:111:111:111:111\"}\r\n\t],\r\n\t\"offline\": [\r\n\t\t{\"ip\": \"10.0.1.8\",  \"t\": 13},\r\n\t\t{\"ip\": \"10.0.1.9\",  \"t\": 7},\r\n\t\t{\"ip\": \"10.0.1.10\", \"t\": 4},\r\n\t\t{\"ip\": \"10.0.1.11\", \"t\": 2}\r\n\t]\r\n}\r\n```\r\n`t`  = time ago in seconds\r\n\r\n### `GET  [network_name]/device/[mac]/info`\r\n```JSON\r\n{\r\n\t\"network_name\": \"Fischergasse\",\r\n\t\"mac\": \"111:111:111:111:111\",\r\n\t\"mac_formated\": \"111:111:111:111:111\",\r\n\t\"vendor\": \"Apple\",\r\n\t\"name_set\": TRUE,\r\n\t\"name\": \"Simon iPhone\",\r\n\t\"last_seen_seconds\": 233534534,\r\n\t\"last_seen_timestamp\": 80346456456,\r\n\t\"last_seen_datetime\": \"12.12.2015 18:35\"\r\n}\r\n``` \r\n`last_seen_seconds`  = time ago in seconds\r\n`last_seen_timestamp`  = unix timestamp\r\nMaybe a `history` object will be added later\r\n\r\n### `GET  networks/list`\r\n```JSON\r\n{\r\n\t\"networks\": [\"Fischergasse\", \"TIM ARM\"]\r\n}\r\n```\r\n*JSON is always an object*\r\n\r\n### `GET  [network_name]/stats[/range]`\r\n```JSON\r\n{\r\n\t\"network_name\": \"Fischergasse\",\r\n\t\"range\": \"12 days\",\r\n\t\"data\": [\r\n\t\t{\"t\": 5466, \"d\": \"23.12.2015 03:20:12\", \"ip\": \"10.0.5.13\", \"status\": \"off\",},\r\n\t\t{\"t\": 5466, \"d\": \"23.12.2015 03:20:12\", \"ip\": \"10.0.5.4\", \"status\": \"on\", \"mac\": \"111:111:...\"}, \r\n\t\t{\"t\": 5478, \"d\": \"23.12.2015 03:20:17\", \"ip\": \"10.0.5.14\", \"status\": \"off\"},\r\n\t\t{\"t\": 5489, \"d\": \"23.12.2015 03:20:20\", \"ip\": \"10.0.5.15\", \"status\": \"off\"},\r\n\t\t{\"t\": 5490, \"d\": \"23.12.2015 03:20:22\", \"ip\": \"10.0.5.16\", \"status\": \"off\"},\r\n\t\t{\"t\": 5456, \"d\": \"23.12.2015 03:20:24\", \"ip\": \"10.0.5.17\", \"status\": \"off\"},\r\n\t\t{\"t\": 5445, \"d\": \"23.12.2015 03:20:25\", \"ip\": \"10.0.5.18\", \"status\": \"off\"},\r\n\t\t{\"t\": 5465, \"d\": \"23.12.2015 03:20:26\", \"ip\": \"10.0.5.19\", \"status\": \"off\"},\r\n\t\t{\"t\": 5464, \"d\": \"23.12.2015 03:20:29\", \"ip\": \"10.0.5.20\", \"status\": \"off\"},\r\n\t\t{\"t\": 5445, \"d\": \"23.12.2015 03:20:32\", \"ip\": \"10.0.5.21\", \"status\": \"off\"},\r\n\t\t{\"t\": 5425, \"d\": \"23.12.2015 03:20:36\", \"ip\": \"10.0.5.22\", \"status\": \"off\"},\r\n\t\t{\"t\": 5489, \"d\": \"23.12.2015 03:20:38\", \"ip\": \"10.0.5.23\", \"status\": \"off\"},\r\n\t\t{\"t\": 5456, \"d\": \"23.12.2015 03:20:39\", \"ip\": \"10.0.5.24\", \"status\": \"off\"},\r\n\t\t{\"t\": 5463, \"d\": \"23.12.2015 03:20:40\", \"ip\": \"10.0.5.25\", \"status\": \"off\"},\r\n\t\t{\"t\": 5495, \"d\": \"23.12.2015 03:20:44\", \"ip\": \"10.0.5.26\", \"status\": \"off\"},\r\n\t\t{\"t\": 5456, \"d\": \"23.12.2015 03:20:45\", \"ip\": \"10.0.5.27\", \"status\": \"off\"},\r\n\t\t{\"t\": 5466, \"d\": \"23.12.2015 03:20:46\", \"ip\": \"10.0.5.28\", \"status\": \"off\"},\r\n\t\t{\"t\": 5489, \"d\": \"23.12.2015 03:20:47\", \"ip\": \"10.0.5.29\", \"status\": \"off\"},\r\n\t]\r\n}\r\n```\r\n`range` is http://php.net/manual/en/function.strtotime.php (default: \"48 h\")\r\nData points on the same time will become two data points\r\n\r\n### `POST  [network_name]/device/[mac]/name`\r\n```JSON\r\n{\r\n\t\"network_name\": \"Fischergasse\",\r\n\t\"mac\": \"111:111:111:111:111\",\r\n\t\"name\": \"Simon iPhone\"\r\n}\r\n```"}}