{"_id":"55e5f0bc9416190d00dc3a47","__v":22,"category":{"_id":"55e49e35830ec32300e1a391","pages":["55e49f04de0d360d0027bc68","55e5f0bc9416190d00dc3a47","5609d60f9f85a70d00908572","5609d65c96ff420d004c8771","564f5cdaea8cef1900ae505e","56720127c17bf90d00b95845","5676d160511d400d0070f2fc"],"project":"55dcd6a68a3dcd2300cc5f76","version":"55dcd6a78a3dcd2300cc5f79","__v":7,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-08-31T18:34:29.204Z","from_sync":false,"order":1,"slug":"web-api-calls","title":"Web API Calls"},"project":"55dcd6a68a3dcd2300cc5f76","user":"55dcd49b0efd5821000d5358","version":{"_id":"55dcd6a78a3dcd2300cc5f79","project":"55dcd6a68a3dcd2300cc5f76","__v":3,"createdAt":"2015-08-25T20:57:11.187Z","releaseDate":"2015-08-25T20:57:11.187Z","categories":["55dcd6a78a3dcd2300cc5f7a","55dce1048a3dcd2300cc5f96","55e49e35830ec32300e1a391"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"22.0.0","version":"22"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-09-01T18:38:52.913Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"status\": \"true\",\n    \"devices\": [\n        {\n            \"deviceaddress\": \"80:00:00:05:46:00:3C:07\",\n            \"devicealias\": \"Shared Raspberry Pi2 ssh22\",\n            \"ownerusername\": \"myfriend:::at:::example.com\",\n            \"devicetype\": \"00:1C:00:00:00:01:00:00:04:30:00:16\",\n            \"devicestate\": \"active\",\n            \"devicelastip\": \"75.51.xx.xx\",\n            \"lastinternalip\": \"10.0.xx.xx\",\n            \"servicetitle\": \"SSH\",\n            \"webenabled\": \"1\",\n            \"weburi\": \"/ssh/index.php\",\n            \"localurl\": \"bm9uZQ==\",\n            \"webviewerurl\": [\n                null\n            ]\n        },\n        {\n            \"deviceaddress\": \"80:00:00:05:xx:xx:xx:xx\",\n            \"devicealias\": \"Freescale i.MX6 vnc\",\n            \"ownerusername\": \"myname@example.com\",\n            \"devicetype\": \"00:04:00:00:00:01:00:00:04:30:17:0D\",\n            \"devicestate\": \"active\",\n            \"devicelastip\": \"76.103.xx.xx\",\n            \"lastinternalip\": \"192.168.xx.xx\",\n            \"servicetitle\": \"VNC\",\n            \"webenabled\": \"1\",\n            \"weburi\": [\n                null\n            ],\n            \"localurl\": \"bm9uZQ==\",\n            \"webviewerurl\": [\n                null\n            ]\n        }\n    ]\n}","name":""}]},"settings":"","examples":{"codes":[{"language":"curl","code":"curl -s -S -X GET -H \"content-type:application/json\" -H \"apikey:WeavedDemoKey\\$2015\" -H \"token:00000000000000000000000\" https://api.weaved.com/v22/api/device/list/all","name":""},{"language":"python","code":"import httplib2\n\napiMethod=\"https://\"\napiServer=\"api.weaved.com\"\napiVersion= \"/v22\"\napiKey=\"WeavedDemoKey$2015\"\n# add the token here which you got from the /user/login API call\ntoken = \"\"\ndeviceListURL = apiMethod + apiServer + apiVersion + \"/api/device/list/all\"\ncontent_type_header     = \"application/json\"\n\ndeviceListHeaders = {\n                'Content-Type': content_type_header,\n                'apikey': apiKey,\n  \t\t\t\t\t\t\t# you need to get token from a call to /user/login\n                'token': token,\n            }\n\nif __name__ == '__main__':            \n    httplib2.debuglevel     = 0\n    http                    = httplib2.Http()\n\n    response, content = http.request( deviceListURL,\n                                          'GET',\n                                          headers=deviceListHeaders)\n    print content\n\n"}]},"method":"get","auth":"required","params":[{"_id":"590a2fb112d47a3700f8364d","ref":"","in":"header","required":false,"desc":"","default":"application/json","type":"string","name":"content-type"},{"_id":"590a2fb112d47a3700f8364c","ref":"","in":"header","required":false,"desc":"API key","default":"WeavedDemokey$2015","type":"string","name":"apikey"},{"_id":"590a2fb112d47a3700f8364b","ref":"","in":"header","required":false,"desc":"login token","default":"","type":"string","name":"token"}],"url":"/device/list/all"},"isReference":false,"order":1,"body":"You will need to supply the token received from a valid login using the /user/login call.  This call retrieves the list of devices either registered directly to the user's account or shared from another Weaved account,\n\n**deviceaddress** - Unique Identifier (UID) given to your device during the pre-registration process.  This number is stored in the .conf file used by the Weaved daemon for this connection.\n**devicealias** - the name you gave to this device\n**ownerusername** - your Weaved account name (typically your e-mail address)\n**devicetype** - a hexadecimal number with fields representing, among other things, the shown \"Device Type\" for this connection.  This information is contained within the encrypted blob of the .conf file for this connection.\n**devicestate** - shows the online status of this connection, either active or inactive\n**devicelastip** - the last known public IP that this device was connected\n**lastinternalip** - the last known internal LAN address of this device\n**servicetitle** - the defined service type.  This can be used to auto-launch a corresponding viewer application on the client, such as a web browser, VNC viewer or SSH terminal\n**webenabled** - 1 if this service is viewable with a web browser, 0 otherwise\n**weburi** - optional string to append to the returned web URL\n**localurl** - ???\n**webviewerurl** - ???","excerpt":"Retrieve the list of devices registered to this Weaved account","slug":"devicelistall","type":"endpoint","title":"/device/list/all"}

get/device/list/all

Retrieve the list of devices registered to this Weaved account

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Headers

content-type:
stringapplication/json
apikey:
stringWeavedDemokey$2015
API key
token:
string
login token

Examples


Result Format


Documentation

You will need to supply the token received from a valid login using the /user/login call. This call retrieves the list of devices either registered directly to the user's account or shared from another Weaved account, **deviceaddress** - Unique Identifier (UID) given to your device during the pre-registration process. This number is stored in the .conf file used by the Weaved daemon for this connection. **devicealias** - the name you gave to this device **ownerusername** - your Weaved account name (typically your e-mail address) **devicetype** - a hexadecimal number with fields representing, among other things, the shown "Device Type" for this connection. This information is contained within the encrypted blob of the .conf file for this connection. **devicestate** - shows the online status of this connection, either active or inactive **devicelastip** - the last known public IP that this device was connected **lastinternalip** - the last known internal LAN address of this device **servicetitle** - the defined service type. This can be used to auto-launch a corresponding viewer application on the client, such as a web browser, VNC viewer or SSH terminal **webenabled** - 1 if this service is viewable with a web browser, 0 otherwise **weburi** - optional string to append to the returned web URL **localurl** - ??? **webviewerurl** - ???

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}