POST /healthCheck Check health

This method allows users to get general informations about the system.

Request

  • The headers must include a valid authentication token.

Response

If succeeds, returns few informations about RAM, disk and ports.

Status: 200 OK { "api_version": "2.4.2", "http_code": "200 OK", "result": [with the executed actions] }

For errors responses, see the response status codes documentation.

POST /modifyServiceFromHostTemplate modifyServiceFromHostTemplate

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { hostTemplateName, service=array(), exportConfiguration = FALSE }

Response

If succeeds, modify the given service with the given columnName => value (ie bellow).

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /modifyServiceFromHost modifyServiceFromHost

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { hostName, service=array(), exportConfiguration = FALSE }

Response

If succeeds, modify the given service with the given columnName => value (ie bellow).

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /modifyNotifierTimeperiod modifyNotifierTimeperiod

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { timeperiod_name, new_timeperiod_name=NULL, timeperiod_days=NULL, timeperiod_hours_notifications=NULL }

Response

If succeeds, Modify The timeperiod of advanced notification (Notifier module) ..

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /modifyNotifierRule modifyNotifierRule

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { rule_name, rule_type, new_rule_name=NULL, change_type=NULL, rule_timeperiod=NULL, add_rule_method=NULL, delete_rule_method=NULL, rule_contact=NULL, rule_debug=NULL, rule_host=NULL, rule_service=NULL, rule_state=NULL, rule_notificationNumber=NULL, rule_tracking=NULL }

Response

If succeeds, Modify a rule of advanced notification menu (Notifier module) ..

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /modifyNotifierMethod modifyNotifierMethod

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { method_name, method_type, new_method_name=NULL, change_type=NULL, method_line=NULL }

Response

If succeeds, Modify a method of advanced notification (Notifier module) ..

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /modifyNagiosRessources modifyNagiosRessources

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { ressources }

Response

If succeeds, modify ressources represented in nagios by $USERi$, you passed an collection of “Useri”:”value” or “” if you want to remove a ressource an example is given bellow.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /modifyNagiosMainConfiguration modifyNagiosMainConfiguration

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { requestConf, exportConfiguration=FALSE }

Response

If succeeds, Modify The Nagios global configuration. See bellow the different parameter that you can changed..

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /modifyEonUser modifyEonUser

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { user_mail=NULL, user_name, new_user_name=NULL, user_descr=NULL, user_group=NULL, user_password=NULL, is_ldap_user=NULL, user_location=NULL, user_limitation=NULL, user_language = NULL, in_nagvis = NULL, in_cacti = NULL, nagvis_group = NULL }

Response

If succeeds, Modify a nagios contact user, a eon user and possibly cacti and nagvis user if necessary. ie bellow.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /modifyEonGroup modifyEonGroup

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { group_name, new_group_name=NULL, group_descr=NULL, is_ldap_group=NULL, group_right=NULL }

Response

If succeeds, Modify a nagios contact group and a eon group. The user could be limited..

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /modifyContactGroup modifyContactGroup

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { contactGroupName, newContactGroupName=NULL, description, exportConfiguration = FALSE }

Response

If succeeds, modify the given contact group.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /modifyContact modifyContact

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { contactName, newContactName="", contactAlias="", contactMail="", contactPager="", contactGroup="", serviceNotificationCommand="", hostNotificationCommand="", $options=array(), exportConfiguration = FALSE }

Response

If succeeds, modify the given contact. if contact group is already set the membershib will be deleted, The same happen for contact notification command..

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /modifyCommand modifyCommand

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { commandName, newCommandName="", commandLine, commandDescription="" }

Response

If succeeds, modify a command to Nagios. returncode=0 or 1 if failed or nothing change.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs", "changes":numerOfchanges] }

For errors responses, see the response status codes documentation.

POST /modifyCheckCommandToServiceTemplate modifyCheckCommandToServiceTemplate

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { commandName, templateServiceName, exportConfiguration=FALSE }

Response

If succeeds, modify Modify the check command associate with the given service template. returnCode=0 for data updated and 1 if it has failed.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /modifyCheckCommandToHostTemplate modifyCheckCommandToHostTemplate

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { commandName, templateHostName, exportConfiguration=FALSE }

Response

If succeeds, Modify the check command associate with the given host template. returnCode=0 for data updated and 1 if it has failed.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /listNagiosStates listNagiosStates

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { backendid = NULL, filters = FALSE }

Response

If succeeds, Return states of hosts and services.

Status: 200 OK { "http_code": "200 OK", "result": [with the executed actions] }

For errors responses, see the response status codes documentation.

POST /listNagiosObjects listNagiosObjects

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { object, backendid = NULL, columns = FALSE, filters = FALSE }

Response

If succeeds, Return nagios object like services, hosts, and their respective informations on which you can filter.

Status: 200 OK { "http_code": "200 OK", "result": [with the executed actions] }

For errors responses, see the response status codes documentation.

POST /listNagiosBackends listNagiosBackends

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN ```{

}```

Response

If succeeds, Return available backend informations(log).

Status: 200 OK { "http_code": "200 OK", "result": [with the executed actions] }

For errors responses, see the response status codes documentation.

POST /listHosts listHosts

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { hostName=FALSE, $hostTemplate=false }

Response

If succeeds, List nagios hosts.

Status: 200 OK { "http_code": "200 OK", "result": [with the executed actions] }

For errors responses, see the response status codes documentation.

Eyes of network Api

Introduction

This project is the begining of the construction of an api for eyes of network. This project had for purpose to offer in the future a better way to manage our products.

Presentation: What is EONAPI?

Eyes Of Network includes a web-based “RESTful” API (Application Programming Interface) called EONAPI that enables external programs to access information from the monitoring database and to manipulate objects inside the databases of EON suite.

In the context of the EON HTTP API, the attribute “RESTful” essentially means:

  • that it is HTTP/HTTPS based
  • that it uses a set of “HTTP GET/POST” URLs to access and manipulate the data and that you’ll get back an JSON document in return (for most calls).

The EON HTTP API offers the following functionality:

  • Functions for manipulating objects (e.g. edit, add, delete)

About the EONAPI

The EON API is built with Slim Framework.

About Slim Framework

Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs. Slim Framework source sode https://www.slimframework.com/.

Slim version: 2.4.2

Dependenties: PHP >= 5.3.0

Compatibility matrix:

Version Comments
PHP 5.3 Tested
PHP 5.4 Tested
PHP 5.5 Tested
PHP > 5.5 Not tested

License

  • Eyes Of Network is licensed under the GNU General Public License.
  • The Slim Framework is licensed under the MIT license.

POST /getContactGroup getContactGroup

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { contactGroupName=FALSE }

Response

If succeeds, return the given contact group otherwise it return all the contac group.

Status: 200 OK { "http_code": "200 OK", "result": [with the executed actions] }

For errors responses, see the response status codes documentation.

POST /getContact getContact

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { contactName=FALSE }

Response

If succeeds, return the given contact otherwise it return all the contact.

Status: 200 OK { "http_code": "200 OK", "result": [with the executed actions] }

For errors responses, see the response status codes documentation.

Get Started

Installation steps through git:

  1. Clone the project EONAPI: $ git clone https://github.com/eyesofnetworkcommunity/eonapi.git

  2. Make the symbolic links in your project: $ ln -sf /srv/eyesofnetwork/eonapi-git/ /srv/eyesofnetwork/eonapi

  3. Edit the eonapi httpd conf file: $ vim /etc/httpd/conf.d/eonapi.conf

    Alias /eonapi "/srv/eyesofnetwork/eonapi/html/api" <Directory /srv/eyesofnetwork/eonapi/html/api> Options -Indexes Require all granted FallbackResource index.php </Directory>

  4. Restart the httpd daemon: $ service httpd restart

Installation through RPM:

POST /exporterNotifierConfig exporterNotifierConfig

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { **** }

Response

If succeeds, Write configuration in the nagios file. It export the configuration of advance notification..

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /exportConfiguration exportConfiguration

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { JobName }

Response

If succeeds, Export Nagios Configuration..

Status: 200 OK { "http_code": "200 OK", "result": [with the executed actions] }

For errors responses, see the response status codes documentation.

POST /deleteServiceTemplateToServiceInHost deleteServiceTemplateToServiceInHost

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { templateServiceName, serviceName, hostName }

Response

If succeeds, Delete a service template in the given service of the specified host..

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /deleteServiceTemplate deleteServiceTemplate

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { templateName }

Response

If succeeds, Delete the given Service template.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /deleteServiceGroupToServiceTemplate deleteServiceGroupToServiceTemplate

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { serviceGroupName, templateServiceName, exportConfiguration=FALSE }

Response

If succeeds, Delete a service group in the given service Template. returncode=0 or 1 if failed.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /deleteServiceGroupToServiceInHost deleteServiceGroupToServiceInHost

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { serviceGroupName, serviceName, hostName, exportConfiguration = FALSE }

Response

If succeeds, delete a service group in the given service of the specified host..

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /deleteServiceDowntime deleteServiceDowntime

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { idDowntime }

Response

If succeeds, Delete nagios service downtime..

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /deleteServiceByHostTemplate deleteServiceByHostTemplate

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { serviceName, hostTemplateName }

Response

If succeeds, delete the given service.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /deleteService deleteService

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { serviceName, hostName }

Response

If succeeds, delete the given service.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /deleteInheritanceTemplateToHostTemplate deleteInheritanceTemplateToHostTemplate

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { inheritanceTemplateName, templateHostName, exportConfiguration=FALSE }

Response

If succeeds, Delete a inherited template in the given Host Template. returncode=0 or 1 if failed.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /deleteInheritServiceTemplateToServiceTemplate deleteInheritServiceTemplateToServiceTemplate

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { inheritanceTemplateName, templateServiceName, exportConfiguration=FALSE }

Response

If succeeds, Delete a inherited Service template in the given service Template. returncode=0 or 1 if failed.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /deleteHostGroupToHostTemplate deleteHostGroupToHostTemplate

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { hostGroupName, templateHostName, exportConfiguration=FALSE }

Response

If succeeds, Delete a Host group in the given Host Template. returncode=0 or 1 if failed.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /deleteHostDowntime deleteHostDowntime

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { idDowntime }

Response

If succeeds, Delete nagios host downtime..

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /deleteHost deleteHost

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { hostName, exportConfiguration }

Response

If succeeds, Delete a nagios host..

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /deleteEonUser deleteEonUser

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { user_name }

Response

If succeeds, delete a eon user and the remaining account in cacti, nagvis, and lilac..

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /deleteEonGroup deleteEonGroup

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { group_name }

Response

If succeeds, delete a eon group..

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /deleteCustomArgumentsToServiceTemplate deleteCustomArgumentsToServiceTemplate

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { templateServiceName, customArguments, exportConfiguration = FALSE }

Response

If succeeds, delete customs arguments to a service template. returncode=0 or 1 if failed or didn’t changed.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /deleteCustomArgumentsToService deleteCustomArgumentsToService

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { serviceName, hostName, customArguments, exportConfiguration = FALSE }

Response

If succeeds, delete customs arguments to a service. returncode=0 or 1 if failed or didn’t changed.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /deleteCustomArgumentsToHostTemplate deleteCustomArgumentsToHostTemplate

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { templateHostName, customArguments, exportConfiguration = FALSE }

Response

If succeeds, delete customs arguments to a host template. returncode=0 or 1 if failed or didn’t changed.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /deleteCustomArgumentsToHost deleteCustomArgumentsToHost

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { hostName, customArguments, exportConfiguration = FALSE }

Response

If succeeds, delete customs arguments to a host. returncode=0 or 1 if failed or didn’t changed.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /deleteContactToServiceTemplate deleteContactToServiceTemplate

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { contactName, templateServiceName, exportConfiguration=FALSE }

Response

If succeeds, Delete a contact in the given service Template. returncode=0 or 1 if failed.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /deleteContactToServiceInHost deleteContactToServiceInHost

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { contactName, serviceName, hostName }

Response

If succeeds, Delete a contact in the given service of the specified host..

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /deleteContactToHostTemplate deleteContactToHostTemplate

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { contactName, templateHostName, exportConfiguration=FALSE }

Response

If succeeds, Delete a Contact in the given Host Template. returncode=0 or 1 if failed.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /deleteContactNotificationCommandToContact deleteContactNotificationCommandToContact

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { contactName, commandName, exportConfiguration }

Response

If succeeds, delete a contact notification command to a nagios contact..

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /deleteContactGroupToServiceTemplate deleteContactGroupToServiceTemplate

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { contactGroupName, templateServiceName, exportConfiguration=FALSE }

Response

If succeeds, Delete a contact group in the given service Template. returncode=0 or 1 if failed.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /deleteContactGroupToServiceInHost deleteContactGroupToServiceInHost

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { contactGroupName, serviceName, hostName }

Response

If succeeds, Delete a contact group in the given service of the specified host..

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /deleteContactGroupToHostTemplate deleteContactGroupToHostTemplate

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { contactGroupName, templateHostName, exportConfiguration=FALSE }

Response

If succeeds, Delete a Contact group in the given Host Template. returncode=0 or 1 if failed.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /deleteContactGroupToContact deleteContactGroupToContact

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { contactName, contactGroupName, exportConfiguration }

Response

If succeeds, delete a contact group to a nagios contact..

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /deleteContactGroup deleteContactGroup

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { contactGroupName }

Response

If succeeds, delete the given contact Group.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /deleteContact deleteContact

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { contactName }

Response

If succeeds, delete the given contact.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /deleteCommand deleteCommand

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { commandName }

Response

If succeeds, Delete a command to Nagios..

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /deleteCheckCommandParameterToServiceTemplate deleteCheckCommandParameterToServiceTemplate

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { templateServiceName, parameters }

Response

If succeeds, delete command parameter to a Service template. returncode=0 or 1 if failed or didn’t changed /!\parameters is a list.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /deleteCheckCommandParameterToServiceInHost deleteCheckCommandParameterToServiceInHost

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { serviceName, hostName, parameters }

Response

If succeeds, delete command parameter to a Service of a specified host. returncode=0 or 1 if failed or didn’t changed /!\ parameters is a list.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /deleteCheckCommandParameterToHostTemplate deleteCheckCommandParameterToHostTemplate

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { templateHostName, parameters }

Response

If succeeds, delete command parameter to host template. returncode=0 or 1 if failed or didn’t changed /!\ parameters is a list.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /createUser createUser

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { userName, userMail, admin, filterName, filterValue, exportConfiguration }

Response

If succeeds, Create a nagios contact and a eon user. The user could be limited or admin (depends on the parameter “admin”). Limited user: admin=false / admin user: admin=true. For a limited user, the GED xml file is created in /srv/eyesofnetwork/eonweb/cache/ with the filters specified in parameters..

Status: 200 OK { "http_code": "200 OK", "result": [with the executed actions] }

For errors responses, see the response status codes documentation.

POST /createServicesDowntime createServicesDowntime

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { hostName, serviceName, comment, startTime, endTime, user, fixed=1, duration=1000 , childHostAction = FALSE }

Response

If succeeds, Create a Service’s downtime.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /createServiceToHostTemplate createServiceToHostTemplate

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { hostTemplateName, service, exportConfiguration }

Response

If succeeds, Create a service in the given host template. (allow to create a service with optional inherited template, optional command and parameters in a specified host template).

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /createServiceToHost createServiceToHost

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { hostName, service, exportConfiguration }

Response

If succeeds, Create a service in the given host. (allow to create a service with optional inherited template, optional command and parameters in a specified host) See example bellow for utilisation.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /createServiceTemplate createServiceTemplate

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { templateName, templateDescription="", servicesGroup=array(), contacts=array(), contactsGroup=array(), checkCommand, checkCommandParameters=array(), templatesToInherit=array(), exportConfiguration = FALSE }

Response

If succeeds, Create a new Service template, if you didn’t give templatesToInherit it will provide “GENERIC_SERVICE” as Inheritance template. The argument witch is by default array take names of objects they are bind..

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /createServiceGroup createServiceGroup

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { serviceGroupName, description="service group", exportConfiguration = FALSE }

Response

If succeeds, Create a Service Group.

Status: 200 OK { "http_code": "200 OK", "result": [with the executed actions] }

For errors responses, see the response status codes documentation.

POST /createHostTemplate createHostTemplate

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { templateHostName, templateHostDescription="", exportConfiguration }

Response

If succeeds, Create a new nagios host template..

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /createHostGroup createHostGroup

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { hostGroupName, description="host group", exportConfiguration = FALSE }

Response

If succeeds, Create a Host Group.

Status: 200 OK { "http_code": "200 OK", "result": [with the executed actions] }

For errors responses, see the response status codes documentation.

POST /createHostDowntime createHostDowntime

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { hostName, comment, startTime, endTime, user, fixed=1, duration=1000 }

Response

If succeeds, Create a Host’s downtime.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /createHost createHost

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { templateHostName, hostName, hostIp, hostAlias, contactName, contactGroupName, exportConfiguration }

Response

If succeeds, Create a nagios host (affected to the provided parent template [templateHostName]) if not exists and reload lilac configuration. Posibility to attach a contact and/or a contact group to the host in the same time..

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /createEonUser createEonUser

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { user_mail, user_name, user_descr="", user_group, user_password, is_ldap_user=false, user_location="", user_limitation=0, user_language = 0, in_nagvis = false, in_cacti = false, nagvis_group = false }

Response

If succeeds, Create a nagios contact, a eon user and possibly cacti and nagvis user if necessary. ie bellow.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /createEonGroup createEonGroup

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { group_name, group_descr="", is_ldap_group=false, group_right=array() }

Response

If succeeds, Create a nagios contact group and a eon group. The user could be limited or admin, If you decide to changed rights, you must provide the complete array like in the ie bellow.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /createContactGroup createContactGroup

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { contactGroupName, description="contact group", exportConfiguration = FALSE }

Response

If succeeds, Create a contact Group.

Status: 200 OK { "http_code": "200 OK", "result": [with the executed actions] }

For errors responses, see the response status codes documentation.

POST /createContact createContact

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { contactName, contactMail, contactAlias="description", contactMail, contactPager, contactGroup, options, exportConfiguration }

Response

If succeeds, Create a nagios contact. In the options variables, you can set the same information than those given in the web interface..

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /checkHost checkHost

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { type, adress, port, path }

Response

If succeeds, Check an particulary host if it’s available.

Status: 200 OK { "http_code": "200 OK", "result": [with the executed actions] }

For errors responses, see the response status codes documentation.

Authenticate

Utilisation: How do I use EONAPI?

All calls to the EON HTTP API are performed by HTTP GET/POST requests. The URLs consist of a path to the API function and sometimes some parameters.

Some calls to the API are protected by API key. You need to present a valid key in your request. Each EON user has a private APIKEY that enables to authenticate/validate the privileges.

  1. Generate your APIKEY with the EONAPI following this URI in your browser or application API call (this operation should be done one time):
    https://[EON_IP]/eonapi/getApiKey?&username=[username]&password=[password]
    

    Pre-requisites: You have to be a local admin user (and not an LDAP user) in order to get an APIKEY from the EONAPI. If not, EONAPI will return an “Unauthorized” 401 response.

If authorized, you should have in return a JSON document with your EONAPI_KEY value:

{
    "api_version": "2.4.2",
    "http_code": "200 OK", 
    "EONAPI_KEY": "022dfa0d83996bddada25cd01d051c6d85b64d5e383ef1f9f6cfb30e0f5b1170"
}

NB: Note the api_version version for implementation in your apps.

  1. Test the privileges of your API key

This API call you will allow you to now if the association username/apiKey is valid & has the needed privileges.

https://[EON_IP]/eonapi/getAuthenticationStatus?&username=[username]&apiKey=[apiKey]

You should have an authorized response:

{
    "api_version": "2.4.2",
    "http_code": "200 OK", 
    "Status": "Authorized"
}
  1. You can use the generated API key in your applications / API calls

There are different methods to test your API. I recommend the Open Source client software Postman to test your requests and check the working of the API. Otherwise, tools like Curl will do the job.

A basic API call will look like that:

https://[EON_IP]/eonapi/[API_function]?&username=[username]&apiKey=[apiKey]

POST /addServiceTemplateToServiceInHost addServiceTemplateToServiceInHost

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { templateServiceName, serviceName, hostName }

Response

If succeeds, Add a service Template in the given service of the specified host..

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /addServiceTemplateFromService addServiceTemplateFromService

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { serviceTemplateName, serviceName, hostName }

Response

If succeeds, Add a service template in the given service of the specified host..

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /addServiceGroupeToServiceTemplate addServiceGroupeToServiceTemplate

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { serviceGroupName, templateServiceName, exportConfiguration = FALSE }

Response

If succeeds, Add a service group to a service template. returncode=0 or 1 if failed.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /addServiceGroupToServiceInHost addServiceGroupToServiceInHost

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { serviceGroupName, serviceName, hostName, exportConfiguration = FALSE }

Response

If succeeds, Add a service group in the given service of the specified host..

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /addNotifierMethod addNotifierMethod

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { method_name, method_type, method_line }

Response

If succeeds, Add a Notifier method into the databases.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /addInheritanceTemplateToHostTemplate addInheritanceTemplateToHostTemplate

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { inheritanceTemplateName, templateHostName, exportConfiguration = FALSE }

Response

If succeeds, Add a Inherit host template to a host template. returncode=0 or 1 if failed.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /addInheritServiceTemplateToServiceTemplate addInheritServiceTemplateToServiceTemplate

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { inheritServiceTemplateName, templateServiceName, exportConfiguration = FALSE }

Response

If succeeds, Add a inherited service template to a service template. returncode=0 or 1 if failed.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /addHostTemplateToHost addHostTemplateToHost

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { templateHostName, hostName, exportConfiguration }

Response

If succeeds, Add a host template to a nagios host..

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /addHostGroupToHostTemplate addHostGroupToHostTemplate

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { hostGroupName, templateHostName, exportConfiguration = FALSE }

Response

If succeeds, Add a Host group to a host template. returncode=0 or 1 if failed.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /addCustomArgumentsToServiceTemplate addCustomArgumentsToServiceTemplate

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { templateServiceName, customArguments, exportConfiguration = FALSE }

Response

If succeeds, Add customs arguments to a service template. returncode=0 or 1 if failed or didn’t changed.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /addCustomArgumentsToService addCustomArgumentsToService

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { serviceName, hostName, customArguments, exportConfiguration = FALSE }

Response

If succeeds, Add customs arguments to a service. returncode=0 or 1 if failed or didn’t changed.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /addCustomArgumentsToHostTemplate addCustomArgumentsToHostTemplate

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { templateHostName, customArguments, exportConfiguration = FALSE }

Response

If succeeds, Add customs arguments to a host template. returncode=0 or 1 if failed or didn’t changed.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /addCustomArgumentsToHost addCustomArgumentsToHost

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { hostName, customArguments, exportConfiguration = FALSE }

Response

If succeeds, Add customs arguments to a host. returncode=0 or 1 if failed or didn’t changed.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /addContactToServiceTemplate addContactToServiceTemplate

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { contactName, templateServiceName, exportConfiguration = FALSE }

Response

If succeeds, Add a contact to a service template. returncode=0 or 1 if failed.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /addContactToServiceInHost addContactToServiceInHost

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { contactName, serviceName, hostName }

Response

If succeeds, Add a contact in the given service of the specified host..

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /addContactToHostTemplate addContactToHostTemplate

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { contactName, templateHostName, exportConfiguration }

Response

If succeeds, Add a contact to a nagios host template..

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /addContactToHost addContactToHost

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { contactName, hostName, exportConfiguration }

Response

If succeeds, Attach a nagios contact to a host if not already attached..

Status: 200 OK { "http_code": "200 OK", "result": [with the executed actions] }

For errors responses, see the response status codes documentation.

POST /addContactNotificationCommandToContact addContactNotificationCommandToContact

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { contactName, commandName, type_command, exportConfiguration }

Response

If succeeds, Add a contact notification command to a nagios contact..

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /addContactGroupToServiceTemplate addContactGroupToServiceTemplate

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { contactGroupName, templateServiceName, exportConfiguration = FALSE }

Response

If succeeds, Add a contact group to a service template. returncode=0 or 1 if failed.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /addContactGroupToServiceInHost addContactGroupToServiceInHost

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { contactGroupName, serviceName, hostName }

Response

If succeeds, Add a contact group in the given service of the specified host..

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /addContactGroupToHostTemplate addContactGroupToHostTemplate

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { contactGroupName, templateHostName, exportConfiguration }

Response

If succeeds, Add a contact group to a nagios host template..

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /addContactGroupToHost addContactGroupToHost

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { contactGroupName, hostName, exportConfiguration }

Response

If succeeds, Attach a nagios contact group to a host if not already attached..

Status: 200 OK { "http_code": "200 OK", "result": [with the executed actions] }

For errors responses, see the response status codes documentation.

POST /addContactGroupToContact addContactGroupToContact

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { contactName, contactGroupName, exportConfiguration }

Response

If succeeds, add a contact group to a nagios contact..

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /addCommand addCommand

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { commandName, commandLine, commandDescription="" }

Response

If succeeds, Add a command to Nagios.returncode=0 or 1 if failed.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /addCheckCommandParameterToServiceTemplate addCheckCommandParameterToServiceTemplate

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { templateServiceName, parameters }

Response

If succeeds, Add command parameter to a service template.returncode=0 or 1 if failed /!\parameters is a list.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

POST /addCheckCommandParameterToServiceInHost addCheckCommandParameterToServiceInHost

This method allows users get informations about a specific lilac object.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { serviceName, hostName, parameters }

Response

If succeeds, Add command parameters in a service of a specified host. returncode=0 or 1 if failed or didn’t changed /!\ parameters is a list.

Status: 200 OK { "http_code": "200 OK", "result": ["code":returnCode, "description":"logs"] }

For errors responses, see the response status codes documentation.

GET /getResources Get resources

This method allows users get informations about a command.

Request

  • The headers must include a valid authentication token.

Response

If succeeds, returns the list of resources.

Status: 200 OK { "http_code": "200 OK", "result": [with the executed actions] }

For errors responses, see the response status codes documentation.

GET /getAuthenticationStatus Get Authentication Status

Confirm that the provided user account has admin privileges and the permission to make advanced API calls. This means the association username/apiKey is correct.

Request

  • The headers must include a valid authentication token.
    https://[EON_IP]/eonapi/getAuthentificationStatus?&username=[username]&apiKey=[apiKey]
    

Response

Sends back if the user is authorized.

Status: 200 OK

{
    "api_version": "2.4.2",
    "http_code": "200 OK", 
    "Status": "Authorized"
}

For errors responses, see the response status codes documentation.

POST /getServicesByHost Get Services By Host

This method allows users get informations about services linked to a specified host.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { "hostName": 'name' }

Response

If succeeds, returns informations about services linked with the given host.

Status: 200 OK { "http_code": "200 OK", "result": [with the executed actions] }

For errors responses, see the response status codes documentation.

POST /getServicesByHostTemplate Get Services By Host Template

This method allows users get services linked to a host template.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { "templateHostName": 'name' }

Response

If succeeds, returns information of services linked with the given host template.

Status: 200 OK { "http_code": "200 OK", "result": [with the executed actions] }

For errors responses, see the response status codes documentation.

POST /getHostsByTemplate Get Hosts by Template

This method allows users get informations about hosts through is link with a specific template.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { "templateHostName": 'name_of_template' }

Response

If succeeds, return hosts link with the given template host.

Status: 200 OK { "http_code": "200 OK", "result": [with the executed actions] }

For errors responses, see the response status codes documentation.

POST /getHostsByHostGroup Get Hosts By Host Group

This method allows users get informations about a command.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { "commandName": 'check_api_command' }

Response

If succeeds, returns informations.

Status: 200 OK { "http_code": "200 OK", "result": [with the executed actions] }

For errors responses, see the response status codes documentation.

POST /getHost Get Host

This method allows users get informations about a specific Host.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { "hostName": 'host_name' }

Response

If succeeds, returns informations about the given host.

Status: 200 OK { "http_code": "200 OK", "result": [with the executed actions] }

For errors responses, see the response status codes documentation.

POST /getHostGroup Get Host Group

This method allows users get informations about a Host Group.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the host group.

Authentication: bearer TOKEN { "hostGroupName": 'name_of_host_group' }

Response

If succeeds, returns informations.

Status: 200 OK { "http_code": "200 OK", "result": [with the executed actions] }

For errors responses, see the response status codes documentation.

POST /getCommand Get command

This method allows users get informations about a command.

Request

  • The headers must include a valid authentication token.
  • The body can’t be empty and must include at least the name attribute, a string that will be used as the name of the thing.

Authentication: bearer TOKEN { "commandName": 'check_api_command' }

Response

If succeeds, returns informations.

Status: 200 OK { "http_code": "200 OK", "result": [with the executed actions] }

For errors responses, see the response status codes documentation.