The Server Density API is implemented over simple HTTP with JSON responses authenticated using basic HTTP auth. It allows you to manage most aspects of the service including retrieving your historical server monitoring data, current status and post back data to us without needing the agent.
- PHP - Server Density API (Andrew Waters)
- Python - py-serverdensity (Wes Mason)
And see this support article for help with using curl.
- Alerts
- Devices
- Metrics
- MongoDB
- Processes
- Services
- Users
All requests go through https://api.serverdensity.com. You can also access without SSL, although this is not recommended.
All requests must access a specific API version, which is appended to the URL e.g. https://api.serverdensity.com/1.4/.
See the Release Notes for changes to the API. New versions will be announced on the Server Density blog.
Authentication is through Basic HTTP Auth against your Server Density account. Each user has the same permissions with access to the same devices and services as they do through the web UI.
Enable the API for a user
- Log into your Server Density account
- Click the Users tab then click Edit next to the user you wish to enable access for.
- Tick the Enable API box and clik the Save changes button.
Example
https://username:password@api.serverdensity.com/1.4/alerts/list?account=llama.serverdensity.com
API keys
We used to require a separate registration to obtain an API key in order to access the API. This proved to be unncessarily complicated so we have removed the need for keys and separate developer accounts.