Description: Retrieve all devices within a realm of a Qeo administrator 
URL Structure: https://my.qeo.org/qeo-rest-service/v1/realms/{id}/devices  
HTTP Method: GET 
Parameters:

HTTP Authorization

Path parameter:
    identifier of the realm to be interrogated (value is of type long)

 

Request Example
https://my.qeo.org/qeo-rest-service/v1/realms/103/devices 
Response:  HTTP 200 OK
Content-Type: application/json

Body: Contains a list of devices found in the realm in JSON format
         {"devices":[{"id":...,"realm":...,"user":...,"type":"device","device_id":"...","name":"...","state":"...",
                           "otc":{"code":"..","date":"..."}},{...}]}

         The returned parameters for each device: 
              "id"            : value of type long, representing the device identifier
              "type"        : type of object returned (always "device")
              "realm"      : value of type long, represents the realm identifier where the device belongs to.
              "user"        : value of type long, representing the user identifier where the device belongs to.
              "device_id" : UTF-8 string representing the devices own identifier
              "name"      : UTF-8 string representing the name of the device in the realm
              "state"       : a device has a certain state: 
                                "CREATING" : device is not yet enrolled, it is not yet ready to talk Qeo
                                "ENROLLED": device is enrolled, it can talk Qeo 
                                "REVOKED" : device is revoked, it can no longer talk Qeo
              "otc"    : - one time code to register your device and to place it in "ENROLLED" state.
                           - otc is only available in case your device is in state "CREATING"
                           - otc is valid for a short period of time
                           - otc is composed of: "code": needed to register your device
                                                           "date": creation date of the code, format:yyyy-MM-dd'T'HH:mm:ss.SSSZ
                                                                      yyyy: year
                                                                      MM: month in year
                                                                      dd: day of month
                                                                      HH: hour 
                                                                      mm: minutes 
                                                                      ss: seconds 
                                                                      SSS: millisecond    
                                                                      Z: time zone  

Response Example
{
  "devices":[{
               "id":7,
               "realm":103,
               "user":6,
               "type":"device",
               "name":"Bedroom set-top box",
               "state":"CREATING",
               "device_id":"",
               "otc":{
                       "code":"35676407",
                       "date":"2016-06-17T16:06:29.794+0200"
                     }
             },{
               "id":5,
               "realm":103,
               "user":12,
               "type":"device",
               "name":"My tablet",
               "state":"ENROLLED",
               "device_id":"ASUS_TRANSFORMER_H785GS664J25HD"
             }]
}