API Monitor
This is the reference documentation for the Monitor REST API v1.
Document conventions
Endpoints are described with an HTTP method and a path. For example:
GET /api/monitor/get/version
Prepend your Developer Console URL to the path to get the full endpoint URL. For instance, if your URL is https://myindeximacluster:8082, then use the following endpoint URL:
https://myindeximacluster:8082/api/get/version
Colon (:) in the path indicates a placeholder value that you must replace. For example:
GET /api/monitor/get/columns/:table
Bodies of requests and responses for each endpoint are described in a JSON format.
Security and authentication
If authentication is disabled, you can skip this section. If not, you first need to log into the API to obtain an authentication token. For example, by using cURL:
curl -d "{ "name": "myLogin", "password": "myPassword" }" -H "Content-Type: application/json" -X POST http://myindeximacluster:8082/api/login
In return, the response will contain an authentication token that you will use to access any API endpoint.
The response will look like this:
{"id":"RzZX9InpUtnUJg1sBoIF7TS0K7onDU6hip61aRohhrrwu1qCWGrOow20ohVJjXpe","userName":"myLogin","isAdministrator":false,"localUser":false}
The id
is the value to be used afterwards.
Any requests containing invalid credentials will receive an error message.
Calling an API endpoint
Once you are authenticated, you may start calling the API endpoints. You will need to provide your authentication token, your monitoring host, and port as headers.
curl -H "Authorization: RzZX9InpUtnUJg1sBoIF7TS0K7onDU6hip61aRohhrrwu1qCWGrOow20ohVJjXpe" \
-H "Monitor-Target-Host: myindeximacluster" -H "Monitor-Target-Port: 9999" \
-X GET http://myindeximacluster:8082/api/monitor/get/version
Endpoint response
When an HTTP request is made, the response is always a JSON response. However, if you do not provide the correct authorization, the JSON response may contain errors:
{"message":"No session attribute found, redirect is not allowed"}