Get Device¶
-
GET
/sk-api/v1/device
¶ Get information about a device.
- Request Headers
Authorization – The client’s Authorization header.
- Query Parameters
deviceId – Unique identification number of the device to be updated. Only one of deviceId or serialNumber can be supplied.
serialNumber – Serial number of the device to be updated. Only one of deviceId or serialNumber can be supplied.
- Status Codes
200 OK –
Query successful.
- Response Data
device – a device representation, as it exists in Skykit Admin.
- Device
chromeWebviewVersion – The version of Chrome used to run webview content on a device.
connectionType – The type of physical connection the device uses to connect to the internet.
contentManagerDisplayName – The device’s name in Skykit Content Manager.
contentManagerLocation – The device’s location in Skykit Content Manager.
contentPending – The name of the pending media item set to play next, if any.
controlVersionName – The device’s custom admin app version (Android only). If none, app is either not installed, or an older version is installed that does not report its version.
created – The date when the device was created inside of Skykit.
defaultHomeApp – Default device home app type and version.
displayRatio – The device’s display ratio when rendering content.
ethernetMacAddress – The device’s ethernet MAC address.
heartbeatUpdated – The last time that the device made a successful heartbeat request. A “heartbeat” is a snapshot of a device’s state, posted to Skykit every few minutes.
homeVersionName – The device’s custom home screen app version (Android only). If none, app is either not installed, or an older version is installed that does not report its version.
hoursOfOperation – The hours during the day when proof of play logs will captured.
id – The device’s unique identifier.
lastPlayedContentName – The name of the last piece of content reported by this device.
launcherVersionName – The device’s legacy custom home screen app version (Android only). If none, app is either not installed, or an older version is installed that does not report its version.
macAddress – The active MAC address of this device.
managingOrgCode – The unique identification code of the managing organization to which this device belongs.
managingOrgName – The name of the managing organization to which this device belongs.
model – The device’s hardware model.
notes – User-supplied notes pertaining to this device.
online – A boolean indicating whether the device is currently online (
true
) or offline (false
).orientation – The device’s orientation:
vertical
orhorizontal
.os – The device’s operating system.
osVersion – The operating system version.
serialNumber – The device’s serial number.
skykitPlayerVersion – The version of the Skykit player running on this device (both Android and Chrome).
streamSpeed – Content download speed in Mbps.
tenantCode – The unique identification code of the tenant to which this device belongs.
tenantName – The name of the tenant to which this device belongs.
timezone – The device’s timezone setting.
usageType – Description field to indicate how the device is to be used inside of Skykit.
wifiSsid – The name of the network to which the device is currently connected.
Request parameters invalid.
- Response Data
message – A human-readable message explaining what went wrong.
Authorization headers invalid.
- Response Data
message – Unauthorized for URL.
Something was wrong in the authentication headers.
- Response Data
message – Insufficient permission.
Example request:
GET /sk-api/v1/device?serialNumber=SN0010287 HTTP/1.1
Example response:
HTTP/1.1 200 OK Content-Type: application/json
{ "connectionType": "WiFi", "contentManagerDisplayName": "Test Display", "contentManagerLocation": "Office", "contentPending": "", "controlVersionName": null, "created": "2019-04-20T15:20:24.023Z", "displayRatio": "16:9", "heartbeatUpdated": "2019-06-20T16:16:16.890Z", "homeVersionName": null, "hoursOfOperation": { "mon": {"startTime": "07:00", "endTime": "18:00"}, "tue": {"startTime": "07:00", "endTime": "18:00"}, "wed": {"startTime": "07:00", "endTime": "18:00"}, "thu": {"startTime": "07:00", "endTime": "18:00"}, "fri": {"startTime": "07:00", "endTime": "18:00"}, "sat": {"startTime": "10:00", "endTime": "19:00"}, "sun": {"startTime": "10:00", "endTime": "16:00"}, "excludeDates": [ "2019-01-08", "2019-11-28", "2019-12-25" ] }, "id": "a4e9e20dc0614df99a86bc3223c7c6c4", "lastPlayedContentName": "video 2", "launcherVersionName": "136.1.1", "macAddress": "3g3gh6wf5twg", "managingOrgCode": "skykit", "managingOrgName": "Skykit", "model" "ASUS Chromebox CN60", "notes": "", "online": true, "orientation": "horizontal", "os": "cros", "osVersion": "74.0.3729.159", "serialNumber": "SN0010287", "skykitPlayerVersion": "113.0.1", "streamSpeed": 3, "tenantCode": "skykit_example_tenant", "tenantName": "Skykit Example Tenant", "timezone": "US/Central", "usageType": "Installed" }
Example usage:
from sign_jwt import make_headers # see: Authentication import requests BASE_URI = 'https://skykit-provisioning.appspot.com' GET_DEVICE_ENDPOINT = 'sk-api/v1/device' URI = '{}/{}'.format(BASE_URI, GET_DEVICE_ENDPOINT) def get_device(device_id=None, serial_number=None): headers = make_headers() if device_id: params = {'deviceId': device_id} elif serial_number: params = {'serialNumber': serial_number} response = requests.get(URI, params=params, headers=headers) response.raise_for_status() return response.json() example_device = get_device( device_id='a4e9e20dc0614df99a86bc3223c7c6c4' )