Esper provides a Python client library to communicate with the Esper APIs to programmatically control and monitor your enterprise's Android-based Dedicated Devices using Esper Manage. To read more about the various capabilities of Esper Manage and Esper managed devices, please visit esper.io.
- API version: 1.0.0
- Package version: 0.1.2
Python 3.4+
Additionally, you need a dedicated Esper environment set up on Esper Cloud through our Esper Dev Trial. For more details checkout Esper Requirements
From PyPI
pip install esperclient
or
From Github
pip install git+https://github.com/esper-io/esper-client-py.git
Download/Clone the project and install via Setuptools.
git clone https://github.com/esper-io/esper-client-py.git
cd esper-client-py
python setup.py install
You need not install setuptools separately, they are packaged along with downloaded library
Please follow the installation procedure stated above and then run the following:
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
try:
# Fetch all devices in an enterprise
api_response = api_instance.get_all_devices(enterprise_id)
print(api_response)
except ApiException as e:
print("Exception when calling DeviceApi->get_all_devices: %s\n" % e)
Given below is a detailed documentation for each of the API endpoint along with supported request options. All URIs are relative to https://foo-api.esper.cloud/api
Class | Method | HTTP request |
---|---|---|
ApplicationApi | delete_app_version | DELETE /enterprise/{enterprise_id}/application/{application_id}/version/{version_id}/ |
ApplicationApi | delete_application | DELETE /enterprise/{enterprise_id}/application/{application_id}/ |
ApplicationApi | get_all_applications | GET /enterprise/{enterprise_id}/application/ |
ApplicationApi | get_app_version | GET /enterprise/{enterprise_id}/application/{application_id}/version/{version_id}/ |
ApplicationApi | get_app_versions | GET /enterprise/{enterprise_id}/application/{application_id}/version/ |
ApplicationApi | get_application | GET /enterprise/{enterprise_id}/application/{application_id}/ |
ApplicationApi | get_install_devices | GET /enterprise/{enterprise_id}/application/{application_id}/version/{version_id}/installdevices |
ApplicationApi | upload | POST /enterprise/{enterprise_id}/application/upload/ |
CommandsApi | get_command | GET /enterprise/{enterprise_id}/device/{device_id}/command/{command_id}/ |
CommandsApi | run_command | POST /enterprise/{enterprise_id}/device/{device_id}/command/ |
CommandsV2Api | create_command | POST /v0/enterprise/{enterprise_id}/command/ |
CommandsV2Api | get_command_request_status | GET /v0/enterprise/{enterprise_id}/command/{request_id}/status/ |
CommandsV2Api | get_device_command_history | GET /v0/enterprise/{enterprise_id}/device/{device_id}/command-history/ |
CommandsV2Api | list_command_request | GET /v0/enterprise/{enterprise_id}/command/ |
ContentApi | delete_content | DELETE /v0/enterprise/{enterprise_id}/content/{content_id}/ |
ContentApi | get_all_content | GET /v0/enterprise/{enterprise_id}/content/ |
ContentApi | get_content | GET /v0/enterprise/{enterprise_id}/content/{content_id}/ |
ContentApi | patch_content | PATCH /v0/enterprise/{enterprise_id}/content/{content_id}/ |
ContentApi | post_content | POST /v0/enterprise/{enterprise_id}/content/upload/ |
DeviceApi | get_all_devices | GET /enterprise/{enterprise_id}/device/ |
DeviceApi | get_app_installs | GET /enterprise/{enterprise_id}/device/{device_id}/install/ |
DeviceApi | get_device_app_by_id | GET /enterprise/{enterprise_id}/device/{device_id}/app/{app_id}/ |
DeviceApi | get_device_apps | GET /enterprise/{enterprise_id}/device/{device_id}/app/ |
DeviceApi | get_device_by_id | GET /enterprise/{enterprise_id}/device/{device_id}/ |
DeviceApi | get_device_event | GET /enterprise/{enterprise_id}/device/{device_id}/status/ |
DeviceGroupApi | create_group | POST /enterprise/{enterprise_id}/devicegroup/ |
DeviceGroupApi | delete_group | DELETE /enterprise/{enterprise_id}/devicegroup/{group_id}/ |
DeviceGroupApi | get_all_groups | GET /enterprise/{enterprise_id}/devicegroup/ |
DeviceGroupApi | get_group_by_id | GET /enterprise/{enterprise_id}/devicegroup/{group_id}/ |
DeviceGroupApi | partial_update_group | PATCH /enterprise/{enterprise_id}/devicegroup/{group_id}/ |
DeviceGroupApi | update_group | PUT /enterprise/{enterprise_id}/devicegroup/{group_id}/ |
EnterpriseApi | get_enterprise | GET /v1/enterprise/{enterprise_id}/ |
EnterpriseApi | partial_update_enterprise | PATCH /v1/enterprise/{enterprise_id}/ |
EnterprisePolicyApi | create_policy | POST /enterprise/{enterprise_id}/policy/ |
EnterprisePolicyApi | delete_enterprise_policy | DELETE /enterprise/{enterprise_id}/policy/{policy_id}/ |
EnterprisePolicyApi | get_policy_by_id | GET /enterprise/{enterprise_id}/policy/{policy_id}/ |
EnterprisePolicyApi | list_policies | GET /enterprise/{enterprise_id}/policy/ |
EnterprisePolicyApi | partialupdate_policy | PATCH /enterprise/{enterprise_id}/policy/{policy_id}/ |
EnterprisePolicyApi | update_policy | PUT /enterprise/{enterprise_id}/policy/{policy_id}/ |
GeofenceApi | create_geofence | POST /v0/enterprise/{enterprise_id}/geofence/ |
GeofenceApi | delete_geofence | DELETE /v0/enterprise/{enterprise_id}/geofence/{geofence_id}/ |
GeofenceApi | get_all_geofences | GET /v0/enterprise/{enterprise_id}/geofence/ |
GeofenceApi | get_geofence | GET /v0/enterprise/{enterprise_id}/geofence/{geofence_id}/ |
GeofenceApi | partial_update_geofence | PATCH /v0/enterprise/{enterprise_id}/geofence/{geofence_id}/ |
GeofenceApi | update_geofence | PUT /v0/enterprise/{enterprise_id}/geofence/{geofence_id}/ |
GroupCommandsApi | get_group_command | GET /enterprise/{enterprise_id}/devicegroup/{group_id}/command/{command_id}/ |
GroupCommandsApi | run_group_command | POST /enterprise/{enterprise_id}/devicegroup/{group_id}/command/ |
SubscriptionApi | create_subscription | POST /v0/enterprise/{enterprise_id}/subscription/ |
SubscriptionApi | delete_subscription | DELETE /v0/enterprise/{enterprise_id}/subscription/{subscription_id}/ |
SubscriptionApi | get_all_subscriptions | GET /v0/enterprise/{enterprise_id}/subscription/ |
SubscriptionApi | get_subscription | GET /v0/enterprise/{enterprise_id}/subscription/{subscription_id}/ |
TokenApi | get_token_info | GET /v1/token-info/ |
TokenApi | renew_token | POST /v0/enterprise/{enterprise_id}/developerapp/{developerapp_id}/renew-token/ |
- AppInstall
- AppInstallApplication
- AppInstallVersion
- AppPermission
- AppVersion
- Application
- ApplicationVersion
- CommandArgs
- CommandRequest
- Content
- Data
- Device
- DeviceApp
- DeviceAppPermission
- DeviceCommand
- DeviceGroup
- DeviceGroupPartialUpdate
- DeviceGroupUpdate
- DeviceStatus
- EmmDevice
- EnterprisePolicy
- EnterprisePolicyData
- EnterprisePolicyDataDevicePasswordPolicy
- EnterprisePolicyDataDeviceUpdatePolicy
- EnterprisePolicyDataFrpGoogles
- EnterprisePolicyDataGoogleAccountPermission
- EnterprisePolicyDataPhonePolicy
- EnterprisePolicyPartialUpdate
- EnterpriseUpdateV1
- EnterpriseV1
- EventSubscription
- EventSubscriptionArgs
- Geofence
- GeofenceUpdate
- GoogleEMM
- GroupCommand
- GroupCommandArgs
- GroupCommandRequest
- InlineResponse200
- InlineResponse2001
- InlineResponse20010
- InlineResponse20011
- InlineResponse20012
- InlineResponse20013
- InlineResponse2002
- InlineResponse2003
- InlineResponse2004
- InlineResponse2005
- InlineResponse2006
- InlineResponse2007
- InlineResponse2008
- InlineResponse2009
- InlineResponse201
- InstallDevices
- Owner
- TokenInfoV1
- TokenRenewV0
- V0CommandArgs
- V0CommandRequest
- V0CommandRequestStatus
- V0CommandScheduleArgs
- V0CommandStatus
- AppInstallStateEnum
- DeviceCommandEnum
- GroupCommandEnum
- SettingsGPSStateEnum
- SettingsRotateStateEnum
- SettingsVolumeStreamEnum
- V0CommandScheduleArgsTimeTypeEnum
- V0CommandScheduleEnum
- V0DeviceCommandEnum
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
Copyright 2019 Shoonya Enterprises Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.