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 Apperian 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 Admin Portal, or returned from a request to the GET /devices/users/<user_psk> resource.
Apperian 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 Web App Catalog, a separate device is assigned to the Web 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 Web 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 Apperian lists device details in the Admin Portal; see Device Details.
Resources¶
-
GET
/v1/devices/users/
(user)¶ List Devices for User
Authenticate as a valid Apperian user.
Returns a list of devices associated with the specified user. If you authenticated as an 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>/ Europe https://eu01ws.apperian.eu/v1/devices/users/<user>/ URL Parameters
- user
- (Required) Unique ID assigned to the user by Apperian.
Header Parameter
- X-TOKEN
- (Required) API token or User token (POST /users/authenticate). For more information, see Authentication.
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", "form_factor": 2, "total_ram": 345182208, "flash": false, "apns_token": "c7ecf46a8fb0620bf3df588d361dde206b12cc1ef5287bef5e4094af5a765b3f", "total_storage": 30428962816, "camera": true, "id": "agJJ9-UvQyxgT7PXVvFVsA", "operating_system_version": "7.0.6", "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, "free_ram": 38486016, "model": "iPad2,2", "single_app_mode_app_psk": null }, { "front_camera": false, "operating_system_name": "Android", "form_factor": 1, "total_ram": 0, "flash": false, "apns_token": null, "total_storage": 0, "camera": false, "id": "agJJ9-UvQyxgT7PXVvFVsA", "operating_system_version": "4.3", "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, "free_ram": 268881920, "model": "GT-I9300", "single_app_mode_app_psk": null } ] }
-
GET
/v2/devices/
(device)/users/
(user)¶ List Device-User Details
Requires administrator privileges. Authenticate as an Apperian 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 Apperian from the device (last_active
). Interaction includes any type of communication between the device and Apperian. 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>/users/<user>/ Europe https://eu01ws.apperian.eu/v1/devices/<device>/users/<user>/ URL Parameters
- device
- (Required) Unique ID assigned to the device by Apperian.
- user
- (Required) Unique ID assigned to the user by Apperian.
Header Parameter
- X-TOKEN
- (Required) API token or User token (POST /users/authenticate). For more information, see Authentication.
Data Parameters
None
Example Request
The following example returns information about a device with a device_id 73108 for a user with a user_id of 103030.
curl -X GET https://na01ws.apperian.com/v1/devices/73108/users/103030/ --header "X-TOKEN:OxS8iqSHSSmRqcqQ1pXXwg"
Example Response
{ "device_user": { "id": PujgdDx0s3kScfctYqCBug, "last_active": "2017-01-12", "created": "2017-01-09T20:56:30.431741", "user": { "first_name": "Matthew", "last_name": "Smith", "modified_date": "2017-07-24T08:08:02.193675+00:00", "user_id": "msmith", "custom_metadata": null, "email": "msmith@example.com", "mobile_phone": "1234567789", "role": 1, "created_date": "2017-07-24T08:08:02.193675+00:00", "until_date": "9999-12-31T23:59:59.999999", "disabled_reason": null, "id": "roKMPRGnBe91jx0oxergCQ", "last_login_from_catalog": "2017-07-27T07:20:21.420851" }, "device": { "front_camera": true, "operating_system_name": "iOS", "form_factor": 1, "total_ram": 838656000, "flash": true, "apns_token": "530a538b4bdfb9c74613b33f19fac8320d8986f5aee47244989d1c01d2f318e2", "total_storage": 121861898240, "camera": true, "id": A4jwZ8qBV5bf53AeA6lrNA, "operating_system_version": "10.2", "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, "free_ram": 22237184, "model": "iPhone7,2", "single_app_mode_app_psk": null }, "disabled_reason": null, "until": "9999-12-31T23:59:59.999999" } }
-
DELETE
/v1/devices/
(device)/users/
(user)¶ Remove Device from User
Requires administrator privileges. Authenticate as an Apperian administrator.
Removes the association in Apperian 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 Admin Portal, and it is no lnger returned from a request to the GET /devices/users/<user> resource. To look for unused devices, use the
last_active date
returned by the GET /devices/<device>/users/<user> resource. It identifies the user’s last interaction with Apperian from the device.URLs
Environment URL North America https://na01ws.apperian.com/v1/devices/<device>/users/<user>/ Europe https://eu01ws.apperian.eu/v1/devices/<device>/users/<user>/ URL Parameters
- device
- (Required) Unique ID assigned to the device by Apperian.
- user
- (Required) Unique ID assigned to the user by Apperian.
Header Parameter
- X-TOKEN
- (Required) API token or User token (POST /users/authenticate). For more information, see Authentication.
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 }
-
GET
/v2/device_users/users/
(user)¶ List Devices for User
Authenticate as a valid Apperian user.
- Returns a list of devices associated with the specified user. If you authenticated as an 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.
Information about each device includes
disabled_reason
, which identifies the disabling status.null
indicates that the device is enabled. For information on disabling and enabling devices, see Disable or Enable a Device.URLs
Environment URL North America https://na01ws.apperian.com/v1/device_users/users/<user>/ Europe https://eu01ws.apperian.eu/v1/device_users/users/<user>/ URL Parameters
- user
- (Required) Unique ID assigned to the user by Apperian.
Header Parameter
- X-TOKEN
- (Required) API token or User token (POST /users/authenticate). For more information, see Authentication.
Data Parameters
None
Example Request
The following example returns a list of devices for a user with a user_id of 103030. This user is associated with two devices.
curl -X GET https://na01ws.apperian.com/v1/device_users/users/103030/ --header "X-TOKEN:OxS8iqSHSSmRqcqQ1pXXwg"
Example Response
{ "user": { "first_name": "Christina", "last_name": "Harrington", "modified_date": "2017-07-24T08:08:02.193675+00:00", "user_id": "charrington", "custom_metadata": null, "email": "charrington@example.com", "id": "roKMPRGnBe91jx0oxergCQ", "mobile_phone": "123-456-7890", "role": 1, "created_date": "2017-07-24T08:08:02.193675+00:00", "until_date": "9999-12-31T23:59:59.999999", "disabled_reason": null, "last_login_from_catalog": "2017-07-27T07:20:21.420851" }, "devices": [ { "device": { "front_camera": false, "operating_system_name": "", "form_factor": 0, "total_ram": 0, "flash": false, "apns_token": null, "total_storage": 0, "camera": false, "id": A4jwZ8qBV5bf53AeA6lrNA, "operating_system_version": "", "user": null, "manufacturer": "", "operating_system": 0, "name": "", "jailbreak_status": 0, "created": "2015-05-15T16:03:34.485585-04:00", "udid": "audid", "free_storage": 0, "free_ram": 0, "model": "", "single_app_mode_app_psk": null }, "id": PujgdDx0s3kScfctYqCBug, "disabled_reason": null, "until": "9999-12-31T23:59:59.999999", "created": "2015-07-21T08:32:26.417742" }, { "device": { "front_camera": false, "operating_system_name": "", "form_factor": 0, "total_ram": 0, "flash": false, "apns_token": null, "total_storage": 0, "camera": false, "id": i1vL30rYoPYXnR1uMoU4ww, "operating_system_version": "", "user": null, "manufacturer": "", "operating_system": 0, "name": "", "jailbreak_status": 0, "created": "2015-10-15T16:06:34.485585-04:00", "udid": "audid", "free_storage": 0, "free_ram": 0, "model": "", "single_app_mode_app_psk": null }, "id": C6jwZ8qBV5bf53AeA6lrNA, "disabled_reason": null, "until": "9999-12-31T23:59:59.999999", "created": "2015-07-21T08:32:26.417742" } ] }
-
GET
/v2/devices/
(device)/users/
(user)¶ List Device-User Details
Requires administrator privileges. Authenticate as an Apperian 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 Apperian from the device (last_active
). Interaction includes any type of communication between the device and Apperian. 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>/users/<user>/ Europe https://eu01ws.apperian.eu/v1/devices/<device>/users/<user>/ URL Parameters
- device
- (Required) Unique ID assigned to the device by Apperian.
- user
- (Required) Unique ID assigned to the user by Apperian.
Header Parameter
- X-TOKEN
- (Required) API token or User token (POST /users/authenticate). For more information, see Authentication.
Data Parameters
None
Example Request
The following example returns information about a device with a device_id 73108 for a user with a user_id of 103030.
curl -X GET https://na01ws.apperian.com/v1/devices/73108/users/103030/ --header "X-TOKEN:OxS8iqSHSSmRqcqQ1pXXwg"
Example Response
{ "device_user": { "id": PujgdDx0s3kScfctYqCBug, "last_active": "2017-01-12", "created": "2017-01-09T20:56:30.431741", "user": { "first_name": "Matthew", "last_name": "Smith", "modified_date": "2017-07-24T08:08:02.193675+00:00", "user_id": "msmith", "custom_metadata": null, "email": "msmith@example.com", "mobile_phone": "1234567789", "role": 1, "created_date": "2017-07-24T08:08:02.193675+00:00", "until_date": "9999-12-31T23:59:59.999999", "disabled_reason": null, "id": "roKMPRGnBe91jx0oxergCQ", "last_login_from_catalog": "2017-07-27T07:20:21.420851" }, "device": { "front_camera": true, "operating_system_name": "iOS", "form_factor": 1, "total_ram": 838656000, "flash": true, "apns_token": "530a538b4bdfb9c74613b33f19fac8320d8986f5aee47244989d1c01d2f318e2", "total_storage": 121861898240, "camera": true, "id": A4jwZ8qBV5bf53AeA6lrNA, "operating_system_version": "10.2", "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, "free_ram": 22237184, "model": "iPhone7,2", "single_app_mode_app_psk": null }, "disabled_reason": null, "until": "9999-12-31T23:59:59.999999" } }