Difference between revisions of "Pandora: Documentation en: Annex ExternalAPI"

From Pandora FMS Wiki
Jump to: navigation, search
(Ejemplo)
(set planned_downtimes_created)
 
(456 intermediate revisions by 9 users not shown)
Line 3: Line 3:
 
= Pandora FMS External API =
 
= Pandora FMS External API =
  
The Pandora FMS External API is used doing remote calls (through HTTP) on the file '''/include/api.php'''.
+
The Pandora FMS External API is used doing remote calls (through HTTP) on the '''/include/api.php''' file.
This is the method that has been defined in Pandora FMS to integrate applications from third parts with Pandora FMS. It basically consist on a call with the parameters formated to receive a value or a list of values that after its application it will use to do operations.
+
This is the method that has been defined in Pandora FMS to integrate applications from third parties to Pandora FMS. It basically consists on a call with the parameters formatted to receive a value or a list of values that after its application will be used to do operations.
  
 
A call to the API.php is as simple as this:
 
A call to the API.php is as simple as this:
Line 10: Line 10:
 
  <nowiki>http://</nowiki>&lt;Pandora Console install&gt;/include/api.php&lt;parameters&gt;
 
  <nowiki>http://</nowiki>&lt;Pandora Console install&gt;/include/api.php&lt;parameters&gt;
  
The API only can receive the following parameters:
+
The API can only receive the following parameters:
  
*op (required): is the first parameter that specify the nature of the operation, which could be "get" or "set" or "help":
+
*op (required): It is the first parameter that specifies the nature of the operation, which could be "get" or "set" or "help":
:*get: returns a value or values.
+
:*get: It returns a value or values.
:*set: send a value or values.
+
:*set: It sends a value or values.
:*help: returns a little help from the calls
+
:*help: It returns a little help from the calls
*op2 (required): the call with an explanatory name of the one that works.
+
*op2 (required): The call with an explanatory name of the one that it works on.
*id (optional): first parameter of the call.
+
*id (optional): The first call parameter.
*id2 (optional): second parameter of the call.
+
*id2 (optional): The second call parameter.
*other (optional): third parameter of the call, sometimes it could be a list of serial values..
+
*other (optional): The third call parameter, sometimes it could be a list of serial values.
*other_mode (optional): format of the serial. list of posible values:
+
*other_mode (optional): Serial format. list of posible values:
:*url_encode: el valor de other es un alfanumérico formateado como [http://en.wikipedia.org/wiki/Percent-encoding UrlEncode].
+
:*url_encode: the othervalue is an alphanumeric formtted as [http://en.wikipedia.org/wiki/Percent-encoding UrlEncode].
:*url_encode_separator_<separador>:the value will be a serial value list with the divider character, for example:
+
:*url_encode_separator_<separador>: The value will be a serial value list with the divider character, for example:
 
  ...other=peras|melones|sandias&other_mode=url_encode_separator_|
 
  ...other=peras|melones|sandias&other_mode=url_encode_separator_|
 
*returnType (optional): return format of the value or values. The current available values are:
 
*returnType (optional): return format of the value or values. The current available values are:
:*string: returns the value as it is as an alphanumeric one.
+
:*string: It returns the value as it is as an alphanumeric one.
:*csv:return the values as a CSV separated by default with the ";" character (fields) and with CR (files)
+
:*csv: It returns the values as a CSV separated with the ";" character (fields) and with CR (files) by default
:*csv_head: returns same as with "csv" except that it adds a first file with the field names to return.
+
:*csv_head: It returns the same as with "csv", except that it adds a first file with the field names to return.
  
 
==Security==
 
==Security==
  
At the moment, the security is based on an IPs list that will have access to the tool. And it will be configured as we could see at the image, in the Pandora Console configuration options.
+
At the moment, security is based on an IP list that will have access to the tool. And it will be configured as seen in the image, in Pandora FMS Console configuration options.
  
If you introduce the character '''*''' in the box text, the ACL check will be omitted relegating the security to the protocol and to the environment. In the same way, the character '''*''' can be used as wildcard. In example. 183.234.33.*
+
If you enter the character '''*''' in the box text, the ACL check will be omitted relegating the security to the protocol and to the environment.
  
 
<center>
 
<center>
Line 39: Line 39:
 
</center>
 
</center>
  
You can also set a password for the actions of the API.
+
You can also set a password for API actions.
  
In order to setup the password it is necessary to follow these steps:
+
In order to setup the password, follow these steps:
  
*''apipass'': Api password configured in the console. You can do it in the following configuration view (Administration>Setup>):  
+
*''apipass'': Api password configured in the console. Do it in the following configuration view (Administration>Setup>):  
 
 
Nota: Before the 4.0.2 version, this parameter was ''pass''
 
  
 
<center>
 
<center>
Line 51: Line 49:
 
</center>
 
</center>
  
To access to the actions of the API, is necessary give a valid user and pass of Pandora FMS, too.
+
Nota: Before version 4.0.2, this parameter was ''pass''
  
*''user'': Valid user of Pandora FMS  
+
To access API actions, it is necessary to give a Pandora FMS valid user and password.
  
*''pass'': The password of the given user
+
*''user'': Valid Pandora FMS user  
  
'''Note: In the API calls the passwords are uncodified. So please be careful and use SSL connections to avoid sniffers. The API allows POST petitions to codify it when use SSL/HTTPS.'''
+
*''pass'': The user password
 +
 
 +
'''Note: In API calls, passwords are uncoded. Be careful and use SSL connections to avoid sniffers. The API allows POST petitions to encrypt them when using SSL/HTTPS.'''
  
 
=== Return ===
 
=== Return ===
  
When the API denies the access, a simple string "auth error" is returned.
+
When the API denies the access, the simple string "auth error" is returned.
  
 
=== Examples ===
 
=== Examples ===
  
In this case, is provided the API password ''1234'' and the access credentials are user: ''admin'' and password: ''pandora''.
+
In this case, the API password ''1234'' is used. The user is ''admin'' and the password is ''pandora''.
  
  http://127.0.0.1/pandora_console/include/api.php?op=get&op2=plugins&return_type=csv&other=;&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=plugins&return_type=csv&other=;&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
Access conditions:  
 
Access conditions:  
* The origin IP is in the ACLs IP list
+
* The source IP is in the ACLs IP list
* The API password is not setted or is ''1234''
+
* The API password is not set or is ''1234''
* The user ''admin'' exists and their password is ''pandora''
+
* The user ''admin'' exists and its password is ''pandora''
  
 
=== Security Workflow ===
 
=== Security Workflow ===
Line 78: Line 78:
 
'''Starting from version 4.0.2''', the API will have several security improvements, and this is implemented by three factors:
 
'''Starting from version 4.0.2''', the API will have several security improvements, and this is implemented by three factors:
  
* IP filtering. Only listed / filtered IP will be allowed to connect the API.
+
* IP filtering. Only listed / filtered IP will be allowed to connect to the API.
 
* Global API password, if defined, needed to use the API.
 
* Global API password, if defined, needed to use the API.
* User & Password in the console, need to be valid and have permissions to perform the operation requested.
+
* User & password valid in the console. Permissions will be used each time there is a requested operation.
  
This is explained in this workflow:
+
It is explained in this workflow:
  
 
<center>
 
<center>
Line 88: Line 88:
 
</center>
 
</center>
  
== New Calls Extension in the API ==
+
== New calls extension in the API ==
  
To develop new calls for the API you have to consider that:
+
To develop new calls for the API, keep in mind that:
  
* The call has to be inscribed as a function in the file &lt;instalación Pandora Console&gt;/include/functions_api.php .
+
* The call has to be inscribed as a function in the file &lt;installation Pandora FMS Console&gt;/include/functions_api.php .
  
* The function must have the next structure: The prefix "api", the kind of operation "get", "set" or "help" (depend if is a data read, data write or retrieve help operation) and the name of the call, trying to be coherent with the operation, as for example:function api_get_[call_name](parameters) .
+
* The function must have this structure: The prefix "api", the kind of operation "get", "set" or "help" (depending on whether it is a data read, data write or retrieve help operation) and the name of the call, trying to be coherent with the operation, as for example: function api_get_[call_name](parameters) .
*The function can have no parameters, but if it have it, the parameters received will be the following in the same order:
+
*The function can have no parameters, but if it has them, the parameters received will be the following in the same order:
*id: first operator or parameter, contains an string.
+
*id: first operator or parameter, it contains a string.
*id2: second operator or parameter, contains an string.
+
*id2: second operator or parameter, it contains a string.
*other: rest of operators or parameters, contains as an array of two positions:
+
*other: rest of operators or parameters, it contains as an array of two positions:
:*$other['type']: that could be string or array.
+
:*$other['type']: That might be be a string or an array.
:*$other['data']: that will be an string with the parameter or an array of numeric index with the past parameters.
+
:*$other['data']: That will be a string with the parameter or an array of numeric index with the past parameters.
*returnType: string that specify the kind of return that the call will have. It is usually transparent for you, but you could use or modify it if necessary.
+
*returnType: string that specifies the kind of return that the call will have. It is usually visible for you, but you may use or modify it if necessary.
  
=== New Calls in the API from the Pandora FMS extensions ===
+
=== New Calls in the API from Pandora FMS extensions ===
  
Is possible to create new API calls without use /include/functions_api.php. The way is adding into a Pandora FMS extension directory a file with the following name: <extension_name>.api.php and into this file create the desired functions with the same considerations of the standard API but with "apiextension" prefix instead of "api".
+
It is possible to create new API calls without using /include/functions_api.php. The process consists of adding into a Pandora FMS extension directory a file with the following name: <extension_name>.api.php, and into this file create the desired functions with the same considerations of the standard API but with "apiextension" prefix instead of "api".
  
  
For example, having an extension called "module_groups" with the path <Pandora installation>/extensions/module_groups we must create a file called module_groups.api.php into this directory.  
+
For example, having an extension called "module_groups" with the path <Pandora installation>/extensions/module_groups, create a file called module_groups.api.php into this directory.  
  
  
Into this file will be the desired functions, for example a function to get the number of modules in a group. This function must have a name like: "apiextension_get_groupmodules".
+
The desired functions will be within this file, for example a function to get the number of modules in a group. This function must have a name like: "apiextension_get_groupmodules".
  
 
==== Function example ====
 
==== Function example ====
  
In this function have been used imaginary functions.
+
In this function, made up functions have been used.
  
 
<code><pre>
 
<code><pre>
Line 132: Line 132:
 
==== Call example ====
 
==== Call example ====
  
This call example gets the number of modules of the group "Servers"
+
This call example gets the number of modules of the "Servers" group.
  
  http://127.0.0.1/pandora_console/include/api.php?op=get&op2=extension&ext_name=module_groups&ext_function=groupmodules&id=Servers&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=extension&ext_name=module_groups&ext_function=groupmodules&id=Servers&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
===API Functions===
 
===API Functions===
  
The following functions could be used in the function code of your call:
+
The following functions could be used in your call function code:
  
*returnError(typeError, returnType): gives back an error in an standardized way for all calls.
+
*returnError(typeError, returnType): It gives back an error in an standardized way for all calls.
:*typeError: by now 'id_not_found' or null.
+
:*typeError: By now 'id_not_found' or null.
:*returnType: by now 'string' or error message.  
+
:*returnType: By now 'string' or error message.  
*returnData(returnType, data, separator): is the function that returns the API call data.
+
*returnData(returnType, data, separator): It is the function that returns the API call data.
:*returnType: that could be 'string', 'csv', 'csv_head'
+
:*returnType: That could be 'string', 'csv', 'csv_head'
:*data: is an array that contains the data, as well as its format. It has the following fields:
+
:*data: It is an array that contains the data, as well as its format. It has the following fields:
::*'type' (required): that could be 'string' and 'array'.
+
::*'type' (required): It could be 'string' and 'array'.
::*'list_index' (optional): contains a numeric index array containing the alphanumeric index that are wanted to take out through exit.
+
::*'list_index' (optional): It contains a numeric index array containing the alphanumeric index to be taken out through exit.
::*'data' (required): contains and string with the data or an array of alphanumeric index or numeric index with the data.
+
::*'data' (required): It contains a string with the data or an array of alphanumeric index or numeric index with data.
  
 
===Example===
 
===Example===
Line 185: Line 185:
 
==API Calls==
 
==API Calls==
  
They are divided in two groups, depending on if they get back or write data in Pandora FMS.
+
They are divided into two groups, depending on whether they return or write data in Pandora FMS.
  
 
There is an exception: The info retrieving call.
 
There is an exception: The info retrieving call.
Line 191: Line 191:
 
===INFO RETRIEVING===
 
===INFO RETRIEVING===
  
Returns the version of Pandora Console in a similar way of the call ''get test'' but without check the API connection.
+
It returns the version of Pandora FMS Console in a similar way as the ''get test'' call but without checking the API connection.
  
This call is useful to verify that this path allows a Pandora FMS installation and to retrieve the version before the authentication.
+
This call is useful to verify that this path allows a Pandora FMS installation and to retrieve the version before authentication.
  
The returned info can be retrieved from the login screen, so it doesn't be considered a security vulnerability.  
+
The returned info can be retrieved from the login screen, so it is not considered a security vulnerability.  
  
  http://127.0.0.1/pandora_console/include/api.php?info=version
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?info=version</nowiki>
  
 
A return sample could be: ''Pandora FMS v5.0 - PC131015''
 
A return sample could be: ''Pandora FMS v5.0 - PC131015''
Line 203: Line 203:
 
===GET===
 
===GET===
  
It gets back the required data.
+
It returns the required data.
  
 
====get test====
 
====get test====
Checks the connection to API and returns the version of Pandora Console.
+
It checks the connection to the API and returns the version of Pandora FMS Console.
 +
 
  
 
{{metaconsole}}
 
{{metaconsole}}
Line 217: Line 218:
 
This example will return OK,[version],[build]
 
This example will return OK,[version],[build]
  
  http://127.0.0.1/pandora_console/include/api.php?op=get&op2=test&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=test&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
A return sample could be: ''OK,v4.0.2,PC120614''
 
A return sample could be: ''OK,v4.0.2,PC120614''
  
 
====get all_agents====
 
====get all_agents====
Returns a list of agents filters by the filter in other parameter.
+
It returns a list of agent filters according to the filter in some other parameter.
  
 
Call syntax:
 
Call syntax:
Line 228: Line 229:
 
*op2=all_agents (required)
 
*op2=all_agents (required)
 
*return_type= csv or json (required)
 
*return_type= csv or json (required)
*other=&lt;serialized parameters&gt; (optional) serialized parameters to filter the agent search:
+
*other=&lt;serialized parameters&gt; (optional). Serialized parameters to filter the agent search:
 
:*&lt;filter_so&gt;
 
:*&lt;filter_so&gt;
 
:*&lt;filter_group&gt;
 
:*&lt;filter_group&gt;
Line 238: Line 239:
 
=====Examples=====
 
=====Examples=====
  
This example will return all agents which id_os is equal to 1, id_group equal to 2, state equal to warning, their alias will contain 'j',  and the policy associated equal to 2.
+
This example will return all agents whose id_os is equal to 1, id_group equals 2, state equal to warning, their alias contains 'j',  and the policy associated equals 2.
  
  CSV example: http://127.0.0.1/pandora_console/include/api.php?op=get&op2=all_agents&return_type=csv&other=1&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora
+
  CSV example: <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=all_agents&return_type=csv&other=1&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora</nowiki>
  JSON example: http://127.0.0.1/pandora_console/include/api.php?op=get&op2=all_agents&return_type=json&other=1&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora
+
  JSON example: <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=all_agents&return_type=json&other=1&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====get module_last_value====
 
====get module_last_value====
Returns the last value of module. This module is filtered by the ID of module pass as parameter id. With the other parameter you can add a error code that your application knows and it is out range of module values.
+
Returns the last module value. This module is filtered by the ID which has gone through the id parameter. With the other parameter you may add an error code that your application knows and it is out of range of module values.
  
 
Call syntax:
 
Call syntax:
 
*op=get (required)
 
*op=get (required)
 
*op2=module_last_value (required)
 
*op2=module_last_value (required)
*id=&lt;índex&gt; (required) should be an index of an agent module.
+
*id=&lt;índex&gt; (required). It should be an agent module index.
*other=&lt;error return&gt; (optional) that you want to it gives back if there is an error(usually not located in the database.
+
*other=&lt;error return&gt; (optional). What you wish to receive if there is an error(usually not located in the database).
:*Error return code are:
+
:*Error return codes are:
::*'error_message' returns an error in a text message.
+
::*'error_message'. It returns an error in a text message.
::*'error_value'&lt;separator&gt;&lt;code or value&gt gives back this code or error value. But it is necessary to enclose it with 'other_mode',like other_mode=url_encode_separator_&lt;separador&gt to put the divider on other.
+
::*'error_value'&lt;separator&gt;&lt;code or value&gt. It returns this code or error value. But it is necessary to enclose it with 'other_mode', like other_mode=url_encode_separator_&lt;separador&gt to place the divider on another one.
  
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=get&op2=module_last_value&id=63&other=error_value|0&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=module_last_value&id=63&other=error_value|0&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  http://127.0.0.1/pandora_console/include/api.php?op=get&op2=module_last_value&id=62&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=module_last_value&id=62&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====get agent_module_name_last_value====
 
====get agent_module_name_last_value====
Returns the last value of module. This module is filtered by the agent name pass as parameter id and module name pass as parameter id2. With the other parameter you can add a error code that your application knows and it is out range of module values.
+
It returns the last module value. This module is filtered by the agent name which has gone through id parameter and module name which has gone through id2 parameter. With the other parameter, you may add an error code recognized by your application and which is out of range of module values.
  
  
Line 268: Line 269:
 
*op=get (required)
 
*op=get (required)
 
*op2=agent_module_name_last_value (required)
 
*op2=agent_module_name_last_value (required)
*id=&lt;alphanumeric&gt;(required) contains the agent name.
+
*id=&lt;alphanumeric&gt;(required). It contains the agent name.
*id2=&lt;alphanumeric&gt; (required) contains the module name.
+
*id2=&lt;alphanumeric&gt; (required). It contains the module name.
*other=&lt;error return&gt; (optional) that you want to return if there is an error ( that usually has not been found in the DB).
+
*other=&lt;error return&gt; (optional). What you wish to receive if there is an error (that usually has not been found in the DB).
 
:*Codes of error return are:
 
:*Codes of error return are:
::*'error_message' returns error in a text message.
+
::*'error_message'. It returns error in a text message.
::*'error_value'&lt;separator&gt;&lt;code or value&gt gives back this code or error value,but it is necessary that it comes with 'other_mode' such as other_mode=url_encode_separator_&lt;separator&gt to use the divider in other.
+
::*'error_value'&lt;separator&gt;&lt;code or value&gt. It returns this code or error value, but it must come with 'other_mode' such as other_mode=url_encode_separator_&lt;separator&gt to use the divider on another one.
  
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=get&op2=agent_module_name_last_value&id=miguel-portatil&id2=cpu_user&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=agent_module_name_last_value&id=miguel-portatil&id2=cpu_user&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====get agent_module_name_last_value_alias====
 
====get agent_module_name_last_value_alias====
 
=> 7.0NG
 
=> 7.0NG
  
Returns the last value of module. This module is filtered by the agent alias pass as parameter id and module name pass as parameter id2. With the other parameter you can add a error code that your application knows and it is out range of module values.
+
It returns the last module value. This module is filtered by the agent alias which has gone through id parameter and module name which has gone through parameter id2. With the other parameter, you may add an error recognized by your application and which is out range of module values.
  
 
Call Syntax:
 
Call Syntax:
Line 288: Line 289:
 
*op=get (required)
 
*op=get (required)
 
*op2=module_last_value_alias (required)
 
*op2=module_last_value_alias (required)
*id=&lt;alphanumeric&gt;(required) contains the agent alias.
+
*id=&lt;alphanumeric&gt;(required). It contains the agent alias.
*id2=&lt;alphanumeric&gt; (required) contains the module name.
+
*id2=&lt;alphanumeric&gt; (required). It contains the module name.
*other=&lt;error return&gt; (optional) that you want to return if there is an error ( that usually has not been found in the DB).
+
*other=&lt;error return&gt; (optional). What you wish to receive if there is an error ( that usually has not been found in the DB).
 
:*Codes of error return are:
 
:*Codes of error return are:
::*'error_message' returns error in a text message.
+
::*'error_message'. It returns error in a text message.
::*'error_value'&lt;separator&gt;&lt;code or value&gt gives back this code or error value,but it is necessary that it comes with 'other_mode' such as other_mode=url_encode_separator_&lt;separator&gt to use the divider in other.
+
::*'error_value'&lt;separator&gt;&lt;code or value&gt. It returns this code or error value, but it must come with 'other_mode' such as other_mode=url_encode_separator_&lt;separator&gt to use the divider on another one.
  
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=get&op2=agent_module_name_last_value_alias&id=pandorafms&id2=Memory_Used&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=agent_module_name_last_value_alias&id=pandorafms&id2=Memory_Used&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====get module_value_all_agents====
 
====get module_value_all_agents====
  
Returns a list of agents and module value, these modules are in all of agents of list and they are filtered by the name of module pass as the parameter id.
+
It returns a list of agent and module values, these modules are in all of the agents of the list and they are filtered by the name of module which has gone through the id parameter.
  
 
Call syntax:
 
Call syntax:
Line 307: Line 308:
 
*op=get (required)
 
*op=get (required)
 
*op2=module_value_all_agents (required)
 
*op2=module_value_all_agents (required)
*id=&lt;name of the module&gt; (required) This is the module name.
+
*id=&lt;name of the module&gt; (required). This is the module name.
  
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=get&op2=module_value_all_agents&id=example_module_name&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=module_value_all_agents&id=example_module_name&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====get agent_modules====
 
====get agent_modules====
Returns the list of modules of agent, this agent is filtered by the id agent pass as id parameter.
+
It returns the list of agent modulest, this agent is filtered by the id agent which has gone through id parameter.
  
 
Call syntax:
 
Call syntax:
Line 323: Line 324:
 
*other=&lt;serialized values&gt; (required) Serialized values in order to filter by agent:
 
*other=&lt;serialized values&gt; (required) Serialized values in order to filter by agent:
 
:*&lt;id_agent&gt;
 
:*&lt;id_agent&gt;
It's necessary to complete 'other_mode' parameter in this way other_mode=url_encode_separator_&lt;separador&gt; in order to configure separator in other field.
+
The 'other_mode' parameter must be completed like this other_mode=url_encode_separator_&lt;separador&gt; in order to configure the separator in other field.
  
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=get&op2=agent_modules&return_type=csv&other=14&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=agent_modules&return_type=csv&other=14&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====get module_id====
 
====get module_id====
Returns the id of a module of an agent.
+
It returns the id of an agent module.
  
 
Call syntax:
 
Call syntax:
Line 341: Line 342:
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=get&op2=module_id&id=5&other=Host%20Alive&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=module_id&id=5&other=Host%20Alive&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====get locate_agent====
 
====get locate_agent====
Get id server whare agent is located, and print all the result like a csv.
+
It gets the id server where the agent is located, and prints all the results like a csv.
  
 
Call syntax:
 
Call syntax:
Line 350: Line 351:
 
*op=get (required)
 
*op=get (required)
 
*op2=locate_agent (required)
 
*op2=locate_agent (required)
*return_type=&lt;csv&gt; (required) Output format.
+
*return_type=&lt;csv&gt; (required). Output format.
 
*id=id_agent (required)
 
*id=id_agent (required)
 
*other_mode= other_mode=url_encode_separator_&lt;separator&gt (required)  
 
*other_mode= other_mode=url_encode_separator_&lt;separator&gt (required)  
Line 356: Line 357:
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=get&op2=locate_agent&return_type=csv&apipass=1234&user=admin&pass=pandora&id=Pepito&other_mode=url_encode_separator_%7C
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=locate_agent&return_type=csv&apipass=1234&user=admin&pass=pandora&id=Pepito&other_mode=url_encode_separator_%7C</nowiki>
  
 
====get policies====
 
====get policies====
Returns the list of polities of agent, this agent is filtered by id into the other parameter.
+
It returns the list of agent policies, whose id which has gone through the other parameter.
  
 
Call syntax:
 
Call syntax:
Line 366: Line 367:
 
*op2=policies (required)
 
*op2=policies (required)
 
*return_type=&lt;csv&gt; (required)  
 
*return_type=&lt;csv&gt; (required)  
*other=&lt;serialized values&gt; (optional) Serialized values for filter policy by policy agent:
+
*other=&lt;serialized values&gt; (optional). Serialized values for filtering policies by policy agent:
 
:*&lt;id_agent&gt;
 
:*&lt;id_agent&gt;
  
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=get&op2=policies&return_type=csv&other=&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=policies&return_type=csv&other=&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
====Get tree_agents====
+
====get tree_agents====
Returns a complete list structured by the groups in the first level, agents in the second level and modules in the third level. This list is filtered by the other parameter.
+
It returns a complete list structured by the groups in the first level, agents in the second level and modules in the third level. This list is filtered by the other parameter.
  
 
Call Syntax:
 
Call Syntax:
 
*op=get (required)
 
*op=get (required)
 
*op2=tree_agents (required)
 
*op2=tree_agents (required)
*return_type=&lt;return kind&gt; (required) that could be 'csv' or 'csv_head'.
+
*return_type=&lt;return kind&gt; (required). That could be 'csv' or 'csv_head'.
*other=&lt;string or serialized parameters&gt; (optional) in this case could be the divider or a parameter list in order and separated by the divider character. We are going to examine the two cases:  
+
*other=&lt;string or serialized parameters&gt; (optional). In this case, it could be the divider or a parameter list ordered and separated by the divider character. Both cases are described here:  
  
 
::*&lt;separator&gt; The divider "yes" of the 'csv'.
 
::*&lt;separator&gt; The divider "yes" of the 'csv'.
::*&lt;separator csv&gt;|&lt;character that replaces the CR|&lt;fields 1&gt;,&lt;fields 2&gt;,&lt;fields N&gt;it will compose the following parameters in order( the divider character '|' could be specified in "other_mode"):
+
::*&lt;separator csv&gt;|&lt;character that replaces the CR|&lt;fields 1&gt;,&lt;fields 2&gt;,&lt;fields N&gt;. It will place the following parameters in order (the divider character '|' could be specified in "other_mode"):
:::*&lt;separator csv&gt;: divider of the fields in the CSV.
+
:::*&lt;separator csv&gt;. Field divider in the CSV.
:::*&lt;character that replaces the CR&gt; character that will be replaced if it finds in any returned character the character RC in order to avoid the ambiguity with the standard use of the RC character to specify registers/files in the CSV. If you pass an string in other, the substitute character is the blank space.
+
:::*&lt;character that replaces the CR&gt;. Character that will be replaced if it finds in any returned character the character RC, in order to avoid the ambiguity with the standard use of the RC character to specify registers/files in the CSV. If you make an string go through other, the replacing character is the blank space.
  
 
:::*&lt;fields 1&gt;,&lt;fields2&gt;,&lt;fields N&gt :the fields to show in the CSV are:  
 
:::*&lt;fields 1&gt;,&lt;fields2&gt;,&lt;fields N&gt :the fields to show in the CSV are:  
Line 522: Line 523:
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=get&op2=tree_agents&return_type=csv&other=;&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=tree_agents&return_type=csv&other=;&apipass=1234&user=admin&pass=pandora</nowiki>
  http://127.0.0.1/pandora_console/include/api.php?op=get&op2=tree_agents&return_type=csv&other=;|%20|type_row,group_id,agent_name&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=tree_agents&return_type=csv&other=;|%20|type_row,group_id,agent_name&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====get module_data====
 
====get module_data====
Line 541: Line 542:
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=get&op2=module_data&id=17&other=;|604800|20121201T13:40|20171215T13:40&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=module_data&id=17&other=;|604800|20121201T13:40|20171215T13:40&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====get graph_module_data====
 
====get graph_module_data====
Returns the chart of a module as a image file, this chart is generated with the same method of static graphs of Pandora. It is necesary pass the width, height, period, label and start date of chart (knowing in Pandora the date indicated in graphs always is the end of data) all of they into the other parameter.
+
Returns the chart of a module as an image file, this chart is generated with the same method of static graphs of Pandora FMS. It is necesary to include the width, height, period, label and start date of chart (knowing in Pandora FMS the date indicated in graphs is always the data end) into the other parameter.
  
  
Line 552: Line 553:
 
*op2=module_data (required)
 
*op2=module_data (required)
 
*id=&lt;id_modulo&gt; (required)
 
*id=&lt;id_modulo&gt; (required)
*other=&lt;serialized parameters&gt; (required). Are the following in this order:
+
*other=&lt;serialized parameters&gt; (required). They are the following in this order:
 
:*&lt;period&gt;
 
:*&lt;period&gt;
 
:*&lt;width&gt;
 
:*&lt;width&gt;
Line 561: Line 562:
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=get&op2=graph_module_data&id=17&other=604800|555|245|pepito|2009-12-07&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=graph_module_data&id=17&other=604800|555|245|pepito|2009-12-07&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====get events====
 
====get events====
Returns a list of events filtered by the other parameter.
+
It returns a list of events filtered by the other parameter.
 +
 
  
 
{{metaconsole}}
 
{{metaconsole}}
 +
 
Call syntax:
 
Call syntax:
  
Line 573: Line 576:
 
*return_type=csv (required)
 
*return_type=csv (required)
 
*other_mode=url_encode_separator_| (optional)
 
*other_mode=url_encode_separator_| (optional)
*other=&lt;serialized parameters&gt; (optional).Are the following in this order:
+
*other=&lt;serialized parameters&gt; (optional). They are the following in this order:
 
:*&lt;separator&gt;
 
:*&lt;separator&gt;
:*&lt;criticity&gt; From 0 to 4, or -1 for to avoid this param
+
:*&lt;criticity&gt; Values from 0 to 4, or -1 to avoid this param
 
:*&lt;agent alias&gt;
 
:*&lt;agent alias&gt;
 
:*&lt;module name&gt;  
 
:*&lt;module name&gt;  
Line 586: Line 589:
 
:*&lt;register limit&gt;
 
:*&lt;register limit&gt;
 
:*&lt;offset register&gt;
 
:*&lt;offset register&gt;
:*&lt;optional style [total|more_criticity]&gt; (total - returns the number of the records,  more_criticity - returns the biggest value of criticity)
+
:*&lt;optional style [total|more_criticity]&gt; (total - it returns the number of the records,  more_criticity - it returns the highest criticity value)
:*&lt;event type&gt; unknown, alert_fired, alert_recovered,.. or its substring. you can also use 'not_normal'.
+
:*&lt;event type&gt; unknown, alert_fired, alert_recovered,.. or its substring. You may also use 'not_normal'.
  
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=get&op2=events&return_type=csv&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=events&return_type=csv&apipass=1234&user=admin&pass=pandora</nowiki>
  http://127.0.0.1/pandora_console/include/api.php?op=get&op2=events&other_mode=url_encode_separator_|&return_type=csv&other=;|2|SERVER|CPU|template_alert00||1274715715|127471781&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=events&other_mode=url_encode_separator_|&return_type=csv&other=;|2|SERVER|CPU|template_alert00||1274715715|127471781&apipass=1234&user=admin&pass=pandora</nowiki>
 
 
===== Full usage example =====
 
 
 
Sample event #1 report this information:
 
 
 
<pre>
 
951140;3998;0;14;0;2012-06-23 22:51:28;Module CheckPandora (0.00) is going to
 
CRITICAL;1340484688;going_up_critical;8176;0;4;;;RemoteAgent;Aerin;transmit;Going down to critical
 
state;http://firefly.artica.es/pandora_demo//images/b_red.png;Critical;http://firefly.artica.es/pandora_demo//
 
images/status_sets/default/severity_critical.png
 
</pre>
 
 
 
Most of the fields, match the fields in the dababase, try to do this query using the SQL manager at pandora:
 
 
 
select * from tevento order by id_evento DESC limit 100;
 
 
 
You will see the fields are like this:
 
 
 
* Field 1 - ID event number (incremental)
 
* Field 2 - ID agent
 
* Field 3 - ID user which validate the event
 
* Field 4 - ID Group (numerical)
 
* Field 5 - Status (0 - new, 1 validated... see more in docs about status codes)
 
* Field 6 - Timestamp (human string timestamp)
 
* Field 7 - Event description (pure text)
 
* Field 8 - utimestamp (Unix timestamp, numerical seconds since 1970)
 
* Field 9 - event type, tokens representing event type with fixed strings
 
* Field 10 - ID agent_module the numerical ID of the module with raise this event. It depends on the event type a new_agent event type do not come with any value here (0). Later the API will get the name, you dont need to call again the api to "resolve" the name by asking with the ID.
 
* Field 11- Id alert. THe same with F10
 
* Field 12 - Criticity (values), check out the docs to see the codes.
 
* Field 13 - User comments (if provided by the user)
 
* Field 14 - Tags
 
 
 
Now comes the API aditional fields, not in DB:
 
 
 
* Field 15 - Agent name
 
* Field 16 - Group name
 
* Field 17 - Group image name.
 
* Field 18 - Long description of the event type
 
* Field 19 - URL to image representing the event status (red ball)
 
* Field 20 - Description of the event criticity (Field 12)
 
* Field 21 - URL to image representing the criticity.
 
  
 
====get all_alert_templates====
 
====get all_alert_templates====
  
Returns the list of alert templates defined into the Pandora.
+
It returns the list of alert templates defined in Pandora FMS.
  
 
Call syntax:
 
Call syntax:
Line 648: Line 609:
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=get&op2=all_alert_templates&return_type=csv&other=;&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=all_alert_templates&return_type=csv&other=;&apipass=1234&user=admin&pass=pandora</nowiki>
 
 
====get all_alert_commands====
 
Returns all the alert commands.
 
 
 
Call syntax:
 
*op=get (required)
 
*op2=all_alert_commands (required)
 
  
=====Examples=====
 
http://localhost/pandora_console/include/api.php?op=get&op2=all_alert_commands&return_type=csv&other=$&apipass=1234&user=admin&pass=pandora
 
  
 
====get module_groups====
 
====get module_groups====
Returns the list of module groups.
+
It returns the list of module groups.
  
 
Call syntax:
 
Call syntax:
Line 671: Line 623:
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=get&op2=module_groups&return_type=csv&other=;&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=module_groups&return_type=csv&other=;&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====get plugins====
 
====get plugins====
Returns the list of server plugins of Pandora.
+
It returns the list of Pandora FMS server plugins.
  
 
Call syntax:
 
Call syntax:
Line 684: Line 636:
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=get&op2=plugins&return_type=csv&other=;&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=plugins&return_type=csv&other=;&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====get tags====
 
====get tags====
Returns the list of tags defined into Pandora.
+
It returns the list of tags defined in Pandora FMS.
  
 
Call syntax:
 
Call syntax:
Line 699: Line 651:
 
This example will return all tags in the system.
 
This example will return all tags in the system.
  
  http://localhost/pandora_console/include/api.php?op=get&op2=tags&return_type=csv&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=get&op2=tags&return_type=csv&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====get module_from_conf====
 
====get module_from_conf====
 
>= 5.0 (Only Enterprise)
 
>= 5.0 (Only Enterprise)
  
Returns the configuration of a local module.
+
It returns the configuration of a local module.
  
 
Call syntax:
 
Call syntax:
 
*op=get (required)
 
*op=get (required)
 
*op2=update_module_in_conf (required)
 
*op2=update_module_in_conf (required)
*id=&lt;id agente&gt; (required)
+
*id=&lt;agent id&gt; (required)
*id2=&lt;nombre módulo&gt; (required)
+
*id2=&lt;module name&gt; (required)
  
 
=====Examples=====
 
=====Examples=====
  http://127.0.0.1/pandora_console/include/api.php?op=get&op2=module_from_conf&apipass=1234&user=admin&pass=pandora&id=9043&id2=example_name
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=module_from_conf&apipass=1234&user=admin&pass=pandora&id=9043&id2=example_name</nowiki>
  
It returns null string if no modules are found.
+
It returns an empty string if no modules are found.
  
 
====get total_modules====
 
====get total_modules====
Line 728: Line 680:
  
 
=====Examples=====
 
=====Examples=====
  http://localhost/pandora_console/include/api.php?op=get&op2=total_modules&id=2&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=get&op2=total_modules&id=2&apipass=1234&user=admin&pass=pandora</nowiki>
 +
 
 +
If the group id is 0, it returns the total amount of modules.
  
 
====get total_agents====
 
====get total_agents====
Line 741: Line 695:
  
 
=====Examples=====
 
=====Examples=====
  http://localhost/pandora_console/include/api.php?op=get&op2=total_agents&id=2&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=get&op2=total_agents&id=2&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====get agent_name====
 
====get agent_name====
Line 749: Line 703:
 
*op=get (required)
 
*op=get (required)
 
*op2=agent_name (required)
 
*op2=agent_name (required)
*id=&lt;id agent&gt; (required)
+
*id=&lt;agent id&gt; (required)
  
 
=====Examples=====
 
=====Examples=====
  http://localhost/pandora_console/include/api.php?op=get&op2=agent_name&id=1&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=get&op2=agent_name&id=1&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====get agent_alias====
 
====get agent_alias====
Line 762: Line 716:
 
*op=get (required)
 
*op=get (required)
 
*op2=agent_alias (required)
 
*op2=agent_alias (required)
*id=&lt;id agent&gt; (required)
+
*id=&lt;agent id&gt; (required)
*id2=<id node> (required in the meta console, unnecessary in the node)
+
*id2=<node id> (required in the meta console, unnecessary in the node)
  
 
=====Examples=====
 
=====Examples=====
  
Node:
+
* Node:
  
  http://localhost/pandora_console/include/api.php?op=get&op2=agent_alias&id=1&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=get&op2=agent_alias&id=1&apipass=1234&user=admin&pass=pandora</nowiki>
  
Metaconsole:
+
* Metaconsole:
  
  http://localhost/pandora_console/enterprise/meta/include/api.php?op=get&op2=agent_alias&id=1&id2=1&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://localhost/pandora_console/enterprise/meta/include/api.php?op=get&op2=agent_alias&id=1&id2=1&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====get module_name====
 
====get module_name====
Line 781: Line 735:
 
*op=get (required)
 
*op=get (required)
 
*op2=module_name (required)
 
*op2=module_name (required)
*id=&lt;id module&gt; (required)
+
*id=&lt;module id&gt; (required)
  
 
=====Examples=====
 
=====Examples=====
  http://localhost/pandora_console/include/api.php?op=get&op2=module_name&id=1&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=get&op2=module_name&id=1&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====get alert_action_by_group====
 
====get alert_action_by_group====
Line 792: Line 746:
 
*op=get (required)
 
*op=get (required)
 
*op2=alert_action_by_group (required)
 
*op2=alert_action_by_group (required)
*id=&lt;id group&gt; (required)
+
*id=&lt;group id&gt; (required)
*id2=&lt;id action&gt; (required)
+
*id2=&lt;action id&gt; (required)
  
 
=====Examples=====
 
=====Examples=====
  http://localhost/pandora_console/include/api.php?op=get&op2=alert_action_by_group&id=0&id2=3&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=get&op2=alert_action_by_group&id=0&id2=3&apipass=1234&user=admin&pass=pandora</nowiki>
 
 
=====Examples=====
 
 
 
http://127.0.0.1/pandora_console/include/api.php?op=get&op2=all_event_filters&return_type=csv&other=;&apipass=1234&user=admin&pass=pandora
 
  
 
====get alert_actions====
 
====get alert_actions====
Line 809: Line 759:
 
*op=get (required)
 
*op=get (required)
 
*op2=alert_actions (required)
 
*op2=alert_actions (required)
*return_type=&lt;return type&gt; (required) which can be 'csv' or 'json'.
+
*return_type=&lt;return type&gt; (required). It can be 'csv' or 'json'.
 
*other=&lt;serialized parameters&gt; (optional):
 
*other=&lt;serialized parameters&gt; (optional):
 
:*&lt;action_name&gt; (optional)
 
:*&lt;action_name&gt; (optional)
Line 815: Line 765:
  
 
=====Examples=====
 
=====Examples=====
  http://localhost/pandora_console/include/api.php?op=get&op2=alert_actions&apipass=1234&user=admin&pass=pandora&other=Create|&other_mode=url_encode_separator_|&return_type=json
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=get&op2=alert_actions&apipass=1234&user=admin&pass=pandora&other=Create|&other_mode=url_encode_separator_|&return_type=json</nowiki>
  
 
====get alert_actions_meta====
 
====get alert_actions_meta====
 +
 
{{metaconsole}}
 
{{metaconsole}}
 
List of node alert actions from Metaconsole.
 
List of node alert actions from Metaconsole.
Line 824: Line 775:
 
*op=get (required)
 
*op=get (required)
 
*op2=alert_actions_meta (required)
 
*op2=alert_actions_meta (required)
*return_type=&lt;return type&gt; (required) which can be 'csv' o 'json'.
+
*return_type=&lt;return type&gt; (required). It can be 'csv' o 'json'.
 
*other=&lt;serialized parameters&gt; (optional):
 
*other=&lt;serialized parameters&gt; (optional):
 
:*&lt;server_name&gt; (optional)
 
:*&lt;server_name&gt; (optional)
Line 831: Line 782:
  
 
=====Examples=====
 
=====Examples=====
  http://localhost/pandora_console/include/api.php?op=get&op2=alert_actions&apipass=1234&user=admin&pass=pandora&other=Create|&other_mode=url_encode_separator_|&return_type=json
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=get&op2=alert_actions_meta&apipass=1234&user=admin&pass=pandora&other=nodo|Create|&other_mode=url_encode_separator_|&return_type=json</nowiki>
  
====get event_info====
 
Return all of event data. This event is selected by id in the id parameter.
 
  
{{metaconsole}}
+
====get all_alert_commands====
 +
It returns all the alert commands.
  
 
Call syntax:
 
Call syntax:
 
*op=get (required)
 
*op=get (required)
*op2=event_info (required)
+
*op2=all_alert_commands (required)
*id=&lt;id_event&gt; (required)
+
*other=cvs_separator(optional)
  
 
=====Examples=====
 
=====Examples=====
  http://127.0.0.1/pandora_console/include/api.php?op=get&op2=event_info&id=80&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=get&op2=all_alert_commands&return_type=csv&other=$&apipass=1234&user=admin&pass=pandora</nowiki>
  
====get tactical_view====
 
  
Returns the next values list (this values you can see in the tactical page in Pandora Console)
+
====get event_info====
* monitor_checks
+
It returns all event data by typing in the event id.
 +
 
 +
 
 +
{{metaconsole}}
 +
 
 +
Call syntax:
 +
*op=get (required)
 +
*op2=event_info (required)
 +
*id=&lt;id_event&gt; (required)
 +
 
 +
=====Examples=====
 +
<nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=event_info&id=80&apipass=1234&user=admin&pass=pandora</nowiki>
 +
 
 +
====get tactical_view====
 +
 
 +
It returns the following value list (this values can be seen in the tactical page in Pandora FMS Console)
 +
* monitor_checks
 
* monitor_not_init
 
* monitor_not_init
 
* monitor_unknown
 
* monitor_unknown
Line 883: Line 848:
  
 
=====Example=====
 
=====Example=====
  http://localhost/pandora_console/include/api.php?op=get&op2=tactical_view&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=get&op2=tactical_view&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====get pandora_servers====
 
====get pandora_servers====
 
>= 5.0
 
>= 5.0
  
Returns the list of pandora servers.
+
It returns the list of Pandora FMS servers.
  
call syntax:
+
Call syntax:
 
*op=get (required)
 
*op=get (required)
 
*op2=pandora_servers (required)
 
*op2=pandora_servers (required)
Line 897: Line 862:
  
 
=====Example=====
 
=====Example=====
  http://localhost/pandora_console/include/api.php?op=get&op2=pandora_servers&return_type=csv&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=get&op2=pandora_servers&return_type=csv&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
It returns the fields in this order:
 
It returns the fields in this order:
Line 915: Line 880:
 
>= 5.0
 
>= 5.0
  
Translate the name of custom field to the id in the data base.
+
It translates the name of custom field into the id in the data base.
  
 
Call syntax:
 
Call syntax:
 
*op=get (required)
 
*op=get (required)
 
*op2=custom_field_id (required)
 
*op2=custom_field_id (required)
*other=&lt;serialized parameters&gt; (required) in this case custom field name
+
*other=&lt;serialized parameters&gt; (required). In this case, custom field name.
 
:*&lt;name&gt; (required)
 
:*&lt;name&gt; (required)
  
 
=====Example=====
 
=====Example=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=get&op2=custom_field_id&other=mycustomfield&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=custom_field_id&other=mycustomfield&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====get gis_agent====
 
====get gis_agent====
 
>= 5.0
 
>= 5.0
  
Return the last gis agent data.
+
It returns the last GIS agent data.
  
 
Call syntax:
 
Call syntax:
 
*op=set (required)
 
*op=set (required)
 
*op2=gis_agent (required)
 
*op2=gis_agent (required)
*id=<index> (required) agent index.
+
*id=<index> (required). It must be an agent index.
  
 
=====Example=====
 
=====Example=====
  
http://localhost/pandora_console/include/api.php?apipass=1234&user=admin&pass=pandora&op=get&op2=gis_agent&id=1
+
<nowiki>http://localhost/pandora_console/include/api.php?apipass=1234&user=admin&pass=pandora&op=get&op2=gis_agent&id=1</nowiki>
  
 
====get special_days====
 
====get special_days====
 
>= 5.1
 
>= 5.1
  
Return special day's list.
+
It returns special day's list.
  
 
Call syntax:
 
Call syntax:
Line 950: Line 915:
 
*op=get (required)
 
*op=get (required)
 
*op2=special_days (required)
 
*op2=special_days (required)
*other=<csv separator> (optional) CSV separator
+
*other=<csv separator> (optional). CSV separator
  
 
=====Example=====
 
=====Example=====
  
  http://127.0.0.1/pandora_console/include/api.php?apipass=1234&user=admin&pass=pandora&op=get&op2=special_days
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?apipass=1234&user=admin&pass=pandora&op=get&op2=special_days</nowiki>
  
 
====get module_properties====
 
====get module_properties====
 
>= 5.1SP2
 
>= 5.1SP2
  
Returns a list of module properties. The list could be filtered by the parameter.
+
It returns a list of module properties. The list could be filtered by parameter.
  
 
Call Syntax:
 
Call Syntax:
Line 965: Line 930:
 
*op2=module_properties (required)
 
*op2=module_properties (required)
 
*id=module-id (required)
 
*id=module-id (required)
*return_type=&lt;return kind&gt; (required) that could be 'csv' or 'csv_head'.
+
*return_type=&lt;return kind&gt; (required). That could be 'csv' or 'csv_head'.
*other=&lt;string or serialized parameters&gt; (optional) in this case could be the divider or a parameter list in order and separated by the divider character. We are going to examine the two cases:  
+
*other=&lt;string or serialized parameters&gt; (optional). In this case, it could be the divider or a parameter list ordered and separated by the divider character. Both cases are exposed:  
  
::*&lt;separator&gt; The divider "yes" of the 'csv'.
+
::*&lt;separator&gt;. The divider "yes" of the 'csv'.
::*&lt;separator csv&gt;|&lt;character that replaces the CR|&lt;fields 1&gt;,&lt;fields 2&gt;,&lt;fields N&gt;it will compose the following parameters in order( the divider character '|' could be specified in "other_mode"):
+
::*&lt;separator csv&gt;|&lt;. Character that replaces the CR|&lt;fields 1&gt;,&lt;fields 2&gt;,&lt;fields N&gt;. It will make up the following parameters in order (the divider character '|' could be specified in "other_mode"):
:::*&lt;separator csv&gt;: divider of the fields in the CSV.
+
:::*&lt;separator csv&gt;. Field divider in the CSV.
:::*&lt;character that replaces the CR&gt; character that will be replaced if it finds in any returned character the character RC in order to avoid the ambiguity with the standard use of the RC character to specify registers/files in the CSV. If you pass an string in other, the substitute character is the blank space.
+
:::*&lt;character that replaces the CR&gt;. Character that will be replaced if it finds in any returned character the character RC, in order to avoid the ambiguity with the standard use of the RC character to specify registers/files in the CSV. If you make a string go through other, the replacing character is the blank space.
:::*&lt;fields 1&gt;,&lt;fields2&gt;,&lt;fields N&gt; :the fields to output in CSV are:  
+
:::*&lt;fields 1&gt;,&lt;fields2&gt;,&lt;fields N&gt;. The fields to output in CSV are:  
::::*module_id_agent_modulo
+
::::*module_id_agent_module
 
::::*module_id_agent
 
::::*module_id_agent
 
::::*module_id_module_type
 
::::*module_id_module_type
Line 1,025: Line 990:
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=get&op2=module_properties&id=6233&return_type=csv&other=;&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=module_properties&id=6233&return_type=csv&other=;&apipass=1234&user=admin&pass=pandora</nowiki>
  http://127.0.0.1/pandora_console/include/api.php?op=get&op2=module_properties&id=1103&return_type=csv&other=;|%20|module_id_agent_module,module_id_module_type,module_name,module_last_try,module_state&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=module_properties&id=1103&return_type=csv&other=;|%20|module_id_agent_module,module_id_module_type,module_name,module_last_try,module_state&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====get module_properties_by_name====
 
====get module_properties_by_name====
 
>= 5.1SP2
 
>= 5.1SP2
  
Returns a list of module properties. The list could be filtered by the parameter.
+
It returns a list of module properties. The list could be filtered by parameter.
  
 
Call Syntax:
 
Call Syntax:
Line 1,038: Line 1,003:
 
*id=agent_name (required)
 
*id=agent_name (required)
 
*id2=agentmodule_name (required)
 
*id2=agentmodule_name (required)
*return_type=&lt;return kind&gt; (required) that could be 'csv' or 'csv_head'.
+
*return_type=&lt;return kind&gt; (required). That could be 'csv' or 'csv_head'.
*other=&lt;string or serialized parameters&gt; (optional) in this case could be the divider or a parameter list in order and separated by the divider character. (the same as 'get module_properties'. For details, see 'get module_properties')
+
*other=&lt;string or serialized parameters&gt; (optional). In this case, it could be the divider or a parameter list in order and separated by the divider character. (the same as 'get module_properties'. For details, see 'get module_properties')
  
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=get&op2=module_properties_by_name&id=my_agent&id2=my_module&return_type=csv&other=;&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=module_properties_by_name&id=my_agent&id2=my_module&return_type=csv&other=;&apipass=1234&user=admin&pass=pandora</nowiki>
  http://127.0.0.1/pandora_console/include/api.php?op=get&op2=module_properties_by_name&id=my_agent&id2=my_module&return_type=csv&other=;|%20|module_id_agent_module,module_id_module_type,module_type,module_name,module_last_try,module_state&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=module_properties_by_name&id=my_agent&id2=my_module&return_type=csv&other=;|%20|module_id_agent_module,module_id_module_type,module_type,module_name,module_last_try,module_state&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====get module_properties_by_alias====
 
====get module_properties_by_alias====
 
>= 7.0NG
 
>= 7.0NG
  
Returns a list of module properties. The list could be filtered by the parameter.
+
It returns a list of module properties. The list could be filtered by parameter.
  
 
Call Syntax:
 
Call Syntax:
Line 1,056: Line 1,021:
 
*id=agent_alias (required)
 
*id=agent_alias (required)
 
*id2=agentmodule_name (required)
 
*id2=agentmodule_name (required)
*return_type=&lt;return kind&gt; (required) that could be 'csv' or 'csv_head'.
+
*return_type=&lt;return kind&gt; (required). That could be 'csv' or 'csv_head'.
*other=&lt;string or serialized parameters&gt; (optional) in this case could be the divider or a parameter list in order and separated by the divider character. (the same as 'get module_properties'. For details, see 'get module_properties')
+
*other=&lt;string or serialized parameters&gt; (optional). In this case, it could be the divider or a parameter list ordered and separated by the divider character (the same as 'get module_properties'. For details, see 'get module_properties').
  
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=get&op2=module_properties_by_alias&id=pandorafms&id2=Memory_Used&return_type=csv&other=;&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=module_properties_by_alias&id=pandorafms&id2=Memory_Used&return_type=csv&other=;&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====get module_graph====
 
====get module_graph====
 
>= 6.0
 
>= 6.0
  
Returns a module graph encoded with base64.
+
It returns a module graph encoded with base64.
  
 
Call Syntax:
 
Call Syntax:
Line 1,076: Line 1,041:
 
=====Examples=====
 
=====Examples=====
  
  http://localhost/pandora_console/include/api.php?op=get&op2=module_graph&id=5&other=3600%7C1&other_mode=url_encode_separator_%7C&apipass=1234&api=1&user=admin&pass=pandora
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=get&op2=module_graph&id=5&other=3600%7C1&other_mode=url_encode_separator_%7C&apipass=1234&api=1&user=admin&pass=pandora</nowiki>
  
 
====get all_planned_downtimes====
 
====get all_planned_downtimes====
 
>= 5.1
 
>= 5.1
  
Return all matches of planned downtime.
+
It returns all matches of planned downtime.
  
 
op=get
 
op=get
 
op2=all_planned_downtimes
 
op2=all_planned_downtimes
 
return_type=csv
 
return_type=csv
other=<name> <group> <type_downtime> <type_execution> <type_periodicity> (for filter)
+
other=<name> <group> <type_downtime> <type_execution> <type_periodicity> (for filtering)
  
  
Line 1,092: Line 1,057:
 
=====Example=====
 
=====Example=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=get&op2=all_planned_downtimes&other=test|0|quiet|periodically|weekly&other_mode=url_encode_separator_|&return_type=json&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=all_planned_downtimes&other=test|0|quiet|periodically|weekly&other_mode=url_encode_separator_|&return_type=json&apipass=1234&user=admin&pass=pandora</nowiki>
  http://127.0.0.1/pandora_console/include/api.php?op=get&op2=all_planned_downtimes&other=test|0|quiet|periodically|weekly&other_mode=url_encode_separator_|&return_type=csv&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=all_planned_downtimes&other=test|0|quiet|periodically|weekly&other_mode=url_encode_separator_|&return_type=csv&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====get planned_downtimes_items====
 
====get planned_downtimes_items====
 
>= 5.1
 
>= 5.1
  
Return all matches of planned downtime items.
+
It returns all matches of planned downtime items.
  
 
op=get
 
op=get
Line 1,107: Line 1,072:
 
=====Example=====
 
=====Example=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=get&op2=planned_downtimes_items&other=test|0|quiet|periodically|weekly&other_mode=url_encode_separator_|&return_type=json&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=planned_downtimes_items&other=test|0|quiet|periodically|weekly&other_mode=url_encode_separator_|&return_type=json&apipass=1234&user=admin&pass=pandora</nowiki>
  http://127.0.0.1/pandora_console/include/api.php?op=get&op2=planned_downtimes_items&other=test|0|quiet|periodically|weekly&other_mode=url_encode_separator_|&return_type=csv&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=planned_downtimes_items&other=test|0|quiet|periodically|weekly&other_mode=url_encode_separator_|&return_type=csv&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====get id_group_agent_by_name====
 
====get id_group_agent_by_name====
 
>= 5.1
 
>= 5.1
  
Return the group id of an agent.
+
It returns the group id of an agent.
  
 
Call Syntax:
 
Call Syntax:
Line 1,119: Line 1,084:
 
* op=get
 
* op=get
 
* op2=id_group_agent_by_name
 
* op2=id_group_agent_by_name
* other=<string or serialized parameters> Agent name and filtering parameters (optional)
+
* other=<string or serialized parameters>. Agent name and filtering parameters (optional).
 
:* <agent_name>
 
:* <agent_name>
  
 
=====Example=====
 
=====Example=====
  http://127.0.0.1/pandora_console/include/api.php?apipass=1234&user=admin&pass=pandora&op=get&op2=id_group_agent_by_name&other_mode=url_encode_separator_|&other=192.168.50.40
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?apipass=1234&user=admin&pass=pandora&op=get&op2=id_group_agent_by_name&other_mode=url_encode_separator_|&other=192.168.50.40</nowiki>
  
 
====get id_group_agent_by_alias====
 
====get id_group_agent_by_alias====
 
>= 7.0NG
 
>= 7.0NG
  
Return the group id of an agent.
+
It returns the group id of an agent.
  
 
Call Syntax:
 
Call Syntax:
Line 1,134: Line 1,099:
 
* op=get
 
* op=get
 
* op2=id_group_agent_by_alias
 
* op2=id_group_agent_by_alias
* other=<string or serialized parameters> Agent alias and filtering parameters (optional)
+
* other=<string or serialized parameters>. Agent alias and filtering parameters (optional)
 
:* <agent_alias>
 
:* <agent_alias>
  
 
=====Example=====
 
=====Example=====
  http://127.0.0.1/pandora_console/include/api.php?apipass=1234&user=admin&pass=pandora&op=get&op2=id_group_agent_by_alias&other_mode=url_encode_separator_%7C&other=pandorafms
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?apipass=1234&user=admin&pass=pandora&op=get&op2=id_group_agent_by_alias&other_mode=url_encode_separator_%7C&other=pandorafms</nowiki>
  
 
====get group_agent_by_name====
 
====get group_agent_by_name====
 
>= 5.1
 
>= 5.1
  
Return the group name for a agent.
+
It returns the group name for a agent.
  
 
Call Syntax:
 
Call Syntax:
Line 1,153: Line 1,118:
  
 
=====Example=====
 
=====Example=====
  http://127.0.0.1/pandora_console/include/api.php?apipass=1234&user=admin&pass=pandora&op=get&op2=group_agent_by_name&other_mode=url_encode_separator_|&other=192.168.50.40
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?apipass=1234&user=admin&pass=pandora&op=get&op2=group_agent_by_name&other_mode=url_encode_separator_|&other=192.168.50.40</nowiki>
  
 
====get group_agent_by_alias====
 
====get group_agent_by_alias====
 
>= 7.0NG
 
>= 7.0NG
  
Return the group name for a agent.
+
It returns the group name for an agent.
  
 
Call Syntax:
 
Call Syntax:
Line 1,164: Line 1,129:
 
* op=get
 
* op=get
 
* op2=group_agent_by_alias
 
* op2=group_agent_by_alias
* other=<string or serialized parameters> Agent alias and filtering parameters (optional).
+
* other=<string or serialized parameters>. Agent alias and filtering parameters (optional).
 
:* <agent_alias>
 
:* <agent_alias>
  
 
=====Example=====
 
=====Example=====
  http://127.0.0.1/pandora_console/include/api.php?apipass=1234&user=admin&pass=pandora&op=get&op2=group_agent_by_alias&other_mode=url_encode_separator_%7C&other=pandorafms
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?apipass=1234&user=admin&pass=pandora&op=get&op2=group_agent_by_alias&other_mode=url_encode_separator_%7C&other=pandorafms</nowiki>
 
 
  
 
====get group_id_by_name====
 
====get group_id_by_name====
 
>= 7.0NG
 
>= 7.0NG
  
Returns the group id from the name.
+
It returns the group id from the name.
  
 
Call syntax:
 
Call syntax:
Line 1,184: Line 1,148:
  
 
=====Example=====
 
=====Example=====
  http://127.0.0.1/pandora_console/include/api.php?apipass=1234&user=admin&pass=pandora&op=get&op2=group_id_by_name&other=Servers
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?apipass=1234&user=admin&pass=pandora&op=get&op2=group_id_by_name&other=Servers</nowiki>
  
====get get_timezone====
+
====get_timezone====
 
>= 7.0NG
 
>= 7.0NG
  
Returns the timezone with which pandora is configured.
+
It returns the timezone with which pandora is configured.
  
 
Call syntax:
 
Call syntax:
Line 1,196: Line 1,160:
  
 
=====Example=====
 
=====Example=====
  http://127.0.0.1/pandora_console/include/api.php?apipass=1234&user=admin&pass=pandora&op=get&op2=timezone
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?apipass=1234&user=admin&pass=pandora&op=get&op2=timezone</nowiki>
  
 
====get cluster_status====
 
====get cluster_status====
 
>= 7.0
 
>= 7.0
  
Returns the cluster status by id
+
It returns the cluster status by id
  
 
*op=get
 
*op=get
Line 1,207: Line 1,171:
 
*id=cluster id
 
*id=cluster id
  
   http://127.0.0.1/pandora_console/include/api.php?op=get&op2=cluster_status&id=1&apipass=1234&user=admin&pass=pandora
+
   <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=cluster_status&id=1&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====get cluster_id_by_name====
 
====get cluster_id_by_name====
 
>= 7.0
 
>= 7.0
  
Returns the id of the cluster by name
+
It returns the id of the cluster by name
  
 
*op=get
 
*op=get
Line 1,218: Line 1,182:
 
*id=cluster name
 
*id=cluster name
  
   http://127.0.0.1/pandora_console/include/api.php?op=get&op2=cluster_id_by_name&id=paco&apipass=1234&user=admin&pass=pandora
+
   <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=cluster_id_by_name&id=paco&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====get agents_id_name_by_cluster_id====
 
====get agents_id_name_by_cluster_id====
 
>= 7.0
 
>= 7.0
  
Returns the id => cluster agents names by the cluster id
+
It returns the id => cluster agents names by cluster id
  
 
*op=get
 
*op=get
Line 1,229: Line 1,193:
 
*id=cluster id
 
*id=cluster id
  
   http://127.0.0.1/pandora_console/include/api.php?op=get&op2=agents_id_name_by_cluster_id&id=1&apipass=1234&user=admin&pass=pandora
+
   <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=agents_id_name_by_cluster_id&id=1&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====get agents_id_name_by_cluster_name====
 
====get agents_id_name_by_cluster_name====
 
>= 7.0
 
>= 7.0
Returns the id => cluster agents names by the cluster name
+
It returns the id => cluster agents names by cluster name
  
 
*op=get
 
*op=get
Line 1,239: Line 1,203:
 
*id=cluster id
 
*id=cluster id
  
   http://127.0.0.1/pandora_console/include/api.php?op=get&op2=agents_id_name_by_cluster_name&id=paco&apipass=1234&user=admin&pass=pandora
+
   <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=agents_id_name_by_cluster_name&id=paco&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====get modules_id_name_by_cluster_id====
 
====get modules_id_name_by_cluster_id====
 
>= 7.0
 
>= 7.0
  
Returns the id => all the module names of the cluster agents by the cluster id
+
It returns the id => all the module names of the cluster agents by cluster id
  
 
*op=get
 
*op=get
Line 1,250: Line 1,214:
 
*id=cluster id
 
*id=cluster id
  
   http://127.0.0.1/pandora_console/include/api.php?op=get&op2=modules_id_name_by_cluster_id&id=1&apipass=1234&user=admin&pass=pandora
+
   <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=modules_id_name_by_cluster_id&id=1&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====get modules_id_name_by_cluster_name====
 
====get modules_id_name_by_cluster_name====
 
>= 7.0
 
>= 7.0
  
Returns the id => all the module names of the cluster agents by the cluster name
+
It returns the id => all the module names of the cluster agents by cluster name
  
 
*op=get
 
*op=get
Line 1,261: Line 1,225:
 
*id=cluster name
 
*id=cluster name
  
   http://127.0.0.1/pandora_console/include/api.php?op=get&op2=modules_id_name_by_cluster_name&id=paco&apipass=1234&user=admin&pass=pandora
+
   <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=modules_id_name_by_cluster_name&id=paco&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====get cluster_items====
 
====get cluster_items====
 
>= 7.0
 
>= 7.0
  
Returns the items of a json object with the format: item id => (name,id,module_agent,type,pcrit,pwarn), by the cluster id
+
It returns the items of a json object with the format: item id => (name,id,module_agent,type,pcrit,pwarn), by cluster id
  
 
pcrit: % for the critic state if its AA or 1 o 0 if its AP
 
pcrit: % for the critic state if its AA or 1 o 0 if its AP
Line 1,276: Line 1,240:
 
*id=cluster id
 
*id=cluster id
  
   http://127.0.0.1/pandora_console/include/api.php?op=get&op2=cluster_items&id=1&apipass=1234&user=admin&pass=pandora
+
   <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=cluster_items&id=1&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====get policy====
 
====get policy====
 
>= 7.0NG. 725
 
>= 7.0NG. 725
  
Returns all data from a policy. If no policy id is specified, it will return all data from all policies.
+
It returns all data from a policy. If no policy id is specified, it will return all data from all policies.
  
  
Line 1,289: Line 1,253:
 
* op2=policy
 
* op2=policy
 
* id=id_policy (optional)
 
* id=id_policy (optional)
* return_type=(json, csv, string).
+
* return_type=(json, csv, string)
  
 
=====Example=====
 
=====Example=====
  http://localhost/pandora_console/include/api.php?op=get&op2=policy&apipass=1234&user=admin&pass=pandora&return_type=json.
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=get&op2=policy&apipass=1234&user=admin&pass=pandora&return_type=json.</nowiki>
  
 
====get collections_policy====
 
====get collections_policy====
 
>= 7.0NG. 725
 
>= 7.0NG. 725
  
Returns all colections of a policy. If no policy id is specified, it returns all colections of all policies.
+
It returns all policy colections. If no policy id is specified, it returns all policy colections.
  
  
Line 1,305: Line 1,269:
 
* op2=collections_policy
 
* op2=collections_policy
 
* id=id_policy (optional)
 
* id=id_policy (optional)
* return_type=(json, csv, string).
+
* return_type=(json, csv, string)
  
 
=====Example=====
 
=====Example=====
  http://localhost/pandora_console/include/api.php?op=get&op2=collections_policy&apipass=1234&user=admin&pass=pandora&return_type=json.
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=get&op2=collections_policy&apipass=1234&user=admin&pass=pandora&return_type=json.</nowiki>
  
 
====get plugins_policy====
 
====get plugins_policy====
 
>= 7.0NG. 725
 
>= 7.0NG. 725
  
Returns all plugins of a policy. If no policy id is specified, it returns all plugins of all policies.
+
It returns all policy plugins. If no policy id is specified, it returns all policy plugins.
  
 
Call syntax:
 
Call syntax:
Line 1,323: Line 1,287:
  
 
=====Example=====
 
=====Example=====
  http://localhost/pandora_console/include/api.php?op=get&op2=plugins_policy&apipass=1234&user=admin&pass=pandora&return_type=json.
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=get&op2=plugins_policy&apipass=1234&user=admin&pass=pandora&return_type=json.</nowiki>
  
 
====get inventory_policy====
 
====get inventory_policy====
 
>= 7.0NG. 725
 
>= 7.0NG. 725
  
Returns all inventory modules of a policy. If no policy id is specified, it returns all inventory modules of all policies.
+
It returns all inventory modules of a policy. If no policy id is specified, it returns all inventory modules of all policies.
  
  
Line 1,336: Line 1,300:
 
* op2=inventory_policy
 
* op2=inventory_policy
 
* id=id_policy (optional)
 
* id=id_policy (optional)
* return_type=(json, csv, string).
+
* return_type=(json, csv, string)
  
 
=====Example=====
 
=====Example=====
  http://localhost/pandora_console/include/api.php?op=get&op2=inventory_policy&apipass=1234&user=admin&pass=pandora&return_type=json&id=2
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=get&op2=inventory_policy&apipass=1234&user=admin&pass=pandora&return_type=json&id=2</nowiki>
  
 
====get unlinking_policy====
 
====get unlinking_policy====
 
>= 7.0NG. 725
 
>= 7.0NG. 725
  
Returns all unlinked modules of a policy. If no policy id is specified, it returns all unlinked modules of all policies.
+
It returns all unlinked modules of a policy. If no policy id is specified, it returns all unlinked modules of all policies.
  
  
Line 1,352: Line 1,316:
 
* op2=unlinking_policy
 
* op2=unlinking_policy
 
* id=id_policy(optional)
 
* id=id_policy(optional)
* return_type=(json, csv, string).
+
* return_type=(json, csv, string)
  
 
=====Example=====
 
=====Example=====
  http://localhost/pandora_console/include/api.php?op=get&op2=unlinking_policy&apipass=1234&user=admin&pass=pandora&return_type=json.
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=get&op2=unlinking_policy&apipass=1234&user=admin&pass=pandora&return_type=json.</nowiki>
  
 
====get alerts_policy====
 
====get alerts_policy====
 
>= 7.0NG. 725
 
>= 7.0NG. 725
  
Returns the alerts of a policy, taking into account:
+
It returns the alerts of a policy, taking into account:
  
 
* If a policy id is specified, it returns the alerts of that policy. If not, it returns all alerts of all policies.  
 
* If a policy id is specified, it returns the alerts of that policy. If not, it returns all alerts of all policies.  
* If the type of alert is specified:(three options).
+
* If the type of alert is specified: (three options).
 
** 0: it shows all by default.
 
** 0: it shows all by default.
 
** 1: Shows only the normal alerts.
 
** 1: Shows only the normal alerts.
Line 1,372: Line 1,336:
 
* op=get
 
* op=get
 
* op2=alerts_policy
 
* op2=alerts_policy
* id=id_policy(optional).
+
* id=id_policy(optional)
 
* id2= 0:all(by default), 1:normal, 2:external.
 
* id2= 0:all(by default), 1:normal, 2:external.
* return_type=(json, csv, string).
+
* return_type=(json, csv, string)
  
 
=====Example=====
 
=====Example=====
  http://localhost/pandora_console/include/api.php?op=get&op2=alerts_policy&apipass=1234&user=admin&pass=pandora&return_type=json&id2=2.
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=get&op2=alerts_policy&apipass=1234&user=admin&pass=pandora&return_type=json&id2=2.</nowiki>
  
 
====get alerts_actions_policy====
 
====get alerts_actions_policy====
 
>= 7.0NG. 725
 
>= 7.0NG. 725
  
Returns all actions of the alerts of a policy, taking into account:
+
It returns all actions of the alerts of a policy, taking into account:
  
 
* If a policy id is specified, it returns the actions of the alerts of that policy. If not, it returns all the actions of all the alerts of all policies.  
 
* If a policy id is specified, it returns the actions of the alerts of that policy. If not, it returns all the actions of all the alerts of all policies.  
 
* If an alert id is specified, it returns the action of that alert.
 
* If an alert id is specified, it returns the action of that alert.
  
Sintaxis de la llamada:
+
Call syntax:
  
 
* op = get
 
* op = get
 
* op2 = alerts_actions_policy
 
* op2 = alerts_actions_policy
* id = id_policy(optional).
+
* id = id_policy(optional)
* id2 = id_policy_alert(optional).
+
* id2 = id_policy_alert(optional)
* return_type=(json, csv, string).
+
* return_type=(json, csv, string)
  
 
=====Example=====
 
=====Example=====
  http://localhost/pandora_console/include/api.php?op=get&op2=alerts_actions_policy&apipass=1234&user=admin&pass=pandora&return_type=json&id=1&id2=3
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=get&op2=alerts_actions_policy&apipass=1234&user=admin&pass=pandora&return_type=json&id=1&id2=3</nowiki>
  
 
====get agents_policy====
 
====get agents_policy====
 
>= 7.0NG. 725
 
>= 7.0NG. 725
  
Returns all agent of a policy. If no policy id is specified, it returns all agents of all policies.
+
It returns all policy agents. If no policy id is specified, it returns all agents of all policies.
 
   
 
   
  
Line 1,409: Line 1,373:
 
* op2 = agents_policy
 
* op2 = agents_policy
 
* id = id_policy(optional)
 
* id = id_policy(optional)
* return_type = (json, csv, string).
+
* return_type = (json, csv, string)
  
 
=====Example=====
 
=====Example=====
  http://localhost/pandora_console/include/api.php?op=get&op2=agents_policy&apipass=1234&user=admin&pass=pandora&return_type=json.
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=get&op2=agents_policy&apipass=1234&user=admin&pass=pandora&return_type=json.</nowiki>
  
 
====get groups_policy====
 
====get groups_policy====
 
>= 7.0NG. 725
 
>= 7.0NG. 725
  
Returns all groups of a policy. If no policy id is specified, it returns all groups of all policies.
+
It returns all groups of a policy. If no policy id is specified, it returns all groups of all policies.
  
 
Call syntax:
 
Call syntax:
Line 1,424: Line 1,388:
 
* op2 = groups_policy
 
* op2 = groups_policy
 
* id = id_policy(optional)
 
* id = id_policy(optional)
* return_type = (json, csv, string).
+
* return_type = (json, csv, string)
  
 
=====Example=====
 
=====Example=====
  http://localhost/pandora_console/include/api.php?op=get&op2=groups_policy&apipass=1234&user=admin&pass=pandora&return_type=json&id=2
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=get&op2=groups_policy&apipass=1234&user=admin&pass=pandora&return_type=json&id=2</nowiki>
  
 
====get queue_policy====
 
====get queue_policy====
 
>= 7.0NG. 725
 
>= 7.0NG. 725
  
Returns the queue of a policy. If no id policy is specified, its returns all queues of all policies.
+
It returns the queue of a policy. If no id policy is specified, its returns all queues of all policies.
  
 
Call syntax:
 
Call syntax:
Line 1,439: Line 1,403:
 
* op2 = queue_policy
 
* op2 = queue_policy
 
* id = id_policy(optional)
 
* id = id_policy(optional)
* return_type = (json, csv, string).
+
* return_type = (json, csv, string)
  
 
=====Example=====
 
=====Example=====
  http://localhost/pandora_console/include/api.php?op=get&op2=queue_policy&apipass=1234&user=admin&pass=pandora&return_type=json
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=get&op2=queue_policy&apipass=1234&user=admin&pass=pandora&return_type=json</nowiki>
  
 
====get traps====
 
====get traps====
 
>= 7.0NG. 728
 
>= 7.0NG. 728
  
Returns the specified source traps, you can also filter by timestamp and other data.
+
It returns the specified source traps, they can also be filtered by timestamp and other data.
  
 
Call syntax:
 
Call syntax:
Line 1,461: Line 1,425:
  
 
=====Example=====
 
=====Example=====
  https://localhost/pandora_console/include/api.php?op=get&op2=traps&other=1537128000%7C9000%7C0%7C1%7C.1.2.3.6.4&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora
+
  <nowiki>https://localhost/pandora_console/include/api.php?op=get&op2=traps&other=1537128000%7C9000%7C0%7C1%7C.1.2.3.6.4&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====get event_responses====
 
====get event_responses====
  
Returns the response list of events the user has access to in Pandora FMS.
+
It returns the response list of events the user has access to in Pandora FMS.
  
 
Call syntax:
 
Call syntax:
Line 1,476: Line 1,440:
 
This example will return all system event responses in csv format.
 
This example will return all system event responses in csv format.
  
  http://localhost/pandora_console/include/api.php?op=get&op2=event_responses&return_type=csv&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=get&op2=event_responses&return_type=csv&apipass=1234&user=admin&pass=pandora</nowiki>
  
====get user_profiles_info====
+
====get users====
  
Returns the list of Pandora FMS' user profiles.
+
It returns the list of Pandora FMS users.
  
 
Call syntax:
 
Call syntax:
 
*op=get (required)
 
*op=get (required)
*op2=user_profiles_info (required)
+
*op2=users (required)
 
*return_type=csv|json (required)
 
*return_type=csv|json (required)
  
 
=====Example=====
 
=====Example=====
  
This example will return all system user profiles in json format.
+
This example will return all users in csv format.
  
  http://localhost/pandora_console/include/api.php?op=get&op2=user_profiles_info&return_type=json&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=get&op2=users&return_type=csv&apipass=1234&user=admin&pass=pandora&other_mode=url_encode_separator_&</nowiki>
  
====get migrate_agent====
+
====get list all user====
>= 7.21 ONLY METACONSOLE
+
{{metaconsole}}
  
Looks up if an especific agent existis en de migration queue, returning the data of  tmigration_queue
+
It lists all Pandora FMS users.
  
*op=get
+
Call syntax:
*op2=migrate_agent
+
*op=get (required)
*id=id_agente a migrar
+
*op2=list_all_user(required)
*return_type = string, json, etc
+
*return_type=csv|json (required)
  
 
=====Example=====
 
=====Example=====
 +
It can return Json or CSV, this return is remarked through the URL.
 +
Only the type of return is remarked, it does not use any specific variable
 +
 +
<nowiki>http://localhost/pandora_console/include/api.php?op=get&op2=list_all_user&return_type=json&apipass=1234&user=admin&pass=pandora</nowiki>
  
  http://127.0.0.1/pandora_console/include/api.php?op=get&op2=migrate_agent&apipass=1234&user=admin&pass=pandora&id=2&return_type=json
+
====get info user name====
 +
{{metaconsole}}
 +
 
 +
It lists user data.
 +
 
 +
Call syntax:
 +
*op=get (required)
 +
*op2=list_all_user(required)
 +
*return_type=csv|json (required)
 +
*other= usernarme (requiered)
 +
 
 +
=====Example=====
 +
It obtains all the information about a specific user.
 +
It can return Json or CSV. This return is specified through the URL.
 +
Only the username is used to obtain said information:
 +
   
 +
<nowiki>http://localhost/pandora_console/include/api.php?op=get&op2=info_user_name&return_type=json&other=admin&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
 +
 
 +
====get user_profiles_info====
 +
 
 +
It returns the list of Pandora FMS user profiles.
 +
 
 +
Call syntax:
 +
*op=get (required)
 +
*op2=user_profiles_info (required)
 +
*return_type=csv|json (required)
 +
 
 +
=====Example=====
 +
 
 +
This example will return all user profiles in json format.
 +
 
 +
<nowiki>http://localhost/pandora_console/include/api.php?op=get&op2=user_profiles_info&return_type=csv&apipass=1234&user=admin&pass=pandora&other_mode=url_encode_separator_&</nowiki>
 +
 
 +
====get migrate_agent====
 +
>= 7.21 ONLY METACONSOLE
 +
 
 +
It looks up whether an especific agent exists in migration queue, returning the data of migration_queue.
 +
 
 +
*op=get
 +
*op2=migrate_agent
 +
*id=id_agente a migrar
 +
*return_type = string, json, etc
 +
 
 +
=====Example=====
 +
 
 +
<nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=migrate_agent&apipass=1234&user=admin&pass=pandora&id=2&return_type=json</nowiki>
  
 
====get language====
 
====get language====
 
>= 7.0NG 730
 
>= 7.0NG 730
  
Returns the language with which Pandora FMS is configured.
+
It returns the language with which Pandora FMS is configured.
  
 
Call syntax:
 
Call syntax:
Line 1,517: Line 1,530:
  
 
=====Example=====
 
=====Example=====
  http://127.0.0.1/pandora_console/include/api.php?apipass=1234&user=admin&pass=pandora&op=get&op2=language
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?apipass=1234&user=admin&pass=pandora&op=get&op2=language</nowiki>
  
 
====get session_timeout====
 
====get session_timeout====
Line 1,523: Line 1,536:
 
>= 7.0NG 730
 
>= 7.0NG 730
  
Returns the session time with which Pandora FMS is configured.
+
It returns the session time with which Pandora FMS is configured.
  
 
Call syntax:
 
Call syntax:
Line 1,531: Line 1,544:
  
 
=====Example=====
 
=====Example=====
  http://127.0.0.1/pandora_console/include/api.php?apipass=1234&user=admin&pass=pandora&op=get&op2=session_timeout
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?apipass=1234&user=admin&pass=pandora&op=get&op2=session_timeout</nowiki>
  
 
====get groups====
 
====get groups====
 
>= 7.0NG 732
 
>= 7.0NG 732
  
Returns the existing groups.
+
It returns the existing groups.
  
 
Call syntax:
 
Call syntax:
Line 1,544: Line 1,557:
 
* other=<optional parameters>:
 
* other=<optional parameters>:
 
:* <csv_separator>: ';' by default.
 
:* <csv_separator>: ';' by default.
:* <return_all_group>: returns the group 'All'.
+
:* <return_all_group>. It returns the group 'All'.
:* <return_all_columns>: returns all columns.
+
:* <return_all_columns>. It returns all columns.
  
 
=====Example=====
 
=====Example=====
  http://127.0.0.1/pandora_console/include/api.php?op=get&op2=groups&other=;%7C1%7C0&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=groups&other=;%7C1%7C0&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora</nowiki>
  
====get inventory_modules====
+
====get filter user group====
 +
{{metaconsole}}
  
{{WIP}}
+
It obtains user groups through filtering.
  
Devuelve la lista de los módulos de inventario de Pandora.
+
Call syntax:
  
Sintaxis de la llamada:
+
* op=get (requiered)
*op=get (obligatorio)
+
* op2=filter_user_group (requiered)
*op2=inventory_modules (obligatorio)
+
* return_type=csv|json(requiered)
*return_type=csv|json (obligatorio)
+
*other= id group(requiered)|Enabled or not(Disabled)(requiered)
  
=====Ejemplos=====
+
=====Example=====
 +
It can return Json or CSV. This return is remarked through the URL.
  
Este ejemplo devolverá información de todos los de inventario del sistema en formato json.
+
{{Warning|Be careful, one of the two variables (group id or Enabled) may be empty, but at least one of them should be filled out.}}
  
  http://localhost/pandora_console/include/api.php?op=get&op2=inventory_modules&return_type=json&apipass=1234&user=admin&pass=pandora
+
   
 +
<nowiki>http://localhost/pandora_console/include/api.php?op=get&op2=filter_user_group&return_type=json&other=0|0&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
===SET===
+
====get inventory_modules====
 
+
It returns the list of Pandora inventory modules.
Send data
+
 
 
+
Call syntax:
====Set new_agent====
+
*op=get (required)
Create a new agent with the data passed as parameters.
+
*op2=inventory_modules (required)
 +
*return_type=csv|json (required)
 +
 
 +
=====Examples=====
 +
 
 +
This example will return information from all of the system's inventories in json format.
 +
 
 +
<nowiki>http://localhost/pandora_console/include/api.php?op=get&op2=inventory_modules&return_type=json&apipass=1234&user=admin&pass=pandora</nowiki>
 +
 
 +
====get list_collections====
 +
It returns the list of all the collections in Pandora FMS.
 +
 
 +
Call syntax:
 +
*op=get (required)
 +
*op2=list_collections (required)
 +
 
 +
=====Examples=====
 +
 
 +
This example will return information from all collections in json format.
 +
 
 +
<nowiki>http://localhost/pandora_console/include/api.php?op=get&op2=list_collections&apipass=1234&user=admin&pass=pandora</nowiki>
 +
 
 +
====get list_collection_files====
 +
It returns the list of all files in a collection. If it does not receive a collection id, it will return all files from all collections.
 +
 
 +
Call syntax:
 +
*op=get (required)
 +
*op2=list_collections_files (required)
 +
*id=id_collection
 +
 
 +
=====Examples=====
 +
 
 +
This example will return the names of all files in a collection in json format.
 +
 
 +
<nowiki>http://localhost/pandora_console/include/api.php?op=get&op2=list_collection_files&id=1&apipass=1234&user=admin&pass=pandora</nowiki>
 +
 
 +
===SET===
 +
 
 +
It sends data.
 +
 
 +
====set new_agent====
 +
It creates a new agent with the data sent as parameters.
  
 
Call syntax:
 
Call syntax:
Line 1,578: Line 1,635:
 
*op=set (required)
 
*op=set (required)
 
*op2=new_agent (required)
 
*op2=new_agent (required)
*other=&lt;serialized parameters&gt; (required).They are the agent configuration and data, serial in the following order:
+
*other=&lt;serialized parameters&gt; (required). They are the agent configuration and data, serialized in the following order:
  
 
:*&lt;agent_alias&gt;
 
:*&lt;agent_alias&gt;
Line 1,597: Line 1,654:
 
=====Example=====
 
=====Example=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=new_agent&other=agente_alias%7C1.1.1.1%7C0%7C4%7C0%7C0%7C300%7C10%7Cpandorafms%7C8%7C10%7C%7Cla%20descripcion%7C1&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=new_agent&other=agente_alias%7C1.1.1.1%7C0%7C4%7C0%7C0%7C300%7C10%7Cpandorafms%7C8%7C10%7C%7Cla%20descripcion%7C1&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
*Note: If ''alias_as_name'' is 1, the agent name will be the same as the alias. If it is 0, the agent name will be automatically generated.
 
*Note: If ''alias_as_name'' is 1, the agent name will be the same as the alias. If it is 0, the agent name will be automatically generated.
  
====Set update_agent====
+
====set update_agent====
Update a new agent with the data passed as parameters.
+
It updates a new agent with data as parameters.
  
 
Call syntax:
 
Call syntax:
Line 1,609: Line 1,666:
 
*op2=update_agent (required)
 
*op2=update_agent (required)
 
*id=&lt;id_agent&gt; (required)
 
*id=&lt;id_agent&gt; (required)
*other=&lt;serialized parameters&gt; (required).They are the agent configuration and data, serial in the following order:
+
*other=&lt;serialized parameters&gt; (required). They are agent configuration and data, serialized in the following order:
  
 
:*&lt;agent_alias&gt;
 
:*&lt;agent_alias&gt;
Line 1,626: Line 1,683:
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?id=5&op=set&op2=update_agent&other=agente_nombre%7C1.1.1.1%7C0%7C4%7C0%7C0%7C30%7C8%7Clocalhost.localdomain%7C%7C0%7C0%7Cla%20descripcion&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?id=5&op=set&op2=update_agent&other=agente_nombre%7C1.1.1.1%7C0%7C4%7C0%7C0%7C30%7C8%7Clocalhost.localdomain%7C%7C0%7C0%7Cla%20descripcion&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====Set delete_agent====
 
====Set delete_agent====
Delete a agent that passed the name as parameter.
+
It deletes an agent that has the name as parameter.
  
 
Call syntax:
 
Call syntax:
 
*op=set (required)
 
*op=set (required)
 
*op2=delete_agent (required)
 
*op2=delete_agent (required)
*id=&lt;name_agent&gt; (required) should be an agent name.
+
*id=&lt;name_agent&gt; (required). It should be an agent name.
  
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=delete_agent&id=agente_erroneo&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=delete_agent&id=agente_erroneo&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set create_module_template====
 
====set create_module_template====
  
Create a alert from a template pass as id parameter, in the module pass as id into other and agent pass as id into the other.
+
It creates an alert from a template as id parameter, in a module chosen by the module id agent id in other.
  
 
Call syntax:
 
Call syntax:
 
*op=set (required)
 
*op=set (required)
 
*op2=create_module_template (required)
 
*op2=create_module_template (required)
*id=&lt;id_template&gt; (required) should be a template id.
+
*id=&lt;id_template&gt; (required). It should be a template id.
 
*other=&lt;id_module&gt;|&lt;id_agent&gt;
 
*other=&lt;id_module&gt;|&lt;id_agent&gt;
  
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=create_module_template&id=1&other=1|10&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=create_module_template&id=1&other=1|10&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set apply_module_template====
 
====set apply_module_template====
  
Apply module template to agent
+
It applies module template to agent.
  
Module template are an agrupation which contain network check modules. This templates can be applied directly to agents, avoiding add modules one by one.
+
Module template is an group which contains network check modules. These templates can be applied directly to agents, avoiding adding modules one by one.
  
 
Call Syntax:
 
Call Syntax:
 
*op=set (required)
 
*op=set (required)
 
*op2=apply_module_template (required)
 
*op2=apply_module_template (required)
*id&lt;id_template&gt; (required) id of the template that will be applied on the module.
+
*id&lt;id_template&gt; (required). Id of the template that will be applied on the module.
*id2&lt;id_agente&gt; (required) id of the agent in which the modules will be created.
+
*id2&lt;id_agente&gt; (required). Id of the agent in which the modules will be created.
  
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=apply_module_template&id=2&id2=2&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=apply_module_template&id=2&id2=2&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set create_network_module====
 
====set create_network_module====
  
Create a network module from the data pass as parameters.
+
It creates a network module from data as parameters.
  
 
Call syntax:
 
Call syntax:
Line 1,678: Line 1,735:
 
*op=set (required)
 
*op=set (required)
 
*op2=create_network_module (required)
 
*op2=create_network_module (required)
*id=&lt;agent_name&gt; (required) should be an agent name.
+
*id=&lt;agent_name&gt; (required). It should be an agent name.
*other=&lt;serialized parameters&gt; (required) are the module configuration and data, serialized in the following order:
+
*other=&lt;serialized parameters&gt; (required). They are module configuration and data, serialized in the following order:
 
:*&lt;name_module&gt;
 
:*&lt;name_module&gt;
 
:*&lt;disabled&gt;
 
:*&lt;disabled&gt;
Line 1,703: Line 1,760:
 
:*&lt;description&gt;
 
:*&lt;description&gt;
 
:*&lt;enable_unknown_events&gt; (only in version 5 or later)
 
:*&lt;enable_unknown_events&gt; (only in version 5 or later)
:*&lt;module_macros&gt; (only in version 5 or later) Should be a base 64 encoded JSON document formed by an object with one property for each macro. The format of the JSON properties should be "<macro name>": "<macro value>".
+
:*&lt;module_macros&gt; (only in version 5 or later). It should be a base64 encoded JSON document made up by an object with one property for each macro. The format of the JSON properties should be "<macro name>": "<macro value>".
 
:*&lt;each_ff&gt; (only in version 5.1 or later)
 
:*&lt;each_ff&gt; (only in version 5.1 or later)
 
:*&lt;ff_threshold_normal&gt; (only in version 5.1 or later)
 
:*&lt;ff_threshold_normal&gt; (only in version 5.1 or later)
Line 1,710: Line 1,767:
 
:*&lt;critical_inverse&gt; (only in version 6.0SP1 or later)
 
:*&lt;critical_inverse&gt; (only in version 6.0SP1 or later)
 
:*&lt;warning_inverse&gt; (only in version 6.0SP1 or later)
 
:*&lt;warning_inverse&gt; (only in version 6.0SP1 or later)
 +
:*&lt;ff_type&gt; (only in version 733 or later)
  
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=create_network_module&id=pepito&other=prueba|0|7|1|10|15|0|16|18|0|15|0|127.0.0.1|0||0|180|0|0|0|0|latency%20ping&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=create_network_module&id=pepito&other=prueba|0|7|1|10|15|0|16|18|0|15|0|127.0.0.1|0||0|180|0|0|0|0|latency%20ping&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set create_plugin_module====
 
====set create_plugin_module====
Create a module plugin with the data passed as parameters.
+
It creates a module plugin with data as parameters.
  
 
Call Syntax:
 
Call Syntax:
Line 1,722: Line 1,780:
 
*op=set (required)
 
*op=set (required)
 
*op2=create_plugin_module (required)
 
*op2=create_plugin_module (required)
*id=&lt;agent_name&gt; (required) should be an agent name.
+
*id=&lt;agent_name&gt; (required). It should be an agent name.
*other=&lt;serialized parameters&gt; (required) are the module configuration and data, serialized in the following order:
+
*other=&lt;serialized parameters&gt; (required). They are module configuration and data, serialized in the following order:
 
:*&lt;name_module&gt;
 
:*&lt;name_module&gt;
 
:*&lt;disabled&gt;
 
:*&lt;disabled&gt;
Line 1,751: Line 1,809:
 
:*&lt;plugin_parameter&gt;
 
:*&lt;plugin_parameter&gt;
 
:*&lt;enable_unknown_events&gt; (only in version 5 or later)
 
:*&lt;enable_unknown_events&gt; (only in version 5 or later)
:*&lt;macros&gt; (only in version 5 or later) Should be a base 64 encoded JSON document. The content should be an object formed by objects with the following properties:
+
:*&lt;macros&gt; (only in version 5 or later). It should be a base64 encoded JSON document. The content should be an object made up by objects with the following properties:
** ''"macro"'': Macro name. Should be ''_field1_'', ''_field2_'', ..., ''_fieldN_''.
+
** ''"macro"'': Macro name. It should be ''_field1_'', ''_field2_'', ..., ''_fieldN_''.
**''"desc"'': Descriptive name of the macro.
+
**''"desc"'': Descriptive macro name.
**''"help"'': Description of the macro.
+
**''"help"'': Macro description.
**''"value"'': Value of the macro.
+
**''"value"'': Macro value.
**''"hide"'': Set to "1" to hide the value of the macro (useful for storing passwords).
+
**''"hide"'': Set to "1" to hide the macro value (useful for storing passwords).
 
=====Example=====
 
=====Example=====
 
  {
 
  {
Line 1,774: Line 1,832:
 
}
 
}
 
  }
 
  }
:*&lt;module_macros&gt; (only in version 5 or later) Should be a base 64 encoded JSON document formed by an object with one property for each macro. The format of the JSON properties should be "<macro name>": "<macro value>".
+
:*&lt;module_macros&gt; (only in version 5 or later). It should be a base64 encoded JSON document made up by an object with one property for each macro. The format of the JSON properties should be "<macro name>": "<macro value>".
 
:*&lt;each_ff&gt; (only in version 5.1 or later)
 
:*&lt;each_ff&gt; (only in version 5.1 or later)
 
:*&lt;ff_threshold_normal&gt; (only in version 5.1 or later)
 
:*&lt;ff_threshold_normal&gt; (only in version 5.1 or later)
Line 1,781: Line 1,839:
 
:*&lt;critical_inverse&gt; (only in version 6.0SP1 or later)
 
:*&lt;critical_inverse&gt; (only in version 6.0SP1 or later)
 
:*&lt;warning_inverse&gt; (only in version 6.0SP1 or later)
 
:*&lt;warning_inverse&gt; (only in version 6.0SP1 or later)
 +
:*&lt;ff_type&gt; (only in version 733 or later)
  
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=create_plugin_module&id=pepito&other=prueba|0|1|2|0|0||0|0||0|0|127.0.0.1|0||0|300|0|0|0|0|plugin%20module%20from%20api|2|admin|pass|-p%20max&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=create_plugin_module&id=pepito&other=prueba|0|1|2|0|0||0|0||0|0|127.0.0.1|0||0|300|0|0|0|0|plugin%20module%20from%20api|2|admin|pass|-p%20max&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set create_data_module====
 
====set create_data_module====
  
Create a module from parameters passed.
+
It creates a module with the given parameters.
  
{{warning|With this call you can add database module data but you cannot modify configuration file of the agents associated to the module}}
+
{{warning|With this call, you may add database module data but the configuration file of the agents associated to the module cannot be modified.}}
  
 
Call Syntax:
 
Call Syntax:
Line 1,796: Line 1,855:
 
*op=set (required)
 
*op=set (required)
 
*op2=create_data_module (required)
 
*op2=create_data_module (required)
*id=&lt;agent_name&gt; (required) should be an agent name.
+
*id=&lt;agent_name&gt; (required). It should be an agent name.
*other=&lt;serialized parameters&gt; (required) are the module configuration and data, serialized in the following order:
+
*other=&lt;serialized parameters&gt; (required). They are module configuration and data, serialized in the following order:
 
:*&lt;name_module&gt;
 
:*&lt;name_module&gt;
 
:*&lt;disabled&gt;
 
:*&lt;disabled&gt;
Line 1,815: Line 1,874:
 
:*&lt;history_data&gt;
 
:*&lt;history_data&gt;
 
:*&lt;enable_unknown_events&gt; (only in version 5 or later)
 
:*&lt;enable_unknown_events&gt; (only in version 5 or later)
:*&lt;module_macros&gt; (only in version 5 or later) Should be a base 64 encoded JSON document formed by an object with one property for each macro. The format of the JSON properties should be "<macro name>": "<macro value>".
+
:*&lt;module_macros&gt; (only in version 5 or later). It should be a base64 encoded JSON document made up by an object with one property for each macro. The format of the JSON properties should be "<macro name>": "<macro value>".
 
:*&lt;ff_threshold&gt; (only in version 5.1 or later)
 
:*&lt;ff_threshold&gt; (only in version 5.1 or later)
 
:*&lt;each_ff&gt; (only in version 5.1 or later)
 
:*&lt;each_ff&gt; (only in version 5.1 or later)
Line 1,824: Line 1,883:
 
:*&lt;critical_inverse&gt; (only in version 6.0SP1 or later)
 
:*&lt;critical_inverse&gt; (only in version 6.0SP1 or later)
 
:*&lt;warning_inverse&gt; (only in version 6.0SP1 or later)
 
:*&lt;warning_inverse&gt; (only in version 6.0SP1 or later)
 +
:*&lt;ff_type&gt; (only in version 733 or later)
  
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=create_data_module&id=pepito&other=prueba|0|1|data%20module%20from%20api|1|10|20|10.50|180|10|15||16|20||0&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=create_data_module&id=pepito&other=prueba|0|1|data%20module%20from%20api|1|10|20|10.50|180|10|15||16|20||0&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set create_SNMP_module====
 
====set create_SNMP_module====
  
Create a SNMP module.
+
It creates an SNMP module.
  
 
Call Syntax:
 
Call Syntax:
 
*op=set (required)
 
*op=set (required)
 
*op2=create_snmp_module (required)
 
*op2=create_snmp_module (required)
*id=&lt;agent_name&gt; (required) should be an agent name.
+
*id=&lt;agent_name&gt; (required). It should be an agent name.
*other=&lt;serialized parameters&gt; (required) are the module configuration and data, serialized in the following order:
+
*other=&lt;serialized parameters&gt; (required). They are module configuration and data, serialized in the following order:
 
:*&lt;name_module&gt;
 
:*&lt;name_module&gt;
 
:*&lt;disabled&gt;
 
:*&lt;disabled&gt;
Line 1,872: Line 1,932:
 
:*&lt;ff_threshold_warning&gt; (only in version 5.1 or later)
 
:*&lt;ff_threshold_warning&gt; (only in version 5.1 or later)
 
:*&lt;ff_threshold_critical&gt; (only in version 5.1 or later)
 
:*&lt;ff_threshold_critical&gt; (only in version 5.1 or later)
 +
:*&lt;ff_type&gt; (only in version 733 or later)
  
 
=====Examples=====
 
=====Examples=====
Line 1,877: Line 1,938:
 
Example 1 (snmp v: 3, snmp3_priv_method: AES, snmp3_priv_pass: example_priv_passw, snmp3_sec_level: authNoPriv, snmp3_auth_method:MD5, snmp3_auth_user: pepito_user, snmp3_auth_pass: example_priv_passw)
 
Example 1 (snmp v: 3, snmp3_priv_method: AES, snmp3_priv_pass: example_priv_passw, snmp3_sec_level: authNoPriv, snmp3_auth_method:MD5, snmp3_auth_user: pepito_user, snmp3_auth_pass: example_priv_passw)
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=create_snmp_module&id=pepito&other=prueba|0|15|1|10|15||16|18||15|0|127.0.0.1|60|3|public|.1.3.6.1.2.1.1.1.0|180|0|0|0|0|SNMP%20module%20from%20API|AES|example_priv_passw|authNoPriv|MD5|pepito_user|example_auth_passw&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=create_snmp_module&id=pepito&other=prueba|0|15|1|10|15||16|18||15|0|127.0.0.1|60|3|public|.1.3.6.1.2.1.1.1.0|180|0|0|0|0|SNMP%20module%20from%20API|AES|example_priv_passw|authNoPriv|MD5|pepito_user|example_auth_passw&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
Example 2 (snmp v: 1)
 
Example 2 (snmp v: 1)
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=create_snmp_module&id=pepito1&other=prueba2|0|15|1|10|15||16|18||15|0|127.0.0.1|60|1|public|.1.3.6.1.2.1.1.1.0|180|0|0|0|0|SNMP module from API&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=create_snmp_module&id=pepito1&other=prueba2|0|15|1|10|15||16|18||15|0|127.0.0.1|60|1|public|.1.3.6.1.2.1.1.1.0|180|0|0|0|0|SNMP module from API&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set update_network_module====
 
====set update_network_module====
  
Update the network module.
+
It updates the network module.
  
 
Call syntax:
 
Call syntax:
Line 1,891: Line 1,952:
 
*op=set (required)
 
*op=set (required)
 
*op2=update_network_module (required)
 
*op2=update_network_module (required)
*id=&lt;module_id&gt; (required) should be a module id.
+
*id=&lt;module_id&gt; (required). It should be a module id.
*other=&lt;serialized parameters&gt; (required) are the module configuration and data, serialized in the following order:
+
*other=&lt;serialized parameters&gt; (required). They are module configuration and data, serialized in the following order:
 
:*&lt;id_agent&gt;
 
:*&lt;id_agent&gt;
 
:*&lt;disabled&gt;
 
:*&lt;disabled&gt;
Line 1,915: Line 1,976:
 
:*&lt;description&gt;
 
:*&lt;description&gt;
 
:*&lt;disabled_types_event&gt; (only in version 5 or later)
 
:*&lt;disabled_types_event&gt; (only in version 5 or later)
:*&lt;module_macros&gt; (only in version 5 or later) Should be a base 64 encoded JSON document formed by an object with one property for each macro. The format of the JSON properties should be "<macro name>": "<macro value>".
+
:*&lt;module_macros&gt; (only in version 5 or later). It should be a base64 encoded JSON document made up by an object with one property for each macro. The format of the JSON properties should be "<macro name>": "<macro value>".
 
:*&lt;each_ff&gt; (only in version 5.1 or later)
 
:*&lt;each_ff&gt; (only in version 5.1 or later)
 
:*&lt;ff_threshold_normal&gt; (only in version 5.1 or later)
 
:*&lt;ff_threshold_normal&gt; (only in version 5.1 or later)
Line 1,922: Line 1,983:
 
:*&lt;critical_inverse&gt; (only in version 6.0SP1 or later)
 
:*&lt;critical_inverse&gt; (only in version 6.0SP1 or later)
 
:*&lt;warning_inverse&gt; (only in version 6.0SP1 or later)
 
:*&lt;warning_inverse&gt; (only in version 6.0SP1 or later)
 +
:*&lt;ff_type&gt; (only in version 733 or later)
  
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=update_network_module&id=3431&other=44|0|2|10|15||16|18||7|0|127.0.0.1|0||0|300|30.00|0|0|0|latency%20ping%20modified%20by%20the%20Api&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=update_network_module&id=3431&other=44|0|2|10|15||16|18||7|0|127.0.0.1|0||0|300|30.00|0|0|0|latency%20ping%20modified%20by%20the%20Api&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set update_plugin_module====
 
====set update_plugin_module====
  
Update the plugin module.
+
It updates the plugin module.
  
 
Call Syntax:
 
Call Syntax:
Line 1,935: Line 1,997:
 
*op=set (required)
 
*op=set (required)
 
*op2=update_plugin_module (required)
 
*op2=update_plugin_module (required)
*id=&lt;module_id&gt; (required) should be a module id.
+
*id=&lt;module_id&gt; (required). It should be a module id.
*other=&lt;serialized parameters&gt; (required) are the module configuration and data, serialized in the following order:
+
*other=&lt;serialized parameters&gt; (required). They are module configuration and data, serialized in the following order:
 
:*&lt;id_agent&gt;
 
:*&lt;id_agent&gt;
 
:*&lt;disabled&gt;
 
:*&lt;disabled&gt;
Line 1,963: Line 2,025:
 
:*&lt;plugin_parameter&gt;
 
:*&lt;plugin_parameter&gt;
 
:*&lt;disabled_types_event&gt; (only in version 5 or later)
 
:*&lt;disabled_types_event&gt; (only in version 5 or later)
:*&lt;macros&gt; (only in version 5 or later) Should be a base 64 encoded JSON document. The content should be an object formed by objects with the following properties:
+
:*&lt;macros&gt; (only in version 5 or later). It should be a base64 encoded JSON document. The content should be an object made up by objects with the following properties:
 
** ''"macro"'': Macro name. Should be ''_field1_'', ''_field2_'', ..., ''_fieldN_''.
 
** ''"macro"'': Macro name. Should be ''_field1_'', ''_field2_'', ..., ''_fieldN_''.
 
**''"desc"'': Descriptive name of the macro.
 
**''"desc"'': Descriptive name of the macro.
**''"help"'': Description of the macro.
+
**''"help"'': Macro description.
**''"value"'':Value of the macro.
+
**''"value"'':Macro value.
 
=====Example=====
 
=====Example=====
 
  {
 
  {
Line 1,983: Line 2,045:
 
   }
 
   }
 
  }
 
  }
:*&lt;module_macros&gt; (only in version 5 or later) Should be a base 64 encoded JSON document formed by an object with one property for each macro. The format of the JSON properties should be "<macro name>": "<macro value>".
+
:*&lt;module_macros&gt; (only in version 5 or later). It should be a base64 encoded JSON document made up by an object with one property for each macro. The format of the JSON properties should be "<macro name>": "<macro value>".
 
:*&lt;each_ff&gt; (only in version 5.1 or later)
 
:*&lt;each_ff&gt; (only in version 5.1 or later)
 
:*&lt;ff_threshold_normal&gt; (only in version 5.1 or later)
 
:*&lt;ff_threshold_normal&gt; (only in version 5.1 or later)
Line 1,990: Line 2,052:
 
:*&lt;critical_inverse&gt; (only in version 6.0SP1 or later)
 
:*&lt;critical_inverse&gt; (only in version 6.0SP1 or later)
 
:*&lt;warning_inverse&gt; (only in version 6.0SP1 or later)
 
:*&lt;warning_inverse&gt; (only in version 6.0SP1 or later)
 +
:*&lt;ff_type&gt; (only in version 733 or later)
  
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=update_plugin_module&id=2343&other=44|0|2|0|0||0|0||0|0|127.0.0.1|0||0|300|0|0|0|0|plugin%20module%20from%20api|2|admin|pass|-p%20max&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=update_plugin_module&id=2343&other=44|0|2|0|0||0|0||0|0|127.0.0.1|0||0|300|0|0|0|0|plugin%20module%20from%20api|2|admin|pass|-p%20max&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set update_data_module====
 
====set update_data_module====
  
{{warning|With this call you can add database module data but you cannot modify configuration file of the agents associated to the module}}
+
{{warning|With this call, a database module data can be added but the configuration file of the agents associated to the module cannot be modified.}}
  
Update the local module.
+
It updates the local module.
  
 
Call Syntax:
 
Call Syntax:
Line 2,005: Line 2,068:
 
*op=set (required)
 
*op=set (required)
 
*op2=update_data_module (required)
 
*op2=update_data_module (required)
*id=&lt;module_id&gt; (required) should be a module id.
+
*id=&lt;module_id&gt; (required). It should be the module id to be updated.
*other=&lt;serialized parameters&gt; (required) are the module configuration and data, serialized in the following order:
+
*other=&lt;serialized parameters&gt; (required). They are module configuration and data, serialized in the following order:
 
:*&lt;id_agent&gt;
 
:*&lt;id_agent&gt;
 
:*&lt;disabled&gt;
 
:*&lt;disabled&gt;
Line 2,029: Line 2,092:
 
:*&lt;description&gt;
 
:*&lt;description&gt;
 
:*&lt;disabled_types_event&gt; (only in version 5 or later)
 
:*&lt;disabled_types_event&gt; (only in version 5 or later)
:*&lt;module_macros&gt; (only in version 5 or later) Should be a base 64 encoded JSON document formed by an object with one property for each macro. The format of the JSON properties should be "<macro name>": "<macro value>".
+
:*&lt;module_macros&gt; (only in version 5 or later). It should be a base64 encoded JSON document made up by an object with one property for each macro. The format of the JSON properties should be "<macro name>": "<macro value>".
 
:*&lt;ff_threshold&gt; (only in version 5.1 or later)
 
:*&lt;ff_threshold&gt; (only in version 5.1 or later)
 
:*&lt;each_ff&gt; (only in version 5.1 or later)
 
:*&lt;each_ff&gt; (only in version 5.1 or later)
Line 2,038: Line 2,101:
 
:*&lt;critical_inverse&gt; (only in version 6.0SP1 or later)
 
:*&lt;critical_inverse&gt; (only in version 6.0SP1 or later)
 
:*&lt;warning_inverse&gt; (only in version 6.0SP1 or later)
 
:*&lt;warning_inverse&gt; (only in version 6.0SP1 or later)
 +
:*&lt;ff_type&gt; (only in version 733 or later)
  
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=update_data_module&id=23234&other=44|0|data%20module%20modified%20from%20API|6|0|0|50.00|300|10|15||16|18||0&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=update_data_module&id=23234&other=44|0|data%20module%20modified%20from%20API|6|0|0|50.00|300|10|15||16|18||0&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set update_data_module_policy====
 
====set update_data_module_policy====
  
Update data module in policy and return id from new module.
+
It updates a data module in a policy and returns an id from the new module.
  
 
Call Syntax:
 
Call Syntax:
 
*op=set (required)
 
*op=set (required)
 
*op2=update_data_module (required)
 
*op2=update_data_module (required)
*id=&lt;id_agent_module&gt; (required) Id of the target policy module.
+
*id=&lt;id_agent_module&gt; (required). Id of the target policy module.
*other=&lt;serialized parameters&gt; (required) are the module configuration and data, serialized in the following order:
+
*other=&lt;serialized parameters&gt; (required). They are module configuration and data, serialized in the following order:
 
:*&lt;id_policy_module&gt;
 
:*&lt;id_policy_module&gt;
 
:*&lt;description&gt;
 
:*&lt;description&gt;
Line 2,067: Line 2,131:
 
:*&lt;configuration_data&gt;
 
:*&lt;configuration_data&gt;
 
:*&lt;disabled_types_event&gt; (only in version 5 or later)
 
:*&lt;disabled_types_event&gt; (only in version 5 or later)
:*&lt;module_macros&gt; (only in version 5 or later) hould be a base 64 encoded JSON document formed by an object with one property for each macro. The format of the JSON properties should be "<macro name>": "<macro value>".
+
:*&lt;module_macros&gt; (only in version 5 or later). It should be a base64 encoded JSON document made up by an object with one property for each macro. The format of the JSON properties should be "<macro name>": "<macro value>".
  
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=update_data_module_policy&id=1&other=10~data%20module%20updated%20by%20Api~2~0~0~50.00~10~20~180~~21~35~~1~module_begin%0dmodule_name%20pandora_process%0dmodule_type%20generic_data%0dmodule_exec%20ps%20aux%20|%20grep%20pandora%20|%20wc%20-l%0dmodule_end&other_mode=url_encode_separator_
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=update_data_module_policy&id=1&other=10~data%20module%20updated%20by%20Api~2~0~0~50.00~10~20~180~~21~35~~1~module_begin%0dmodule_name%20pandora_process%0dmodule_type%20generic_data%0dmodule_exec%20ps%20aux%20|%20grep%20pandora%20|%20wc%20-l%0dmodule_end&other_mode=url_encode_separator_</nowiki>
  
 
====set update_SNMP_module====
 
====set update_SNMP_module====
  
Update a SNMP module.
+
It updates an SNMP module.
  
 
Call Syntax:
 
Call Syntax:
 
*op=set (required)
 
*op=set (required)
 
*op2=update_snmp_module (required)
 
*op2=update_snmp_module (required)
*id=&lt;module_id&gt; (required) should be a module id.
+
*id=&lt;module_id&gt; (required). It should be a module id.
*other=&lt;serialized parameters&gt; (required) are the module configuration and data, serialized in the following order:
+
*other=&lt;serialized parameters&gt; (required). They are module configuration and data, serialized in the following order:
 
:*&lt;id_agent&gt;
 
:*&lt;id_agent&gt;
 
:*&lt;disabled&gt;
 
:*&lt;disabled&gt;
Line 2,115: Line 2,179:
 
:*&lt;ff_threshold_warning&gt; (only in version 5.1 or later)
 
:*&lt;ff_threshold_warning&gt; (only in version 5.1 or later)
 
:*&lt;ff_threshold_critical&gt; (only in version 5.1 or later)
 
:*&lt;ff_threshold_critical&gt; (only in version 5.1 or later)
 +
:*&lt;ff_type&gt; (only in version 733 or later)
  
 
=====Examples=====
 
=====Examples=====
Line 2,120: Line 2,185:
 
Example (snmp v: 3, snmp3_priv_method: AES, snmp3_priv_pass: example_priv_passw, snmp3_sec_level: authNoPriv, snmp3_auth_method:MD5, snmp3_auth_user: pepito_user, snmp3_auth_pass: example_priv_passw)
 
Example (snmp v: 3, snmp3_priv_method: AES, snmp3_priv_pass: example_priv_passw, snmp3_sec_level: authNoPriv, snmp3_auth_method:MD5, snmp3_auth_user: pepito_user, snmp3_auth_pass: example_priv_passw)
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=update_snmp_module&id=33432&other=44|0|6|20|25||26|30||15|1|127.0.0.1|60|3|public|.1.3.6.1.2.1.1.1.0|180|50.00|10|60|0|SNMP%20module%20modified%20by%20API|AES|example_priv_passw|authNoPriv|MD5|pepito_user|example_auth_passw&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=update_snmp_module&id=33432&other=44|0|6|20|25||26|30||15|1|127.0.0.1|60|3|public|.1.3.6.1.2.1.1.1.0|180|50.00|10|60|0|SNMP%20module%20modified%20by%20API|AES|example_priv_passw|authNoPriv|MD5|pepito_user|example_auth_passw&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set apply_policy====
 
====set apply_policy====
 
+
It applies the policy, once it has gone through id, in one or several agents.
Apply the policy pass as policy id into the id parameter.
 
  
 
Call syntax:
 
Call syntax:
 
*op=set (required)
 
*op=set (required)
 
*op2=apply_policy (required)
 
*op2=apply_policy (required)
*id=&lt;id_policy&gt; (required) should be a policy Id.
+
*id=&lt;id_policy&gt; (required)
 +
*id2=&lt;id_agent&gt; (optional). Id or name of the agent as indicated in the other parameter. If it is empty, the policy will be applied to all its agents.
 +
*other=&lt;serialized parameters&gt;
 +
:*&lt;name_agent (Boolean)&gt;. It indicates whether the agent will be sent by Id (0) or by name (1).
 +
:*&lt;server_id&gt; (required when using Metaconsole). Id of the server in which the policy will be applied.
  
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=apply_policy&id=1&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://192.168.70.102/pandora_console/include/api.php?op=set&op2=apply_policy&id=22&id2=3e&other=0|1&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set apply_all_policies====
 
====set apply_all_policies====
  
Apply all policies that are in Pandora.
+
It applies all policies within Pandora FMS.
  
 
Call syntax:
 
Call syntax:
Line 2,145: Line 2,213:
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=apply_all_policies&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=apply_all_policies&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set add_network_module_policy====
 
====set add_network_module_policy====
  
Add a network module in the policy pass as id in the parameter.
+
It adds a network module in the policy after it has gone through id in the parameter.
  
 
Call syntax:
 
Call syntax:
 
*op=set (required)
 
*op=set (required)
 
*op2=add_network_module_policy (required)
 
*op2=add_network_module_policy (required)
*id=&lt;id_policy&gt; (required) should be a policy Id.
+
*id=&lt;id_policy&gt; (required). It should be a policy Id.
*other=&lt;serialized parameters&gt; (required) are the module configuration and data, serialized in the following order:
+
*other=&lt;serialized parameters&gt; (required). They are module configuration and data, serialized in the following order:
 
:*&lt;id_module_type&gt;
 
:*&lt;id_module_type&gt;
 
:*&lt;description&gt;
 
:*&lt;description&gt;
Line 2,177: Line 2,245:
 
:*&lt;custom_id&gt;
 
:*&lt;custom_id&gt;
 
:*&lt;enable_unknown_events&gt; (only in version 5 or later)
 
:*&lt;enable_unknown_events&gt; (only in version 5 or later)
:*&lt;module_macros&gt; (only in version 5 or later) Should be a base 64 encoded JSON document formed by an object with one property for each macro. The format of the JSON properties should be "<macro name>": "<macro value>".
+
:*&lt;module_macros&gt; (only in version 5 or later). It should be a base64 encoded JSON document made up by an object with one property for each macro. The format of the JSON properties should be "<macro name>": "<macro value>".
 
:*&lt;each_ff&gt; (only in version 5.1 or later)
 
:*&lt;each_ff&gt; (only in version 5.1 or later)
 
:*&lt;ff_threshold_normal&gt; (only in version 5.1 or later)
 
:*&lt;ff_threshold_normal&gt; (only in version 5.1 or later)
 
:*&lt;ff_threshold_warning&gt; (only in version 5.1 or later)
 
:*&lt;ff_threshold_warning&gt; (only in version 5.1 or later)
 
:*&lt;ff_threshold_critical&gt; (only in version 5.1 or later)
 
:*&lt;ff_threshold_critical&gt; (only in version 5.1 or later)
 +
:*&lt;ff_type&gt; (only in version 733 or later)
  
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=add_network_module_policy&id=1&other=network_module_policy_example_name|6|network%20module%20created%20by%20Api|2|0|0|50.00|180|10|20||21|35||1|15|0|66|||0&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=add_network_module_policy&id=1&other=network_module_policy_example_name|6|network%20module%20created%20by%20Api|2|0|0|50.00|180|10|20||21|35||1|15|0|66|||0&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set add_plugin_module_policy====
 
====set add_plugin_module_policy====
  
Add a plugin module in the policy pass as id in the parameter.
+
It adds a plugin module in the policy that has gone through id in the parameter.
  
 
Call syntax:
 
Call syntax:
 
*op=set (required)
 
*op=set (required)
 
*op2=add_plugin_module_policy (required)
 
*op2=add_plugin_module_policy (required)
*id=&lt;id_policy&gt; (required) should be a policy Id.
+
*id=&lt;id_policy&gt; (required). It should be a policy Id.
*other=&lt;serialized parameters&gt; (required) are the module configuration and data, serialized in the following order:
+
*other=&lt;serialized parameters&gt; (required). They are module configuration and data, serialized in the following order:
 
:*&lt;name_module&gt;
 
:*&lt;name_module&gt;
 
:*&lt;disabled&gt;
 
:*&lt;disabled&gt;
Line 2,222: Line 2,291:
 
:*&lt;plugin_parameter&gt;
 
:*&lt;plugin_parameter&gt;
 
:*&lt;enable_unknown_events&gt; (only in version 5)
 
:*&lt;enable_unknown_events&gt; (only in version 5)
:*&lt;macros&gt; (only in version 5 or later) Should be a base 64 encoded JSON document. The content should be an object formed by objects with the following properties:
+
:*&lt;macros&gt; (only in version 5 or later). It should be a base64 encoded JSON document. The content should be an object made up by objects with the following properties:
** ''"macro"'': Macro name. Should be ''_field1_'', ''_field2_'', ..., ''_fieldN_''.
+
** ''"macro"'': Macro name. It should be ''_field1_'', ''_field2_'', ..., ''_fieldN_''.
**''"desc"'': Descriptive name of the macro.
+
**''"desc"'': Descriptive macro name.
**''"help"'': Description of the macro.
+
**''"help"'': Macro description.
**''"value"'':Value of the macro.
+
**''"value"'':Macro value.
 
=====Example=====
 
=====Example=====
 
  {
 
  {
Line 2,242: Line 2,311:
 
   }
 
   }
 
  }
 
  }
:*&lt;module_macros&gt; (only in version 5 or later) Should be a base 64 encoded JSON document formed by an object with one property for each macro. The format of the JSON properties should be "<macro name>": "<macro value>".
+
:*&lt;module_macros&gt; (only in version 5 or later). It should be a base64 encoded JSON document made up by an object with one property for each macro. The format of the JSON properties should be "<macro name>": "<macro value>".
 
:*&lt;each_ff&gt; (only in version 5.1 or later)
 
:*&lt;each_ff&gt; (only in version 5.1 or later)
 
:*&lt;ff_threshold_normal&gt; (only in version 5.1 or later)
 
:*&lt;ff_threshold_normal&gt; (only in version 5.1 or later)
 
:*&lt;ff_threshold_warning&gt; (only in version 5.1 or later)
 
:*&lt;ff_threshold_warning&gt; (only in version 5.1 or later)
 
:*&lt;ff_threshold_critical&gt; (only in version 5.1 or later)
 
:*&lt;ff_threshold_critical&gt; (only in version 5.1 or later)
 +
:*&lt;ff_type&gt; (only in version 733 or later)
  
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=add_plugin_module_policy&id=1&other=example%20plugin%20module%20name|0|1|2|0|0||0|0||15|0|66|||300|50.00|0|0|0|plugin%20module%20from%20api|2|admin|pass|-p%20max&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=add_plugin_module_policy&id=1&other=example%20plugin%20module%20name|0|1|2|0|0||0|0||15|0|66|||300|50.00|0|0|0|plugin%20module%20from%20api|2|admin|pass|-p%20max&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set add_data_module_policy====
 
====set add_data_module_policy====
  
Add a local module in the policy pass as id in the parameter.
+
It adds a local module in the policy which has gone through id in the parameter.
  
 
Call syntax:
 
Call syntax:
 
*op=set (required)
 
*op=set (required)
 
*op2=add_data_module_policy (required)
 
*op2=add_data_module_policy (required)
*id=&lt;id_policy&gt; (required) should be a policy Id.
+
*id=&lt;id_policy&gt; (required). It should be a policy Id.
*other=&lt;serialized parameters&gt; (required) are the module configuration and data, serialized in the following order:
+
*other=&lt;serialized parameters&gt; (required). They are module configuration and data, serialized in the following order:
 
:*&lt;name_module&gt;
 
:*&lt;name_module&gt;
 
:*&lt;id_module_type&gt;
 
:*&lt;id_module_type&gt;
Line 2,276: Line 2,346:
 
:*&lt;str_critical&gt;
 
:*&lt;str_critical&gt;
 
:*&lt;history_data&gt;
 
:*&lt;history_data&gt;
:*&lt;configuration_data&gt; This is the definition block of the agent that will be inserted in the config file of the policy agent.
+
:*&lt;configuration_data&gt;. This is the definition block of the agent that will be entered in the config file of the policy agent.
 
:*&lt;enable_unknown_events&gt; (only in version 5 or later)
 
:*&lt;enable_unknown_events&gt; (only in version 5 or later)
:*&lt;module_macros&gt; (only in version 5 or later) Should be a base 64 encoded JSON document formed by an object with one property for each macro. The format of the JSON properties should be "<macro name>": "<macro value>".
+
:*&lt;module_macros&gt; (only in version 5). It should be a base64 encoded JSON document made up by an object with one property for each macro. The format of the JSON properties should be "<macro name>": "<macro value>".
:*&lt;ff_threshold&gt; (only in version 5.1 or later)
+
:*&lt;ff_threshold&gt; (only in version 5.1 )
:*&lt;each_ff&gt; (only in version 5.1 or later)
+
:*&lt;each_ff&gt; (only in version 5.1)
:*&lt;ff_threshold_normal&gt; (only in version 5.1 or later)
+
:*&lt;ff_threshold_normal&gt; (only in version 5.1)
:*&lt;ff_threshold_warning&gt; (only in version 5.1 or later)
+
:*&lt;ff_threshold_warning&gt; (only in version 5.1)
:*&lt;ff_threshold_critical&gt; (only in version 5.1 or later)
+
:*&lt;ff_threshold_critical&gt; (only in version 5.1)
:*&lt;ff_timeout&gt; (only in version 5.1 or later)
+
:*&lt;ff_timeout&gt; (only in version 5.1)
 +
:*&lt;ff_type&gt; (only in version 734)
  
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=add_data_module_policy&id=1&other=data_module_policy_example_name~2~data%20module%20created%20by%20Api~2~0~0~50.00~10~20~180~~21~35~~1~module_begin%0dmodule_name%20pandora_process%0dmodule_type%20generic_data%0dmodule_exec%20ps%20aux%20|%20grep%20pandora%20|%20wc%20-l%0dmodule_end&other_mode=url_encode_separator_~&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=add_data_module_policy&id=1&other=data_module_policy_example_name~2~data%20module%20created%20by%20Api~2~0~0~50.00~10~20~180~~21~35~~1~module_begin%0dmodule_name%20pandora_process%0dmodule_type%20generic_data%0dmodule_exec%20ps%20aux%20|%20grep%20pandora%20|%20wc%20-l%0dmodule_end&other_mode=url_encode_separator_~&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set add_SNMP_module_policy====
 
====set add_SNMP_module_policy====
  
Add a SNMP module in the policy pass as id in the parameter.
+
It adds a SNMP module in the policy which has gone through id in the parameter.
  
 
Call syntax:
 
Call syntax:
 
*op=set (required)
 
*op=set (required)
 
*op2=add_snmp_module_policy (required)
 
*op2=add_snmp_module_policy (required)
*id=&lt;id_policy&gt; (required) should be a policy Id.
+
*id=&lt;id_policy&gt; (required). It should be a policy Id.
*other=&lt;serialized parameters&gt; (required) are the module configuration and data, serialized in the following order:
+
*other=&lt;serialized parameters&gt; (required). They are module configuration and data, serialized in the following order:
 
:*&lt;name_module&gt;
 
:*&lt;name_module&gt;
 
:*&lt;disabled&gt;
 
:*&lt;disabled&gt;
Line 2,328: Line 2,399:
 
:*&lt;snmp3_auth_pass&gt;
 
:*&lt;snmp3_auth_pass&gt;
 
:*&lt;enable_unknown_events&gt; (only in version 5 or later)
 
:*&lt;enable_unknown_events&gt; (only in version 5 or later)
:*&lt;each_ff&gt; (only in version 5.1 or later)
+
:*&lt;each_ff&gt; (only in version 5.1)
:*&lt;ff_threshold_normal&gt; (only in version 5.1 or later)
+
:*&lt;ff_threshold_normal&gt; (only in version 5.1)
:*&lt;ff_threshold_warning&gt; (only in version 5.1 or later)
+
:*&lt;ff_threshold_warning&gt; (only in version 5.1)
:*&lt;ff_threshold_critical&gt; (only in version 5.1 or later)
+
:*&lt;ff_threshold_critical&gt; (only in version 5.1)
 +
:*&lt;ff_type&gt; (only in version 734)
  
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=add_snmp_module_policy&id=1&other=example%20SNMP%20module%20name|0|15|2|0|0||0|0||15|1|66|3|public|.1.3.6.1.2.1.1.1.0|180|50.00|10|60|0|SNMP%20module%20modified%20by%20API|AES|example_priv_passw|authNoPriv|MD5|pepito_user|example_auth_passw&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=add_snmp_module_policy&id=1&other=example%20SNMP%20module%20name|0|15|2|0|0||0|0||15|1|66|3|public|.1.3.6.1.2.1.1.1.0|180|50.00|10|60|0|SNMP%20module%20modified%20by%20API|AES|example_priv_passw|authNoPriv|MD5|pepito_user|example_auth_passw&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
====set add_agent_policy====
+
====set add_agent_policy_by_id====
  
Add a agent into a policy.
+
It adds an agent to a policy using the agent ID
  
 
Call syntax:
 
Call syntax:
 
*op=set (required)
 
*op=set (required)
*op2=add_agent_policy (required)
+
*op2=add_agent_policy_by_id (mandatory)
*id=&lt;id_policy&gt; (required) should be a policy Id.
+
*id=&lt;id_policy&gt; (required). It must be a policy Id.
*other=&lt;serialized parameters&gt; (required) are the agent configuration and data, serialized in the following order:
+
*other=&lt;serialized parameters&gt; (required). These are agent configuration and data, serialized in the following order:
 
:*&lt;id_agent&gt;
 
:*&lt;id_agent&gt;
 +
:*&lt;id_node&gt; (required when using the Metaconsole). ID of the node the agent you wish to add to the policy belongs to.
  
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=add_agent_policy&id=1&other=167&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
* Node:
 +
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=add_agent_policy_by_id&id=2&other=1&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora</nowiki>
  
====set remove_agent_from_policy====
+
* Metaconsole:
 +
<nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=add_agent_policy_by_id&id=2&other=1%7C1&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora</nowiki>
  
Eliminates an agent from the policy
+
====set add_agent_policy_by_name====
 +
 
 +
It adds an agent to a policy using the agent name.
  
 
Call syntax:
 
Call syntax:
 
*op=set (required)
 
*op=set (required)
*op2=remove_agent_from_policy (required)
+
*op2=add_agent_policy_by_name (required)
*id=&lt;id_política&gt; (required) must be a policy Id.
+
*id=&lt;id_policy&gt; (required). It must be a policy Id.
*id2=&lt;id_agente>&gt; (required)must be an agent Id that’s applied to a policy.
+
*other=&lt;serialized parameters&gt; (required). These are agent configuration and data, serialized in the following order:
 +
:*&lt;agent_name&gt;
  
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=remove_agent_from_policy&apipass=1234&user=admin&pass=pandora&id=11&id2=2
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=add_agent_policy_by_name&id=4&other=e76774025b24057cc71df514f27027c43484c3af766ed40f259a86a4fd568f9d&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora</nowiki>
 +
 
 +
====set remove_agent_from_policy_by_id====
 +
 
 +
It deletes an agent from a policy using the agent ID.
 +
 
 +
Call syntax:
 +
*op=set (required)
 +
*op2=remove_agent_from_policy_by_id (required)
 +
*id=&lt;id_política&gt; (required). It must be a policy Id.
 +
*other=&lt;serialized parameters&gt; (required). These are the agent’s configuration and data, serialized in the following order:
 +
:*&lt;id_agent&gt;
 +
:*&lt;id_node&gt; (required when using the Metaconsole). ID of the node the agent you wish to remove from the policy belongs to.
 +
 
 +
=====Examples=====
 +
 
 +
* Node:
 +
<nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=remove_agent_from_policy_by_id&id=2&other=2&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora</nowiki>
 +
 
 +
* Metaconsole:
 +
<nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=remove_agent_from_policy_by_id&id=4&other=1%7C1&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora</nowiki>
 +
 
 +
====set remove_agent_from_policy_by_name====
 +
 
 +
It deletes an agent from a policy using the agent name.
 +
 
 +
Call syntax:
 +
*op=set (required)
 +
*op2=remove_agent_from_policy_by_name (required)
 +
*id=&lt;id_policy&gt; (required). It must be a policy Id.
 +
*other=&lt;serialized parameters&gt; (required). These are the agent’s configuration and data, serialized in the following order:
 +
:*&lt;agent_name&gt;
 +
 
 +
=====Examples=====
 +
 
 +
<nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=remove_agent_from_policy_by_name&id=4&other=e76774025b24057cc71df514f27027c43484c3af766ed40f259a86a4fd568f9d&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set new_network_component====
 
====set new_network_component====
  
Create a new network component.
+
It creates a new network component.
  
 
Call syntax:
 
Call syntax:
 
*op=set (required)
 
*op=set (required)
 
*op2=new_network_component (required)
 
*op2=new_network_component (required)
*id=&lt;network_component_name&gt; (required) should be the network component name.
+
*id=&lt;network_component_name&gt; (required). It should be the network component name.
*other=&lt;serialized parameters&gt; (required) are the agent configuration and data of the network component, serialized in the following order:
+
*other=&lt;serialized parameters&gt; (required). They are agent configuration and data of the network component, serialized in the following order:
 
:*&lt;network_component_type&gt;
 
:*&lt;network_component_type&gt;
 
:*&lt;description&gt;
 
:*&lt;description&gt;
Line 2,394: Line 2,507:
 
:*&lt;network_component_group&gt;
 
:*&lt;network_component_group&gt;
 
:*&lt;enable_unknown_events&gt; (only in version 5)
 
:*&lt;enable_unknown_events&gt; (only in version 5)
:*&lt;each_ff&gt; (only in version 5.1 or later)
+
:*&lt;each_ff&gt; (only in version 5.1)
:*&lt;ff_threshold_normal&gt; (only in version 5.1 or later)
+
:*&lt;ff_threshold_normal&gt; (only in version 5.1)
:*&lt;ff_threshold_warning&gt; (only in version 5.1 or later)
+
:*&lt;ff_threshold_warning&gt; (only in version 5.1)
:*&lt;ff_threshold_critical&gt; (only in version 5.1 or later)
+
:*&lt;ff_threshold_critical&gt; (only in version 5.1)
 +
:*&lt;ff_type&gt; (only in version 734)
  
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=new_network_component&id=example_network_component_name&other=7|network%20component%20created%20by%20Api|300|30|10|public|3||1|10|20|str|21|30|str1|10|50.00|12&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=new_network_component&id=example_network_component_name&other=7|network%20component%20created%20by%20Api|300|30|10|public|3||1|10|20|str|21|30|str1|10|50.00|12&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set new_plugin_component====
 
====set new_plugin_component====
  
Create a new plugin component.
+
It creates a new plugin component.
  
 
Call syntax:
 
Call syntax:
 
*op=set (required)
 
*op=set (required)
 
*op2=new_plugin_component (required)
 
*op2=new_plugin_component (required)
*id=&lt;plugin_component_name&gt; (required) should be the plugin component name.
+
*id=&lt;plugin_component_name&gt; (required). It should be the plugin component name.
*other=&lt;serialized parameters&gt; (required) are the agent configuration and data of the plugin component, serialized in the following order:
+
*other=&lt;serialized parameters&gt; (required). They are agent configuration and data of the plugin component, serialized in the following order:
 
:*&lt;plugin_component_type&gt;
 
:*&lt;plugin_component_type&gt;
 
:*&lt;description&gt;
 
:*&lt;description&gt;
Line 2,431: Line 2,545:
 
:*&lt;post_process&gt;
 
:*&lt;post_process&gt;
 
:*&lt;plugin_component_group&gt;
 
:*&lt;plugin_component_group&gt;
:*&lt;enable_unknown_events&gt; (only in version 5 or later)
+
:*&lt;enable_unknown_events&gt; (only in version 5)
:*&lt;each_ff&gt; (only in version 5.1 or later)
+
:*&lt;each_ff&gt; (only in version 5.1)
:*&lt;ff_threshold_normal&gt; (only in version 5.1 or later)
+
:*&lt;ff_threshold_normal&gt; (only in version 5.1)
:*&lt;ff_threshold_warning&gt; (only in version 5.1 or later)
+
:*&lt;ff_threshold_warning&gt; (only in version 5.1)
:*&lt;ff_threshold_critical&gt; (only in version 5.1 or later)
+
:*&lt;ff_threshold_critical&gt; (only in version 5.1)
 +
:*&lt;ff_type&gt; (only in version 734)
  
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=new_plugin_component&id=example_plugin_component_name&other=2|plugin%20component%20created%20by%20Api|300|30|10|66|3|2|example_user|example_pass|-p%20max||1|10|20|str|21|30|str1|10|50.00|12&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=new_plugin_component&id=example_plugin_component_name&other=2|plugin%20component%20created%20by%20Api|300|30|10|66|3|2|example_user|example_pass|-p%20max||1|10|20|str|21|30|str1|10|50.00|12&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set new_snmp_component====
 
====set new_snmp_component====
  
Create a new SNMP component.
+
It creates a new SNMP component.
  
 
Call syntax:
 
Call syntax:
Line 2,449: Line 2,564:
 
*op=set (required)
 
*op=set (required)
 
*op2=new_snmp_component (required)
 
*op2=new_snmp_component (required)
*id=&lt;snmp_component_name&gt; (required) should be the snmp component name.
+
*id=&lt;snmp_component_name&gt; (required). It should be the SNMP component name.
*other=&lt;serialized parameters&gt; (required) are the configuration and data of the snmp component, serialized in the following order:
+
*other=&lt;serialized parameters&gt; (required). These are the configuration and data of the snmp component, serialized in the following order:
 
:*&lt;snmp_component_type&gt;
 
:*&lt;snmp_component_type&gt;
 
:*&lt;description&gt;
 
:*&lt;description&gt;
Line 2,478: Line 2,593:
 
:*&lt;snmp3_security_level&gt;
 
:*&lt;snmp3_security_level&gt;
 
:*&lt;snmp_component_group&gt;
 
:*&lt;snmp_component_group&gt;
:*&lt;enable_unknown_events&gt; (only in version 5 or later)
+
:*&lt;enable_unknown_events&gt; (only in version 5)
:*&lt;each_ff&gt; (only in version 5.1 or later)
+
:*&lt;each_ff&gt; (only in version 5.1)
:*&lt;ff_threshold_normal&gt; (only in version 5.1 or later)
+
:*&lt;ff_threshold_normal&gt; (only in version 5.1)
:*&lt;ff_threshold_warning&gt; (only in version 5.1 or later)
+
:*&lt;ff_threshold_warning&gt; (only in version 5.1)
:*&lt;ff_threshold_critical&gt; (only in version 5.1 or later)
+
:*&lt;ff_threshold_critical&gt; (only in version 5.1)
 +
:*&lt;ff_type&gt; (only in version 734)
  
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=new_snmp_component&id=example_snmp_component_name&other=16|SNMP%20component%20created%20by%20Api|300|30|10|3||1|10|20|str|21|30|str1|15|50.00|3|.1.3.6.1.2.1.2.2.1.8.2|public|example_auth_user|example_auth_pass|66|AES|example_priv_pass|MD5|authNoPriv|12&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=new_snmp_component&id=example_snmp_component_name&other=16|SNMP%20component%20created%20by%20Api|300|30|10|3||1|10|20|str|21|30|str1|15|50.00|3|.1.3.6.1.2.1.2.2.1.8.2|public|example_auth_user|example_auth_pass|66|AES|example_priv_pass|MD5|authNoPriv|12&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set new_local_component====
 
====set new_local_component====
  
Create a new local component.
+
It creates a new local component.
  
 
Call syntax:
 
Call syntax:
 
*op=set (required)
 
*op=set (required)
 
*op2=new_local_component (required)
 
*op2=new_local_component (required)
*id=&lt;local_component_name&gt; (required) should be a local component name.
+
*id=&lt;local_component_name&gt; (required). It should be a local component name.
*other=&lt;serialized parameters&gt; (required) are the configuration and data of the local component, serialized in the following order:
+
*other=&lt;serialized parameters&gt; (required). They are configuration and data of the local component, serialized in the following order:
 
:*&lt;description&gt;
 
:*&lt;description&gt;
 
:*&lt;id_os&gt;
 
:*&lt;id_os&gt;
 
:*&lt;local_component_group&gt;
 
:*&lt;local_component_group&gt;
:*&lt;configuration_data&gt; This is the configuration block of the module.
+
:*&lt;configuration_data&gt;. This is the module configuration block.
:*&lt;enable_unknown_events&gt; (only in version 5 or later)
+
:*&lt;enable_unknown_events&gt; (only in version 5)
:*&lt;ff_threshold&gt; (only in version 5.1 or later)
+
:*&lt;ff_threshold&gt; (only in version 5.1)
:*&lt;each_ff&gt; (only in version 5.1 or later)
+
:*&lt;each_ff&gt; (only in version 5.1)
:*&lt;ff_threshold_normal&gt; (only in version 5.1 or later)
+
:*&lt;ff_threshold_normal&gt; (only in version 5.1)
:*&lt;ff_threshold_warning&gt; (only in version 5.1 or later)
+
:*&lt;ff_threshold_warning&gt; (only in version 5.1)
:*&lt;ff_threshold_critical&gt; (only in version 5.1 or later)
+
:*&lt;ff_threshold_critical&gt; (only in version 5.1)
:*&lt;ff_timeout&gt; (only in version 5.1 or later)
+
:*&lt;ff_timeout&gt; (only in version 5.1)
 
+
:*&lt;ff_type&gt; (only in version 734)
=====Examples=====
+
 
 
+
=====Examples=====
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=new_local_component&id=example_local_component_name&other=local%20component%20created%20by%20Api~5~12~module_begin%0dmodule_name%20example_local_component_name%0dmodule_type%20generic_data%0dmodule_exec%20ps%20|%20grep%20pid%20|%20wc%20-l%0dmodule_interval%202%0dmodule_end&other_mode=url_encode_separator_~&apipass=1234&user=admin&pass=pandora
+
 
 
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=new_local_component&id=example_local_component_name&other=local%20component%20created%20by%20Api~5~12~module_begin%0dmodule_name%20example_local_component_name%0dmodule_type%20generic_data%0dmodule_exec%20ps%20|%20grep%20pid%20|%20wc%20-l%0dmodule_interval%202%0dmodule_end&other_mode=url_encode_separator_~&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set create_alert_template====
 
====set create_alert_template====
  
Create a template of alert.
+
It creates an alert template.
  
 
Call Syntax:
 
Call Syntax:
Line 2,522: Line 2,638:
 
*op=set (required)
 
*op=set (required)
 
*op2=create_alert_template (required)
 
*op2=create_alert_template (required)
*id=&lt;template_name&gt; (required) will be the template name.
+
*id=&lt;template_name&gt; (required). It is the template name.
*other=&lt;serialized parameters&gt; (required) are the template configuration and data, serialized in the following order:
+
*other=&lt;serialized parameters&gt; (required). They are template configuration and data, serialized in the following order:
 
:*&lt;type [regex|max_min|max|min|equal|not_equal|warning|critical|onchange|unknown|always]&gt;
 
:*&lt;type [regex|max_min|max|min|equal|not_equal|warning|critical|onchange|unknown|always]&gt;
 
:*&lt;description&gt;
 
:*&lt;description&gt;
Line 2,556: Line 2,672:
 
Example 1 (condition: regexp =~ /pp/, action: Mail to XXX, max_alert: 10, min_alert: 0, priority: WARNING, group: databases):
 
Example 1 (condition: regexp =~ /pp/, action: Mail to XXX, max_alert: 10, min_alert: 0, priority: WARNING, group: databases):
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=create_alert_template&id=pepito&other=regex|template%20based%20in%20regexp|1||||pp|1||||10|0|||||||||||||3&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=create_alert_template&id=pepito&other=regex|template%20based%20in%20regexp|1||||pp|1||||10|0|||||||||||||3&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
Example 2 (condition: value is not between 5 and 10, max_value: 10.00, min_value: 5.00, time_from: 00:00:00, time_to: 15:00:00, priority: CRITICAL, group: Servers):
 
Example 2 (condition: value is not between 5 and 10, max_value: 10.00, min_value: 5.00, time_from: 00:00:00, time_to: 15:00:00, priority: CRITICAL, group: Servers):
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=create_alert_template&id=template_min_max&other=max_min|template%20based%20in%20range|NULL||||||10|5||||00:00:00|15:00:00|||||||||||4|2&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=create_alert_template&id=template_min_max&other=max_min|template%20based%20in%20range|NULL||||||10|5||||00:00:00|15:00:00|||||||||||4|2&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set update_alert_template====
 
====set update_alert_template====
  
Update the template alert.
+
It updates the template alert.
  
 
Call Syntax:
 
Call Syntax:
Line 2,570: Line 2,686:
 
*op=set (required)
 
*op=set (required)
 
*op2=update_alert_template (required)
 
*op2=update_alert_template (required)
*id=&lt;id_template&gt; (required) should be a template id.
+
*id=&lt;id_template&gt; (required). It should be a template id.
*other=&lt;serialized parameters&gt; (required) are the template configuration and data, serialized in the following order:
+
*other=&lt;serialized parameters&gt; (required). They are template configuration and data, serialized in the following order:
 
:*&lt;template_name&gt;
 
:*&lt;template_name&gt;
 
:*&lt;type [regex|max_min|max|min|equal|not_equal|warning|critical|onchange|unknown|always]&gt;
 
:*&lt;type [regex|max_min|max|min|equal|not_equal|warning|critical|onchange|unknown|always]&gt;
Line 2,603: Line 2,719:
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=update_alert_template&id=38&other=example_template_with_changed_name|onchange|changing%20from%20min_max%20to%20onchange||||||1||||5|1|||1|1|0|1|1|0|0|1|field%20recovery%20example%201|field%20recovery%20example%202|1|8&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=update_alert_template&id=38&other=example_template_with_changed_name|onchange|changing%20from%20min_max%20to%20onchange||||||1||||5|1|||1|1|0|1|1|0|0|1|field%20recovery%20example%201|field%20recovery%20example%202|1|8&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set delete_alert_template====
 
====set delete_alert_template====
  
Delete a alert template and delete the alerts that are using this template.
+
It deletes a alert template and deletes all the alerts it defines.
  
 
Call Syntax:
 
Call Syntax:
Line 2,613: Line 2,729:
 
*op=set (required)
 
*op=set (required)
 
*op2=delete_alert_template (required)
 
*op2=delete_alert_template (required)
*id=&lt;id_template&gt; (required) should be a template id.
+
*id=&lt;id_template&gt; (required). It should be a template id.
  
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=delete_alert_template&id=38&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=delete_alert_template&id=38&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set delete_module_template====
 
====set delete_module_template====
  
Delete a module template.
+
It deletes a module template.
  
 
Call Syntax:
 
Call Syntax:
Line 2,627: Line 2,743:
 
*op=set (required)
 
*op=set (required)
 
*op2=delete_module_template (required)
 
*op2=delete_module_template (required)
*id=&lt;id_alert_template_module&gt; (required) should be a alert_template_module id.
+
*id=&lt;id_alert_template_module&gt; (required). It should be an alert_template_module id.
  
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=delete_module_template&id=38&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=delete_module_template&id=38&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set delete_module_template_by_names====
 
====set delete_module_template_by_names====
  
Delete a module template.
+
It deletes a module template.
  
 
Call Syntax:
 
Call Syntax:
Line 2,643: Line 2,759:
 
*id=&lt;agent name&gt; (required)
 
*id=&lt;agent name&gt; (required)
 
*id2=&lt;alert template name&gt; (required)
 
*id2=&lt;alert template name&gt; (required)
*other=&lt;serialized parameter&gt; (required), are the following in this order:
+
*other=&lt;serialized parameter&gt; (required). They are the following in this order:
 
:*&lt;module name&gt; (required)
 
:*&lt;module name&gt; (required)
  
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=delete_module_template_by_names&id=sample-agent&id2=test&other=memfree&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=delete_module_template_by_names&id=sample-agent&id2=test&other=memfree&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set stop_downtime====
 
====set stop_downtime====
  
Stop a downtime.
+
It stops a downtime.
  
 
Call Syntax:
 
Call Syntax:
Line 2,658: Line 2,774:
 
*op=set (required)
 
*op=set (required)
 
*op2=stop_downtime (required)
 
*op2=stop_downtime (required)
*id=&lt;id_downtime&gt; (required) should be a id downtime.
+
*id=&lt;id_downtime&gt; (required). It should be an id downtime.
  
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=stop_downtime&id=1&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=stop_downtime&id=1&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set new_user====
 
====set new_user====
  
Create a new user into Pandora.
+
It creates a new user in Pandora FMS.
  
 
Call Syntax:
 
Call Syntax:
 
*op=set (required)
 
*op=set (required)
 
*op2=new_user (required)
 
*op2=new_user (required)
*id=&lt;user_name&gt; (required) will be an user name.
+
*id=&lt;user_name&gt; (required). It is an user name.
*other=&lt;serialized parameters&gt; (required) are the user configuration and data, serialized in the following order:
+
*other=&lt;serialized parameters&gt; (required). They are user configuration and data, serialized in the following order:
 
:*&lt;fullname&gt;
 
:*&lt;fullname&gt;
 
:*&lt;firstname&gt;
 
:*&lt;firstname&gt;
Line 2,682: Line 2,798:
 
:*&lt;languages&gt;
 
:*&lt;languages&gt;
 
:*&lt;comments&gt;
 
:*&lt;comments&gt;
 +
:*&lt;time_autorefresh&gt;
 +
:*&lt;default_event_filter&gt;
 +
:*&lt;section&gt;
 +
:*&lt;session_time&gt; (-1 to establish the session as permanent)
  
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=new_user&id=md&other=miguel|de%20dios|matias|kkk|pandora|[email protected]|666|es|descripcion%20y%20esas%20cosas&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=new_user&id=md&other=miguel|de%20dios|matias|kkk|pandora|[email protected]|666|es|descripcion%20y%20esas%20cosas&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====Set update_user====
 
====Set update_user====
  
Update a user selected by the id into the id parameter.
+
It updates a user selected by the id in the id parameter.
  
 
Call Syntax:
 
Call Syntax:
 
*op=set (required)
 
*op=set (required)
 
*op2=update_user (required)
 
*op2=update_user (required)
*id=&lt;user_name&gt; (required) should be an user name.
+
*id=&lt;user_name&gt; (required). It should be a user name.
*other=&lt;serialized parameters&gt; (required) are the module configuration and data, serialized in the following order:
+
*other=&lt;serialized parameters&gt; (required). They are module configuration and data, serialized in the following order:
 
:*&lt;fullname&gt;
 
:*&lt;fullname&gt;
 
:*&lt;firstname&gt;
 
:*&lt;firstname&gt;
Line 2,711: Line 2,831:
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=update_user&id=example_user_name&other=example_fullname||example_lastname||example_new_passwd|example_email||example_language|example%20comment|1|30|&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=update_user&id=example_user_name&other=example_fullname||example_lastname||example_new_passwd|example_email||example_language|example%20comment|1|30|&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====Set delete_user====
 
====Set delete_user====
  
Delete a selected user.
+
It deletes a selected user.
  
 
Call syntax:
 
Call syntax:
Line 2,721: Line 2,841:
 
*op=set (required)
 
*op=set (required)
 
*op2=delete_user (required)
 
*op2=delete_user (required)
*id=&lt;nombre_usuario&gt; (required) should be an user name.
+
*id=&lt;nombre_usuario&gt; (required). It should be a username.
 +
 
 +
=====Examples=====
 +
 
 +
<nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=delete_user&id=md&apipass=1234&user=admin&pass=pandora</nowiki>
 +
 
 +
====Set delete_user_permissions====
 +
{{metaconsole}}
 +
It deletes user permissions.
 +
 
 +
Call syntax:
 +
 
 +
*Op = set(requiered)
 +
*Op2 =delete_user_permission(requiered)
 +
*Return_type = csv|json(requiered)
 +
*Other = id profile(requiered)
 +
 
 +
 
 +
=====Example=====
 +
It deletes user permissions.
 +
It can return Json or CSV, this return is remarked through the URL.
 +
 +
<nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=delete_user_permission&return_type=json&other=2&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
 +
 
 +
====Set add_permission_user_group====
 +
{{metaconsole}}
 +
 
 +
It adds permissions to a user group.
 +
 
 +
Call syntax:
 +
* Op = set(requiered)
 +
* Op2 =add_permission_user_to_group(requiered)
 +
* Return_type = csv|json(requiered)
 +
* Other = user id(requiered)|group_id(requiered)|profile id(requiered)|No hierarchy(Optional)| profile id(Optional)
 +
 
 +
 
  
 
=====Examples=====
 
=====Examples=====
 +
It can return Json or CSV, this return is remarked through the URL.
 +
{{Warning|Be careful, no_hierarchy may be empty. If that is the case, it takes value 0.}}
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=delete_user&id=md&apipass=1234&user=admin&pass=pandora
+
{{Warning|Be careful, permission id (id_up) in the table can be used if an existing permission must be modified.}}
 +
   
 +
<nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=add_permission_user_to_group&return_type=json&other=admin|0|1|1|20&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set enable_disable_user====
 
====set enable_disable_user====
  
Enable a disabled user.
+
It enables a disabled user.
  
 
Call syntax:
 
Call syntax:
Line 2,735: Line 2,894:
 
*op=set (required)
 
*op=set (required)
 
*op2=enable_disable_user (required)
 
*op2=enable_disable_user (required)
*id=&lt;user_name&gt; (required) should be an user name.
+
*id=&lt;user_name&gt; (required). It should be a username.
  
 
=====Examples=====
 
=====Examples=====
Line 2,741: Line 2,900:
 
Example 1 (Disable user 'example_name')  
 
Example 1 (Disable user 'example_name')  
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=enable_disable_user&id=example_name&other=0&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=enable_disable_user&id=example_name&other=0&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
Example 2 (Enable user 'example_name')
 
Example 2 (Enable user 'example_name')
 
    
 
    
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=enable_disable_user&id=example_name&other=1&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=enable_disable_user&id=example_name&other=1&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set meta_synch_user====
 
====set meta_synch_user====
  
 
{{metaconsole}}
 
{{metaconsole}}
Syncronizes metaconsole users to the node
+
 
 +
It syncronizes metaconsole users to the node
  
 
Call syntax:
 
Call syntax:
Line 2,756: Line 2,916:
 
*op2=meta_synch_user (required)
 
*op2=meta_synch_user (required)
 
*other=&lt;serialized parameters&gt; (opcional):
 
*other=&lt;serialized parameters&gt; (opcional):
:*&lt;user_name_1,user_name_2,user_name_3..&gt; (Nombres de los usuarios separados por comas y sin espacios al inicio o al final, required)
+
:*&lt;user_name_1,user_name_2,user_name_3..&gt; (Usernames separated by comma and without spaces at the beginning or the end, required)
 
:*&lt;server_name&gt; (required)
 
:*&lt;server_name&gt; (required)
:*&lt;profile_mode(1-0)&gt; (opcional)
+
:*&lt;profile_mode(1-0)&gt; (optional)
:*&lt;group_name&gt; (opcional)
+
:*&lt;group_name&gt; (optional)
:*&lt;profile_1,profile_2,profile_3&gt; (Perfiles separados por comas y sin espacios al principio y al final, opcional)
+
:*&lt;profile_1,profile_2,profile_3&gt; (Profiles separated by comma and without spaces at the beginning or at the end, optional)
:*&lt;create_groups(1-0)&gt; (opcional)
+
:*&lt;create_groups(1-0)&gt; (optional)
  
 
=====Example=====
 
=====Example=====
  
  http://localhost/pandora_console/include/api.php?op=set&op2=meta_synch_user&apipass=1234&user=admin&pass=pandora&other=name1,name2|nodo1|0|||&other_mode=url_encode_separator_|
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=meta_synch_user&apipass=1234&user=admin&pass=pandora&other=name1,name2|nodo1|0|||&other_mode=url_encode_separator_|</nowiki>
  
 
====set create_group====
 
====set create_group====
  
Create a group.
+
It creates a group.
  
 
Call syntax:
 
Call syntax:
Line 2,775: Line 2,935:
 
*op=set (required)
 
*op=set (required)
 
*op2=create_group (required)
 
*op2=create_group (required)
*id=&lt;group_name&gt; (required) should be a group name.
+
*id=&lt;group_name&gt; (required). It should be a group name.
*other=&lt;serialized_parameters&gt; (required). Are the following in this order:
+
*other=&lt;serialized_parameters&gt; (required). They are the following in this order:
 
:*&lt;icon name&gt;  
 
:*&lt;icon name&gt;  
 
:*&lt;parent group id&gt; (optional)
 
:*&lt;parent group id&gt; (optional)
Line 2,790: Line 2,950:
 
Example 1 (with parent group: Servers)
 
Example 1 (with parent group: Servers)
 
   
 
   
   http://127.0.0.1/pandora_console/include/api.php?op=set&op2=create_group&id=example_group_name&other=applications|2&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
   <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=create_group&id=example_group_name&other=applications|2&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
 
   
 
   
 
Example 2 (without parent group)
 
Example 2 (without parent group)
 
   
 
   
   http://127.0.0.1/pandora_console/include/api.php?op=set&op2=create_group&id=example_group_name2&other=computer|&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
   <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=create_group&id=example_group_name2&other=computer|&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set update_group====
 
====set update_group====
  
Update a group.
+
It updates a group with past data as parameters.
  
 
Call syntax:
 
Call syntax:
Line 2,804: Line 2,964:
 
*op=set (required)
 
*op=set (required)
 
*op2=update_group (required)
 
*op2=update_group (required)
*id=&lt;group_id&gt; (required) should be a group id
+
*id=&lt;group_id&gt; (required). It should be a group id
*other=&lt;serialized_parameters&gt; (required). Are the following in this order:
+
*other=&lt;serialized_parameters&gt; (required). They are the following in this order:
 
:*&lt;group name&gt;  
 
:*&lt;group name&gt;  
 
:*&lt;icon name&gt;  
 
:*&lt;icon name&gt;  
Line 2,818: Line 2,978:
 
=====Example=====
 
=====Example=====
  
   http://127.0.0.1/pandora_console/include/api.php?op=set&op2=update_group&id=example_group_id&other=New%20Name|application|2|new%20description|1|0|custom%20id||&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
   <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=update_group&id=example_group_id&other=New%20Name|application|2|new%20description|1|0|custom%20id||&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set delete_group====
 
====set delete_group====
  
Delete a group.
+
It deletes a group.
  
 
Call syntax:
 
Call syntax:
 
*op=set (required)
 
*op=set (required)
 
*op2=delete_group (required)
 
*op2=delete_group (required)
*id=&lt;group_id&gt; (required) should be a group id
+
*id=&lt;group_id&gt; (required) it should be a group id
  
 
=====Example=====
 
=====Example=====
  
   http://127.0.0.1/pandora_console/include/api.php?op=set&op2=delete_group&id=303&apipass=1234&user=admin&pass=pandora
+
   <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=delete_group&id=303&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====Set add_user_profile====
 
====Set add_user_profile====
  
Add a profile into user.
+
It adds a profile into user.
  
 
Call syntax:
 
Call syntax:
Line 2,841: Line 3,001:
 
*op=set (required)
 
*op=set (required)
 
*op2=add_user_profile (required)
 
*op2=add_user_profile (required)
*id=&lt;user_name&gt; (required) should be an user name.
+
*id=&lt;user_name&gt; (required). It should be a user name.
*other=&lt;serialized parameters&gt; (required) are the group configuration and data and the profile, serialized in the following order:  
+
*other=&lt;serialized parameters&gt; (required). They are group and profile configuration and data, serialized in the following order:  
 
:*&lt;group&gt;
 
:*&lt;group&gt;
 
:*&lt;profile&gt;
 
:*&lt;profile&gt;
Line 2,848: Line 3,008:
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=add_user_profile&id=md&other=12|4&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=add_user_profile&id=md&other=12|4&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set delete_user_profile====
 
====set delete_user_profile====
  
Deattach a profile of user.
+
It deletes a profile from a user.
  
 
Call syntax:
 
Call syntax:
Line 2,858: Line 3,018:
 
*op=set (required)
 
*op=set (required)
 
*op2=delete_user_profile (required)
 
*op2=delete_user_profile (required)
*id=&lt;user_name&gt; (required) should be an user name.
+
*id=&lt;user_name&gt; (required). It should be a user name.
*other=&lt;serialized parameters&gt; (required) are the group configuration, data and profile, serialized in the following order:
+
*other=&lt;serialized parameters&gt; (required). They are the group configuration, data and profile, serialized in the following order:
 
:*&lt;group&gt;
 
:*&lt;group&gt;
 
:*&lt;profile&gt;
 
:*&lt;profile&gt;
Line 2,865: Line 3,025:
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=delete_user_profile&id=md&other=12|4&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=delete_user_profile&id=md&other=12|4&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set new_incident====
 
====set new_incident====
  
Create a new incident.
+
It creates a new incident.
  
 
Call syntax:
 
Call syntax:
 
*op=set (required)
 
*op=set (required)
 
*op2=new_incident (required)
 
*op2=new_incident (required)
*other=&lt;serialized parameters&gt; (required) are the incident configuration and data, serialized in the following order:
+
*other=&lt;serialized parameters&gt; (required). They are incident configuration and data, serialized in the following order:
 
:*&lt;title&gt;
 
:*&lt;title&gt;
 
:*&lt;description&gt;
 
:*&lt;description&gt;
Line 2,884: Line 3,044:
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=new_incident&other=titulo|descripcion%20texto|Logfiles|2|10|12&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=new_incident&other=titulo|descripcion%20texto|Logfiles|2|10|12&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====Set new_note_incident====
 
====Set new_note_incident====
  
Add a note into a incident.
+
It adds a note within an incident.
  
 
Call syntax:
 
Call syntax:
 
*op=set (required)
 
*op=set (required)
 
*op2=new_note_incident (required)
 
*op2=new_note_incident (required)
*id=&lt;id_incident&gt; (required )the incident id.
+
*id=&lt;id_incident&gt; (required). It is the incident id.
*id2=&lt;user_name&gt; (required) the user name.
+
*id2=&lt;user_name&gt; (required). Username.
*other=&lt;note&gt; (required) is the note codified in url encode.
+
*other=&lt;note&gt; (required). It is the note codified in url encode.
  
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=new_note_incident&id=5&id2=miguel&other=una%20nota%20para%20la%20incidencia&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=new_note_incident&id=5&id2=miguel&other=una%20nota%20para%20la%20incidencia&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set validate_all_alerts====
 
====set validate_all_alerts====
  
Validate all alerts.
+
It validates all alerts.
  
 
Call syntax:
 
Call syntax:
Line 2,910: Line 3,070:
  
 
=====Examples=====
 
=====Examples=====
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=validate_all_alerts&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=validate_all_alerts&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set validate_all_policy_alerts====
 
====set validate_all_policy_alerts====
  
Validate the alerts created from a policy.
+
It validates the alerts created from a policy.
  
 
Call syntax:
 
Call syntax:
Line 2,921: Line 3,081:
  
 
=====Examples=====
 
=====Examples=====
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=validate_all_policy_alerts&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=validate_all_policy_alerts&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set event_validate_filter====
 
====set event_validate_filter====
  
Validate all events that pass the filter pass as parameters.
+
It validates all events that pass the past filter as parameters.
 +
 
  
 
{{metaconsole}}
 
{{metaconsole}}
Line 2,934: Line 3,095:
 
*op2=event_validate_filter (required)
 
*op2=event_validate_filter (required)
 
*other_mode=url_encode_separator_|(optional)
 
*other_mode=url_encode_separator_|(optional)
*other=&lt;serialized_parameters&gt; (optional). Are the following in this order:
+
*other=&lt;serialized_parameters&gt; (optional). They are the following in this order:
 
:*&lt;separator&gt;
 
:*&lt;separator&gt;
:*&lt;criticity&gt; De 0 a 4
+
:*&lt;criticity&gt; From 0 to 4
 
:*&lt;agent name&gt;
 
:*&lt;agent name&gt;
 
:*&lt;module name&gt;
 
:*&lt;module name&gt;
Line 2,946: Line 3,107:
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=event_validate_filter&other_mode=url_encode_separator_|&other=;|2&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=event_validate_filter&other_mode=url_encode_separator_|&other=;|2&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set event_validate_filter_pro====
 
====set event_validate_filter_pro====
  
It is the similar to previous call.
+
It is similar to previous call.
 +
 
  
 
{{metaconsole}}
 
{{metaconsole}}
Line 2,959: Line 3,121:
 
*op2=event_validate_filter_pro (required)
 
*op2=event_validate_filter_pro (required)
 
*other_mode=url_encode_separator_| (optional)
 
*other_mode=url_encode_separator_| (optional)
*other=&lt;serialized parameters&gt; (optional), are the following in this order:
+
*other=&lt;serialized parameters&gt; (optional). They are the following in this order:
 
:*&lt;separator&gt;
 
:*&lt;separator&gt;
 
:*&lt;criticity&gt; From 0 to 4
 
:*&lt;criticity&gt; From 0 to 4
Line 2,971: Line 3,133:
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=event_validate_filter_pro&other_mode=url_encode_separator_|&other=;|2&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=event_validate_filter_pro&other_mode=url_encode_separator_|&other=;|2&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set new_alert_template====
 
====set new_alert_template====
  
Apply a new alert from a template and module pass as id agent and name of module.
+
It applies a new alert from a template and module which has gone through id agent and module name.
  
 
Call syntax:
 
Call syntax:
Line 2,984: Line 3,146:
 
*id2=&lt;alert template name&gt; (required)
 
*id2=&lt;alert template name&gt; (required)
 
*other_mode=url_encode_separator_| (optional)
 
*other_mode=url_encode_separator_| (optional)
*other=&lt;serialized parameter&gt; (required), are the following in this order:
+
*other=&lt;serialized parameter&gt; (required). They are the following in this order:
 
:*&lt;module name&gt; (required)
 
:*&lt;module name&gt; (required)
  
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=new_alert_template&id=miguel-portatil&id2=test&other_mode=url_encode_separator_|&other=memfree&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=new_alert_template&id=miguel-portatil&id2=test&other_mode=url_encode_separator_|&other=memfree&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set alert_actions====
 
====set alert_actions====
  
Add actions into a alert.
+
It adds actions within an alert.
  
 
Call syntax:
 
Call syntax:
Line 3,001: Line 3,163:
 
*id2=&lt;alert template name&gt; (required)
 
*id2=&lt;alert template name&gt; (required)
 
*other_mode=url_encode_separator_| (optional)
 
*other_mode=url_encode_separator_| (optional)
*other=&lt;serialized parameters&gt; (required), are the following in this order:
+
*other=&lt;serialized parameters&gt; (required). They are the following in this order:
 
:*&lt;module name&gt; (required)
 
:*&lt;module name&gt; (required)
 
:*&lt;action name&gt; (required)
 
:*&lt;action name&gt; (required)
Line 3,009: Line 3,171:
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=alert_actions&id=miguel-portatil&id2=test&other_mode=url_encode_separator_|&other=memfree|test&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=alert_actions&id=miguel-portatil&id2=test&other_mode=url_encode_separator_|&other=memfree|test&apipass=1234&user=admin&pass=pandora</nowiki>
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=alert_actions&id=miguel-portatil&id2=test&other_mode=url_encode_separator_|&other=memfree|test|1|3&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=alert_actions&id=miguel-portatil&id2=test&other_mode=url_encode_separator_|&other=memfree|test|1|3&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set alert_commands====
 
====set alert_commands====
Add commands to an alert.
+
It adds commands within an alert.
  
 
Call syntax:
 
Call syntax:
Line 3,021: Line 3,183:
 
*id=&lt;name of the command&gt; (required)
 
*id=&lt;name of the command&gt; (required)
 
*other_mode=url_encode_separator_| (optional)
 
*other_mode=url_encode_separator_| (optional)
*other=&lt;serialized parameters&gt; (required), which are the following in this order:
+
*other=&lt;serialized parameters&gt; (required). They are the following in this order:
 
:*&lt;command&gt; (required)
 
:*&lt;command&gt; (required)
 
:*&lt;id_group&gt; (required)
 
:*&lt;id_group&gt; (required)
Line 3,029: Line 3,191:
  
 
=====Examples=====
 
=====Examples=====
  http://localhost/pandora_console/include/api.php?op=set&op2=alert_commands&id=PRUEBA1&other=command|0|Desc|1|des1|val1|des2|val2|des3|val3||val4|des5&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=alert_commands&id=PRUEBA1&other=command|0|Desc|1|des1|val1|des2|val2|des3|val3||val4|des5&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set new_module====
 
====set new_module====
Create a new module.
+
It creates a new module.
  
 
Call Syntax:
 
Call Syntax:
Line 3,041: Line 3,203:
 
*id2=&lt;new module name&gt; (required)
 
*id2=&lt;new module name&gt; (required)
 
*other_mode=url_encode_separator_| (optional)
 
*other_mode=url_encode_separator_| (optional)
*other=&lt;serialized parameters&gt; (required), are the following in this order:
+
*other=&lt;serialized parameters&gt; (required). They are the following in this order:
 
:*&lt;network module kind &gt; (required)
 
:*&lt;network module kind &gt; (required)
 
:*&lt;action name&gt; (required)
 
:*&lt;action name&gt; (required)
Line 3,060: Line 3,222:
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=new_module&id=miguel-portatil&id2=juanito&other_mode=url_encode_separator_|&other=remote_tcp_string|localhost|33|descripcion%20larga&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=new_module&id=miguel-portatil&id2=juanito&other_mode=url_encode_separator_|&other=remote_tcp_string|localhost|33|descripcion%20larga&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set delete_module====
 
====set delete_module====
Delete a module.
+
It deletes a module.
  
 
Call syntax:
 
Call syntax:
Line 3,075: Line 3,237:
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=delete_module&id=miguel-portatil&id2=juanito&other=simulate&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=delete_module&id=miguel-portatil&id2=juanito&other=simulate&apipass=1234&user=admin&pass=pandora</nowiki>
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=delete_module&id=miguel-portatil&id2=juanito&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=delete_module&id=miguel-portatil&id2=juanito&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set enable_alert====
 
====set enable_alert====
Enable a alert of a agent.
+
It enables an agent alert.
  
 
Call syntax
 
Call syntax
Line 3,093: Line 3,255:
 
===== Examples =====
 
===== Examples =====
  
  http://localhost/pandora_console/include/api.php?op=set&op2=enable_alert&id=garfio&id2=Status&other=Warning%20condition&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=enable_alert&id=garfio&id2=Status&other=Warning%20condition&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set enable_alert_alias====
 
====set enable_alert_alias====
  
Enable alert of a agent by alias.
+
It enables agent alert by alias.
  
 
Call syntax:
 
Call syntax:
Line 3,109: Line 3,271:
 
===== Examples =====
 
===== Examples =====
  
  http://localhost/pandora_console/include/api.php?op=set&op2=enable_alert_alias&id=nova&id2=CPU%20Load&other=critical%20condition&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=enable_alert_alias&id=nova&id2=CPU%20Load&other=critical%20condition&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set disable_alert====
 
====set disable_alert====
  
Disable a alert of a agent.
+
It disables an agent alert.
  
 
Call syntax:
 
Call syntax:
Line 3,127: Line 3,289:
 
===== Examples =====
 
===== Examples =====
  
  http://localhost/pandora_console/include/api.php?op=set&op2=disable_alert&id=garfio&id2=Status&other=Warning%20condition&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=disable_alert&id=garfio&id2=Status&other=Warning%20condition&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set disable_alert_alias====
 
====set disable_alert_alias====
  
Disable a alert of a agent.
+
It disables an agent alert.
  
 
Call syntax:
 
Call syntax:
Line 3,145: Line 3,307:
 
===== Examples =====
 
===== Examples =====
  
  http://localhost/pandora_console/include/api.php?op=set&op2=disable_alert_alias&id=nova&id2=CPU%20Load&other=critical%20condition&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=disable_alert_alias&id=nova&id2=CPU%20Load&other=critical%20condition&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set enable_module_alerts====
 
====set enable_module_alerts====
  
Equal to the enable_alert api call.
+
Same as enable_alert api call.
  
 
Call syntax:
 
Call syntax:
Line 3,161: Line 3,323:
 
===== Examples =====
 
===== Examples =====
  
  http://localhost/pandora_console/include/api.php?op=set&op2=enable_module_alerts&id=garfio&id2=Status&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=enable_module_alerts&id=garfio&id2=Status&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set disable_module_alerts====
 
====set disable_module_alerts====
  
Equal to the call api disable_alert.
+
Same as api disable_alert.
  
 
Call syntax:
 
Call syntax:
Line 3,176: Line 3,338:
 
===== Examples =====
 
===== Examples =====
  
  http://localhost/pandora_console/include/api.php?op=set&op2=disable_module_alerts&id=garfio&id2=Status&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=disable_module_alerts&id=garfio&id2=Status&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set enable_module====
 
====set enable_module====
  
Enable the module.
+
It enables the module.
  
 
Call syntax
 
Call syntax
Line 3,191: Line 3,353:
 
===== Examples =====
 
===== Examples =====
  
  http://localhost/pandora_console/include/api.php?op=set&op2=enable_module&id=garfio&id2=Status&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=enable_module&id=garfio&id2=Status&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set disable_module====
 
====set disable_module====
  
Disable the module.
+
It disables the module.
  
Call syntax
+
Call syntax:
  
 
*op=set (required)
 
*op=set (required)
Line 3,206: Line 3,368:
 
===== Examples =====
 
===== Examples =====
  
  http://localhost/pandora_console/include/api.php?op=set&op2=disable_module&id=garfio&id2=Status&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=disable_module&id=garfio&id2=Status&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set create_network_module_from_component====
 
====set create_network_module_from_component====
  
Create a new network module from a component.
+
It creates a new network module from a component.
  
 
Call syntax:
 
Call syntax:
Line 3,216: Line 3,378:
 
*op=set (required)
 
*op=set (required)
 
*op2=create_network_module_from_component (required)
 
*op2=create_network_module_from_component (required)
*id=&lt;Nombre del agente&gt; (required)
+
*id=&lt;Agent name&gt; (required)
*id2=&lt;Nombre del componente&gt; (required)
+
*id2=&lt;Component name&gt; (required)
  
  
 
===== Examples =====
 
===== Examples =====
  
  http://localhost/pandora_console/include/api.php?op=set&op2=create_network_module_from_component&id=garfio&id2=OS%20Total%20process&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=create_network_module_from_component&id=garfio&id2=OS%20Total%20process&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set module_data====
 
====set module_data====
  
Add module value.
+
It adds a module value.
  
 
Call syntax:
 
Call syntax:
Line 3,232: Line 3,394:
 
*op=set (required)
 
*op=set (required)
 
*op2=module_data (required)
 
*op2=module_data (required)
*id=&lt;id agente módulo&gt; (required)
+
*id=&lt;id module agent&gt; (required)
 
*other: module data and timestamp serialized.
 
*other: module data and timestamp serialized.
**dato: data which must belong to any Pandora data type.
+
**dato: data which must belong to any Pandora FMS data type.
**tiempo: could be a specified timestamp of the string "now".
+
**tiempo: it could be a specified timestamp of the string "now".
  
 
=====Example=====
 
=====Example=====
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=module_data&id=14&other_mode=url_encode_separator_|&other=123|now&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=module_data&id=14&other_mode=url_encode_separator_|&other=123|now&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set new_module_group====
 
====set new_module_group====
Creates a new module group.
+
It creates a new module group.
  
 
Call syntax:
 
Call syntax:
Line 3,249: Line 3,411:
  
 
=====Examples=====
 
=====Examples=====
  http://localhost/pandora_console/include/api.php?op=set&op2=new_module_group&id=Module_group_name&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=new_module_group&id=Module_group_name&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set module_group_synch====
 
====set module_group_synch====
 
{{metaconsole}}
 
{{metaconsole}}
Syncronizes a module group from the Metaconsole.
+
It syncronizes a module group from the Metaconsole.
  
 
Call syntax:
 
Call syntax:
 
*op=set (required)
 
*op=set (required)
 
*op2=module_group_synch (required)
 
*op2=module_group_synch (required)
*other=&lt;serialized parameters&gt; (required) in this case the name of the server(s)that are required to sync with the meta.
+
*other=&lt;serialized parameters&gt; (required). In this case, the name of the server(s)that are required to sync with the meta.
 
:*&lt;server_name_1&gt;&lt;server_name_2&gt;...&lt;server_name_n&gt; (required)
 
:*&lt;server_name_1&gt;&lt;server_name_2&gt;...&lt;server_name_n&gt; (required)
  
 
=====Examples=====
 
=====Examples=====
  http://localhost/pandora_console/include/api.php?op=set&op2=module_group_synch&other=server_name1|server_name2|server_name3&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=module_group_synch&other=server_name1|server_name2|server_name3&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set add_module_in_conf====
 
====set add_module_in_conf====
 
>= 5.0 (Only Enterprise)
 
>= 5.0 (Only Enterprise)
  
Add the configuration into a local module.
+
It adds the configuration to a local module.
  
 
Call syntax:
 
Call syntax:
 
*op=set (required)
 
*op=set (required)
 
*op2=add_module_in_conf (required)
 
*op2=add_module_in_conf (required)
*id=&lt;id agente&gt; (required)
+
*id=&lt;agent id&gt; (required)
*id2=&lt;nombre módulo&gt; (required)
+
*id2=&lt;module name&gt; (required)
 
*other: The module data that will be placed in the conf file encoded in base64 (required) (required)
 
*other: The module data that will be placed in the conf file encoded in base64 (required) (required)
  
 
=====Examples=====
 
=====Examples=====
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=add_module_in_conf&apipass=1234&user=admin&pass=pandora&id=9043&id2=example_name&other=bW9kdWxlX2JlZ2luCm1vZHVsZV9uYW1lIGV4YW1wbGVfbmFtZQptb2R1bGVfdHlwZSBnZW5lcmljX2RhdGEKbW9kdWxlX2V4ZWMgZWNobyAxOwptb2R1bGVfZW5k
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=add_module_in_conf&apipass=1234&user=admin&pass=pandora&id=9043&id2=example_name&other=bW9kdWxlX2JlZ2luCm1vZHVsZV9uYW1lIGV4YW1wbGVfbmFtZQptb2R1bGVfdHlwZSBnZW5lcmljX2RhdGEKbW9kdWxlX2V4ZWMgZWNobyAxOwptb2R1bGVfZW5k</nowiki>
  
Will be returned '0' when success, '-1' when error, '-2' if already exists
+
It will return '0' when it is successful, '-1' when there is an error and '-2' if it already exists.
  
 
====set delete_module_in_conf====
 
====set delete_module_in_conf====
 
>= 5.0 (Only Enterprise)
 
>= 5.0 (Only Enterprise)
  
Delete a configuration of local module.
+
It deletes a local module configuration.
  
 
Call syntax:
 
Call syntax:
 
*op=set (required)
 
*op=set (required)
 
*op2=add_module_in_conf (required)
 
*op2=add_module_in_conf (required)
*id=&lt;id agente&gt; (required)
+
*id=&lt;agent id&gt; (required)
 
*id2=&lt;module name&gt; (required)
 
*id2=&lt;module name&gt; (required)
  
 
=====Examples=====
 
=====Examples=====
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=add_module_in_conf&user=admin&pass=pandora&id=9043&id2=example_name
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=add_module_in_conf&user=admin&pass=pandora&id=9043&id2=example_name</nowiki><nowiki>Insert non-formatted text here</nowiki>
  
Will be returned '0' when success or '-1' when error
+
It will return '0' when it is successful or '-1' when there is an error
  
 
====set update_module_in_conf====
 
====set update_module_in_conf====
 
>= 5.0 (Only Enterprise)
 
>= 5.0 (Only Enterprise)
  
Update a configuration of local module.
+
It updates a local module configuration.
  
 
Call syntax:
 
Call syntax:
Line 3,310: Line 3,472:
  
 
=====Examples=====
 
=====Examples=====
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=update_module_in_conf&apipass=1234&user=admin&pass=pandora&id=9043&id2=example_name&other=bW9kdWxlX2JlZ2luCm1vZHVsZV9uYW1lIGV4YW1wbGVfbmFtZQptb2R1bGVfdHlwZSBnZW5lcmljX2RhdGEKbW9kdWxlX2V4ZWMgZWNobyAxOwptb2R1bGVfZW5k
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=update_module_in_conf&apipass=1234&user=admin&pass=pandora&id=9043&id2=example_name&other=bW9kdWxlX2JlZ2luCm1vZHVsZV9uYW1lIGV4YW1wbGVfbmFtZQptb2R1bGVfdHlwZSBnZW5lcmljX2RhdGEKbW9kdWxlX2V4ZWMgZWNobyAxOwptb2R1bGVfZW5k</nowiki>
  
Will be returned '1' when no changes, '0' when success, '-1' when error, '-2' if doesn't exist
+
It will return '1' when there are no changes, '0' when it is successful, '-1' when there is an error and '-2' if does not exist.
  
 
====set create_event====
 
====set create_event====
  
Create a new event into Pandora.
+
It creates a new event in Pandora FMS.
 +
 
  
 
{{metaconsole}}
 
{{metaconsole}}
Line 3,323: Line 3,486:
 
*op=set (required)
 
*op=set (required)
 
*op2=create_event (required)
 
*op2=create_event (required)
*other=&lt;serialized_parameters&gt; (required) event's configuration data as follows:
+
*other=&lt;serialized_parameters&gt; (required). Event configuration data as follows:
 
:*&lt;event_text&gt; (required)(string)
 
:*&lt;event_text&gt; (required)(string)
 
:*&lt;id_group&gt; (required)(string)
 
:*&lt;id_group&gt; (required)(string)
Line 3,340: Line 3,503:
 
:*&lt;source&gt;(string)
 
:*&lt;source&gt;(string)
 
:*&lt;tags&gt;(string)
 
:*&lt;tags&gt;(string)
:*&lt;custom_data&gt; Custom data should be a base 64 encoded JSON document.
+
:*&lt;custom_data&gt;. Custom data should be a base64 encoded JSON document.
:*&lt;server_id&gt; The id of the child node (only for metaconsole).
+
:*&lt;server_id&gt;. The id of the child node (only for Metaconsole).
 
:*&lt;id_extra&gt; (alphanumeric)
 
:*&lt;id_extra&gt; (alphanumeric)
  
Line 3,347: Line 3,510:
 
=====Examples=====
 
=====Examples=====
  
http://127.0.0.1/pandora_console/include/api.php?op=set&op2=create_event&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora&other=Event_name|0|1|0|admin|alert_fired|4|1|||||comment|admin||tags|eyJBbnN3ZXIgdG8gdGhlIFVsdGltYXRlIFF1ZXN0aW9uIG9mIExpZmUsIHRoZSBVbml2ZXJzZSwgYW5kIEV2ZXJ5dGhpbmciOiA0Mn0=||12
+
<nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=create_event&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora&other=Event_name|0|1|0|admin|alert_fired|4|1|||||comment|admin||tags|eyJBbnN3ZXIgdG8gdGhlIFVsdGltYXRlIFF1ZXN0aW9uIG9mIExpZmUsIHRoZSBVbml2ZXJzZSwgYW5kIEV2ZXJ5dGhpbmciOiA0Mn0=||12</nowiki>
  
 
====set add_event_comment====
 
====set add_event_comment====
  
>= 5.1
+
It adds an event comment.  
 
+
{{Tip|This feature can be also used in the Metaconsole}}
Add an event comment.  
 
 
 
{{metaconsole}}
 
  
 
Call syntax:
 
Call syntax:
 
*op=set (required)
 
*op=set (required)
 
*op2=add_event_comment (required)
 
*op2=add_event_comment (required)
*other=&lt;serialized_parameters&gt; (required) event's configuration data as follows:
+
*other=&lt;serialized_parameters&gt; (required). Event configuration data serialized as follows:
 
:*&lt;comment&gt; (required)
 
:*&lt;comment&gt; (required)
 +
 +
{{Tip|Enter the parameter "true" after "string" to use it in the Metaconsole}}
  
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=add_event_comment&id=event_id&other=string&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
* Node
 +
 
 +
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=add_event_comment&id=event_id&other=string&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
 +
 
 +
* Metaconsole
 +
 
 +
<nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=add_event_comment&id=event_id&other=string|true&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set create_netflow_filter====
 
====set create_netflow_filter====
 
(>=5.0)
 
(>=5.0)
  
Create a new filter of netflow.
+
It creates a new netflow filter.
  
 
Call syntax:
 
Call syntax:
 
*op=set (required)
 
*op=set (required)
 
*op2=create_netflow_filter (required)
 
*op2=create_netflow_filter (required)
*other=&lt;serialized parameters&gt; (required) filter data in this order:
+
*other=&lt;serialized parameters&gt; (required). It filters data in this order:
 
:*&lt;filter_name&gt; (required)
 
:*&lt;filter_name&gt; (required)
 
:*&lt;group_id&gt; (required)
 
:*&lt;group_id&gt; (required)
Line 3,384: Line 3,552:
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora/include/api.php?op=set&op2=create_netflow_filter&apipass=1234&user=admin&pass=pandora&other=Filter%20name|9|host%20192.168.50.3%20OR%20host%20192.168.50.4%20or%20HOST%20192.168.50.6|dstport|kilobytes&other_mode=url_encode_separator_|
+
  <nowiki>http://127.0.0.1/pandora/include/api.php?op=set&op2=create_netflow_filter&apipass=1234&user=admin&pass=pandora&other=Filter%20name|9|host%20192.168.50.3%20OR%20host%20192.168.50.4%20or%20HOST%20192.168.50.6|dstport|kilobytes&other_mode=url_encode_separator_|</nowiki>
  
 
====set create_custom_field====
 
====set create_custom_field====
 
>= 5.0
 
>= 5.0
  
Create a new custom field.
+
It creates a new custom field.
  
 
Call syntax:
 
Call syntax:
 
*op=set (required)
 
*op=set (required)
 
*op2=create_custom_field (required)
 
*op2=create_custom_field (required)
*other=&lt;serialized parameters&gt; (required) parameters to configure the custom field
+
*other=&lt;serialized parameters&gt; (required). Parameters to configure the custom field.
 
:*&lt;name&gt; (required)
 
:*&lt;name&gt; (required)
:*&lt;flag_display_front&gt; (required; 0 the field will not be displayed on operation view, 1 the field will be displayed)
+
:*&lt;flag_display_front&gt; (required; 0 for the field to not be displayed on operation view, 1 for the field to be displayed)
  
 
=====Example=====
 
=====Example=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=create_custom_field&other=mycustomfield|0&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=create_custom_field&other=mycustomfield|0&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set create_tag====
 
====set create_tag====
 
>= 5.0
 
>= 5.0
  
Create a new tag.
+
It creates a new tag.
  
 
Call syntax:
 
Call syntax:
 
*op=set (required)
 
*op=set (required)
 
*op2=create_tag (required)
 
*op2=create_tag (required)
*other=&lt;serialized parameters&gt; (required) parameters to configure the tag
+
*other=&lt;serialized parameters&gt; (required). Parameters to configure the tag.
:*&lt;name&gt; Tag's name (required)
+
:*&lt;name&gt; Tag name (required)
:*&lt;description&gt; Tag's description
+
:*&lt;description&gt; Tag description
:*&lt;eurl&gt; Tag's URL
+
:*&lt;eurl&gt; Tag URL
:*&lt;email&gt; Tag's email
+
:*&lt;email&gt; Tag email
  
 
=====Example=====
 
=====Example=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=create_tag&other=tag_name|tag_description|tag_url|tag_email&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=create_tag&other=tag_name|tag_description|tag_url|tag_email&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set enable_disable_agent====
 
====set enable_disable_agent====
  
Enable / disabled agent.
+
It enables a disabled agent.
  
 
Call syntax:
 
Call syntax:
Line 3,428: Line 3,596:
 
*op=set (required)
 
*op=set (required)
 
*op2=enable_disable_agent (required)
 
*op2=enable_disable_agent (required)
*id=&lt;agent_id&gt; (required) should be an agent id.
+
*id=&lt;agent_id&gt; (required). It should be an agent id.
  
 
=====Examples=====
 
=====Examples=====
Line 3,434: Line 3,602:
 
Example 1 (Disable agent 'example_id')  
 
Example 1 (Disable agent 'example_id')  
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=enable_disable_agent&id=example_id&other=0&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=enable_disable_agent&id=example_id&other=0&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
Example 2 (Enable agent 'example_id')
 
Example 2 (Enable agent 'example_id')
 
    
 
    
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=enable_disable_agent&id=example_id&other=1&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=enable_disable_agent&id=example_id&other=1&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set gis_agent_only_position====
 
====set gis_agent_only_position====
 
>= 5.0
 
>= 5.0
  
Add new position GIS in any agent.
+
It adds a new GIS position within any agent.
  
 
Call syntax:
 
Call syntax:
 
*op=set (required)
 
*op=set (required)
 
*op2=gis_agent_only_position (required)
 
*op2=gis_agent_only_position (required)
*id=<índice> (required) agent index
+
*id=<índice> (required). Agent index.
*other=&lt;serialized parameters&gt; (required) params to set position
+
*other=&lt;serialized parameters&gt; (required). Parameters to set the GIS.
:*&lt;latitude&gt; Latitude
+
:*&lt;latitude&gt; Latitude.
:*&lt;longitude&gt; Longitude
+
:*&lt;longitude&gt; Longitude.
:*&lt;altitude&gt; Altitude
+
:*&lt;altitude&gt; Altitude.
  
 
=====Example=====
 
=====Example=====
  
  http://127.0.0.1/pandora_console/include/api.php?apipass=1234&user=admin&pass=pandora&op=set&op2=gis_agent_only_position&id=582&other_mode=url_encode_separator_|&other=2%7C1%7C0
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?apipass=1234&user=admin&pass=pandora&op=set&op2=gis_agent_only_position&id=582&other_mode=url_encode_separator_|&other=2%7C1%7C0</nowiki>
  
 
====set gis_agent====
 
====set gis_agent====
 
>= 5.0
 
>= 5.0
  
Add the gis data agent.
+
It adds a gis data agent.
  
 
Call syntax:
 
Call syntax:
 
*op=set (required)
 
*op=set (required)
 
*op2=gis_agent_only_position (required)
 
*op2=gis_agent_only_position (required)
*id=<índice> (compolsory) agent index.
+
*id=<índice> (compolsory). Agent index.
*other=&lt;serialized parameters&gt; (required) gis data
+
*other=&lt;serialized parameters&gt; (required). Gis data.
 
:*&lt;latitude&gt;
 
:*&lt;latitude&gt;
 
:*&lt;longitude&gt;
 
:*&lt;longitude&gt;
Line 3,479: Line 3,647:
 
:*&lt;description_update_gis&gt;
 
:*&lt;description_update_gis&gt;
 
:*&lt;description_first_insert&gt;
 
:*&lt;description_first_insert&gt;
 +
 +
=====Ejemplo=====
 +
<nowiki>http://127.0.0.1/pandora5/include/api.php?apipass=1234&user=admin&pass=pandora&op=set&op2=gis_agent&id=582&other_mode=url_encode_separator_|&other=2%7C2%7C0%7C0%7C0%7C2000-01-01+01%3A01%3A01%7C0%7C666%7Caaa%7Cbbb%7Cccc</nowiki>
 +
 +
====set reset_agent_counts====
 +
 +
It updates agent alert and module counting.
 +
 +
Call syntax:
 +
*op=set (required)
 +
*op2=reset_agent_counts (required)
 +
*id=<id_agent> (required). It must be an agent id or "All".
 +
 +
=====Example=====
 +
 +
<nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=reset_agent_counts&apipass=1234&user=admin&pass=pandora&id=All</nowiki>
  
 
====set create_special_day====
 
====set create_special_day====
 
>= 5.1
 
>= 5.1
  
Add new special day.
+
It adds a new special day.
  
 
Call syntax:
 
Call syntax:
Line 3,490: Line 3,674:
 
*op2=create_special_day (required)
 
*op2=create_special_day (required)
 
*other=&lt;serialized parameters&gt; (required)
 
*other=&lt;serialized parameters&gt; (required)
:*&lt;special day&gt; Special day
+
:*&lt;special day&gt; Special day.
:*&lt;same day&gt; Same day
+
:*&lt;same day&gt; Same day.
:*&lt;description&gt; Description
+
:*&lt;description&gt; Description.
:*&lt;id_group&gt; Group ID
+
:*&lt;id_group&gt; Group ID.
  
 
=====Example=====
 
=====Example=====
  
  http://127.0.0.1/pandora_console/include/api.php?apipass=1234&user=admin&pass=pandora&op=set&op2=create_special_day&other_mode=url_encode_separator_|&other=2014-05-03|Sunday|desc|0
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?apipass=1234&user=admin&pass=pandora&op=set&op2=create_special_day&other_mode=url_encode_separator_|&other=2014-05-03|Sunday|desc|0</nowiki>
  
 
====set update_special_day====
 
====set update_special_day====
 
>= 5.1
 
>= 5.1
  
Update a configuration of special day already defined.
+
It updates an already defined special day configuration.
  
 
Call syntax:
 
Call syntax:
Line 3,510: Line 3,694:
 
*id=&lt;special day's id&gt; (required)
 
*id=&lt;special day's id&gt; (required)
 
*other=&lt;serialized parameters&gt; (required)
 
*other=&lt;serialized parameters&gt; (required)
:*&lt;special day&gt; Special day
+
:*&lt;special day&gt; Special day.
:*&lt;same day&gt; Same day
+
:*&lt;same day&gt; Same day.
:*&lt;description&gt; Description
+
:*&lt;description&gt; Description.
:*&lt;id_group&gt; Group ID
+
:*&lt;id_group&gt; Group ID.
  
 
=====Example=====
 
=====Example=====
  
  http://127.0.0.1/pandora_console/include/api.php?apipass=1234&user=admin&pass=pandora&op=set&op2=update_special_day&id=1&other_mode=url_encode_separator_|&other=2014-05-03|Sunday|desc|0
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?apipass=1234&user=admin&pass=pandora&op=set&op2=update_special_day&id=1&other_mode=url_encode_separator_|&other=2014-05-03|Sunday|desc|0</nowiki>
  
 
====set delete_special_day====
 
====set delete_special_day====
 
>= 5.1
 
>= 5.1
  
Delete a special day.
+
It deletes a special day.
  
 
Call syntax:
 
Call syntax:
Line 3,532: Line 3,716:
 
=====Example=====
 
=====Example=====
  
  http://127.0.0.1/pandora_console/include/api.php?apipass=1234&user=admin&pass=pandora&op=set&op2=delete_special_day&id=1
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?apipass=1234&user=admin&pass=pandora&op=set&op2=delete_special_day&id=1</nowiki>
  
 
====set pagerduty_webhook====
 
====set pagerduty_webhook====
 
>= 5.1
 
>= 5.1
  
Connect PagerDuty notification with Pandora FMS alerts. This call will be set in webhooks option in PagerDuty's service to validate the alerts of Pandora FMS previously linked to Pager Duty when were validated from PagerDuty.
+
It connects PagerDuty notifications with Pandora FMS alerts. This call is set in the Webhook option in PagerDuty's service to validate Pandora FMS alerts which have been previously linked to Pager Duty when they were validated from PagerDuty.
  
 
Call syntax:
 
Call syntax:
Line 3,547: Line 3,731:
 
=====Example=====
 
=====Example=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=pagerduty_webhook&apipass=1234&user=admin&pass=pandora&id=alert
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=pagerduty_webhook&apipass=1234&user=admin&pass=pandora&id=alert</nowiki>
  
 
====set tag_user_profile====
 
====set tag_user_profile====
 
>= 6
 
>= 6
  
Add a tag into a profile for a user.
+
It adds a tag into a user profile.
  
 
Call syntax:
 
Call syntax:
Line 3,566: Line 3,750:
 
=====Example=====
 
=====Example=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=tag_user_profile&apipass=1234&user=admin&pass=pandora&id=1&id2=2&other_mode=url_encode_separator_|&other=122|3
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=tag_user_profile&apipass=1234&user=admin&pass=pandora&id=1&id2=2&other_mode=url_encode_separator_|&other=122|3</nowiki>
  
 
====set tag====
 
====set tag====
 
>= 6
 
>= 6
  
Add a tag into your pandora.
+
It adds a tag into Pandora FMS.
  
 
Call syntax:
 
Call syntax:
Line 3,584: Line 3,768:
 
=====Example=====
 
=====Example=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=tag&apipass=1234&user=admin&pass=pandora&id=test&other_mode=url_encode_separator_|&other="a test"|http://www.artica.es|[email protected]|01189998819991197253
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=tag&apipass=1234&user=admin&pass=pandora&id=test&other_mode=url_encode_separator_|&other="a test"|http://www.artica.es|[email protected]|01189998819991197253</nowiki>
  
 
====set add_tag_module====
 
====set add_tag_module====
 
>= 6
 
>= 6
  
Add a tag into a module.
+
It adds a tag to a module.
  
 
Call syntax:
 
Call syntax:
Line 3,601: Line 3,785:
 
=====Example=====
 
=====Example=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=add_tag_module&apipass=1234&user=admin&pass=pandora&id=1&id2=2
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=add_tag_module&apipass=1234&user=admin&pass=pandora&id=1&id2=2</nowiki>
  
 
====set remove_tag_module====
 
====set remove_tag_module====
 
>= 6
 
>= 6
  
Remove a tag into a module.
+
It removes a tag from a module.
  
 
Call syntax:
 
Call syntax:
Line 3,618: Line 3,802:
 
=====Example=====
 
=====Example=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=remove_tag_module&apipass=1234&user=admin&pass=pandora&id=1&id2=2
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=remove_tag_module&apipass=1234&user=admin&pass=pandora&id=1&id2=2</nowiki>
  
 
====set planned_downtimes_created====
 
====set planned_downtimes_created====
 
>= 5.1
 
>= 5.1
  
Add new planned downtime.
+
It adds new planned downtime.
  
 
*op=set
 
*op=set
Line 3,630: Line 3,814:
 
*  <tuesday>;<wednesday>;<thursday>;<friday>;<saturday>;<sunday>;<periodically_time_from>;<periodically_time_to>;
 
*  <tuesday>;<wednesday>;<thursday>;<friday>;<saturday>;<sunday>;<periodically_time_from>;<periodically_time_to>;
 
*  <periodically_day_from>;<periodically_day_to>;<type_downtime>;<type_execution>;<type_periodicity>;<id_user>;
 
*  <periodically_day_from>;<periodically_day_to>;<type_downtime>;<type_execution>;<type_periodicity>;<id_user>;
 +
 +
{{Warning|Date format needs to be MM/DD/YYYY for this call to work properly.}}
  
 
=====Examples=====
 
=====Examples=====
Line 3,635: Line 3,821:
 
Once:
 
Once:
  
  http://localhost/pandora_console/include/api.php?op=set&op2=planned_downtimes_created&apipass=1234&user=admin&pass=pandora&id=testing&other=testing|11/05/2018|11/16/2018|0|1|1|1|1|1|1|1|12:06:00|19:06:00|1|31|quiet|once|weekly|admin&other_mode=url_encode_separator_|
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=planned_downtimes_created&apipass=1234&user=admin&pass=pandora&id=testing&other=testing|11/05/2018|11/16/2018|0|1|1|1|1|1|1|1|12:06:00|19:06:00|1|31|quiet|once|weekly|admin&other_mode=url_encode_separator_|</nowiki>
  
 
Periodically:
 
Periodically:
  
  http://localhost/pandora_console/include/api.php?op=set&op2=planned_downtimes_created&apipass=1234&user=admin&pass=pandora&id=testing&other=testing|11/05/2018|11/16/2018|0|1|1|1|1|1|1|1|12:06:00|19:06:00|1|31|quiet|periodically|weekly|admin&other_mode=url_encode_separator_|
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=planned_downtimes_created&apipass=1234&user=admin&pass=pandora&id=testing&other=testing|11/05/2018|11/16/2018|0|1|1|1|1|1|1|1|12:06:00|19:06:00|1|31|quiet|periodically|weekly|admin&other_mode=url_encode_separator_|</nowiki>
  
 
====set planned_downtimes_additem====
 
====set planned_downtimes_additem====
 
>= 5.1
 
>= 5.1
Add new items of a planned downtime.
+
It adds new items of a planned downtime.
 
*op=set
 
*op=set
 
*op2=planned_downtimes_additem
 
*op2=planned_downtimes_additem
Line 3,651: Line 3,837:
 
=====Example=====
 
=====Example=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=planned_downtimes_additem&apipass=1234&user=admin&pass=pandora&id=123&other=1;2;3;4%7CStatus;Unkown_modules%20&other_mode=url_encode_separator_|
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=planned_downtimes_additem&apipass=1234&user=admin&pass=pandora&id=123&other=1;2;3;4%7CStatus;Unkown_modules%20&other_mode=url_encode_separator_|</nowiki>
  
 
====set planned_downtimes_deleted====
 
====set planned_downtimes_deleted====
 
>=5.1
 
>=5.1
  
Delete a planned downtime
+
It deletes a planned downtime
 
*op=set
 
*op=set
 
*op2=planned_downtimes_deleted
 
*op2=planned_downtimes_deleted
Line 3,663: Line 3,849:
 
=====Example=====
 
=====Example=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=planned_downtimes_deleted&apipass=1234&user=admin&pass=pandora&id=10
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=planned_downtimes_deleted&apipass=1234&user=admin&pass=pandora&id=10</nowiki>
  
 
====set create_synthetic_module====
 
====set create_synthetic_module====
 
>=5.1SP4
 
>=5.1SP4
  
Add new synthetic module:
+
It adds a new synthetic module:
 
*op=set
 
*op=set
 
*op2=create_synthetic_module
 
*op2=create_synthetic_module
*id=Name of agent to add module
+
*id=Agent name to add module
 
*other= <name_module><synthetic_type><AgentName;Operation;NameModule> OR <AgentName;NameModule> OR <Operation;Value>
 
*other= <name_module><synthetic_type><AgentName;Operation;NameModule> OR <AgentName;NameModule> OR <Operation;Value>
  
 
**Data of module:
 
**Data of module:
   In arithmetic creations the firts without operator if you put Agent and module: AgentName;NameModule or this if you will put a value: <Operation;Value>. the rest of data <AgentName;Operation;NameModule> or <Operation;Value>
+
   In arithmetic creations the first piece of data is Agent without operator: AgentName;NameModule or if you type in a value: <Operation;Value>. The rest of values follow this one: <AgentName;Operation;NameModule> or <Operation;Value>
 
   average: <AgentName;Operation;NameModule> or <Operation;Value>
 
   average: <AgentName;Operation;NameModule> or <Operation;Value>
  
Line 3,684: Line 3,870:
  
 
=====Example=====
 
=====Example=====
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=create_synthetic_module&apipass=1234&user=admin&pass=pandora&id=test&other=Test|arithmetic|Agent%20Name;Module%20Name|Agent%20Name2;ADD;Module%20Name2&other_mode=url_encode_separator_|
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=create_synthetic_module&apipass=1234&user=admin&pass=pandora&id=test&other=Test|arithmetic|Agent%20Name;Module%20Name|Agent%20Name2;ADD;Module%20Name2&other_mode=url_encode_separator_|</nowiki>
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=create_synthetic_module&apipass=1234&user=admin&pass=pandora&id=pepito&other=prueba|average|Agent%20Name;AVG;Name%20Module|Agent%20Name2;AVG;Name%20Module2&other_mode=url_encode_separator_|
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=create_synthetic_module&apipass=1234&user=admin&pass=pandora&id=pepito&other=prueba|average|Agent%20Name;AVG;Name%20Module|Agent%20Name2;AVG;Name%20Module2&other_mode=url_encode_separator_|</nowiki>
  
 
====set create_service====
 
====set create_service====
 
>= 7
 
>= 7
  
Create a new service.
+
It creates a new service.
  
 
*op=set
 
*op=set
Line 3,700: Line 3,886:
 
=====Example=====
 
=====Example=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=create_service&return_type=json&other=test1%7CDescripcion%7C12%7C1%7C0.5%7C1&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=create_service&return_type=json&other=test1%7CDescripcion%7C12%7C1%7C0.5%7C1&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set update_service====
 
====set update_service====
 
>= 7
 
>= 7
  
Update a service.
+
It modifies a service.
  
 
*op=set
 
*op=set
Line 3,715: Line 3,901:
 
=====Example=====
 
=====Example=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=update_service&return_type=json&id=1&other=test2%7CDescripcion2%7C%7C%7C0.6%7C&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=update_service&return_type=json&id=1&other=test2%7CDescripcion2%7C%7C%7C0.6%7C&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set add_element_service====
 
====set add_element_service====
 
>= 7
 
>= 7
  
Adds elements to service.
+
It adds elements to a service.
  
 
*op=set
 
*op=set
Line 3,733: Line 3,919:
 
In each type, the id field refers to different things:
 
In each type, the id field refers to different things:
  
- If it is of type agent, it is agent id
+
- If it belongs to agent type, it is agent id
  
- If it is of type module, it is agent module id
+
- If it belongs to module type, it is agent module id
  
- If it is service type, it is the service id that we want to add.
+
- If it belongs to service type, it is the service id to be added.
  
  
 
=====Example=====
 
=====Example=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=add_element_service&return_type=json&id=6&other=W3sidHlwZSI6ImFnZW50IiwiaWQiOjIsImRlc2NyaXB0aW9uIjoiamlqaWppIiwid2VpZ2h0X2NyaXRpY2FsIjowLCJ3ZWlnaHRfd2FybmluZyI6MCwid2VpZ2h0X3Vua25vd24iOjAsIndlaWdodF9vayI6MH0seyJ0eXBlIjoibW9kdWxlIiwiaWQiOjEsImRlc2NyaXB0aW9uIjoiSG9sYSBxdWUgdGFsIiwid2VpZ2h0X2NyaXRpY2FsIjowLCJ3ZWlnaHRfd2FybmluZyI6MCwid2VpZ2h0X3Vua25vd24iOjAsIndlaWdodF9vayI6MH0seyJ0eXBlIjoic2VydmljZSIsImlkIjozLCJkZXNjcmlwdGlvbiI6ImplamVqZWplIiwid2VpZ2h0X2NyaXRpY2FsIjowLCJ3ZWlnaHRfd2FybmluZyI6MCwid2VpZ2h0X3Vua25vd24iOjAsIndlaWdodF9vayI6MH1d&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=add_element_service&return_type=json&id=6&other=W3sidHlwZSI6ImFnZW50IiwiaWQiOjIsImRlc2NyaXB0aW9uIjoiamlqaWppIiwid2VpZ2h0X2NyaXRpY2FsIjowLCJ3ZWlnaHRfd2FybmluZyI6MCwid2VpZ2h0X3Vua25vd24iOjAsIndlaWdodF9vayI6MH0seyJ0eXBlIjoibW9kdWxlIiwiaWQiOjEsImRlc2NyaXB0aW9uIjoiSG9sYSBxdWUgdGFsIiwid2VpZ2h0X2NyaXRpY2FsIjowLCJ3ZWlnaHRfd2FybmluZyI6MCwid2VpZ2h0X3Vua25vd24iOjAsIndlaWdodF9vayI6MH0seyJ0eXBlIjoic2VydmljZSIsImlkIjozLCJkZXNjcmlwdGlvbiI6ImplamVqZWplIiwid2VpZ2h0X2NyaXRpY2FsIjowLCJ3ZWlnaHRfd2FybmluZyI6MCwid2VpZ2h0X3Vua25vd24iOjAsIndlaWdodF9vayI6MH1d&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set metaconsole_synch====
 
====set metaconsole_synch====
 
>= 7
 
>= 7
  
Add license key to metaconsole and synchonize nodes.
+
It adds license key to the Metaconsole and performs the synchronization with nodes.
  
 
*op=set
 
*op=set
Line 3,755: Line 3,941:
 
=====Example=====
 
=====Example=====
  
http://127.0.0.1/pandora_console/enterprise/meta/include/api.php?op=set&op2=metaconsole_synch&id=LICENSEKEY&apipass=1234&user=admin&pass=pandora
+
<nowiki>http://127.0.0.1/pandora_console/enterprise/meta/include/api.php?op=set&op2=metaconsole_synch&id=LICENSEKEY&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set migrate_agent====
 
====set migrate_agent====
 
>= 7.21 ONLY METACONSOLE
 
>= 7.21 ONLY METACONSOLE
  
Adds a selected agent to the agent migration queue
+
It adds a selected agent to the agent migration queue.
  
 
*op=set
 
*op=set
Line 3,771: Line 3,957:
 
=====Example=====
 
=====Example=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=migrate_agent&apipass=1234&user=admin&pass=pandora&id=2&other=nova|fringe|0&other_mode=url_encode_separator_|&return_type=string
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=migrate_agent&apipass=1234&user=admin&pass=pandora&id=2&other=nova|fringe|0&other_mode=url_encode_separator_|&return_type=string</nowiki>
  
 
====set new_cluster====
 
====set new_cluster====
 
>= 7.0
 
>= 7.0
  
Crea un cluster de agentes
+
It creates an agent cluster
  
Crea un cluster de monitorización con agentes e items para monitorizar distintos nodos.
+
It creates a monitoring cluster with agents and items to monitor different nodes.
  
 
*op=set
 
*op=set
 
*op2=new_cluster
 
*op2=new_cluster
*other=nombre_cluster| tipo_cluster| descripcion| id_grupo
+
*other=cluster_name| cluster_type| description| group_id
 
*other_mode=url_encode_separator_
 
*other_mode=url_encode_separator_
  
 
=====Example=====
 
=====Example=====
  
   http://127.0.0.1/pandora_console/include/api.php?op=set&op2=new_cluster&other=nombre_cluster%7CAA%7Cdescripcion%7C12&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora
+
   <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=new_cluster&other=nombre_cluster%7CAA%7Cdescripcion%7C12&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set add_cluster_agent====
 
====set add_cluster_agent====
 
>= 7.0
 
>= 7.0
  
Add agent to a cluster
+
It adds an agent to a cluster.
  
 
*op=set
 
*op=set
Line 3,804: Line 3,990:
 
{"id":5,"id_agent":3}]
 
{"id":5,"id_agent":3}]
  
   http://127.0.0.1/pandora_console/include/api.php?op=set&op2=add_cluster_agent&other=W3siaWQiOjUsImlkX2FnZW50IjoyfSwKeyJpZCI6NSwiaWRfYWdlbnQiOjN9XQ==&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora
+
   <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=add_cluster_agent&other=W3siaWQiOjUsImlkX2FnZW50IjoyfSwKeyJpZCI6NSwiaWRfYWdlbnQiOjN9XQ==&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set add_cluster_item (activo/activo)====
 
====set add_cluster_item (activo/activo)====
 
>= 7.0
 
>= 7.0
  
Adds an active/active item to a cluster
+
It adds an active/active item to a cluster
  
 
*op=set
 
*op=set
Line 3,821: Line 4,007:
 
{"name":"TCP_Connections","id_cluster":5,"type":"AA","critical_limit":80,"warning_limit":60}]
 
{"name":"TCP_Connections","id_cluster":5,"type":"AA","critical_limit":80,"warning_limit":60}]
  
   http://127.0.0.1/pandora_console/include/api.php?op=set&op2=add_cluster_item&other=W3sibmFtZSI6IlN3YXBfVXNlZCIsImlkX2NsdXN0ZXIiOjUsInR5cGUiOiJBQSIsImNyaXRpY2FsX2xpbWl0Ijo4MCwid2FybmluZ19saW1pdCI6NjB9LAp7Im5hbWUiOiJUQ1BfQ29ubmVjdGlvbnMiLCJpZF9jbHVzdGVyIjo1LCJ0eXBlIjoiQUEiLCJjcml0aWNhbF9saW1pdCI6ODAsIndhcm5pbmdfbGltaXQiOjYwfV0=&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora
+
   <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=add_cluster_item&other=W3sibmFtZSI6IlN3YXBfVXNlZCIsImlkX2NsdXN0ZXIiOjUsInR5cGUiOiJBQSIsImNyaXRpY2FsX2xpbWl0Ijo4MCwid2FybmluZ19saW1pdCI6NjB9LAp7Im5hbWUiOiJUQ1BfQ29ubmVjdGlvbnMiLCJpZF9jbHVzdGVyIjo1LCJ0eXBlIjoiQUEiLCJjcml0aWNhbF9saW1pdCI6ODAsIndhcm5pbmdfbGltaXQiOjYwfV0=&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set add_cluster_item (active/passive)====
 
====set add_cluster_item (active/passive)====
 
>= 7.0
 
>= 7.0
  
Adds a passive/actve item to a cluster
+
It adds a passive/actve item to a cluster.
  
 
*op=set
 
*op=set
Line 3,838: Line 4,024:
 
{"name":"DiskUsed_/proc/sched_debug","id_cluster":5,"type":"AP","is_critical":1}]
 
{"name":"DiskUsed_/proc/sched_debug","id_cluster":5,"type":"AP","is_critical":1}]
  
   http://127.0.0.1/pandora_console/include/api.php?op=set&op2=add_cluster_item&other=W3sibmFtZSI6IkRpc2tVc2VkXy9wcm9jL2tjb3JlIiwiaWRfY2x1c3RlciI6NSwidHlwZSI6IkFQIiwiaXNfY3JpdGljYWwiOjF9LAp7Im5hbWUiOiJEaXNrVXNlZF8vcHJvYy9zY2hlZF9kZWJ1ZyIsImlkX2NsdXN0ZXIiOjUsInR5cGUiOiJBUCIsImlzX2NyaXRpY2FsIjoxfV0=&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora
+
   <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=add_cluster_item&other=W3sibmFtZSI6IkRpc2tVc2VkXy9wcm9jL2tjb3JlIiwiaWRfY2x1c3RlciI6NSwidHlwZSI6IkFQIiwiaXNfY3JpdGljYWwiOjF9LAp7Im5hbWUiOiJEaXNrVXNlZF8vcHJvYy9zY2hlZF9kZWJ1ZyIsImlkX2NsdXN0ZXIiOjUsInR5cGUiOiJBUCIsImlzX2NyaXRpY2FsIjoxfV0=&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set delete_cluster====
 
====set delete_cluster====
 
>= 7.0
 
>= 7.0
  
Deletes a cluster.
+
It deletes a cluster.
  
 
*op=set
 
*op=set
Line 3,849: Line 4,035:
 
*id=id of the cluster to delete
 
*id=id of the cluster to delete
  
   http://127.0.0.1/pandora_console/include/api.php?op=set&op2=delete_cluster&id=7&apipass=1234&user=admin&pass=pandora
+
   <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=delete_cluster&id=7&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set delete_cluster_agent====
 
====set delete_cluster_agent====
 
>= 7.0
 
>= 7.0
  
Disassociates an agent from a cluster
+
It unpairs an agent from a cluster
  
 
*op=set
 
*op=set
Line 3,860: Line 4,046:
 
*other=id_agente| id_cluster|
 
*other=id_agente| id_cluster|
 
*other_mode=url_encode_separator_
 
*other_mode=url_encode_separator_
 +
 +
The json structure should be:
 +
[{"id":5,"id_agent":2}, {"id":5,"id_agent":3}]
  
 
=====Example=====
 
=====Example=====
  
   http://127.0.0.1/pandora_console/include/api.php?op=set&op2=delete_cluster_agent&other=2%7C1&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora
+
   <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=delete_cluster_agent&other=2%7C1&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set delete_cluster_item====
 
====set delete_cluster_item====
 
>= 7.0
 
>= 7.0
  
Deletes an item from a cluster
+
It deletes an item from a cluster.
  
 
*op=set
 
*op=set
Line 3,874: Line 4,063:
 
*id=id of item to eliminate
 
*id=id of item to eliminate
  
   http://127.0.0.1/pandora_console/include/api.php?op=set&op2=delete_cluster_item&id=9&apipass=1234&user=admin&pass=pandora
+
   <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=delete_cluster_item&id=9&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set create_policy====
 
====set create_policy====
 
>= 7.0. 725
 
>= 7.0. 725
  
Create a policy.
+
It creates a policy.
Its required the policy name, that can not be repeated and the id_group that must exist in the database.
+
Both the policy name, which cannot be repeated, and the id_group, which must exist in the database, are required.
  
 
*op = set
 
*op = set
Line 3,890: Line 4,079:
 
=====Example=====
 
=====Example=====
  
  http://localhost/pandora_console/include/api.php?op=set&op2=create_policy&apipass=1234&user=admin&pass=pandora&other=name%20Policy|11|this%20description&other_mode=url_encode_separator_|&return_type=json
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=create_policy&apipass=1234&user=admin&pass=pandora&other=name%20Policy|11|this%20description&other_mode=url_encode_separator_|&return_type=json</nowiki>
  
 
====set update_policy====
 
====set update_policy====
 
>= 7.0. 725
 
>= 7.0. 725
  
Update a policy.
+
It updates a policy.
The policy name can not be repeated and the id_group must exist in the database. Returns 0 (false) or the updated policy id (true).  
+
The policy name cannot be repeated and the id_group must exist in the database. It returns 0 (false) or the updated policy id (true).  
  
  
 
*op = set
 
*op = set
 
*op2 = update_policy
 
*op2 = update_policy
*id = id política
+
*id = policy id
*other = policy name | id_del grupo | description;
+
*other = policy name | group_id | description;
 
*other_mode = url_encode_separator_|
 
*other_mode = url_encode_separator_|
 
*return_type = (string, csv, json).
 
*return_type = (string, csv, json).
  
=====Exmaple=====
+
=====Example=====
  
  http://localhost/pandora_console/include/api.php?op=set&op2=update_policy&apipass=1234&user=admin&pass=pandora&id=17&other=policy2|11|this%20description&other_mode=url_encode_separator_|&return_type=json
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=update_policy&apipass=1234&user=admin&pass=pandora&id=17&other=policy2|11|this%20description&other_mode=url_encode_separator_|&return_type=json</nowiki>
  
 
====set delete_policy====
 
====set delete_policy====
 
>= 7.0. 725
 
>= 7.0. 725
  
Deletes a policy. Its required to introduce the policy id, which must exist in order to delete it. Returns 0 (false) or 1 (true).
+
It deletes a policy. It is required to enter the policy id, which must exist in order to delete it. It returns 0 (false) or 1 (true).
  
 
*op = set
 
*op = set
Line 3,922: Line 4,111:
 
=====Example=====
 
=====Example=====
  
  http://localhost/pandora_console/include/api.php?op=set&op2=delete_policy&apipass=1234&user=admin&pass=pandora&id=10&return_type=json
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=delete_policy&apipass=1234&user=admin&pass=pandora&id=10&return_type=json</nowiki>
  
 
====set add_collections_policy====
 
====set add_collections_policy====
 
>= 7.0. 725
 
>= 7.0. 725
  
Add a collection to a policy. It is necessary to introduce the policy id and that there is such a policy, as an id, name or short name of the collection you want to add which should exist. Both fields are required.
+
It adds a collection to a policy. It is necessary to enter the policy id and for such a policy to exist, as an id, name or short name of the collection you wish to add, which should exist too. Both fields are required.
Returns 0 (false) or the id of the collection added to a policy (true).
+
It returns 0 (false) or the id of the collection added to a policy (true).
  
 
*op = set
 
*op = set
Line 3,938: Line 4,127:
 
=====Example=====
 
=====Example=====
  
  http://localhost/pandora_console/include/api.php?op=set&op2=add_collections_policy&apipass=1234&user=admin&pass=pandora&return_type=string&id=4&id2=apache_plugin
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=add_collections_policy&apipass=1234&user=admin&pass=pandora&return_type=string&id=4&id2=apache_plugin</nowiki>
  
 
====set remove_collections_policy====
 
====set remove_collections_policy====
 
>= 7.0. 725
 
>= 7.0. 725
  
To mark a collection of a policy that is pending deletion is necessary:  
+
To mark a policy collection that is yet to be deleted, it is necessary:  
* A policy id and that such a policy exists. Required
+
* A policy id, and for such a policy to exist. Mandatory.
* An id, name or short name of the collection you want to remove which must exist. Required
+
* An id, name or short name of the collection you wish to remove, which must exist. Mandatory.
* and 0 or 1: where 1 is to mark as pending to be deleted and if it is 0 it removes the pending mark to be deleted. by default, if this field is not added, it will try to mark so that it can be deleted.
+
* And 0 or 1: 1 marks it as yet to be deleted and 0 removes said state. If this field is empty, it will try to check it so that it can be deleted by default.
  
returns 0 (false) or 1 (true).
+
It returns 0 (false) or 1 (true).
  
 
*op = set
 
*op = set
Line 3,959: Line 4,148:
 
=====Example=====
 
=====Example=====
  
  http://localhost/pandora_console/include/api.php?op=set&op2=remove_collections_policy&apipass=1234&user=admin&pass=pandora&return_type=string&id=4&id2=2&other=1.
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=remove_collections_policy&apipass=1234&user=admin&pass=pandora&return_type=string&id=4&id2=2&other=1.</nowiki>
  
 
====set create_plugins_policy====
 
====set create_plugins_policy====
 
>= 7.0. 725
 
>= 7.0. 725
  
To add a plugin to a policy is necessary:  
+
To add a plugin to a policy the following are necessary:  
* A policy id and that such a policy exists. Required
+
* A policy id and for such a policy to exist. Mandatory.
* The plugin string to run. Required
+
* The plugin string to run. Mandatory.
  
returns 0 (false) or the plugin id that's been added to a policy (true).
+
It returns 0 (false) or the plugin id that has been added to a policy (true).
  
 
*op = set
 
*op = set
Line 3,978: Line 4,167:
 
=====Example=====
 
=====Example=====
  
  http://localhost/pandora_console/include/api.php?op=set&op2=create_plugins_policy&apipass=1234&user=admin&pass=pandora&return_type=json&id=2&id2=echo%201
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=create_plugins_policy&apipass=1234&user=admin&pass=pandora&return_type=json&id=2&id2=echo%201</nowiki>
  
 
====set delete_plugins_policy====
 
====set delete_plugins_policy====
 
>= 7.0. 725
 
>= 7.0. 725
  
To remove a plugin from a policy it is necessary:  
+
These are the requirements to remove a plugin from a policy:  
* A policy id and that such a policy exists. required
+
* A policy id and for such a policy to exist. Mandatory.
* A plugin id that you want to remove. required
+
* A plugin id to be removed. Mandatory.  
* 0 or 1: being 1 mark as pending to be deleted the plugin and if it is 0 remove the pending mark to be deleted by default if not added, this field is marked as pending to be deleted.
+
* 0 or 1: 1 means the plugin is yet to be deleted and 0 removes this state. If not added, this field is marked as pending to be deleted by default.
returns 0 (false) or 1 (true).
+
It returns 0 (false) or 1 (true).
  
 
*op = set
 
*op = set
Line 3,998: Line 4,187:
 
=====Example=====
 
=====Example=====
  
  http://localhost/pandora_console/include/api.php?op=set&op2=delete_plugins_policy&apipass=1234&user=admin&pass=pandora&return_type=string&id=2&id2=1&other=1
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=delete_plugins_policy&apipass=1234&user=admin&pass=pandora&return_type=string&id=2&id2=1&other=1</nowiki>
  
 
====set linking_policy====
 
====set linking_policy====
 
>= 7.0. 725
 
>= 7.0. 725
  
To link an unlinked module of a policy is necessary:  
+
To link an unlinked policy module it is necessary:  
 
* An agent id module that is unlinked.
 
* An agent id module that is unlinked.
  
returns 0 (false) or 1 (true).
+
It returns 0 (false) or 1 (true).
  
 
*op = set
 
*op = set
Line 4,015: Line 4,204:
 
=====Example=====
 
=====Example=====
  
  http://localhost/pandora_console/include/api.php?op=set&op2=linking_policy&apipass=1234&user=admin&pass=pandora&return_type=json&id=28
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=linking_policy&apipass=1234&user=admin&pass=pandora&return_type=json&id=28</nowiki>
  
 
====set create_alerts_policy====
 
====set create_alerts_policy====
 
>= 7.0. 725
 
>= 7.0. 725
  
To create policy alerts is necessary:  
+
To create policy alert, these are necessary:  
 
* A policy id that must exist (required).
 
* A policy id that must exist (required).
* A policy module id if it is of normal type is obligatory.
+
* A policy module id, if it belongs to the normal type it is mandatory.
 
* A template id that must exist (required).
 
* A template id that must exist (required).
* Whether or not it is external 0 (normal), 1 (external). By default it is 0 normal
+
* Whether it is external or not: 0 (normal), 1 (external). It is 0 (normal) by default.
* It is obligatory in case of being of external type (1) name of module with which to coincide.
+
* If it belongs to the external type (1) a module name that must match it.
returns 0 (false) or the id of the alert added in the policy (true).
+
It returns 0 (false) or the id of the alert added in the policy (true).
  
 
*op = set
 
*op = set
Line 4,038: Line 4,227:
 
=====Example=====
 
=====Example=====
  
  http://localhost/pandora_console/include/api.php?op=set&op2=create_alerts_policy&apipass=1234&user=admin&pass=pandora&return_type=string&id=2&other=0|2|1|cpu%20load&other_mode=url_encode_separator_|
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=create_alerts_policy&apipass=1234&user=admin&pass=pandora&return_type=string&id=2&other=0|2|1|cpu%20load&other_mode=url_encode_separator_|</nowiki>
  
 
====set update_alerts_policy====
 
====set update_alerts_policy====
 
>= 7.0. 725
 
>= 7.0. 725
  
To update policy alerts is necessary:  
+
To update policy alerts, it is necessary:  
 
* A policy id that must exist (required).
 
* A policy id that must exist (required).
 
* Active 0 | Waiting 1
 
* Active 0 | Waiting 1
 
* enable 0 | disable 1
 
* enable 0 | disable 1
returns 0 (false) or the id of the updated alert in the policy (true).
+
It returns 0 (false) or the id of the updated alert in the policy (true).
  
 
*op = set
 
*op = set
Line 4,058: Line 4,247:
 
=====Example=====
 
=====Example=====
  
  http://localhost/pandora_console/include/api.php?op=set&op2=update_alerts_policy&apipass=1234&user=admin&pass=pandora&return_type=string&id=7&other=1|1&other_mode=url_encode_separator_|
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=update_alerts_policy&apipass=1234&user=admin&pass=pandora&return_type=string&id=7&other=1|1&other_mode=url_encode_separator_|</nowiki>
  
 
====set delete_alerts_policy====
 
====set delete_alerts_policy====
 
>= 7.0. 725
 
>= 7.0. 725
  
To remove an alert from a policy is necessary:  
+
To remove an alert from a policy it is necessary:  
 
* A policy alert id that must exist (required).
 
* A policy alert id that must exist (required).
* 0 | 1 mark pending removal or not by default if you do not add this field stays at 1
+
* 0 | 1 mark it as yet to bet removed or not. If this field is empty, 1 is set by default.
 
* Active 0 | Standby 1
 
* Active 0 | Standby 1
returns 0 (false) or 1 (true).
+
It returns 0 (false) or 1 (true).
  
 
*op = set
 
*op = set
Line 4,077: Line 4,266:
 
=====Example=====
 
=====Example=====
  
  http://localhost/pandora_console/include/api.php?op=set&op2=delete_alerts_policy&apipass=1234&user=admin&pass=pandora&return_type=string&id=7&id2=1
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=delete_alerts_policy&apipass=1234&user=admin&pass=pandora&return_type=string&id=7&id2=1</nowiki>
  
 
====set create_alerts_actions_policy====
 
====set create_alerts_actions_policy====
 
>= 7.0. 725
 
>= 7.0. 725
  
To add an action to a policy alert is necessary:  
+
To add an action to a policy alert it is necessary:  
 
* A policy alert id that must exist (required).
 
* A policy alert id that must exist (required).
 
* A policy action id that must exist (required).
 
* A policy action id that must exist (required).
* You can add a minimum number of shots or a maximum number of shots by default: 0.
+
* You may add a minimum number of shots or a maximum number of shots by default: 0.
returns 0 (false) or the id of the action added to the alert of a policy (true).
+
It returns 0 (false) or the id of the action added to the policy alert (true).
  
 
*op = set
 
*op = set
Line 4,098: Line 4,287:
 
=====Example=====
 
=====Example=====
  
  http://172.16.0.2/pandora_console/include/api.php?op=set&op2=create_alerts_actions_policy&apipass=1234&user=admin&pass=pandora&return_type=string&id=1&id2=4&other=5|2&other_mode=url_encode_separator_|
+
  <nowiki>http://172.16.0.2/pandora_console/include/api.php?op=set&op2=create_alerts_actions_policy&apipass=1234&user=admin&pass=pandora&return_type=string&id=1&id2=4&other=5|2&other_mode=url_encode_separator_|</nowiki>
  
 
====set delete_alerts_actions_policy====
 
====set delete_alerts_actions_policy====
 
>= 7.0. 725
 
>= 7.0. 725
  
To remove an action from a policy alert is necessary:  
+
To remove an action from a policy alert, it is necessary:  
 
* A policy alert id that must exist (required).
 
* A policy alert id that must exist (required).
 
* A policy action id that must exist (required).
 
* A policy action id that must exist (required).
Line 4,115: Line 4,304:
 
=====Example=====
 
=====Example=====
  
  http://localhost/pandora_console/include/api.php?op=set&op2=delete_alerts_actions_policy&apipass=1234&user=admin&pass=pandora&return_type=string&id=1&id2=4
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=delete_alerts_actions_policy&apipass=1234&user=admin&pass=pandora&return_type=string&id=1&id2=4</nowiki>
  
 
====set remove_agents_policy====
 
====set remove_agents_policy====
 
>= 7.0. 725
 
>= 7.0. 725
  
To remove an agent from a policy is necessary:  
+
To remove an agent from a policy, it is necessary:  
 
* A policy id that must exist (required).
 
* A policy id that must exist (required).
 
* An agent id that must exist (required).
 
* An agent id that must exist (required).
Line 4,132: Line 4,321:
 
=====Example=====
 
=====Example=====
  
  http://localhost/pandora_console/include/api.php?op=set&op2=remove_agents_policy&apipass=1234&user=admin&pass=pandora&return_type=string&id=5&id2=2
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=remove_agents_policy&apipass=1234&user=admin&pass=pandora&return_type=string&id=5&id2=2</nowiki>
  
 
====set add_groups_policy====
 
====set add_groups_policy====
 
>= 7.0. 725
 
>= 7.0. 725
  
To add a group of a policy is necessary:  
+
To add a policy group, it is necessary:  
* A policy id that must exist (required).
+
* An existing policy id (required).
* A group id that must exist (required).
+
* An existing group id (required).
  
 
*op = set
 
*op = set
Line 4,149: Line 4,338:
 
=====Example=====
 
=====Example=====
  
  http://localhost/pandora_console/include/api.php?op=set&op2=add_groups_policy&apipass=1234&user=admin&pass=pandora&return_type=string&id=7&id2=12
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=add_groups_policy&apipass=1234&user=admin&pass=pandora&return_type=string&id=7&id2=12</nowiki>
  
 
====set remove_groups_policy====
 
====set remove_groups_policy====
 
>= 7.0. 725
 
>= 7.0. 725
  
To remove an agent from a policy is necessary:  
+
To remove an agent from a policy, it is necessary:  
* A policy id that must exist (required).
+
* An existing policy id (required).
* A group id that must exist (required).
+
* An existing group id (required).
  
 
*op = set
 
*op = set
Line 4,166: Line 4,355:
 
=====Example=====
 
=====Example=====
  
  http://localhost/pandora_console/include/api.php?op=set&op2=remove_groups_policy&apipass=1234&user=admin&pass=pandora&return_type=string&id=5&id2=2
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=remove_groups_policy&apipass=1234&user=admin&pass=pandora&return_type=string&id=5&id2=2</nowiki>
  
 
====set create_os====
 
====set create_os====
 
>= 7.0. 727
 
>= 7.0. 727
  
Creates a new operating system with the passed data as parameters.
+
It creates a new operating system with the data as parameters.
  
 
Call syntax:
 
Call syntax:
 
*op=set (required)
 
*op=set (required)
 
*op2=create_os (required)
 
*op2=create_os (required)
*other=<serializead parameters> (required) are the system's data, serializead in this order:
+
*other=<serializead parameters> (required). They are the system's data, serializead in this order:
 
:*&lt;name&gt;
 
:*&lt;name&gt;
 
:*&lt;description&gt;
 
:*&lt;description&gt;
Line 4,183: Line 4,372:
 
=====Example=====
 
=====Example=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=create_os&other=os_name%7Cos_description%7Cos_icon.png&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=create_os&other=os_name%7Cos_description%7Cos_icon.png&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set update_os====
 
====set update_os====
 
>= 7.0. 727
 
>= 7.0. 727
  
Updates the operating system with the passed data as parameters.
+
It updates the operating system with data as parameters.
  
 
Call syntax:
 
Call syntax:
 
*op=set (required)
 
*op=set (required)
 
*op2=create_os (required)
 
*op2=create_os (required)
*other=<serializead parameters> (required) are the operating system's data, serializead in this order:
+
*other=<serializead parameters> (required). They are the operating system's data, serialized in this order:
 
:*&lt;name&gt;
 
:*&lt;name&gt;
 
:*&lt;description&gt;
 
:*&lt;description&gt;
Line 4,200: Line 4,389:
 
=====Example=====
 
=====Example=====
  
  http://127.0.0.1/pandora_console/include/api.php?id=107&op=set&op2=update_os&other=os_name_to_update%7Cos_description_to_update%7Cos_icon_to_update.png&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?id=107&op=set&op2=update_os&other=os_name_to_update%7Cos_description_to_update%7Cos_icon_to_update.png&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set disabled_and_standby====
 
====set disabled_and_standby====
 
>= 7.0. 728
 
>= 7.0. 728
  
Disables an agent and, if it has remote configuration, puts it in standby mode.
+
It disables an agent and, if it has remote configuration, it makes it go into standby mode.
  
 
Call Syntax:
 
Call Syntax:
 
*op=set (required)
 
*op=set (required)
 
*op2=disabled_and_standby (required)
 
*op2=disabled_and_standby (required)
*id=<agent id> (required). In the metaconsole it is the id of tagente, that is to say, the id of the node.
+
*id=<agent id> (required). In the Metaconsole, it is the id of the agent, that is to say, the id of the node.
*id2=<id del nodo> (required in the meta console, unnecessary in the node)
+
*id2=<id del nodo> (required in the Metaconsole, not needed in the node)
 
*other=<valor> (optional) Value (0 to enable and 1 to disable) of the new status. If no value is specified, it disables the agent.
 
*other=<valor> (optional) Value (0 to enable and 1 to disable) of the new status. If no value is specified, it disables the agent.
  
 
=====Example=====
 
=====Example=====
  
  http://127.0.0.1/pandora_console/include/api.php?id=2&op=set&op2=disabled_and_standby&other=1&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?id=2&op=set&op2=disabled_and_standby&other=1&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora</nowiki>
  
  http://127.0.0.1/pandora_console/include/api.php?id=2&id2=1&op=set&op2=disabled_and_standby&other=1&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?id=2&id2=1&op=set&op2=disabled_and_standby&other=1&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set validate_traps====
 
====set validate_traps====
 
>= 7.0. 728
 
>= 7.0. 728
  
Allows to validate traps.
+
It allows to validate traps.
  
 
*op = set
 
*op = set
Line 4,231: Line 4,420:
 
=====Example=====
 
=====Example=====
  
  https://127.0.0.1/pandora_console/include/api.php?op=set&op2=validate_traps&id=1&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora
+
  <nowiki>https://127.0.0.1/pandora_console/include/api.php?op=set&op2=validate_traps&id=1&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set delete_traps====
 
====set delete_traps====
 
>= 7.0. 728
 
>= 7.0. 728
  
Allows to delete a trap:  
+
It allows to delete a trap:  
  
 
*op = set
 
*op = set
Line 4,244: Line 4,433:
 
=====Example=====
 
=====Example=====
  
  http://127.0.0.1/pandora_console/include/api.php?id=2&op=set&op2=delete_traps&id=1&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?id=2&op=set&op2=delete_traps&id=1&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set access_process====
 
====set access_process====
 
>= 7.0NG. 728
 
>= 7.0NG. 728
  
This function allows to manage the access to a third application from records in the system audit log of pandorafms. It uses different parameters to process one of these registry actions in our application and avoids concurrent access by administrator users. Optionally, it can prohibit access to non-administrator users.
+
This function allows to manage the access to a third application from records in the system audit log of Pandora FMS. It uses different parameters to process one of these registry actions in your application and avoids concurrent access by administrator users. Optionally, it can ban access to non-administrator users.
  
 
Call syntax:
 
Call syntax:
Line 4,258: Line 4,447:
 
:* <user_id>
 
:* <user_id>
  
The id of the user trying to access the application, this data is recorded and checked in the audit to filter the access, exit, exploration or navigation of the user through the application.
+
The id of the user trying to access the application, this data is recorded and checked in the audit to filter user access, exit, exploration or navigation through the application.
  
 
:* <action> - (login,logout,exclude,browse)
 
:* <action> - (login,logout,exclude,browse)
  
login: It is used to request access to the application. It deletes the text string "free" and registers our access in the pandorafms audit or returns the text string "denied" if there is another user in the audit records who has previously accessed the system and has not yet logged out. It will also return denied if the administrator-only access parameter is enabled and the user is not.
+
login: It is used to request access to the application. It deletes the text string "free" and registers your access in Pandora FMS audit or returns the text string "denied" if there is another user in the audit records who has previously logged in the system and has not yet logged out. It will also return denied if the administrator-only access parameter is enabled and the user is not an admin.
  
logout: Logs a user's exit from the application so that other users are again allowed to access.
+
logout: Logs a user's application logout so that other users are again allowed to access.
  
 
browse: It must be used on all pages of the external application, as it checks whether this user is still the last one to access or be expelled from the application.
 
browse: It must be used on all pages of the external application, as it checks whether this user is still the last one to access or be expelled from the application.
  
exclude: Expels the currently registered user and registers the access of another that we have sent in the user_id parameter
+
exclude: It expels the currently registered user and registers the access of another one sent in the user_id parameter
  
 
:* <app ip address>
 
:* <app ip address>
  
IP address of the application from which you are accessing it. It is registered and checked in the pandorafms audit to check the access status of users in the application.
+
IP address of the application from which you access it. It is registered and checked in the Pandora FMS audit to check user access status in the application.
  
 
:* <app name>
 
:* <app name>
  
Name of the application you are accessing from. It is registered and checked in the pandorafms audit to check the access status of users in the application.
+
Name of the application you are accessing from. It is registered and checked in the Pandora FMS audit to check the user access status in the application.
  
 
:* <only admin access>
 
:* <only admin access>
  
Forbids the access to non-administrator users.
+
It forbids the access to non-administrator users.
  
 
=====Example (requires adapted environment)=====
 
=====Example (requires adapted environment)=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=get&op2=access_process&other=1%7Clogin%7C192.168.50.25%7Cexternal_app%7C0&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=access_process&other=1%7Clogin%7C192.168.50.25%7Cexternal_app%7C0&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set create_event_response====
 
====set create_event_response====
  
Creates a new event response.
+
It creates a new event response.
  
 
Call syntax:
 
Call syntax:
Line 4,294: Line 4,483:
 
*op2=create_event_response (required)
 
*op2=create_event_response (required)
 
*return_type=csv|json (required)
 
*return_type=csv|json (required)
*other=<serialized parameters> (all required). In this order
+
*other=<serialized parameters> (all required). In the following order:
 
:*<name>
 
:*<name>
 
:*<description>
 
:*<description>
:*<target> If the forth parameter (<type>) is ''command'', here it is necessary to indicate the wanted command to execute the response to the event. On the other hand, if it is ''url'', you must indicate the URL you want to access as a response to the event.
+
:*<target> If the forth parameter (<type>) is ''command'', here it is necessary to indicate the desired command to execute the response to the event. On the other hand, if it is ''url'', indicate the URL you wish to access as a response to the event.
 
:*<type> ''command'' or ''url''.
 
:*<type> ''command'' or ''url''.
 
:*<group id> The user must have permissions over the indicated group.  
 
:*<group id> The user must have permissions over the indicated group.  
 
:*<modal window width> In pixels.
 
:*<modal window width> In pixels.
 
:*<modal window height> In pixels.
 
:*<modal window height> In pixels.
:*<new window> 1 or 0. Indicates if the URL is show on a new window (1) or on a  modal window (0).
+
:*<new window> 1 or 0. It indicates whether the URL is shown on a new window (1) or on a  modal window (0).
 
:*<parameters> Parameters that complement the execution of the command.
 
:*<parameters> Parameters that complement the execution of the command.
:*<server> Id of the server in which the command is wanted to be executed. For the local console, the value is 0.
+
:*<server> Id of the server in which the command is to be executed. For the local console, the value is 0.
  
 
=====Example=====
 
=====Example=====
  
  http://localhost/pandora_console/include/api.php?op=set&op2=create_event_response&other=response%7Cdescription%20response%7Ctouch%7Ccommand%7C0%7C650%7C400%7C0%7Cresponse%7C0&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=create_event_response&other=response%7Cdescription%20response%7Ctouch%7Ccommand%7C0%7C650%7C400%7C0%7Cresponse%7C0&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set update_event_response====
 
====set update_event_response====
  
Edits an existing event response. The user must have permissions on the group to which the response belongs in order to edit it.
+
It edits an existing event response. The user must have permissions on the group to which the response belongs, in order to edit it.
  
 
Call syntax:
 
Call syntax:
Line 4,319: Line 4,508:
 
*return_type=csv|json (required)
 
*return_type=csv|json (required)
 
*id=<id of event response> (required)  
 
*id=<id of event response> (required)  
*other=<serialized parameters> (optional). In this order
+
*other=<serialized parameters> (optional). In the following order:
 
:*<name>
 
:*<name>
 
:*<description>
 
:*<description>
:*<target> If the fourth parameter (<type>) is ''command'', here you have to indicate the command that you want to execute the response to the event. On the other hand, if it is ''url'', you must indicate the URL you want to access as a response to the event.
+
:*<target> If the fourth parameter (<type>) is ''command'', indicate here the command that you wish for the event response to execute. On the other hand, if it is ''url'', indicate the URL you wish to access as a response to the event.
 
:*<type> ''command'' or ''url''.
 
:*<type> ''command'' or ''url''.
 
:*<group id> The user must have permissions on the indicated group.
 
:*<group id> The user must have permissions on the indicated group.
 
:*<modal window width> In pixels.
 
:*<modal window width> In pixels.
 
:*<modal window height> In pixels.
 
:*<modal window height> In pixels.
:*<new window> 1 or 0. Indicates whether the URL is displayed in a new window (1) or on a modal window (0).
+
:*<new window> 1 or 0. It indicates whether the URL is displayed on a new window (1) or on a modal window (0).
 
:*<parameters> Parameters that complement the command's execution.
 
:*<parameters> Parameters that complement the command's execution.
:*<server> Id of the server where the command is wished to be executed. For the local console the value is 0.
+
:*<server> Id of the server where the command is to be executed. For the local console the value is 0.
  
 
=====Example=====
 
=====Example=====
  
  http://localhost/pandora_console/include/api.php?op=set&op2=update_event_response&id=7&other=response%7Cdescription%20response%7Ctouch%7Ccommand%7C0%7C650%7C400%7C0%7Cresponse%7C0&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=update_event_response&id=7&other=response%7Cdescription%20response%7Ctouch%7Ccommand%7C0%7C650%7C400%7C0%7Cresponse%7C0&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set delete_event_response====
 
====set delete_event_response====
Deletes an event response. The user must have permissions on the group to which the response belongs in order to delete it.
+
It deletes an event response. The user must have permissions on the group to which the response belongs in order to delete it.
  
 
Call syntax:
 
Call syntax:
Line 4,346: Line 4,535:
 
=====Example=====
 
=====Example=====
  
  http://localhost/pandora_console/include/api.php?op=set&op2=delete_event_response&id=7&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=delete_event_response&id=7&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set create_user_profile_info====
 
====set create_user_profile_info====
  
Creates a new user profile.
+
It creates a new user profile.
  
 
Call syntax:
 
Call syntax:
Line 4,356: Line 4,545:
 
*op2=create_user_profile_info (required)
 
*op2=create_user_profile_info (required)
 
*return_type=csv|json (required)
 
*return_type=csv|json (required)
*other=<serialized parameters> In this order
+
*other=<serialized parameters> In the following order:
 
:*<name> (required)
 
:*<name> (required)
:*<access bits>: 1 if bit is to be set and 0 if not. They are not required but if no value is specified the bit will be marked as not active. In this order:  
+
:*<access bits>: 1 if bit is to be set and 0 if not. They are not required but if no value is specified, the bit will be marked as not active. In this order:  
 
'''IR|IW|IM|AR|AW|AD|LW|LM|UM|DM|ER|EW|EM|RR|RW|RM|MR|MW|MM|VR|VW|VM|PM'''.  
 
'''IR|IW|IM|AR|AW|AD|LW|LM|UM|DM|ER|EW|EM|RR|RW|RM|MR|MW|MM|VR|VW|VM|PM'''.  
  
{{Tip|To know which permissions we should activate, visit the following [[Pandora:Documentation_en:Managing_and_Administration#Profiles_in_Pandora_FMS | link.]]}}
+
{{Tip|To know which permissions should be activated, click on the following [[Pandora:Documentation_en:Managing_and_Administration#Profiles_in_Pandora_FMS | link.]]}}
  
 
=====Example=====
 
=====Example=====
  
This example creates a profile that gives a read-only access to Pandora, that is, it is the same as the predefined profile ''Operator (read)''.
+
This example creates a profile that gives read-only access to Pandora, that is, it is the same as the predefined profile ''Operator (read)''.
  
  http://localhost/pandora_console/include/api.php?op=set&op2=create_user_profile_info&return_type=json&other=API_profile%7C1%7C0%7C0%7C1%7C0%7C0%7C0%7C0%7C0%7C0%7C1%7C0%7C0%7C1%7C0%7C0%7C1%7C0%7C0%7C1%7C0%7C0%7C0&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=create_user_profile_info&return_type=json&other=API_profile%7C1%7C0%7C0%7C1%7C0%7C0%7C0%7C0%7C0%7C0%7C1%7C0%7C0%7C1%7C0%7C0%7C1%7C0%7C0%7C1%7C0%7C0%7C0&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set update_user_profile_info====
 
====set update_user_profile_info====
  
Updates new existing user profile.
+
It updates a new existing user profile.
  
 
Call syntax:
 
Call syntax:
 
*op=set (required)
 
*op=set (required)
 
*op2=update_user_profile_info (required)
 
*op2=update_user_profile_info (required)
*other=<serialized parameters> (all optional) in this order
+
*other=<serialized parameters> (all optional). In the following order:
 
:*<name>
 
:*<name>
 
:*<access bits>: 1 if you want to set the bit and 0 if you want to disable it. If no value is specified, it will not change. In this order:  
 
:*<access bits>: 1 if you want to set the bit and 0 if you want to disable it. If no value is specified, it will not change. In this order:  
 
'''IR|IW|IM|AR|AW|AD|LW|LM|UM|DM|ER|EW|EM|RR|RW|RM|MR|MW|MM|VR|VW|VM|PM'''.  
 
'''IR|IW|IM|AR|AW|AD|LW|LM|UM|DM|ER|EW|EM|RR|RW|RM|MR|MW|MM|VR|VW|VM|PM'''.  
  
{{Tip|To know which permissions we should activate, visit the following [[Pandora:Documentation_en:Managing_and_Administration#Profiles_in_Pandora_FMS | link.]]}}
+
{{Tip|To find out which permissions should be activated, click on the following [[Pandora:Documentation_en:Managing_and_Administration#Profiles_in_Pandora_FMS | link.]]}}
  
 
=====Example=====
 
=====Example=====
  
In this example we change the name of the profile with ID 6 to ''API_profile_updated'' and we give all the permissions (read, write and management) related to agents and we remove the permission to read events.
+
In this example the name of the profile with ID 6 is replaced by ''API_profile_updated'' and it is granted all permissions (read, write and management) related to agents and permission to read events is withdrawn.
  
  http://localhost/pandora_console/include/api.php?op=set&op2=update_user_profile_info&return_type=json&id=6&other=API_profile_updated%7C%7C%7C%7C1%7C1%7C1%7C%7C%7C%7C%7C0%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=update_user_profile_info&return_type=json&id=6&other=API_profile_updated%7C%7C%7C%7C1%7C1%7C1%7C%7C%7C%7C%7C0%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set delete_user_profile_info====
 
====set delete_user_profile_info====
  
Deletes a user profile. It also deletes all assignments from that profile to any user.
+
It deletes a user profile. It also deletes all that profile assignments to any user.
  
 
Call syntax:
 
Call syntax:
Line 4,401: Line 4,590:
 
=====Example=====
 
=====Example=====
  
  http://localhost/pandora_console/include/api.php?op=set&op2=delete_user_profile_info&return_type=json&id=8&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=delete_user_profile_info&return_type=json&id=8&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set create_event_filter====
 
====set create_event_filter====
Creates an event filter.
+
It creates an event filter.
  
 
Call syntax:
 
Call syntax:
Line 4,434: Line 4,623:
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=create_event_filter&id=test&other=%7C%7Cerror%7C4%7C%7C%7C1%7C%7C12%7C%7C%7C2018-12-09%7C2018-12-13%7C[%226%22]%7C[%2210%22,%226%22,%223%22]%7C1%7C10%7C%7C%7C&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=create_event_filter&id=test&other=%7C%7Cerror%7C4%7C%7C%7C1%7C%7C12%7C%7C%7C2018-12-09%7C2018-12-13%7C[%226%22]%7C[%2210%22,%226%22,%223%22]%7C1%7C10%7C%7C%7C&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set update_event_filter====
 
====set update_event_filter====
Updates an event filter.
+
It updates an event filter.
  
 
Call syntax:
 
Call syntax:
 
*op=set (required)
 
*op=set (required)
 
*op2=update_event_filter (required)
 
*op2=update_event_filter (required)
*id=<event_filter_id> (required) must be an existing event filter id.
+
*id=<event_filter_id> (required). It must be an existing event filter id.
*other=<serialized parameters> (optional). In this order
+
*other=<serialized parameters> (optional). In the following order:
 
:*<id_group_filter>
 
:*<id_group_filter>
 
:*<id_group>
 
:*<id_group>
Line 4,467: Line 4,656:
 
=====Example=====
 
=====Example=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=update_event_filter&id=195&other=new_name%7C%7C%7Calert_recovered%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=update_event_filter&id=195&other=new_name%7C%7C%7Calert_recovered%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set delete_event_filter====
 
====set delete_event_filter====
Deletes an event filter.
+
It deletes an event filter.
  
 
Call syntax:
 
Call syntax:
 
*op=set (required)
 
*op=set (required)
 
*op2=delete_event_filter (required)
 
*op2=delete_event_filter (required)
*id=<event_filter_id> (required) must be an existing event filter id.
+
*id=<event_filter_id> (required). It must be an existing event filter id.
  
 
=====Example=====
 
=====Example=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=set&op2=delete_event_filter&id=38&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=set&op2=delete_event_filter&id=38&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====get all_event_filters====
 
====get all_event_filters====
  
Returns the list of existing event filters.
+
It returns the list of existing event filters.
  
 
Call syntax:
 
Call syntax:
Line 4,493: Line 4,682:
 
=====Examples=====
 
=====Examples=====
  
  http://127.0.0.1/pandora_console/include/api.php?op=get&op2=all_event_filters&return_type=csv&other=;&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://127.0.0.1/pandora_console/include/api.php?op=get&op2=all_event_filters&return_type=csv&other=;&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
====set create_inventory_module====
 
====set create_inventory_module====
 +
It creates a new inventory module.
  
{{WIP}}
+
Call syntax:
 +
*op=set (required)
 +
*op2=create_inventory_module (required)
 +
*return_type=csv|json
 +
*other=<serialized parameters> In the following order:
 +
:*<name> (required)
 +
:*<description>: (required, but can be empty)
 +
:*<operation system id>: (required). Numerical Id of the table ''tconfig_os''.
 +
:*<interpreter>: (required, but can be empty). If the interpreter is empty, it is interpreted as just a local inventory module.
 +
:*< code >: (required, but can be empty). ''Script'' that must be executed to obtain the inventory data. Must be in '''base64'''.
 +
:*< data format >: (required). Header of the retrieved data (separated by '';'').
 +
:*<block mode>: (required) 1 or 0.
  
Crea un nuevo módulo de inventario.
+
=====Example=====
  
Sintaxis de la llamada:
+
This example creates an inventory module called '''OS''' that collects the ''kernel-name'' and ''nodename'' data from a Linux system.
*op=set (obligatorio)
 
*op2=create_inventory_module (obligatorio)
 
*return_type=csv|json (obligatorio)
 
*other=<parámetros serializados> Por este orden
 
:*<nombre> (obligatorio)
 
:*<descripcción>: (obligatorio pero puede ser vacío)
 
:*<id sistema operation>: (obligatorio). Id numérico de la tabla ''tconfig_os''
 
:*<intérprete>: (obligatorio aunque puede ser vacío). Si el intérprete es vacío se interpreta que solo es un módulo de inventario local.
 
:*<código>: (obligatorio pero puede ser vacío) ''Script'' que tiene que ejecutarse para obtener los datos de inventario. Debe pasarse en '''base64'''.
 
:*<formato de los datos>: (obligatorio) Cabecera de los datos extraídos (separados por '';'').
 
:*<modo block>: (obligatorio) 1 o 0.
 
  
=====Ejemplo=====
+
<nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=create_inventory_module&return_type=json&other=OS%7COS_name_description%7C1%7C/bin/bash%7CIyEvYmluL2Jhc2gKZWNobyB1bmFtZSAtbiAtcw==%7Ckernelname;nodename%7C0&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora</nowiki>
 +
 
 +
====set update_inventory_module====
 +
It updates an inventory module.
 +
 
 +
Call syntax:
 +
*op=set (required)
 +
*op2=update_inventory_module (required)
 +
*id= inventory module ID (required)
 +
*return_type=csv|json
 +
*other=<serialized parameters>. In the following order:
 +
:*<name> (required)
 +
:*<description>: (required, but it can be empty)
 +
:*<operation system id>: (required). Numerical Id of the ''tconfig_os'' table.
 +
:*<interpreter>: (required, but can be empty). If the interpreter is empty, it is interpreted as just a local inventory module.
 +
:*< code >: (required, but it can be empty). ''Script'' that must be executed to obtain inventory data. It must be in '''base64'''.
 +
:*< data format >: (required) Header of the retrieved data (separated by '';'').
 +
:*<block mode>: (required) 1 or 0.
 +
 
 +
=====Example=====
 +
 
 +
<nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=update_inventory_module&return_type=json&id=42&other=OS_easy%7COS_name_description%7C1%7C/bin/bash%7CIyEvYmluL2Jhc2gKZWNobyB1bmFtZSAtbiAtcw==%7Ckernelname;nodename%7C0&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora</nowiki>
 +
 
 +
====set delete_inventory_module====
 +
It deletes a user profile. It also deletes all assignments from that profile to any user.
 +
 
 +
Call syntax:
 +
*op=set (required)
 +
*op2=delete_inventory_module (required)
 +
*return_type=csv|json
 +
*id=<inventory module ID> (required)
 +
 
 +
=====Examples=====
  
Este ejemplo crea módulo llamado '''OS''' de inventario que recoge los datos ''kernel-name'' y ''nodename'' de un sistema Linux.
+
<nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=delete_inventory_module&return_type=json&id=42&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora</nowiki>
  
http://localhost/pandora_console/include/api.php?op=set&op2=create_inventory_module&return_type=json&other=OS%7COS_name_description%7C1%7C/bin/bash%7CIyEvYmluL2Jhc2gKZWNobyB1bmFtZSAtbiAtcw==%7Ckernelname;nodename%7C0&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora
+
====set create_collection====
 +
It creates a collection.
  
====set update_inventory_module====
+
Call syntax:
 +
*op=set (required)
 +
*op2=create_collection (required)
 +
*other=&lt;serialized values&gt; (required) Serialized values to create the collection.
 +
:*&lt;name&gt;
 +
:*&lt;short_name&gt;
 +
:*&lt;id_group&gt;
 +
:*&lt;description&gt;
 +
It is necessary to pair it with 'other_mode' as follows: other_mode=url_encode_separator_&lt;separator&gt; to pass the separator of the serialized values of other.
 +
 
 +
=====Examples=====
  
{{WIP}}
+
<nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=create_collection&other=test_plugin|test_p|0|test&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora</nowiki>
  
Actualiza un módulo de inventario.
+
====set delete_collection====
 +
It deletes a collection.
  
Sintaxis de la llamada:
+
Call syntax:
*op=set (obligatorio)
+
*op=set (required)
*op2=update_inventory_module (obligatorio)
+
*op2=delete_collection (required)
*id= ID del módulo de inventario (obligatorio)
+
*id= id_collection (required)
*return_type=csv|json (obligatorio)
 
*other=<parámetros serializados> Por este orden
 
:*<nombre> (obligatorio)
 
:*<descripcción>: (obligatorio pero puede ser vacío)
 
:*<id sistema operation>: (obligatorio). Id numérico de la tabla ''tconfig_os''
 
:*<intérprete>: (obligatorio aunque puede ser vacío). Si el intérprete es vacío se interpreta que solo es un módulo de inventario local.
 
:*<código>: (obligatorio pero puede ser vacío) ''Script'' que tiene que ejecutarse para obtener los datos de inventario. Debe pasarse en '''base64'''.
 
:*<formato de los datos>: (obligatorio) Cabecera de los datos extraídos (separados por '';'').
 
:*<modo block>: (obligatorio) 1 o 0.
 
  
=====Ejemplos=====
+
=====Examples=====
  
  http://localhost/pandora_console/include/api.php?op=set&op2=update_inventory_module&return_type=json&id=42&other=OS_easy%7COS_name_description%7C1%7C/bin/bash%7CIyEvYmluL2Jhc2gKZWNobyB1bmFtZSAtbiAtcw==%7Ckernelname;nodename%7C0&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora
+
  <nowiki>http://localhost/pandora_console/include/api.php?op=set&op2=delete_collection&id=15&apipass=1234&user=admin&pass=pandora</nowiki>
  
 
== Examples ==
 
== Examples ==
Several examples in several languages about to call Pandora API.
+
These are several examples in several languages about calling Pandora FMS API.
  
 
===Example===
 
===Example===
  
  http://127.0.0.1/pandora5/include/api.php?apipass=1234&user=admin&pass=pandora&op=set&op2=gis_agent&id=582&other_mode=url_encode_separator_|&other=2%7C2%7C0%7C0%7C0%7C2000-01-01+01%3A01%3A01%7C0%7C666%7Caaa%7Cbbb%7Cccc
+
  <nowiki>http://127.0.0.1/pandora5/include/api.php?apipass=1234&user=admin&pass=pandora&op=set&op2=gis_agent&id=582&other_mode=url_encode_separator_|&other=2%7C2%7C0%7C0%7C0%7C2000-01-01+01%3A01%3A01%7C0%7C666%7Caaa%7Cbbb%7Cccc</nowiki>
  
 
=== PHP ===
 
=== PHP ===
Line 4,974: Line 5,199:
  
 
=== Java (Android) ===
 
=== Java (Android) ===
Please you can see our project (Pandora Event Viewer) in [https://sourceforge.net/p/pandora/code/8678/tree/trunk/extras/pandroid_event_viewer/ Pandroid Event Viewer source code in SourceForge SVN repository] but this is piece of code for get the data of events across the API.
+
See our project (Pandora FMS Event Viewer) in [https://sourceforge.net/p/pandora/code/8678/tree/trunk/extras/pandroid_event_viewer/ Pandroid FMS Event Viewer source code in SourceForge SVN repository] but this is the most important piece of code, which calls the API to get event data.
  
 
<pre>
 
<pre>
Line 5,040: Line 5,265:
 
Some ideas for the future of api.php are:
 
Some ideas for the future of api.php are:
  
* Increase the API calls group.
+
* Broading the API call ensemble.
* Return and get values in xml, JSON...
+
* Returning and getting values in xml, JSON...
* Increase the call security for insecure environments.
+
* Increasing security call for insecure environments.
* Integrate with third tools standards.
+
* Integration with third tool standards.
  
  

Latest revision as of 06:54, 8 October 2019

Go back to Pandora FMS documentation index

Contents