{"_id":"55674c9a77c15523002fd5a9","category":{"_id":"55674b187acd550d0075eb14","pages":["55674b197acd550d0075eb16","55674c1d77c15523002fd5a3","55674c2d7acd550d0075eb1d","55674c9a77c15523002fd5a9","55674ce31c38390d006980c7","55674d1d7acd550d0075eb22","55674d7a77c15523002fd5b4","55674dac77c15523002fd5b6","55674e4c77c15523002fd5bb"],"__v":9,"project":"55674b177acd550d0075eb10","version":"55674b187acd550d0075eb13","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-05-28T17:06:32.570Z","from_sync":false,"order":9999,"slug":"documentation","title":"Documentation"},"project":"55674b177acd550d0075eb10","user":"5564f227f0f70f0d00a9ab20","version":{"_id":"55674b187acd550d0075eb13","__v":1,"project":"55674b177acd550d0075eb10","createdAt":"2015-05-28T17:06:32.083Z","releaseDate":"2015-05-28T17:06:32.083Z","categories":["55674b187acd550d0075eb14"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"__v":4,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-05-28T17:12:58.310Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":5,"body":"[block:api-header]\n{\n  \"type\": \"get\",\n  \"title\": \"/mydevices\"\n}\n[/block]\nReturns all information (including tokens) of all devices or nodes belonging to a user's UUID (identified with an \"owner\" property and user's UUID i.e. \"owner\":\"0d1234a0-1234-11e3-b09c-1234e847b2cc\") \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"coap get -H \\\"meshblu_auth_uuid={:UUID}&meshblu_auth_token={:TOKEN}\\\" coap://meshblu-coap.octoblu.com/mydevices\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{  \\n  \\\"devices\\\":[  \\n    {  \\n      \\\"owner\\\":\\\"0d1234a0-1234-11e3-b09c-1234e847b2cc\\\",\\n      \\\"name\\\":\\\"SMS\\\",\\n      \\\"phoneNumber\\\":\\\"16025551234\\\",\\n      \\\"uuid\\\":\\\"1c1234e1-xxxx-11e3-1234-671234c01234\\\",\\n      \\\"timestamp\\\":1390861609070,\\n      \\\"token\\\":\\\"1234eg1234zz1tt1234w0op12346bt9\\\",\\n      \\\"channel\\\":\\\"main\\\",\\n      \\\"online\\\":false,\\n      \\\"_id\\\":\\\"52e6d1234980420c4a0001db\\\"\\n    }\\n  }\\n]\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"get\",\n  \"title\": \"/devices/{uuid}/publickey\"\n}\n[/block]\nReturns the base64-encoded public key for a device, or null if the device does not have a public key. \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"coap get coap://meshblu-coap.octoblu.com/devices/0d1234a0-1234-11e3-b09c-1234e847b2cc/publickey\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"publicKey\\\" : \\\"LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0NCk1JR2ZNQTBHQ1NxR1NJYjNEUUVCQVFVQUE0R05BRENCaVFLQmdRQ3FHS3VrTzFEZTd6aFpqNitIMHF0alRrVnh3VENwdktlNGVDWjANCkZQcXJpMGNiMkpaZlhKL0RnWVNGNnZVcHdtSkc4d1ZRWktqZUdjakRPTDVVbHN1dXNGbmNDeldCUTdSS05VU2VzbVFSTVNHa1ZiMS8NCjNqK3NrWjZVdFcrNXUwOWxITnNqNnRRNTFzMVNQckNCa2VkYk5mMFRwMEdiTUpEeVI0ZTlUMDRaWndJREFRQUINCi0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLQ==\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"mydevices","type":"basic","title":"My Devices"}
[block:api-header] { "type": "get", "title": "/mydevices" } [/block] Returns all information (including tokens) of all devices or nodes belonging to a user's UUID (identified with an "owner" property and user's UUID i.e. "owner":"0d1234a0-1234-11e3-b09c-1234e847b2cc") [block:code] { "codes": [ { "code": "coap get -H \"meshblu_auth_uuid={:UUID}&meshblu_auth_token={:TOKEN}\" coap://meshblu-coap.octoblu.com/mydevices", "language": "shell" } ] } [/block] [block:code] { "codes": [ { "code": "{ \n \"devices\":[ \n { \n \"owner\":\"0d1234a0-1234-11e3-b09c-1234e847b2cc\",\n \"name\":\"SMS\",\n \"phoneNumber\":\"16025551234\",\n \"uuid\":\"1c1234e1-xxxx-11e3-1234-671234c01234\",\n \"timestamp\":1390861609070,\n \"token\":\"1234eg1234zz1tt1234w0op12346bt9\",\n \"channel\":\"main\",\n \"online\":false,\n \"_id\":\"52e6d1234980420c4a0001db\"\n }\n }\n]\n}", "language": "json" } ] } [/block] [block:api-header] { "type": "get", "title": "/devices/{uuid}/publickey" } [/block] Returns the base64-encoded public key for a device, or null if the device does not have a public key. [block:code] { "codes": [ { "code": "coap get coap://meshblu-coap.octoblu.com/devices/0d1234a0-1234-11e3-b09c-1234e847b2cc/publickey", "language": "shell" } ] } [/block] [block:code] { "codes": [ { "code": "{\n \"publicKey\" : \"LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0NCk1JR2ZNQTBHQ1NxR1NJYjNEUUVCQVFVQUE0R05BRENCaVFLQmdRQ3FHS3VrTzFEZTd6aFpqNitIMHF0alRrVnh3VENwdktlNGVDWjANCkZQcXJpMGNiMkpaZlhKL0RnWVNGNnZVcHdtSkc4d1ZRWktqZUdjakRPTDVVbHN1dXNGbmNDeldCUTdSS05VU2VzbVFSTVNHa1ZiMS8NCjNqK3NrWjZVdFcrNXUwOWxITnNqNnRRNTFzMVNQckNCa2VkYk5mMFRwMEdiTUpEeVI0ZTlUMDRaWndJREFRQUINCi0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLQ==\"\n}", "language": "json" } ] } [/block]