{"_id":"59e70b9ee027ae002e7d2eeb","category":{"_id":"59e70b9ee027ae002e7d2ed6","version":"59e70b9ee027ae002e7d2ed2","project":"5496d393f52a630b00519cdd","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-12-21T18:05:46.941Z","from_sync":false,"order":3,"slug":"rest-api","title":"REST API"},"parentDoc":null,"project":"5496d393f52a630b00519cdd","user":"5496d353f52a630b00519cdc","version":{"_id":"59e70b9ee027ae002e7d2ed2","project":"5496d393f52a630b00519cdd","__v":2,"createdAt":"2017-10-18T08:06:54.462Z","releaseDate":"2017-10-18T08:06:54.462Z","categories":["59e70b9ee027ae002e7d2ed3","59e70b9ee027ae002e7d2ed4","59e70b9ee027ae002e7d2ed5","59e70b9ee027ae002e7d2ed6","59e70b9ee027ae002e7d2ed7","59e70b9ee027ae002e7d2ed8","59e70b9ee027ae002e7d2ed9","59e70b9ee027ae002e7d2eda","59e70b9ee027ae002e7d2edb","59e70b9ee027ae002e7d2edc","59e70b9ee027ae002e7d2edd","59e70b9ee027ae002e7d2ede","59e70b9ee027ae002e7d2edf","5b8661ccdd19310003a3fa0b"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"2.0.10","version":"2.0.10"},"githubsync":"","__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2014-12-21T18:40:34.710Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"method":"get","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":4,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Parameters\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field\",\n    \"0-0\": \"limit\\n*(default=25)*\",\n    \"1-0\": \"skip\\n*(optional)*\",\n    \"2-0\": \"active_since\\n*(optional)*\",\n    \"3-0\": \"order\\n*(default=\\ncreation_time_asc)*\",\n    \"h-1\": \"Description\",\n    \"0-1\": \"Limits the number of items returned\",\n    \"1-1\": \"Skips the first items\",\n    \"2-1\": \"Filters results to devices that were active since a specific date\",\n    \"3-1\": \"How to order the results:\\n  * **creation_time_asc** - by ascending device creation time. Recently added device will be last.\\n  * **creation_time_desc** - by  descending device creation time. Recently added device will be first.\",\n    \"3-2\": \"string\",\n    \"3-3\": \"creation_time_asc\",\n    \"2-3\": \"2013-12-25\",\n    \"2-2\": \"YYYY-MM-DD\",\n    \"1-2\": \"int\",\n    \"0-2\": \"int\",\n    \"h-2\": \"Type\",\n    \"h-3\": \"Example\",\n    \"0-3\": \"100\",\n    \"1-3\": \"12\"\n  },\n  \"cols\": 4,\n  \"rows\": 4\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Response\"\n}\n[/block]\nResponse contains the following structure:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field\",\n    \"h-1\": \"Description\",\n    \"h-2\": \"Type\",\n    \"h-3\": \"Example\",\n    \"0-0\": \"device_id\",\n    \"1-0\": \"details\",\n    \"0-1\": \"Placer’s unique device ID. device_id can be used for specific user queries of insights and places data.\",\n    \"1-1\": \"The device details.\",\n    \"1-2\": \"JSON Array of [Device Details](doc:device-details)\",\n    \"0-2\": \"String\",\n    \"0-3\": \"531729fe2989bd000dfc43db\"\n  },\n  \"cols\": 4,\n  \"rows\": 2\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Example\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"result\\\": \\\"SUCCESS\\\",\\n  \\\"total_count\\\": 23456,\\n  \\\"data\\\": [\\n    {\\n      \\\"device_id\\\": \\\"e0fc05c3478926023a8607029f012f9f62bb4590\\\",\\n      \\\"details\\\": {\\n        \\\"creation_time\\\": \\\"2014-03-05T13:43:26.917Z\\\",\\n        \\\"user_id\\\": \\\"123455675443\\\",\\n        \\\"device_id\\\": \\\"531729fe2989bd000dfc43db\\\",\\n        \\\"last_seen\\\": \\\"2014-03-06T11:53:27.427Z\\\",\\n        \\\"profile_last_modfied\\\": \\\"2014-03-06T11:53:27.427Z\\\",\\n        \\\"custom_data\\\": {\\n          \\\"number_of_family_memebers\\\": 4\\n        },\\n        \\\"status\\\": \\\"active_with_errors\\\",\\n        \\\"status_error\\\": {\\n          \\\"error_code\\\": 21,\\n          \\\"error_details\\\": \\\"App is missing location permissions\\\"\\n        }\\n      }\\n    }\\n  ]\\n}\\n\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"HTTPS  api.placer.io/v2/apps/**APP_KEY**/devices\n\n*Devices is used to retrieve a list of devices with basic details such as: user ids, creation date, activity, etc.*","slug":"devices","type":"endpoint","title":"Devices"}

getDevices

HTTPS api.placer.io/v2/apps/**APP_KEY**/devices *Devices is used to retrieve a list of devices with basic details such as: user ids, creation date, activity, etc.*

[block:api-header] { "type": "basic", "title": "Parameters" } [/block] [block:parameters] { "data": { "h-0": "Field", "0-0": "limit\n*(default=25)*", "1-0": "skip\n*(optional)*", "2-0": "active_since\n*(optional)*", "3-0": "order\n*(default=\ncreation_time_asc)*", "h-1": "Description", "0-1": "Limits the number of items returned", "1-1": "Skips the first items", "2-1": "Filters results to devices that were active since a specific date", "3-1": "How to order the results:\n * **creation_time_asc** - by ascending device creation time. Recently added device will be last.\n * **creation_time_desc** - by descending device creation time. Recently added device will be first.", "3-2": "string", "3-3": "creation_time_asc", "2-3": "2013-12-25", "2-2": "YYYY-MM-DD", "1-2": "int", "0-2": "int", "h-2": "Type", "h-3": "Example", "0-3": "100", "1-3": "12" }, "cols": 4, "rows": 4 } [/block] [block:api-header] { "type": "basic", "title": "Response" } [/block] Response contains the following structure: [block:parameters] { "data": { "h-0": "Field", "h-1": "Description", "h-2": "Type", "h-3": "Example", "0-0": "device_id", "1-0": "details", "0-1": "Placer’s unique device ID. device_id can be used for specific user queries of insights and places data.", "1-1": "The device details.", "1-2": "JSON Array of [Device Details](doc:device-details)", "0-2": "String", "0-3": "531729fe2989bd000dfc43db" }, "cols": 4, "rows": 2 } [/block] [block:api-header] { "type": "basic", "title": "Example" } [/block] [block:code] { "codes": [ { "code": "{\n \"result\": \"SUCCESS\",\n \"total_count\": 23456,\n \"data\": [\n {\n \"device_id\": \"e0fc05c3478926023a8607029f012f9f62bb4590\",\n \"details\": {\n \"creation_time\": \"2014-03-05T13:43:26.917Z\",\n \"user_id\": \"123455675443\",\n \"device_id\": \"531729fe2989bd000dfc43db\",\n \"last_seen\": \"2014-03-06T11:53:27.427Z\",\n \"profile_last_modfied\": \"2014-03-06T11:53:27.427Z\",\n \"custom_data\": {\n \"number_of_family_memebers\": 4\n },\n \"status\": \"active_with_errors\",\n \"status_error\": {\n \"error_code\": 21,\n \"error_details\": \"App is missing location permissions\"\n }\n }\n }\n ]\n}\n", "language": "json" } ] } [/block]