Whenever you reboot, install an app, or perform any other action on a device from the console, you send a command. Commands are singular actions that can be applied to a device for a variety of reasons. Use the Commands API to send commands to your device programmatically.
In this article:
- How Do I Know Which Commands API to Use?
- How Do I Know if the Command Succeeded?
- Not Sure Where to Start?
- Command Body
- Command Keys and Values
- Command Type (required)
- Level (required)
- Device Type (required)
- Command (required)
- Command Arguments (sometimes required)
- Scheduled Commands (optional)
How Do I Know Which Commands API to Use?
Today, there are two command API endpoints. Eventually, the newer commands API framework will replace the older one.
The older Commands V2 API supports Android devices. That is, the endpoint https://{tenant-name}-api.esper.cloud/api/v0/enterprise/{enterprise_id}/command/. Development work is paused on this endpoint, but supported commands will still work. See the API docs for a list of available commands.
The newer Commands API supports mixed fleet (Android, iOS, etc.). That is, the endpoint https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/.
Devices will only receive commands if supported. For example, iOS devices will not receive the Notify Device command. Device support is noted in the description when applicable.
How Do I Know if the Command Succeeded?
Even when a command returns a 201 status code, the command could still fail after reaching the device. This could be due to many reasons. For example, you could send a command to delete an app that doesn’t exist on the device, or set the device to a state that it’s already in. It’s a good practice to check the device’s event feed after sending a command. Open the event feed message to see the full error.
Not Sure Where to Start?
See our article on Getting Started with APIs to learn how to create API keys and send requests.
Command Body
The command body (also known as the request body or payload) contains information to process the request in the JSON programming format.
{
"command_type": "DEVICE",
"devices": [
"c382df6c-6e8c-4c2e-92f4-13d0badbb0dd"
],
"device_type": "all",
"command": "INSTALL_CERTIFICATE",
"command_args": {
"cert_file_type": "pkcs12",
"cert_data_base64": "bXkgbGl0dGxlIHBvbnk=",
"cert_alias_name": "mlp",
"cert_storage_type": "system"
}
}
The body differs for each command.
Command Keys and Values
Use the following keys and values to target certain devices or groups.
Command Type (required)
The command type parameter is used to specify
-
Device: A command used for devices
- "command_type": "DEVICE"
-
Group: A command used for groups
- "command_type": "GROUP"
-
Dynamic: A command used for a dynamic set of devices, such as a subset of devices from different groups. (Deprecated)
- "command_type": "DYNAMIC"
Level (required)
- Device Level: A command sent to a single device. Use with command_type: Device.
"devices": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
]
- Group Level: A command sent to a group of devices. Use with command_type: Group.
"groups": [
"01922b24-adae-787f-a08a-778067704f57"
]
Device Type (required)
In the past, the device_type key was used to send commands to certain types of devices. This field no longer differentiates between the two. Using any of the fields will still send a command to all devices. We recommend using device_type all to avoid confusion.
-
Active: Fires the command to active devices only. (Deprecated)
- "device_type": "active"
-
Inactive: Fires the command to inactive devices only. Note: If the device remains inactive (powered off for example, or not connected to a network) during the scheduled window, the device will not receive the command. (Deprecated)
- "device_type": "inactive"
-
All: Fires the command to all devices. (Recommended)
- "device_type": "all"
Command (required)
The command.
Command Arguments (sometimes required)
An object containing the specific data for the command. Command arguments are strings unless otherwise indicated.
Scheduled Commands (optional)
You can also schedule commands. Learn more about scheduling commands.
App Commands for Android
Unless otherwise specified, the following commands will work on Android devices provisioned in Esper.
Apply app config
Apply a config to an app.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments (Chrome example)
{ "command_type": "DEVICE",
"devices": [
"c382df6c-6e8c-4c2e-92f4-13d0badbb0dd"
],
"device_type": "all",
"command": "APPLY_APP_CONFIG",
"command_args": {
"custom_settings_config": {
"managedAppConfigurations": {
"com.android.chrome": {
"HomepageLocation": "https://esper.io",
"URLBlocklist": [
"example.com"
]
}
}
}
}
}
Key | Required? | Description |
managedAppConfigurations | Required | An object containing the managed configuration information for the app. See the app’s documentation for more information. |
Clear app data
Clears data and cache for a single app. Find an app’s package name in the device’s app section. Preloaded apps may not be supported.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments (YouTube example)
{ [...]
"command": "CLEAR_APP_DATA",
"command_args": {
"package_name":"com.google.android.youtube"
}
}
Key | Required? | Description |
package_name | Required | The app’s package name. |
Grant app permission
Grant app permissions.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{[...],
"command":"SET_APP_PERMISSION",
"command_args": {
"package_name": "com.android.chrome",
"grant_state": "PERMISSION_GRANT_STATE_DENIED",
"permission": "android.permission.WRITE_EXTERNAL_STORAGE"
}
}
Key | Required? | Description |
package_name | Required | The app’s package name. See app package names in the devices Apps section. |
grant_state | Required | One of the following:
|
permission | Required | The Android permission. |
Hide an App
Hide an installed app. This command won’t uninstall an app, but instead set an already installed app to the “hide” state.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{ [...],
"command":"REMOVE_TO_WHITELIST",
"command_args": {
"package_name":"com.android.chrome"
}
}
Key | Required? | Description |
package_name | Required | The app’s package name. See app package names in the devices Apps section. |
Install App
Install an app on the device.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{ [...],
"command": "INSTALL",
"command_args": {
"app_version": "3e9c3dca-bc26-4cf0-af35-608738a43256"
}
}
Key | Required? | Description |
app_version | Required | The app’s version ID. Use Get Applications to find an app’s version ID. |
You can use Applications or Applications V1 to find the app’s version ID. Each ID is found in a different place in the API response. Only the latest version ID is returned for both Applications and Applications V1.
Applications
Find the ID in versions > id.
Applications V1
Find the ID in latest_version > id.
Set app state
Set an app’s state.
- Show: show the app on the device.
- Hide: the app does not display on the device, but can still run in the background.
- Disable: the app does not display on the device and will not run in the background.
Note: What is the difference between SET_APP_STATE (show state) and ADD_TO_WHITELIST?
When setting the app in the SHOW state, the app will be visible in the Esper Launcher. The app can be launched from the background as well as by a device user's tap.
When the app is whitelisted, the Esper Launcher will add the app to its whitelisted packages. This means Android will allow the app to launch and bring it to the foreground, even if the app is set to the Show or Hide state.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{ [...],
"command":"SET_APP_STATE",
"command_args": {
"package_name": "com.android.chrome",
"app_state": "SHOW"
}
}
Key | Required? | Description |
package_name | Required | The app’s package name. See app package names in the devices Apps section. |
app_state | Required | One of the following:
|
Show App
Display an installed system app. This command won’t install an app, but instead set an already installed app to the “show” state.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{ [...],
"command":"ADD_TO_WHITELIST",
"command_args": {
"package_name":"com.android.chrome"
}
}
Key | Required? | Description |
package_name | Required | The app’s package name. See app package names in the device’s Apps section. |
Uninstall App
Uninstall an app from the device.
Also supported on iOS devices.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{ [...],
"command":"UNINSTALL",
"command_args": {
"package_name": "com.example.myapplication"
}
}
Key | Required? | Description |
package_name | Required | The package name of the application. Find package names in the device’s Apps section. |
Network Commands for Android
Unless otherwise specified, the following commands will work on Android devices provisioned in Esper.
Add Wi-Fi access points
Add Wi-Fi access points to a device.
Command Arguments
Security type: none
{ [...],
"command":"ADD_WIFI_AP",
"command_args": {
"wifi_access_points": [
{
"wifi_ssid": "no-sec ",
"wifi_security_type": "NONE",
"hidden": false
}
]
}
}
Security: WEP, WPA, WPA2, or WPA-3
{ [...],
"command_args": {
"wifi_access_points": [
{
"wifi_ssid": "andi-network",
"wifi_password": "password",
"wifi_security_type": "WPA2",
"hidden": false
}
]
}
}
Security: EAP (TTLS example)
{ [...],
"command_args": {
"wifi_access_points": [
{
"wifi_ssid": "andi-eap",
"wifi_password": "password",
"wifi_security_type": "EAP",
"wifi_phase2_auth": "PAP",
"wifi_eap_method": "TTLS",
"identity": "Andi",
"anonymous_identity": "Anon-Andi",
"domain": "Andi-Domain",
"hidden": false,
"certificate_file_path": "/storage/9/what/sdf.pks"
}
]
}
}
Required keys depend on the Wi-Fi security type.
Key | Required? | Description |
wifi_access_points | Required | Array of objects. Contains Wi-Fi information in each object. |
wifi_ssid | Required | The name of the Wi-Fi network. |
wifi_security_type | Required | One of the following:
|
wifi_password | Required | The password of the Wi-Fi network. Not required for “None” security types or “EAP” security types except “PWD”. |
wifi_eap_method | Required |
One of the following:
Not required for non-EAP security types. |
identity | Required | The network identity. Only required for PWD EAP methods. |
hidden | Required |
True or False Not required for non-EAP security types. |
domain | Required | The domain name. Not required for non-EAP security types. |
wifi_phase2_auth | Required | The Wi-Fi phase2 authentication. Only required for TTLS or PEAP EAP methods. |
certificate_file_path | Required | The file path of the certificate. Not required for non-EAP security types. |
certificate_file_password | Required |
The certificate file password. Only required for TLS EAP methods. |
See Install certificate to install a certificate on a device.
Install certificate
Install a certificate on an Android version 9+ device.
- Currently, certificates cannot be used for Wi-Fi authentication (such as EAP-TLS).
- Include the entire certificate chain (up to Root CA certificate) in a pkcs12 file.
- The Install Certificate command expires after 30 days. Devices that do not receive the command within 30 days (for example, devices turned off or without a network connection for 30 days) will not receive the command. A “certificate not found error” will be displayed in the Event Feed.
- Commands are available for all command types: device, dynamic, and group. Sending this command to multiple devices or groups will install (or uninstall) the same certificate on all devices.
- Alias names are case-sensitive.
- Keep a record of the alias name. The alias name is the only identifier used for deletion.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{[...],
"command":"INSTALL_CERTIFICATE",
"command_args": {
"cert_file_type": "pkcs12",
"cert_data_base64": "ZnJpZW5kc2hpcCBpcyBtYWdpYw==",
"cert_password": "mypassword1234!",
"cert_alias_name": "oct24cert",
"cert_storage_type": "system"
}
}
Key | Required? | Description |
cert_file_type | Required | The cert file type. Currently only supports “pkcs12”. |
cert_data_base64 | Required | Base64 encoded string which contents for the pkcs12 file. |
cert_password | Optional | The certificate’s password. This field must be added if the file is password-protected. |
cert_alias_name | Required | The unique alias name for the certificate. Certificates with the same name but different content will be overwritten. Alias names are case-sensitive. |
cert_storage_type | Required | The certificate storage type. Currently only supports “system”. |
Remove Wi-Fi Access Point
Remove Wi-Fi access points from the device. After removal, your device may not automatically reconnect to another access point. To check in with Esper, you may need to manually add an access point.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{[...],
"command":"REMOVE_WIFI_AP",
"command_args": {
"wifi_access_points": [
"Esper"
]
}
}
Key | Required? | Description |
wifi_access_points | Required | An array of strings with the access point names. |
Set Ethernet settings
Set a device’s Ethernet settings.
Requirements
Only supported on certain Foundation devices with a minimum version of 3.0.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{[...],
"command":"SET_ETHERNET_SETTINGS",
"command_args": {
"ethernet_auth_mode": "EAP_TLS",
"ethernet_ca_cert_alias": "",
"ethernet_client_cert_alias": "",
"ethernet_eap_identity": ""
}
}
Key | Required? | Description |
ethernet_auth_mode | Required | EAP_TLS or NONE. If NONE, the other fields aren’t required. |
ethernet_ca_cert_alias | Required | The CA certificate alias. |
ethernet_client_cert_alias | Required | The client certificate alias. |
ethernet_eap_identity | Required | The EAP identity. |
Set Static IP
Set a static IP on the device.
Requirements
Only available for Foundation devices on version 1075+. For Ethernet, you’ll need Esper Foundation for Android (x86 devices) running SDK 3.0+. For Wi-Fi devices, you’ll need Android version 6-11.
Note
The devices you’re setting up Static IP for will need to be connected to Wi-Fi regardless of whether you’re using Ethernet or Wi-Fi. The Static IP configuration can only be set to the current Wi-Fi network that the device is connected to and a new Wi-Fi connection cannot be configured as Static using this feature.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{[...],
"command":"SET_STATIC_IP",
"command_args": {
"interface": "eth",
"dhcp_enabled": "false",
"static_ip": "192.168.1.40",
"gateway": "192.168.1.1",
"primary_dns": "1.1.1.1",
"subnet_mask": 24,
"secondary_dns": "8.8.8.8"
}
}
Key | Required? | Description |
interface | Required | “eth” |
dhcp_enabled | Required | “true” or “false”. Note that these values are strings. |
static_ip | Required | The static IP. |
gateway | Required | The gateway IP address. |
primary_dns | Required | The primary DNS. |
subnet_mask | Required | The subnet mask. Input the prefix length (1-32). Refer to the conversion chart for more information. |
secondary_dns | Optional | The secondary DNS. |
Set Wi-Fi state
Set the device’s Wi-Fi state (on/off). The device will automatically reconnect to Wi-Fi after a few moments.
Not supported for devices on Android 10+.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{[...],
"command":"SET_WIFI_STATE",
"command_args": {
"wifi_state": false
}
}
Key | Required? | Description |
wifi_state | Required | Boolean. True (on) or False (off). |
Uninstall certificate
Uninstall a certificate.
- If the alias name does not exist on the device, no error will be shown. The command will be marked successful.
- Alias names are case-sensitive.
- Any certificate may be deleted with this API. Ensure the alias name is correct before using this command.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{[...],
"command_args": {
"cert_alias_name": "mycert",
"cert_storage_type": "system"
}
}
Key | Required? | Description |
cert_alias_name | Required | The unique alias name for the certificate. Alias names are case-sensitive. |
cert_storage_type | Required | The certificate storage type. Currently only supports “system”. |
Use Only Saved Wi-Fi Access Points
When enabled, the device user cannot edit, add, or remove access points from Esper Settings in User Mode. They can, however, see a list of saved access points and select the available access points.
No restrictions apply when in Esper Settings Admin mode.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{[...],
"command":"USE_ONLY_SAVED_WIFI_AP",
"command_args": {
"use_only_saved_ap": true
}
}
Key | Required? | Description |
use_only_saved_ap | Required | Boolean. true to enable, false to disable. |
Device Actions for Android
Unless otherwise specified, the following commands will work on Android devices provisioned in Esper.
Beep Device
Send a beep command to the device. The device will beep for a specified amount of time. Ensure the sound volume is audible to make the most out of this command.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{[...],
"command":"BEEP_DEVICE",
"command_args": {
"duration":"10"
}
}
Key | Required? | Description |
duration | Required | A value (in seconds) between 10 and 300. |
Lock
Lock a device’s screen. The display will turn off but the device can still be activated by manually pressing a power button. Note that this is not the same as locking down a device (see Set Device Lockdown state).
Also supported on iOS devices. On iOS devices, the lockscreen is displayed instead of the display turning off.
Command Arguments
{ [...],
"command": "LOCK"
}
Ping
Send a ping to the device. This is also called a “heartbeat command” and acts as a manual way for the device to check in with Esper.
Also supported on iOS devices.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{[...],
"command":"UPDATE_HEARTBEAT"
}
Reboot
Reboot the device.
Also supported on iOS devices.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{[...],
"command": "REBOOT"
}
Send message
Broadcast a popup message to the device.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{ [...],
"command":"NOTIFY_DEVICE",
"command_args": {
"title": "Notice of App Update",
"message":"We will be updating our application on 2/23 at 1:00 AM.",
"url":"https://esper.io"
}
}
Key | Required? | Description |
title | Required | Title of the message. |
message | Required | Message. |
url | Optional | A URL that will redirect the user to a website. Must be used with a browser in the “SHOW” state. |
Set device lockdown state
Lock a device. You can use this command if you notice unauthorized activity on the device. You’ll need to use the console to unlock the device after locking it. Note the “UNLOCKED” state will not unlock the device.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{ [...],
"command":"SET_DEVICE_LOCKDOWN_STATE",
"command_args": {
"state": "LOCKED",
"message":"This device is locked. See your admin to unlock it."
}
}
Key | Required? | Description |
state | Required | LOCKED |
message | Optional | The message displayed on the screen during lockdown. |
Set kiosk mode
Sets the device to kiosk mode with the desired app.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{ [...],
"command":"SET_KIOSK_APP",
"command_args": {
package_name": "org.mozilla.firefox"
}
}
Key | Required? | Description |
package_name | Required | The app package name intended for kiosk mode. |
Set multi-app mode
Sets the device to multi-app mode.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{[...],
"command":"SET_MULTI_APP_MODE"
}
Wipe
Wipe the device. The device must be provisioned again if wiped.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{[...],
"command":"WIPE"
}
Device Settings for Android
Unless otherwise specified, the following commands will work on Android devices provisioned in Esper.
Reset Lockscreen Password
Reset the device’s lock screen password. After it is received, the device user will be prompted to enter the new lock screen password.
Sending the Reset Lockscreen Password command will NOT lock the device’s screen.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{ [...],
"command":"RESET_LOCKSCREEN_PASSWORD",
"command_args":{
"new_lockscreen_password":"1234"
}
}
Key | Required? | Description |
new_lockscreen_password | Required | The new lock screen password. These should be numerical values. |
Set Bluetooth
Turn the device’s Bluetooth on or off. The command will fail if the device is already set to the indicated state.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{ [...],
"command":"SET_BLUETOOTH_STATE",
"command_args": {
"bluetooth_state": true
}
}
Key | Required? | Description |
bluetooth_state | Required | Boolean. true (for on) or false (for off). |
Set brightness scale
Set the device’s brightness.
Note
Starting with Android version 9, brightness values in Esper Settings and the console may differ from those observed in Android settings. This is because a different formula is used for different versions. You can still use the API to set the device’s brightness and the change that happens on the device will still be accurate.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{[...],
"command":"SET_BRIGHTNESS_SCALE",
"command_args": {
"brightness_value": 85
}
}
Key | Required? | Description |
brightness_value | Required | Integer. The brightness value is from 1 - 100. |
Set Device Language
Set a device’s language. Requires a Knox device or supervisor plugin.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{ [...],
"command":"SET_DEVICE_LANGUAGE",
"command_args": {
"locale": "pt_br"
}
}
Key | Required? | Description |
locale | Required |
A two-letter lowercase IOS language code and two letter lowercase ISO country code separated by an underscore. Example: en_us where en is the English language code and us is the United States country code. |
Click on Details to see a list of languages.
{ language: 'Afrikaans (Namibia)', locale: 'af_na' },
{ language: 'Afrikaans (South Africa)', locale: 'af_za' },
{ language: 'Akan (Ghana)', locale: 'ak_gh' },
{ language: 'Albanian (Albania)', locale: 'sq_al' },
{ language: 'Albanian (Macedonia (FYROM))', locale: 'sq_mk' },
{ language: 'Amharic (Ethiopia)', locale: 'am_et' },
{ language: 'Arabic (Algeria)', locale: 'ar_dz' },
{ language: 'Arabic (Bahrain)', locale: 'ar_bh' },
{ language: 'Arabic (Chad)', locale: 'ar_td' },
{ language: 'Arabic (Comoros)', locale: 'ar_km' },
{ language: 'Arabic (Djibouti)', locale: 'ar_dj' },
{ language: 'Arabic (Egypt)', locale: 'ar_eg' },
{ language: 'Arabic (Eritrea)', locale: 'ar_er' },
{ language: 'Arabic (Iraq)', locale: 'ar_iq' },
{ language: 'Arabic (Israel)', locale: 'ar_il' },
{ language: 'Arabic (Jordan)', locale: 'ar_jo' },
{ language: 'Arabic (Kuwait)', locale: 'ar_kw' },
{ language: 'Arabic (Lebanon)', locale: 'ar_lb' },
{ language: 'Arabic (Libya)', locale: 'ar_ly' },
{ language: 'Arabic (Mauritania)', locale: 'ar_mr' },
{ language: 'Arabic (Morocco)', locale: 'ar_ma' },
{ language: 'Arabic (Oman)', locale: 'ar_om' },
{ language: 'Arabic (Palestine)', locale: 'ar_ps' },
{ language: 'Arabic (Qatar)', locale: 'ar_qa' },
{ language: 'Arabic (Saudi Arabia)', locale: 'ar_sa' },
{ language: 'Arabic (Somalia)', locale: 'ar_so' },
{ language: 'Arabic (South Sudan)', locale: 'ar_ss' },
{ language: 'Arabic (Sudan)', locale: 'ar_sd' },
{ language: 'Arabic (Syria)', locale: 'ar_sy' },
{ language: 'Arabic (Tunisia)', locale: 'ar_tn' },
{ language: 'Arabic (United Arab Emirates)', locale: 'ar_ae' },
{ language: 'Arabic (Western Sahara)', locale: 'ar_eh' },
{ language: 'Arabic (Yemen)', locale: 'ar_ye' },
{ language: 'Armenian (Armenia)', locale: 'hy_am' },
{ language: 'Assamese (India)', locale: 'as_in' },
{ language: 'Azerbaijani (Cyrillic,Azerbaijan)', locale: 'az_az' },
{ language: 'Azerbaijani (Latin,Azerbaijan)', locale: 'az_az' },
{ language: 'Bambara (Mali)', locale: 'bm_ml' },
{ language: 'Basque (Spain)', locale: 'eu_es' },
{ language: 'Belarusian (Belarus)', locale: 'be_by' },
{ language: 'Bengali (Bangladesh)', locale: 'bn_bd' },
{ language: 'Bengali (India)', locale: 'bn_in' },
{ language: 'Bosnian (Cyrillic,Bosnia and Herzegovina)', locale: 'bs_ba' },
{ language: 'Bosnian (Latin,Bosnia and Herzegovina)', locale: 'bs_ba' },
{ language: 'Breton (France)', locale: 'br_fr' },
{ language: 'Bulgarian (Bulgaria)', locale: 'bg_bg' },
{ language: 'Burmese (Myanmar (Burma))', locale: 'my_mm' },
{ language: 'Catalan (Andorra)', locale: 'ca_ad' },
{ language: 'Catalan (France)', locale: 'ca_fr' },
{ language: 'Catalan (Italy)', locale: 'ca_it' },
{ language: 'Catalan (Spain)', locale: 'ca_es' },
{ language: 'Chinese (Simplified Han,China)', locale: 'zh_cn' },
{ language: 'Chinese (Simplified Han,Hong Kong)', locale: 'zh_hk' },
{ language: 'Chinese (Simplified Han,Macau)', locale: 'zh_mo' },
{ language: 'Chinese (Simplified Han,Singapore)', locale: 'zh_sg' },
{ language: 'Chinese (Traditional Han,Hong Kong)', locale: 'zh_hk' },
{ language: 'Chinese (Traditional Han,Macau)', locale: 'zh_mo' },
{ language: 'Chinese (Traditional Han,Taiwan)', locale: 'zh_tw' },
{ language: 'Cornish (United Kingdom)', locale: 'kw_gb' },
{ language: 'Croatian (Bosnia and Herzegovina)', locale: 'hr_ba' },
{ language: 'Croatian (Croatia)', locale: 'hr_hr' },
{ language: 'Czech (Czech Republic)', locale: 'cs_cz' },
{ language: 'Danish (Denmark)', locale: 'da_dk' },
{ language: 'Danish (Greenland)', locale: 'da_gl' },
{ language: 'Dutch (Aruba)', locale: 'nl_aw' },
{ language: 'Dutch (Belgium)', locale: 'nl_be' },
{ language: 'Dutch (Caribbean Netherlands)', locale: 'nl_bq' },
{ language: 'Dutch (Curaçao)', locale: 'nl_cw' },
{ language: 'Dutch (Netherlands)', locale: 'nl_nl' },
{ language: 'Dutch (Sint Maarten)', locale: 'nl_sx' },
{ language: 'Dutch (Suriname)', locale: 'nl_sr' },
{ language: 'Dzongkha (Bhutan)', locale: 'dz_bt' },
{ language: 'English (American Samoa)', locale: 'en_as' },
{ language: 'English (Anguilla)', locale: 'en_ai' },
{ language: 'English (Antigua and Barbuda)', locale: 'en_ag' },
{ language: 'English (Australia)', locale: 'en_au' },
{ language: 'English (Bahamas)', locale: 'en_bs' },
{ language: 'English (Barbados)', locale: 'en_bb' },
{ language: 'English (Belgium)', locale: 'en_be' },
{ language: 'English (Belize)', locale: 'en_bz' },
{ language: 'English (Bermuda)', locale: 'en_bm' },
{ language: 'English (Botswana)', locale: 'en_bw' },
{ language: 'English (British Indian Ocean Territory)', locale: 'en_io' },
{ language: 'English (British Virgin Islands)', locale: 'en_vg' },
{ language: 'English (Cameroon)', locale: 'en_cm' },
{ language: 'English (Canada)', locale: 'en_ca' },
{ language: 'English (Cayman Islands)', locale: 'en_ky' },
{ language: 'English (Christmas Island)', locale: 'en_cx' },
{ language: 'English (Cocos (Keeling) Islands)', locale: 'en_cc' },
{ language: 'English (Cook Islands)', locale: 'en_ck' },
{ language: 'English (Diego Garcia)', locale: 'en_dg' },
{ language: 'English (Dominica)', locale: 'en_dm' },
{ language: 'English (Eritrea)', locale: 'en_er' },
{ language: 'English (Falkland Islands (Islas Malvinas))', locale: 'en_fk' },
{ language: 'English (Fiji)', locale: 'en_fj' },
{ language: 'English (Gambia)', locale: 'en_gm' },
{ language: 'English (Ghana)', locale: 'en_gh' },
{ language: 'English (Gibraltar)', locale: 'en_gi' },
{ language: 'English (Grenada)', locale: 'en_gd' },
{ language: 'English (Guam)', locale: 'en_gu' },
{ language: 'English (Guernsey)', locale: 'en_gg' },
{ language: 'English (Guyana)', locale: 'en_gy' },
{ language: 'English (Hong Kong)', locale: 'en_hk' },
{ language: 'English (India)', locale: 'en_in' },
{ language: 'English (Ireland)', locale: 'en_ie' },
{ language: 'English (Isle of Man)', locale: 'en_im' },
{ language: 'English (Jamaica)', locale: 'en_jm' },
{ language: 'English (Jersey)', locale: 'en_je' },
{ language: 'English (Kenya)', locale: 'en_ke' },
{ language: 'English (Kiribati)', locale: 'en_ki' },
{ language: 'English (Lesotho)', locale: 'en_ls' },
{ language: 'English (Liberia)', locale: 'en_lr' },
{ language: 'English (Macau)', locale: 'en_mo' },
{ language: 'English (Madagascar)', locale: 'en_mg' },
{ language: 'English (Malawi)', locale: 'en_mw' },
{ language: 'English (Malta)', locale: 'en_mt' },
{ language: 'English (Marshall Islands)', locale: 'en_mh' },
{ language: 'English (Mauritius)', locale: 'en_mu' },
{ language: 'English (Micronesia)', locale: 'en_fm' },
{ language: 'English (Montserrat)', locale: 'en_ms' },
{ language: 'English (Namibia)', locale: 'en_na' },
{ language: 'English (Nauru)', locale: 'en_nr' },
{ language: 'English (New Zealand)', locale: 'en_nz' },
{ language: 'English (Nigeria)', locale: 'en_ng' },
{ language: 'English (Niue)', locale: 'en_nu'},
{ language: 'English (Norfolk Island)', locale: 'en_nf' },
{ language: 'English (Northern Mariana Islands)', locale: 'en_mp' },
{ language: 'English (Pakistan)', locale: 'en_pk' },
{ language: 'English (Palau)', locale: 'en_pw' },
{ language: 'English (Papua New Guinea)', locale: 'en_pg' },
{ language: 'English (Philippines)', locale: 'en_ph' },
{ language: 'English (Pitcairn Islands)', locale: 'en_pn' },
{ language: 'English (Puerto Rico)', locale: 'en_pr' },
{ language: 'English (Rwanda)', locale: 'en_rw' },
{ language: 'English (Saint Helena)', locale: 'en_sh' },
{ language: 'English (Saint Kitts and Nevis)', locale: 'en_kn' },
{ language: 'English (Saint Lucia)', locale: 'en_lc' },
{ language: 'English (Samoa)', locale: 'en_ws' },
{ language: 'English (Seychelles)', locale: 'en_sc' },
{ language: 'English (Sierra Leone)', locale: 'en_sl' },
{ language: 'English (Singapore)', locale: 'en_sg' },
{ language: 'English (Sint Maarten)', locale: 'en_sx' },
{ language: 'English (Solomon Islands)', locale: 'en_sb' },
{ language: 'English (South Africa)', locale: 'en_za' },
{ language: 'English (South Sudan)', locale: 'en_ss' },
{ language: 'English (St. Vincent & Grenadines)', locale: 'en_vc' },
{ language: 'English (Sudan)', locale: 'en_sd' },
{ language: 'English (Swaziland)', locale: 'en_sz' },
{ language: 'English (Tanzania)', locale: 'en_tz' },
{ language: 'English (Tokelau)', locale: 'en_tk' },
{ language: 'English (Tonga)', locale: 'en_to' },
{ language: 'English (Trinidad and Tobago)', locale: 'en_tt' },
{ language: 'English (Turks and Caicos Islands)', locale: 'en_tc' },
{ language: 'English (Tuvalu)', locale: 'en_tv' },
{ language: 'English (U.S. Outlying Islands)', locale: 'en_um' },
{ language: 'English (U.S. Virgin Islands)', locale: 'en_vi' },
{ language: 'English (Uganda)', locale: 'en_ug' },
{ language: 'English (United Kingdom)', locale: 'en_gb' },
{ language: 'English (United States,Computer)', locale: 'en_us' },
{ language: 'English (United States)', locale: 'en_us' },
{ language: 'English (Vanuatu)', locale: 'en_vu' },
{ language: 'English (Zambia)', locale: 'en_zm' },
{ language: 'English (Zimbabwe)', locale: 'en_zw' },
{ language: 'Estonian (Estonia)', locale: 'et_ee' },
{ language: 'Ewe (Ghana)', locale: 'ee_gh' },
{ language: 'Ewe (Togo)', locale: 'ee_tg' },
{ language: 'Faroese (Faroe Islands)', locale: 'fo_fo' },
{ language: 'Finnish (Finland)', locale: 'fi_fi' },
{ language: 'French (Algeria)', locale: 'fr_dz' },
{ language: 'French (Belgium)', locale: 'fr_be' },
{ language: 'French (Benin)', locale: 'fr_bj' },
{ language: 'French (Burkina Faso)', locale: 'fr_bf' },
{ language: 'French (Burundi)', locale: 'fr_bi' },
{ language: 'French (Cameroon)', locale: 'fr_cm' },
{ language: 'French (Canada)', locale: 'fr_ca' },
{ language: 'French (Central African Republic)', locale: 'fr_cf' },
{ language: 'French (Chad)', locale: 'fr_td' },
{ language: 'French (Comoros)', locale: 'fr_km' },
{ language: 'French (Congo (DRC))', locale: 'fr_cd' },
{ language: 'French (Congo (Republic))', locale: 'fr_cg' },
{ language: 'French (Côte d’Ivoire)', locale: 'fr_ci' },
{ language: 'French (Djibouti)', locale: 'fr_dj' },
{ language: 'French (Equatorial Guinea)', locale: 'fr_gq' },
{ language: 'French (France)', locale: 'fr_fr' },
{ language: 'French (French Guiana)', locale: 'fr_gf' },
{ language: 'French (French Polynesia)', locale: 'fr_pf' },
{ language: 'French (Gabon)', locale: 'fr_ga' },
{ language: 'French (Guadeloupe)', locale: 'fr_gp' },
{ language: 'French (Guinea)', locale: 'fr_gn' },
{ language: 'French (Haiti)', locale: 'fr_ht' },
{ language: 'French (Luxembourg)', locale: 'fr_lu' },
{ language: 'French (Madagascar)', locale: 'fr_mg' },
{ language: 'French (Mali)', locale: 'fr_ml' },
{ language: 'French (Martinique)', locale: 'fr_mq' },
{ language: 'French (Mauritania)', locale: 'fr_mr' },
{ language: 'French (Mauritius)', locale: 'fr_mu' },
{ language: 'French (Mayotte)', locale: 'fr_yt' },
{ language: 'French (Monaco)', locale: 'fr_mc' },
{ language: 'French (Morocco)', locale: 'fr_ma' },
{ language: 'French (New Caledonia)', locale: 'fr_nc' },
{ language: 'French (Niger)', locale: 'fr_ne' },
{ language: 'French (Réunion)', locale: 'fr_re' },
{ language: 'French (Rwanda)', locale: 'fr_rw' },
{ language: 'French (Saint Barthélemy)', locale: 'fr_bl' },
{ language: 'French (Saint Martin)', locale: 'fr_mf' },
{ language: 'French (Saint Pierre and Miquelon)', locale: 'fr_pm' },
{ language: 'French (Senegal)', locale: 'fr_sn' },
{ language: 'French (Seychelles)', locale: 'fr_sc' },
{ language: 'French (Switzerland)', locale: 'fr_ch' },
{ language: 'French (Syria)', locale: 'fr_sy' },
{ language: 'French (Togo)', locale: 'fr_tg' },
{ language: 'French (Tunisia)', locale: 'fr_tn' },
{ language: 'French (Vanuatu)', locale: 'fr_vu' },
{ language: 'French (Wallis and Futuna)', locale: 'fr_wf' },
{ language: 'Fulah (Senegal)', locale: 'ff_sn' },
{ language: 'Galician (Spain)', locale: 'gl_es'},
{ language: 'Ganda (Uganda)', locale: 'lg_ug' },
{ language: 'Georgian (Georgia)', locale: 'ka_ge' },
{ language: 'German (Austria)', locale: 'de_at' },
{ language: 'German (Belgium)', locale: 'de_be' },
{ language: 'German (Germany)', locale: 'de_de' },
{ language: 'German (Liechtenstein)', locale: 'de_li' },
{ language: 'German (Luxembourg)', locale: 'de_lu' },
{ language: 'German (Switzerland)', locale: 'de_ch' },
{ language: 'Greek (Cyprus)', locale: 'el_cy' },
{ language: 'Greek (Greece)', locale: 'el_gr' },
{ language: 'Gujarati (India)', locale: 'gu_in' },
{ language: 'Hausa (Latin,Ghana)', locale: 'ha_gh' },
{ language: 'Hausa (Latin,Niger)', locale: 'ha_ne' },
{ language: 'Hausa (Latin,Nigeria)', locale: 'ha_ng' },
{ language: 'Hebrew (Israel)', locale: 'iw_il' },
{ language: 'Hindi (India)', locale: 'hi_in' },
{ language: 'Hungarian (Hungary)', locale: 'hu_hu' },
{ language: 'Icelandic (Iceland)', locale: 'is_is' },
{ language: 'Igbo (Nigeria)', locale: 'ig_ng' },
{ language: 'Indonesian (Indonesia)', locale: 'in_id' },
{ language: 'Irish (Ireland)', locale: 'ga_ie' },
{ language: 'Italian (Italy)', locale: 'it_it' },
{ language: 'Italian (San Marino)', locale: 'it_sm' },
{ language: 'Italian (Switzerland)', locale: 'it_ch' },
{ language: 'Japanese (Japan)', locale: 'ja_jp' },
{ language: 'Kalaallisut (Greenland)', locale: 'kl_gl' },
{ language: 'Kannada (India)', locale: 'kn_in' },
{ language: 'Kashmiri (Arabic,India)', locale: 'ks_in' },
{ language: 'Kazakh (Cyrillic,Kazakhstan)', locale: 'kk_kz' },
{ language: 'Khmer (Cambodia)', locale: 'km_kh' },
{ language: 'Kikuyu (Kenya)', locale: 'ki_ke' },
{ language: 'Kinyarwanda (Rwanda)', locale: 'rw_rw' },
{ language: 'Korean (North Korea)', locale: 'ko_kp' },
{ language: 'Korean (South Korea)', locale: 'ko_kr' },
{ language: 'Kyrgyz (Cyrillic,Kyrgyzstan)', locale: 'ky_kg' },
{ language: 'Lao (Laos)', locale: 'lo_la' },
{ language: 'Latvian (Latvia)', locale: 'lv_lv' },
{ language: 'Lingala (Angola)', locale: 'ln_ao' },
{ language: 'Lingala (Central African Republic)', locale: 'ln_cf' },
{ language: 'Lingala (Congo (DRC))', locale: 'ln_cd' },
{ language: 'Lingala (Congo (Republic))', locale: 'ln_cg' },
{ language: 'Lithuanian (Lithuania)', locale: 'lt_lt' },
{ language: 'Luba-Katanga (Congo (DRC))', locale: 'lu_cd' },
{ language: 'Macedonian (Macedonia (FYROM))', locale: 'mk_mk' },
{ language: 'Malagasy (Madagascar)', locale: 'mg_mg' },
{ language: 'Malay (Latin,Brunei)', locale: 'ms_bn' },
{ language: 'Malay (Latin,Malaysia)', locale: 'ms_my' },
{ language: 'Malay (Latin,Singapore)', locale: 'ms_sg' },
{ language: 'Malayalam (India)', locale: 'ml_in' },
{ language: 'Maltese (Malta)', locale: 'mt_mt' },
{ language: 'Manx (Isle of Man)', locale: 'gv_im' },
{ language: 'Marathi (India)', locale: 'mr_in' },
{ language: 'Mongolian (Cyrillic,Mongolia)', locale: 'mn_mn' },
{ language: 'Nepali (India)', locale: 'ne_in' },
{ language: 'Nepali (Nepal)', locale: 'ne_np' },
{ language: 'North Ndebele (Zimbabwe)', locale: 'nd_zw' },
{ language: 'Norwegian Bokmål (Norway)', locale: 'nb_no' },
{ language: 'Norwegian Bokmål (Svalbard and Jan Mayen)', locale: 'nb_sj' },
{ language: 'Norwegian Nynorsk (Norway)', locale: 'nn_no' },
{ language: 'Oriya (India)', locale: 'or_in' },
{ language: 'Oromo (Ethiopia)', locale: 'om_et' },
{ language: 'Oromo (Kenya)', locale: 'om_ke' },
{ language: 'Pashto (Afghanistan)', locale: 'ps_af' },
{ language: 'Persian (Afghanistan)', locale: 'fa_af' },
{ language: 'Persian (Iran)', locale: 'fa_ir' },
{ language: 'Polish (Poland)', locale: 'pl_pl' },
{ language: 'Portuguese (Angola)', locale: 'pt_ao' },
{ language: 'Portuguese (Brazil)', locale: 'pt_br' },
{ language: 'Portuguese (Cape Verde)', locale: 'pt_cv' },
{ language: 'Portuguese (Guinea-Bissau)', locale: 'pt_gw' },
{ language: 'Portuguese (Macau)', locale: 'pt_mo' },
{ language: 'Portuguese (Mozambique)', locale: 'pt_mz' },
{ language: 'Portuguese (Portugal)', locale: 'pt_pt' },
{ language: 'Portuguese (São Tomé and Príncipe)', locale: 'pt_st' },
{ language: 'Portuguese (Timor-Leste)', locale: 'pt_tl' },
{ language: 'Punjabi (Arabic,Pakistan)', locale: 'pa_pk' },
{ language: 'Punjabi (Gurmukhi,India)', locale: 'pa_in' },
{ language: 'Romanian (Moldova)', locale: 'ro_md' },
{ language: 'Romanian (Romania)', locale: 'ro_ro' },
{ language: 'Romansh (Switzerland)', locale: 'rm_ch' },
{ language: 'Rundi (Burundi)', locale: 'rn_bi' },
{ language: 'Russian (Belarus)', locale: 'ru_by' },
{ language: 'Russian (Kazakhstan)', locale: 'ru_kz' },
{ language: 'Russian (Kyrgyzstan)', locale: 'ru_kg' },
{ language: 'Russian (Moldova)', locale: 'ru_md' },
{ language: 'Russian (Russia)', locale: 'ru_ru' },
{ language: 'Russian (Ukraine)', locale: 'ru_ua' },
{ language: 'Sango (Central African Republic)', locale: 'sg_cf' },
{ language: 'Serbian (Cyrillic,Bosnia and Herzegovina)', locale: 'sr_ba' },
{ language: 'Serbian (Cyrillic,Kosovo)', locale: 'sr_xk' },
{ language: 'Serbian (Cyrillic,Montenegro)', locale: 'sr_me' },
{ language: 'Serbian (Cyrillic,Serbia)', locale: 'sr_rs' },
{ language: 'Serbian (Latin,Bosnia and Herzegovina)', locale: 'sr_ba' },
{ language: 'Serbian (Latin,Kosovo)', locale: 'sr_xk' },
{ language: 'Serbian (Latin,Montenegro)', locale: 'sr_me' },
{ language: 'Serbian (Latin,Serbia)', locale: 'sr_rs' },
{ language: 'Shona (Zimbabwe)', locale: 'sn_zw' },
{ language: 'Sichuan Yi (China)', locale: 'ii_cn' },
{ language: 'Sinhala (Sri Lanka)', locale: 'si_lk' },
{ language: 'Slovak (Slovakia)', locale: 'sk_sk' },
{ language: 'Slovenian (Slovenia)', locale: 'sl_si' },
{ language: 'Somali (Djibouti)', locale: 'so_dj' },
{ language: 'Somali (Ethiopia)', locale: 'so_et' },
{ language: 'Somali (Kenya)', locale: 'so_ke' },
{ language: 'Somali (Somalia)', locale: 'so_so' },
{ language: 'Spanish (Argentina)', locale: 'es_ar' },
{ language: 'Spanish (Bolivia)', locale: 'es_bo' },
{ language: 'Spanish (Canary Islands)', locale: 'es_ic' },
{ language: 'Spanish (Ceuta and Melilla)', locale: 'es_ea' },
{ language: 'Spanish (Chile)', locale: 'es_cl' },
{ language: 'Spanish (Colombia)', locale: 'es_co' },
{ language: 'Spanish (Costa Rica)', locale: 'es_cr' },
{ language: 'Spanish (Cuba)', locale: 'es_cu' },
{ language: 'Spanish (Dominican Republic)', locale: 'es_do' },
{ language: 'Spanish (Ecuador)', locale: 'es_ec' },
{ language: 'Spanish (El Salvador)', locale: 'es_sv' },
{ language: 'Spanish (Equatorial Guinea)', locale: 'es_gq' },
{ language: 'Spanish (Guatemala)', locale: 'es_gt' },
{ language: 'Spanish (Honduras)', locale: 'es_hn' },
{ language: 'Spanish (Mexico)', locale: 'es_mx' },
{ language: 'Spanish (Nicaragua)', locale: 'es_ni' },
{ language: 'Spanish (Panama)', locale: 'es_pa' },
{ language: 'Spanish (Paraguay)', locale: 'es_py' },
{ language: 'Spanish (Peru)', locale: 'es_pe' },
{ language: 'Spanish (Philippines)', locale: 'es_ph' },
{ language: 'Spanish (Puerto Rico)', locale: 'es_pr' },
{ language: 'Spanish (Spain)', locale: 'es_es' },
{ language: 'Spanish (United States)', locale: 'es_us' },
{ language: 'Spanish (Uruguay)', locale: 'es_uy' },
{ language: 'Spanish (Venezuela)', locale: 'es_ve' },
{ language: 'Swahili (Kenya)', locale: 'sw_ke' },
{ language: 'Swahili (Tanzania)', locale: 'sw_tz' },
{ language: 'Swahili (Uganda)', locale: 'sw_ug' },
{ language: 'Swedish (Åland Islands)', locale: 'sv_ax' },
{ language: 'Swedish (Finland)', locale: 'sv_fi' },
{ language: 'Swedish (Sweden)', locale: 'sv_se' },
{ language: 'Tamil (India)', locale: 'ta_in' },
{ language: 'Tamil (Malaysia)', locale: 'ta_my' },
{ language: 'Tamil (Singapore)', locale: 'ta_sg' },
{ language: 'Tamil (Sri Lanka)', locale: 'ta_lk' },
{ language: 'Telugu (India)', locale: 'te_in' },
{ language: 'Thai (Thailand)', locale: 'th_th' },
{ language: 'Tibetan (China)', locale: 'bo_cn' },
{ language: 'Tibetan (India)', locale: 'bo_in' },
{ language: 'Tigrinya (Eritrea)', locale: 'ti_er' },
{ language: 'Tigrinya (Ethiopia)', locale: 'ti_et' },
{ language: 'Tongan (Tonga)', locale: 'to_to' },
{ language: 'Turkish (Cyprus)', locale: 'tr_cy' },
{ language: 'Turkish (Turkey)', locale: 'tr_tr' },
{ language: 'Ukrainian (Ukraine)', locale: 'uk_ua' },
{ language: 'Urdu (India)', locale: 'ur_in' },
{ language: 'Urdu (Pakistan)', locale: 'ur_pk' },
{ language: 'Uyghur (Arabic,China)', locale: 'ug_cn' },
{ language: 'Uzbek (Arabic,Afghanistan)', locale: 'uz_af' },
{ language: 'Uzbek (Cyrillic,Uzbekistan)', locale: 'uz_uz' },
{ language: 'Uzbek (Latin,Uzbekistan)', locale: 'uz_uz' },
{ language: 'Vietnamese (Vietnam)', locale: 'vi_vn' },
{ language: 'Welsh (United Kingdom)', locale: 'cy_gb' },
{ language: 'Yoruba (Benin)', locale: 'yo_bj' },
{ language: 'Yoruba (Nigeria)', locale: 'yo_ng' },
{ language: 'Zulu (South Africa)', locale: 'zu_za'}
Set GPS state
Set the device’s GPS state.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{ [...],
"command":"SET_GPS_STATE",
"command_args": {
"gps_state": 0
}
}
Key | Required? | Description |
gps_state | Required |
Integer. One of the following: 1 = Location mode sensors only 2 = Location mode battery saving 3 = Location mode off 4 = Location mode on |
Set screen orientation
Set the device’s screen orientation.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{[...],
"command":"SET_NEW_POLICY",
"command_args": {
"rotate_state": 0
}
}
Key | Required? | Description |
rotate_state | Required | Integer. One of the following:
|
Set screen timeout
Set the duration before the screen times out.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{[...],
"command":"SET_SCREEN_OFF_TIMEOUT",
"command_args": {
"screen_off_timeout": 7200000
}
}
Key | Required? | Description |
screen_off_timeout | Required | Integer. The screen timeout duration in milliseconds. Accepts values -1 (never) or between 5000 (5 seconds) to 7200000 (2 hours). |
Set timezone
Set the device’s timezone. See a list of timezone strings in the TZ identifier column of this article. May have additional device requirements. Reach out to Esper to learn more.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{[...],
"command":"SET_SCREEN_OFF_TIMEOUT",
"command_args": {
"timezone_string": "America/Edmonton"
}
}
Key | Required? | Description |
timezone_string | Required | The timezone string. |
Device Management for Android
Unless otherwise specified, the following commands will work on Android devices provisioned in Esper.
Converge
Converge a device to its currently assigned blueprint.
Also works for iOS devices.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{ [...]
"command": "CONVERGE"
}
Set New Policy
Set a new compliance policy for a device. Requires the device to be on the Templates experience.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{ [...],
"command":"SET_NEW_POLICY",
"command_args": {
"policy_url": "https://demo-api.esper.cloud/api/enterprise/1111aaaa-f271-4113-b77b-a240e7652e07/policy/1/"
}
}
Key | Required? | Description |
policy_url | Required | The Compliance policy URL. Find the policy url by using the List all policies in enterprise request. |
iOS Commands
The following commands will work on iOS devices.
Clear passcode
Clears the passcode on a device. The device must be unlocked to receive this command.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{[...],
"command":"CLEAR_PASSCODE"
}
VPP app install
Install a VPP app.
Requirements
Requires an ABM-provisioned device and an installed VPP token.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{[...],
"command":"VPP_APP_INSTALL",
"command_args":{
"app_id": "585027354",
"bundle_identifier": "com.google.Maps"
}
}
Key | Required? | Description |
app_id | Required | The VPP app’s ID. See note below. |
bundle_identifier | Required | The app’s bundle identifier. See note below. |
Note:
- Bundle Identifier: In Apps > VPP Apps, search for the app. The app’s bundle identifier is located beneath the app’s name.
- App ID: Use a Chrome browser and DevTools to open the Inspector. In Apps > VPP, right-click on the app’s name and then locate the data-testid div on the right-side panel to find the app_id.
Beta Commands
The following requests may be in active development, customer betas, or only available on certain tenants.
Device information
Supported by Android.
Prompt the device to update device information.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{ [...],
"command":"DEVICE_INFORMATION"
}
Install profile
Supported by iOS. Install a profile.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{ [...],
"command":"INSTALL_PROFILE"
}
List installed profiles
Supported by iOS.
List the installed profiles on the device.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{[...],
"command":"LIST_INSTALLED_PROFILES"
}
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{ [...],
"command":"DELETE_PROFILE"
}
Run shell script
Supported by Linux.
Run a shell script.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{ [...],
"command":"RUN_SHELL_SCRIPT"
}
Set App Notifications
Supported by Android.
Enable or disable app notifications. May only work for certain apps and certain versions of Android.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{ [...],
"command":"SET_APP_NOTIFICATIONS",
"command_args": {
"app_notifications_state": "DISABLED",
"package_name":"app package name"
}
}
Key | Required? | Description |
app_notifications_state | Required | ENABLED or DISABLED. |
package_name | Required | The app’s package name. |
Update Device Config
Used to update and install the Esper Agent and other apps. This was primarily used by administrators when updating Foundation devices. Most users won’t need to use this command.
Requirements
Supported by devices running Esper Foundation.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{ [...],
"command":"UPDATE_DEVICE_CONFIG",
"custom_settings_config": {
"commands": [
{
"command": "INSTALL",
"type": "Simple",
"packageName": "io.shoonya.shoonyadpc",
"downloadUrl": "https://exampledownloadurl.apk",
"installType": "APK",
"hashString": "examplehashstring",
"versionCode": "1",
"minSdkVersion": "1",
"commandId": "ESPER-TEST"
}
]
}
}
Key | Required? | Description |
custom_settings_config | Required | Object. Contains a command array with various values related to the Esper Agent. Reach out to Esper if you’re interested in this API. |
Update Latest DPC
Supported by Android. May have additional requirements.
Update the device to the latest Esper agent. Devices are usually updated automatically as Esper Agent versions come out. You can also use a pipeline to update Esper Agent versions.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{ [...],
"command":"UPDATE_LATEST_DPC"
}
Deprecated
The following commands are no longer supported.
Apple app uninstall
Uninstall an app on an iOS device. Use Uninstall App to achieve this behavior.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{ [...],
"command":"APPLE_APP_UNINSTALL",
"command_args":{
"app_id": "585027354",
"bundle_identifier": "com.google.Maps"
}
}
Key | Required? | Description |
app_id | Required | The VPP app’s ID. |
bundle_identifier | Required | The app’s bundle identifier. |
Update Blueprint
Updates a device to its latest blueprint. This was used for the old blueprints service and may not work on most tenants. Use a converge command to achieve this behavior.
Request
POST https://{tenant-name}-api.esper.cloud/api/commands/v0/commands/
Command Arguments
{ [...],
"command":"UPDATE_BLUEPRINT"
}