Skip to content

ESPER API REFERENCE (1.0.0)

Introduction

Welcome to Esper’s API documentation. The Esper API allows users to accomplish operations outside of the console. Some common uses for our APIs include observing device information and console activity, installing and updating apps, uploading files, and sending files to devices. Our users have also used the API to automate app updates, perform bulk actions, and more.

Esper API endpoints use REST-based architecture and return JSON responses.

See our documentation for:

Authentication

You need to create an API Key to interact with our APIs. Learn more about generating an API Key. You can also learn more about Esper and sign up for an account at esper.io/signup.

Some endpoints also require an Enterprise ID. This ID can be found in the API Management section of the Esper console.

Pagination

Responses may be paginated. Use the following parameters to query the data. A full list of parameters can be found on the endpoint’s documentation page.

ParameterData TypeExplanation
limitintegerLimit the data returned. Default = 20.
offsetintegerOffset to the first item returned. Default = 0.
orderingstringOrder the results set by the field name. Varies by endpoint.
nextstringPaginate to the next response set.
previousstringPaginate to the last set response.

Errors

We use standard HTTP status codes for success or failure. A typical error response may look something like this:

{
  "errors": [],
  "message": "error message",
  "status": 400
}
  • errors - List of error details
  • message - Error description
  • status - HTTP status code

Some common status codes and messages are:

NumberMessageExplanation
200OKThe request succeeded.
201Resource creationA resource was created.
401UnauthorizedThe API key is invalid.
404Not foundThe resource was not found.
429Rate limit exceededToo many requests. Wait a moment and try again.
500Server errorInternal error. Wait a moment and try again. If the issue persists, contact Esper.

See how our systems are doing by checking our status page.

Rate Limits

To ensure quality of service for all customers, we enforce rate limits for API requests. Most customers won’t hit this limit with normal use. In case you experience 429 or rate limit exceeded errors, we recommend the following:

  • Try sending requests in batches.
  • Begin with about 20 requests at a time and building up from there.
  • Ensure your scripts are efficient and don’t contain redundant calls.
  • Reach out to your account manager to discuss your options.
Download OpenAPI description
Languages
Servers
Mock server
https://api.esper.io/_mock/openapi
https://{foo}-api.esper.cloud/api

Company Settings

Operations

Application

Operations

Application V1

Operations

AndroidDevice

Operations

Fetch all devices in an enterprise

Request

Returns a list of devices

Security
apiKey
Path
enterprise_idstring(uuid)required

ID of the enterprise

Query
namestring

filter by device name

groupstring(uuid)

filter by group id. It will list all the devices under this gorup including the subgroups

imeistring

filter by imei

serialstring

filter by serial number

stateinteger(int32)(DeviceStateEnum)

Following are the Device States and their description

* 0 = Device State is Unspecified
* 1 = Online
* 20 = Disabled (device has been factory reset or removed from the Esper Dashboard)
* 30 = Beginning Provisioning
* 40 = Configuring Google Play (still provisioning)
* 50 = Applying Policies and Installing Applications (still provisioning)
* 60 = Offline
* 70 = Device is undergoing a Factory Reset (reset started from Dashboard)
* 80 = Device Onboarding in Progress
* 90 = Device Onboarding Failed
* 100 = Device Onboarded in Esper
* 110 = Android For Work Account added
* 120 = Apps installed
* 130 = Branding Processed
* 140 = Permission Policy Processed
* 150 = Device Policy Processed
* 160 = Device Settings Processed
* 170 = Security Policy Processed
* 180 = Phone Policy Processed
* 190 = Custom Settings Processed
* 200 = Registered
Enum012030405060708090
brandstring

filter by brand

is_gmsboolean

filter for gms devices

searchstring

A search term. Search by device name, imei or mac address

tagsstring

A partial text search for device tags

assigned_blueprint_idstring(uuid)

Filter by assigned blueprint id

current_blueprint_idstring(uuid)

Filter by current blueprint id

current_blueprint_version_idstring(uuid)

Filter by current blueprint version id

limitinteger

Number of results to return per page.

Default 20
offsetinteger

Return results from this index.

Default 0
curl -i -X GET \
  'https://api.esper.io/_mock/openapi/enterprise/{enterprise_id}/device/?name=string&group=497f6eca-6276-4993-bfeb-53cbbbba6f08&imei=string&serial=string&state=0&brand=string&is_gms=true&search=string&tags=string&assigned_blueprint_id=497f6eca-6276-4993-bfeb-53cbbbba6f08&current_blueprint_id=497f6eca-6276-4993-bfeb-53cbbbba6f08&current_blueprint_version_id=497f6eca-6276-4993-bfeb-53cbbbba6f08&limit=20&offset=0' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

successful operation

Bodyapplication/json
countinteger(int64)
nextstring(url)
previousstring(url)
resultsArray of objects(DeviceInfo)
Response
application/json
{ "count": 0, "next": "string", "previous": "string", "results": [ { … } ] }

Fetch device details by ID

Request

Returns details of a device

Security
apiKey
Path
enterprise_idstring(uuid)required

ID of the enterprise

device_idstring(uuid)required

ID of the device

curl -i -X GET \
  'https://api.esper.io/_mock/openapi/enterprise/{enterprise_id}/device/{device_id}/' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

successful operation

Bodyapplication/json
idstring(uuid)
urlstring(url)
device_namestring
alias_namestring

Device friendly name

policy_namestring
statusinteger(int32)

Current status of device

stateinteger(int32)(DeviceStateEnum)

Following are the Device States and their description

* 0 = Device State is Unspecified
* 1 = Online
* 20 = Disabled (device has been factory reset or removed from the Esper Dashboard)
* 30 = Beginning Provisioning
* 40 = Configuring Google Play (still provisioning)
* 50 = Applying Policies and Installing Applications (still provisioning)
* 60 = Offline
* 70 = Device is undergoing a Factory Reset (reset started from Dashboard)
* 80 = Device Onboarding in Progress
* 90 = Device Onboarding Failed
* 100 = Device Onboarded in Esper
* 110 = Android For Work Account added
* 120 = Apps installed
* 130 = Branding Processed
* 140 = Permission Policy Processed
* 150 = Device Policy Processed
* 160 = Device Settings Processed
* 170 = Security Policy Processed
* 180 = Phone Policy Processed
* 190 = Custom Settings Processed
* 200 = Registered
Enum012030405060708090
current_commandstring(uuid)

Current command associated with device

suidstring

Device generated unique id

directory_record_idstring(uuid)

ID of Directory Record associated with the device (if available)

fcm_idstring
enterprisestring(url)
policystring(url)
userstring(url)
groupsArray of strings(url)
tagsArray of strings
api_levelinteger(int32)
template_namestring
mqtt_idstring
softwareInfoobject
hardwareInfoobject
displaysobject
networkInfoobject
memoryInfoobject
esper_cientstring
device_typestring
audioConstraintsobject
provisioned_onstring(date-time)
created_onstring(date-time)
current_app_modeinteger
kiosk_app_namestring
lockdown_stateinteger
timezone_stringstring
initialtemplatestring
updated_onstring(date-time)
emm_deviceobject(EmmDevice)
is_gmsboolean
Default true
is_activeboolean
Default true
has_seamlessInfobooleanread-only
Response
application/json
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "url": "string", "device_name": "string", "alias_name": "string", "policy_name": "string", "status": 0, "state": 0, "current_command": "56d48fe1-418b-4f15-89fd-e796ac9dcba7", "suid": "string", "directory_record_id": "6f311904-88c6-4ec4-a47d-9093f673ceea", "fcm_id": "string", "enterprise": "string", "policy": "string", "user": "string", "groups": [ "string" ], "tags": [ "string" ], "api_level": 0, "template_name": "string", "mqtt_id": "string", "softwareInfo": {}, "hardwareInfo": {}, "displays": {}, "networkInfo": {}, "memoryInfo": {}, "esper_cient": "string", "device_type": "string", "audioConstraints": {}, "provisioned_on": "2019-08-24T14:15:22Z", "created_on": "2019-08-24T14:15:22Z", "current_app_mode": 0, "kiosk_app_name": "string", "lockdown_state": 0, "timezone_string": "string", "initialtemplate": "string", "updated_on": "2019-08-24T14:15:22Z", "emm_device": { "id": 0, "google_device_id": "string", "managementType": "string", "device": "8dca31e6-c85b-4a6b-bfb4-205d45d9b3bd", "google_user": 0, "policy": 0, "created_on": "2019-08-24T14:15:22Z", "updated_on": "2019-08-24T14:15:22Z", "is_active": true }, "is_gms": true, "is_active": true, "has_seamlessInfo": true }

List all device apps

Request

Returns DeviceApp list

Security
apiKey
Path
enterprise_idstringrequired

A UUID string identifying this enterprise.

device_idstringrequired

A UUID string identifying device.

Query
package_namestring

Filter by Package name

whitelistedstring

Whitelist filter

searchstring

A search term. Search by app_name.

limitinteger

Number of results to return per page.

Default 20
offsetinteger

Return results from this index.

curl -i -X GET \
  'https://api.esper.io/_mock/openapi/enterprise/{enterprise_id}/device/{device_id}/app/?package_name=string&whitelisted=string&search=string&limit=20&offset=0' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

successful operation

Bodyapplication/json
countintegerrequired
nextstring or null(url)
previousstring or null(url)
resultsArray of objects(DeviceApp)required
results[].​idstring(uuid)(Id)read-only
results[].​app_namestring(App name)non-emptyrequired
results[].​statestring
results[].​app_typestring
results[].​package_namestring(Package name)[ 1 .. 255 ] charactersrequired
results[].​whitelistedboolean(Whitelisted)
results[].​is_data_clearableboolean(Data clearable)
results[].​is_uninstallableboolean(Uninstallable)
results[].​product_idstring or null(Product id)[ 1 .. 255 ] characters
results[].​version_codestring or null(Version code)[ 1 .. 128 ] characters
results[].​version_namestring or null(Version name)[ 1 .. 128 ] characters
results[].​created_onstring(date-time)(Created on)read-only
results[].​updated_onstring(date-time)(Updated on)read-only
results[].​is_activeboolean(Is active)
results[].​is_kiosk_appboolean
results[].​is_esper_controlledboolean
results[].​devicestring(uuid)(AndroidDevice)required
Response
application/json
{ "count": 0, "next": "string", "previous": "string", "results": [ { … } ] }

Device Group

Operations

Token (Deprecated)

Operations

Commands V2

Operations

Enterprise Policy

Operations

Geofence

Operations

Content

Operations

User (Deprecated)

Operations

User

Operations

Blueprint (Deprecated)

Operations

Directory Record

Operations

Tile Icon

Operations

Alerts

Operations

Alarms

Operations

Wallpapers

Operations

Device Telemetry

Operations

Daily and Custom Reports

Operations

SSO Connections

Operations

Roles

Operations

Personal Access Token

Operations

Blueprints API

Operations

Custom Actions API

Operations

System

Operations

Pipelines

Operations

Stages

Operations

Target Lists

Operations

Targets

Operations

Device Groups

Operations

Operation Lists

Operations

Operations

Operations

Pipeline Runs

Operations

Stage Runs

Operations

Target Runs

Operations

Device

Operations

Device Heartbeat

Operations

Device Apps

Operations

Device Enrollment in EMM

Operations

Operations

Operations

DeviceOperations

Operations

MultiOS Remote Viewer

Operations

Device V2

Operations

VPP License Management

Operations

VPP App Management

Operations

Tenant Apps

Operations

Apple App Store

Operations

App List

Operations

Webclips

Operations

Provisioning Profiles

Operations

Esper Apps

Operations

Tenant Esper Apps

Operations

Command Request

Operations

Command Status

Operations

Converge

Operations

Converge Command

Operations

DEP Sync Request

Operations

ABM Provisioning

Operations

APNs certificate

Operations

DEP Tokens

Operations

VPP Token Management

Operations

Google Enterprise

Operations

FoundryBuilds

Operations

FoundryDeviceModels

Operations

FoundryEvents

Operations

Reports API

Operations

Query API

Operations

Ingest API

Operations