Esper APIs are a set of REST-based endpoints that help you programmatically control and monitor the Console and Devices running the Esper Agent. To read more about the various capabilities of Esper APIs and Esper managed devices, visit esper.io or read our API documentation.
To use these APIs, you'll need to create an account with Esper and have access to the Console and the API Key Management section.
Requirements:
- An Esper API Key
- An Enterprise Admin Account
In this article:
Authentication
You’ll need to generate an API Key before interacting with the Esper API. See Generating an API Key for more information. Once you have the API key, you can construct your first Esper API request.
curl -X GET https://{{esper_tenant_name }}-api.esper.cloud/api/enterprise/{{enterprise_id}}/device/ -H 'Authorization: Bearer {{api_key}}' -H 'Content-Type: application/json'
Construct the request by inputting:
- esper_tenant_name: The tenant name is located in your tenant URL.
- enterprise_id: The enterprise ID is located in the top right corner of the API KEY Management screen in the Esper Console.
- api_key: The API key generated from the Console.
You’ll need to sign up for Postman to create a request. See Postman’s documentation for sending a request. Once you’ve set up your Postman account, create a new HTTP Request for your workspace.
Construct the request by inputting:
- The REST Verb
- The URI with your esper_tenant_name and enterprise_id.
- For Authorization, select Bearer Token and input your API_KEY.
Errors
The API uses standard HTTP status codes to indicate success or failure. All error responses will have a JSON body in the following format
{
"errors": [],
"message": "error message",
"status": 400
}
errors
List of error detailsmessage
Error descriptionstatus
HTTP status code
Error Code | Meaning |
200 | Accepted |
201 | Resource created |
401 | Unauthorized |
403 | Forbidden |
404 | Not found |
500 | Server error |
Frequently Used Endpoints
We've provided a list our most frequently used endpoints below. To see a full list of APIs and latest updates, see the API documentation.
Enterprise
Application
Devices
Device Groups
Device Commands
Swap Views
Click on the button at the top right of the page to swap between different views and hide samples.
Having issues? Reach out to Esper by submitting a ticket.