The LeanSentry API allows you to programmatically control and retrieve data about your LeanSentry environment. The API is currently in pre-release mode, and may change.
You can access the LeanSentry API by making HTTPS requests to the following URI:
<method>: refers to one of the supported actions documented below.
[parameters]: querystring parameters specific to each method.
To authenticate your request, you must provide the following information as HTTP Headers included with EACH API request:
LS-Environment-Id: The id of the environment your API request is targetting (if applicable).
LS-Environment-Key: The API key for the environment.
LS-Username: The username of a valid user on behalf of which your action will be performed.
You can obtain the API key in your environment settings page (restricted to account administrators):
Review each method for specific HTTP response codes that it returns. In general, the method will return the following codes:
400: Invalid input.
404: Target/object not found.
403: Not authorized.
The response will be provided in a JSON format as follows:
status: "OK" | Error code
statusDetail: Detailed description of the error if any
data: Any data object returned, if applicable
Lists all currently configured servers being monitored by LeanSentry in your environment.
List of servers:
Brings the server offline/online (Business tier only). See Offline mode for more information.
serverId: the id of the target server
online: true|false, whether to bring the server online (false = bring offline).
202: the change has been made, see statusDescription for details.
200: no change made.