Devices API

Use the Devices API to request data about a specific user’s devices, or about a specific user-device combination.

You can also use the Devices API to remove the association in EASE between a user and a device. This is a useful way to remove “clutter” associated with unused devices; once you remove a device, it is no longer listed for the user in the Devices table on the user’s details page in the EASE Portal, or returned from a request to the GET /devices/users/<user_psk> resource.

EASE associates a device with a user once the user has logged into the App Catalog on that device. If a user logs in to an HTML5 App Catalog, a separate device is assigned to the HTML5 App Catalog for each type of physical device on which the user runs it. Because the user can run both a native App Catalog and an HTML5 App Catalog on the same physical device, there is not always a one-to-one correlation between device IDs and physical devices. For more information, it is helpful to look at how EASE lists device details in the EASE Portal; see Device Details.

Resources

GET /v1/devices/users/(user_psk)

List Devices for User

Authenticate as a valid EASE user.

Returns a list of devices associated with the specified user. If you authenticated as an EASE administrator, you can list devices for any user in the organization. If you authenticated as a non-administrator, you can list devices for the authenticated user only.

URLs

Environment URL
North America https://na01ws.apperian.com/v1/devices/users/<user_psk>/
Europe https://eu01ws.apperian.eu/v1/devices/users/<user_psk>/

URL Parameters

user_psk
(Required) Unique ID assigned to the user by EASE.

Header Parameter

X-TOKEN
(Required) Session token returned by POST /users/authenticate.

Data Parameters

None

Example Request

The following example returns a list of devices for a user with a user_psk of 103030. This user is associated with two devices.

curl -X GET https://na01ws.apperian.com/v1/devices/users/103030/ --header "X-TOKEN:OxS8iqSHSSmRqcqQ1pXXwg"

Example Response

{
   "devices": [
     {
       "front_camera": true,
       "operating_system_name": "iPhone OS",
       "controllable_status": 0,
       "mdm_id": null,
       "form_factor": 2,
       "mdm_user_id": null,
       "total_ram": 345182208,
       "flash": false,
       "apns_token": "c7ecf46a8fb0620bf3df588d361dde206b12cc1ef5287bef5e4094af5a765b3f",
       "total_storage": 30428962816,
       "camera": true,
       "id": "agJJ9-UvQyxgT7PXVvFVsA",
       "operating_system_version": "7.0.6",
       "mdm_status": 12,
       "manufacturer": "Apple, Inc.",
       "operating_system": 1,
       "name": "Kiosk iPad 1",
       "jailbreak_status": 0,
       "created": "2014-03-05T13:32:34.730099+00:00",
       "udid": "ffffffffd3301642a3964fa49cc06bfdcab36d6f",
       "free_storage": 22335856640,
       "mdm_status_update_date": "2014-07-15T18:46:53.963523+00:00",
       "free_ram": 38486016,
       "supervised": 1,
       "model": "iPad2,2",
       "single_app_mode_app_psk": null
    },
    {
       "front_camera": false,
       "operating_system_name": "Android",
       "controllable_status": 0,
       "mdm_id": null,
       "form_factor": 1,
       "mdm_user_id": null,
       "total_ram": 0,
       "flash": false,
       "apns_token": null,
       "total_storage": 0,
       "camera": false,
       "id": "agJJ9-UvQyxgT7PXVvFVsA",
       "operating_system_version": "4.3",
       "mdm_status": 0,
       "manufacturer": "samsung",
       "operating_system": 104,
       "name": "m0",
       "jailbreak_status": 0,
       "created": "2014-04-08T14:19:48.118389+00:00",
       "udid": "60:21:c0:89:50:f8",
       "free_storage": 0,
       "mdm_status_update_date": "2014-07-23T16:05:53.994846+00:00",
       "free_ram": 268881920,
       "supervised": -1,
       "model": "GT-I9300",
       "single_app_mode_app_psk": null
    }
  ]
}
GET /v1/devices/(device_psk)/users/(user_psk)

List Device-User Details

Requires administrator privileges. Authenticate as an EASE administrator.

Returns information about a specific device-user pairing. Information includes details such as device and model, the date when the user first logged in to the App Catalog from the device (created), and the date of the user’s last interaction with EASE from the device (last_active). Interaction includes any type of communication between the device and EASE. For example: logging in or out of the catalog, listing apps in the catalog, authenticating to open an app wrapped with the Enterprise SSO policy, and updating an app.

This resource also returns disabled_reason, which identifies the disabling status of the device. null indicates that the device is enabled. For instructions on disabling and enabling devices, see Disable or Enable a Device.

URLs

Environment URL
North America https://na01ws.apperian.com/v1/devices/<device_psk>/users/<user_psk>/
Europe https://eu01ws.apperian.eu/v1/devices/<device_psk>/users/<user_psk>/

URL Parameters

device_psk
(Required) Unique ID assigned to the device by EASE.
user_psk
(Required) Unique ID assigned to the user by EASE.

Header Parameter

X-TOKEN
(Required) Session token returned by POST /users/authenticate.

Data Parameters

None

Example Request

The following example returns information about a device with a device_psk 73108 for a user with a user_psk of 103030.

curl -X GET https://na01ws.apperian.com/v1/devices/73108/users/103030/ --header "X-TOKEN:OxS8iqSHSSmRqcqQ1pXXwg"

Example Response

{
  "device_user": {
  "psk": 42,
  "last_active": "2017-01-12",
  "created": "2017-01-09T20:56:30.431741",
  "user": {
     "psk": 103030,
     "first_name": "Matthew",
     "last_name": "Smith",
     "modified_date": "2016-12-06T21:38:52+00:00",
     "custom_metadata": null,
     "email": "msmith@example.com",
     "mobile_phone": "1234567789",
     "role": 1,
     "created_date": "2016-12-06T21:38:52+00:00",
     "until_date": "9999-12-31T23:59:59.999999",
     "disabled_reason": null,
     "id": "msmith",
     "last_login_from_catalog": "2017-01-12T18:34:11.766115"
   },
   "device": {
     "front_camera": true,
     "operating_system_name": "iOS",
     "controllable_status": 0,
     "mdm_id": null,
     "form_factor": 1,
     "mdm_user_id": null,
     "total_ram": 838656000,
     "flash": true,
     "apns_token": "530a538b4bdfb9c74613b33f19fac8320d8986f5aee47244989d1c01d2f318e2",
     "total_storage": 121861898240,
     "camera": true,
     "psk": 73108,
     "operating_system_version": "10.2",
     "mdm_status": 0,
     "manufacturer": "Apple, Inc.",
     "operating_system": 1,
     "name": "Voyager",
     "jailbreak_status": 0,
     "created": "2016-12-20T15:35:27.840252+00:00",
     "udid": "ffffffffd13b4d1b4906422087247982e7418814",
     "free_storage": 59419865088,
     "mdm_status_update_date": "2016-12-20T15:35:27.840252+00:00",
     "free_ram": 22237184,
     "supervised": -1,
     "model": "iPhone7,2",
     "single_app_mode_app_psk": null
   },
  "disabled_reason": null,
  "until": "9999-12-31T23:59:59.999999"
 }
}
DELETE /v1/devices/(device_psk)/users/(user_psk)

Remove Device from User

Requires administrator privileges. Authenticate as an EASE administrator.

Removes the association in EASE between the user and the device. If the user logs back in to the App Catalog from the same device in the future, a new association is created.

Removing a device is useful when, for example, a user upgrades to a new mobile device and no longer uses his/her old device. By removing the association between the device and the user, the device is no longer listed for the user in the Devices table on the user’s details page in the EASE Portal, and it is no lnger returned from a request to the GET /devices/users/<user_psk> resource. To look for unused devices, use the last_active date returned by the GET /devices/<device_psk>/users/<user_psk> resource. It identifies the user’s last interaction with EASE from the device.

URLs

Environment URL
North America https://na01ws.apperian.com/v1/devices/<device_psk>/users/<user_psk>/
Europe https://eu01ws.apperian.eu/v1/devices/<device_psk>/users/<user_psk>/

URL Parameters

device_psk
(Required) Unique ID assigned to the device by EASE.
user_psk
(Required) Unique ID assigned to the user by EASE.

Header Parameter

X-TOKEN
(Required) Session token returned by POST /users/authenticate.

Data Parameters

None

Example Request

The following example removes a device with a device_psk 73108 from a user with a user_psk of 103030.

curl -X DELETE https://na01ws.apperian.com/v1/devices/73108/users/103030/ --header "X-TOKEN:OxS8iqSHSSmRqcqQ1pXXwg"

Example Response

{
  "deleted": true
}