All URIs are relative to https://foo-api.esper.cloud/api
Method | HTTP request | Description |
---|---|---|
get_all_devices | GET /enterprise/{enterprise_id}/device/ | Fetch all devices in an enterprise |
get_app_installs | GET /enterprise/{enterprise_id}/device/{device_id}/install/ | List installed apps |
get_device_app_by_id | GET /enterprise/{enterprise_id}/device/{device_id}/app/{app_id}/ | Get device app details |
get_device_apps | GET /enterprise/{enterprise_id}/device/{device_id}/app/ | List all device apps |
get_device_by_id | GET /enterprise/{enterprise_id}/device/{device_id}/ | Fetch device details by ID |
get_device_event | GET /enterprise/{enterprise_id}/device/{device_id}/status/ | Get latest device event |
InlineResponse2003 get_all_devices(enterprise_id, name=name, group=group, imei=imei, serial=serial, state=state, brand=brand, is_gms=is_gms, search=search, tags=tags, limit=limit, offset=offset)
Fetch all devices in an enterprise
Returns a list of devices
import esperclient
from esperclient.rest import ApiException
# Configure API key authorization: apiKey
configuration = esperclient.Configuration()
configuration.host = 'SERVER_URL'
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = esperclient.DeviceApi(esperclient.ApiClient(configuration))
enterprise_id = 'enterprise_id_example' # str | ID of the enterprise
name = 'name_example' # str | Filter by device name (optional)
group = 'group_example' # str | Filter by group id (optional)
imei = 'imei_example' # str | filter by imei (optional)
serial = 'serial_example' # str | filter by serial number (optional)
state = 56 # int | filter by device state (optional)
brand = 'brand_example' # str | filter by brand (optional)
is_gms = true # bool | filter for gms devices (optional)
search = 'search_example' # str | A search term. Search by device name, imei or mac address (optional)
tags = 'tags_example' # str | A partial text search for device tags (optional)
limit = 20 # int | Number of results to return per page. (optional) (default to 20)
offset = 0 # int | The initial index from which to return the results. (optional) (default to 0)
try:
# Fetch all devices in an enterprise
api_response = api_instance.get_all_devices(enterprise_id, name=name, group=group, imei=imei, serial=serial, state=state, brand=brand, is_gms=is_gms, search=search, tags=tags, limit=limit, offset=offset)
print(api_response)
except ApiException as e:
print("Exception when calling DeviceApi->get_all_devices: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
enterprise_id | str | ID of the enterprise | |
name | str | Filter by device name | [optional] |
group | str | Filter by group id | [optional] |
imei | str | filter by imei | [optional] |
serial | str | filter by serial number | [optional] |
state | int | filter by device state | [optional] |
brand | str | filter by brand | [optional] |
is_gms | bool | filter for gms devices | [optional] |
search | str | A search term. Search by device name, imei or mac address | [optional] |
tags | str | A partial text search for device tags | [optional] |
limit | int | Number of results to return per page. | [optional] [default to 20] |
offset | int | The initial index from which to return the results. | [optional] [default to 0] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse2005 get_app_installs(enterprise_id, device_id, device=device, package_name=package_name, application_name=application_name, install_state=install_state, limit=limit, offset=offset)
List installed apps
Returns AppInstall list
import esperclient
from esperclient.rest import ApiException
# Configure API key authorization: apiKey
configuration = esperclient.Configuration()
configuration.host = 'SERVER_URL'
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = esperclient.DeviceApi(esperclient.ApiClient(configuration))
enterprise_id = 'enterprise_id_example' # str | A UUID string identifying this enterprise.
device_id = 'device_id_example' # str | A UUID string identifying device.
device = 'device_example' # str | filter by device id (optional)
package_name = 'package_name_example' # str | filter by package name (optional)
application_name = 'application_name_example' # str | filter by application name (optional)
install_state = 'install_state_example' # str | filter by install state (optional)
limit = 20 # int | Number of results to return per page. (optional) (default to 20)
offset = 0 # int | The initial index from which to return the results. (optional) (default to 0)
try:
# List installed apps
api_response = api_instance.get_app_installs(enterprise_id, device_id, device=device, package_name=package_name, application_name=application_name, install_state=install_state, limit=limit, offset=offset)
print(api_response)
except ApiException as e:
print("Exception when calling DeviceApi->get_app_installs: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
enterprise_id | str | A UUID string identifying this enterprise. | |
device_id | str | A UUID string identifying device. | |
device | str | filter by device id | [optional] |
package_name | str | filter by package name | [optional] |
application_name | str | filter by application name | [optional] |
install_state | str | filter by install state | [optional] |
limit | int | Number of results to return per page. | [optional] [default to 20] |
offset | int | The initial index from which to return the results. | [optional] [default to 0] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeviceApp get_device_app_by_id(app_id, enterprise_id, device_id)
Get device app details
Returns DeviceApp instance
import esperclient
from esperclient.rest import ApiException
# Configure API key authorization: apiKey
configuration = esperclient.Configuration()
configuration.host = 'SERVER_URL'
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = esperclient.DeviceApi(esperclient.ApiClient(configuration))
app_id = 'app_id_example' # str | A UUID string identifying this device app.
enterprise_id = 'enterprise_id_example' # str | A UUID string identifying this device.
device_id = 'device_id_example' # str | A UUID string identifying this enteprise.
try:
# Get device app details
api_response = api_instance.get_device_app_by_id(app_id, enterprise_id, device_id)
print(api_response)
except ApiException as e:
print("Exception when calling DeviceApi->get_device_app_by_id: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
app_id | str | A UUID string identifying this device app. | |
enterprise_id | str | A UUID string identifying this device. | |
device_id | str | A UUID string identifying this enteprise. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse2004 get_device_apps(enterprise_id, device_id, package_name=package_name, whitelisted=whitelisted, search=search, limit=limit, offset=offset)
List all device apps
Returns DeviceApp list
import esperclient
from esperclient.rest import ApiException
# Configure API key authorization: apiKey
configuration = esperclient.Configuration()
configuration.host = 'SERVER_URL'
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = esperclient.DeviceApi(esperclient.ApiClient(configuration))
enterprise_id = 'enterprise_id_example' # str | A UUID string identifying this enterprise.
device_id = 'device_id_example' # str | A UUID string identifying device.
package_name = 'package_name_example' # str | Filter by Package name (optional)
whitelisted = 'whitelisted_example' # str | Whitelist filter (optional)
search = 'search_example' # str | A search term. Search by app_name. (optional)
limit = 20 # int | Number of results to return per page. (optional) (default to 20)
offset = 56 # int | The initial index from which to return the results. (optional)
try:
# List all device apps
api_response = api_instance.get_device_apps(enterprise_id, device_id, package_name=package_name, whitelisted=whitelisted, search=search, limit=limit, offset=offset)
print(api_response)
except ApiException as e:
print("Exception when calling DeviceApi->get_device_apps: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
enterprise_id | str | A UUID string identifying this enterprise. | |
device_id | str | A UUID string identifying device. | |
package_name | str | Filter by Package name | [optional] |
whitelisted | str | Whitelist filter | [optional] |
search | str | A search term. Search by app_name. | [optional] |
limit | int | Number of results to return per page. | [optional] [default to 20] |
offset | int | The initial index from which to return the results. | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Device get_device_by_id(enterprise_id, device_id)
Fetch device details by ID
Returns details of a device
import esperclient
from esperclient.rest import ApiException
# Configure API key authorization: apiKey
configuration = esperclient.Configuration()
configuration.host = 'SERVER_URL'
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = esperclient.DeviceApi(esperclient.ApiClient(configuration))
enterprise_id = 'enterprise_id_example' # str | ID of the enterprise
device_id = 'device_id_example' # str | ID of the device
try:
# Fetch device details by ID
api_response = api_instance.get_device_by_id(enterprise_id, device_id)
print(api_response)
except ApiException as e:
print("Exception when calling DeviceApi->get_device_by_id: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
enterprise_id | str | ID of the enterprise | |
device_id | str | ID of the device |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse2006 get_device_event(enterprise_id, device_id, latest_event)
Get latest device event
Returns DeviceStatus instance
import esperclient
from esperclient.rest import ApiException
# Configure API key authorization: apiKey
configuration = esperclient.Configuration()
configuration.host = 'SERVER_URL'
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = esperclient.DeviceApi(esperclient.ApiClient(configuration))
enterprise_id = 'enterprise_id_example' # str | A UUID string identifying this enterprise.
device_id = 'device_id_example' # str | A UUID string identifying device.
latest_event = 56 # int | Flag to get latest event
try:
# Get latest device event
api_response = api_instance.get_device_event(enterprise_id, device_id, latest_event)
print(api_response)
except ApiException as e:
print("Exception when calling DeviceApi->get_device_event: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
enterprise_id | str | A UUID string identifying this enterprise. | |
device_id | str | A UUID string identifying device. | |
latest_event | int | Flag to get latest event |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]