Alerts
======

get\_\ *alert_config_global*
----------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X GET https://PEM-SERVER-IP/api/v14/alert/config/global/ \
     -H Accept: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Accept: application/json,
     X-Auth-Token: string
   }

   r = requests.get(https://PEM-SERVER-IP/api/v14/alert/config/global/, headers = headers)

   print(r.json())

.. code:: javascript


   const headers = {
     Accept:application/json,
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/global/,
   {
     method: GET,

     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``GET /alert/config/global/``

Gets ``Alerts`` for global level.

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  X-Auth-Token,header,string,true,Token of authorization

**Example responses**

.. raw:: html

   <Details summary="200 Response">

.. code:: json

   [
     {
       "id": 0,
       "alert_name": "string",
       "alert_template": 0,
       "description": "string",
       "enabled": true,
       "history_retention": 0,
       "frequency_min": 0,
       "auto_created": true,
       "template_id": "string",
       "params": [],
       "param_names": [
         "string"
       ],
       "param_types": "string",
       "params_units": [
         "string"
       ],
       "threshold_unit": "string",
       "operator": "string",
       "low_threshold_value": 0,
       "medium_threshold_value": 0,
       "high_threshold_value": 0,
       "send_email": true,
       "all_alert_enable": true,
       "email_group_id": 0,
       "low_alert_enable": true,
       "low_email_group_id": 0,
       "med_alert_enable": true,
       "med_email_group_id": 0,
       "high_alert_enable": true,
       "high_email_group_id": 0,
       "send_trap": true,
       "snmp_trap_version": 0,
       "low_send_trap": true,
       "med_send_trap": true,
       "high_send_trap": true,
       "cleared_alert_enable": true,
       "execute_script": true,
       "execute_script_on_clear": true,
       "execute_script_on_pem_server": true,
       "script_code": "string",
       "submit_to_nagios": true,
       "override_default_config": true,
       "send_notification": true,
       "low_webhook_ids": [
         0
       ],
       "med_webhook_ids": [
         0
       ],
       "high_webhook_ids": [
         0
       ],
       "cleared_webhook_ids": [
         0
       ]
     }
   ]

.. raw:: html

   </Details>

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Successful response,Inline

Response Schema
^^^^^^^^^^^^^^^

Status Code **200**

.. csv-table::
  :header: Name,Type,Required,Restrictions,Description
  :widths: 12,8,8,8,12
  :align: left
  :class: longtable

  *anonymous*,\ :ref:`Query information <Schemas>` ],false,none,none
  » id,integer,false,none,Alert ID. NOTE: This property is not applicable for a POST request.
  » alert_name,string,false,none,Name of the alert. NOTE: This property is a mandatory parameter for a POST request.
  » alert_template,integer,false,none,ID of the alert template. This property must be a positive integer value. NOTE: It is a mandatory parameter for a POST request.
  » description,string,false,none,none
  » enabled,boolean,false,none,Determines whether this alert is enabled/disabled. NOTE: This property is a mandatory parameter for a POST request.
  » history_retention,integer,false,none,Specifies how many days to keep the history of this alert. Possible values are from 1 to 99999. NOTE: This property is a mandatory parameter for a POST request.
  » frequency_min,integer,false,none,Defines in minutes how frequently the alert must be checked on a PEM database server. Possible values are from 1 to 65534. NOTE: This property is a mandatory parameter for a POST request.
  » auto_created,boolean,false,none,Specifies whether the alert is auto-created.
  » template_id,string,false,none,Defines the alert template.
  » params,\ :ref:`Query information <Schemas>` ],false,none,List of parameter/value pairs to be used by the alert template for checking alerts. NOTE: The alert template requires the all parameter to be defined.
  »» paramname,string,false,none,Name of the parameter. NOTE: This property must present on the alert template parameter list.Example:
  »» paramvalue,string,false,none,Value for the given parameter
  » param_names,[string],false,none,Defines the name of parameters.
  » param_types,string,false,none,Defines the type of parameters. Example: INTEGER/STRING..
  » params_units,[string],false,none,"Defines the unit used for parameters.Example: 'DAYS','True or False','Hours','Minutes' etc"
  » threshold_unit,string,false,none,"Units used to calculate the threshold, such as MB/kB/seconds/days/... This value is only used for the GUI."
  » operator,string,false,none,"Defines the operator for checking threshold values. Valid strings are "">"" and ""&lt;"". NOTE: This property is a mandatory parameter for a POST request."
  » low_threshold_value,number,false,none,Threshold value for triggering the low alert. This property can be any valid integer/float value. NOTE: It is a mandatory parameter for the POST request.
  » medium_threshold_value,number,false,none,Threshold value for triggering the medium alert. This property can be any valid integer/float value. NOTE: It is a mandatory parameter for the POST request.
  » high_threshold_value,number,false,none,Threshold value for triggering the high alert. It can be any valid integer/float value. NOTE: It is a mandatory parameter for the POST request.
  » send_email,boolean,false,none,Determines whether to send an email when the state of the alert changes.
  » all_alert_enable,boolean,false,none,Determines whether to send an email notification to the group specified by the parameter 'email_group_id' when the state of the alert changes.
  » email_group_id,integer,false,none,Defines the email group to which email notification are sent when the state of the alert changes.
  » low_alert_enable,boolean,false,none,Determines whether to send an email notification to the group specified by the parameter 'low_email_group_id' when the state of the alert is set to LOW.
  » low_email_group_id,integer,false,none,Defines the email group to which email notification are sent when the state of the alert changes to LOW.
  » med_alert_enable,boolean,false,none,Determines whether to send an email notification to the group specified by the parameter 'medium_email_group_id' when the state of the alert is set to MEDIUM.
  » med_email_group_id,integer,false,none,Defines the email group to which email notification are sent when state of the alert changes to MEDIUM.
  » high_alert_enable,boolean,false,none,Determines whether to send an email notification to the group specified by the parameter 'high_email_group_id' when the state of the alert is set to HIGH.
  » high_email_group_id,integer,false,none,Defines the email group to which email notification are sent when the state of the alert changes to HIGH.
  » send_trap,boolean,false,none,Determines whether to send SNMP trap notifications when the state of the alert changes.
  » snmp_trap_version,integer,false,none,"Defines the SNMP trap version. Supported SNMP trap versions are 1, 2 or 3"
  » low_send_trap,boolean,false,none,Determines whether to send SNMP trap notifications when the state of the alert changes to LOW.
  » med_send_trap,boolean,false,none,Determines whether to send SNMP trap notification when the state of the alert changes to MEDIUM.
  » high_send_trap,boolean,false,none,Determines whether to send SNMP trap notification when the state of the alert changes to HIGH.
  » cleared_alert_enable,boolean,false,none,Determines whether to mute the notification for 'clear alert'.
  » execute_script,boolean,false,none,Determines whether to execute the provided script if the state of the alert changes to LOW/MEDIUM/HIGH.
  » execute_script_on_clear,boolean,false,none,Determines whether to execute the provided script if the state of the alert is cleared.
  » execute_script_on_pem_server,boolean,false,none,Determines whether to execute the provided script on the PEM host or the host where the agent is monitoring the object.
  » script_code,string,false,none,The shell or batch script to be executed. Please read the documentation for detailed information.
  » submit_to_nagios,boolean,false,none,Determines whether to send notification to the nagios when the state of the alert changes.
  » override_default_config,boolean,false,none,Determines whether to override the default webhook configuration.
  » send_notification,boolean,false,none,Determines whether to enable the webhook send notification.
  » low_webhook_ids,[integer],false,none,Webhook IDs for which low alerts are configured
  » med_webhook_ids,[integer],false,none,Webhook IDs for which medium alerts are configured
  » high_webhook_ids,[integer],false,none,Webhook IDs for which high alerts are configured
  » cleared_webhook_ids,[integer],false,none,Webhook IDs for which cleared alerts are configured

Enumerated Values
'''''''''''''''''

.. csv-table::
  :header: Property,Value
  :widths: 25,25
  :align: left
  :class: longtable

  paramname,Exclude tables smaller than
  paramname,mount point
  paramname,Host IP Address
  paramname,Time interval to monitor
  paramname,Time since idle
  paramname,Per CPU utilization (K%)

..  Note::
   This operation does not require authentication

post\_\ *alert_config_global*
-----------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X POST https://PEM-SERVER-IP/api/v14/alert/config/global/ \
     -H Content-Type: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Content-Type: application/json,
     X-Auth-Token: string
   }

   r = requests.post(https://PEM-SERVER-IP/api/v14/alert/config/global/, headers = headers)

   print(r.json())

.. code:: javascript

   const inputBody = {
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "all_alert_enable": true,
     "email_group_id": 1,
     "low_alert_enable": true,
     "low_email_group_id": 1,
     "med_alert_enable": true,
     "med_email_group_id": 1,
     "high_alert_enable": true,
     "high_email_group_id": 1,
     "send_trap": false,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "params": [],
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": false,
     "low_webhook_ids": [],
     "med_webhook_ids": [],
     "high_webhook_ids": [],
     "cleared_webhook_ids": []
   };
   const headers = {
     Content-Type:application/json,
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/global/,
   {
     method: POST,
     body: inputBody,
     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``POST /alert/config/global/``

Creates ``Alert`` for global level.

**Body parameter**

.. code:: json

   {
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "all_alert_enable": true,
     "email_group_id": 1,
     "low_alert_enable": true,
     "low_email_group_id": 1,
     "med_alert_enable": true,
     "med_email_group_id": 1,
     "high_alert_enable": true,
     "high_email_group_id": 1,
     "send_trap": false,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "params": [],
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": false,
     "low_webhook_ids": [],
     "med_webhook_ids": [],
     "high_webhook_ids": [],
     "cleared_webhook_ids": []
   }

.. _parameters-1:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  X-Auth-Token,header,string,true,Token of authorization
  body,body,:ref:`AlertPayload<AlertPayload>` ,true,none

**Example responses**

.. _responses-1:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Status 200,None

.. _response-schema-1:

Response Schema
^^^^^^^^^^^^^^^

..  Note::
   This operation does not require authentication

get\_\ *alert_config_global*\ {alert_id}
----------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X GET https://PEM-SERVER-IP/api/v14/alert/config/global/{alert_id} \
     -H Accept: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Accept: application/json,
     X-Auth-Token: string
   }

   r = requests.get(https://PEM-SERVER-IP/api/v14/alert/config/global/{alert_id}, headers = headers)

   print(r.json())

.. code:: javascript


   const headers = {
     Accept:application/json,
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/global/{alert_id},
   {
     method: GET,

     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``GET /alert/config/global/{alert_id}``

Gets ``Alerts`` for global level by alert_id.

.. _parameters-2:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  alert_id,path,integer,true,Alert ID
  X-Auth-Token,header,string,true,Token of authorization

**Example responses**

.. raw:: html

   <Details summary="200 Response">

.. code:: json

   {
     "id": 0,
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "auto_created": true,
     "template_id": "string",
     "params": [],
     "param_names": [
       "string"
     ],
     "param_types": "string",
     "params_units": [
       "string"
     ],
     "threshold_unit": "string",
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "send_email": true,
     "all_alert_enable": true,
     "email_group_id": 0,
     "low_alert_enable": true,
     "low_email_group_id": 0,
     "med_alert_enable": true,
     "med_email_group_id": 0,
     "high_alert_enable": true,
     "high_email_group_id": 0,
     "send_trap": true,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": true,
     "low_webhook_ids": [
       0
     ],
     "med_webhook_ids": [
       0
     ],
     "high_webhook_ids": [
       0
     ],
     "cleared_webhook_ids": [
       0
     ]
   }

.. raw:: html

   </Details>

.. _responses-2:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Successful response,:ref:`About alert threads<About alert threads>` 

..  Note::
   This operation does not require authentication

put\_\ *alert_config_global*\ {alert_id}
----------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X PUT https://PEM-SERVER-IP/api/v14/alert/config/global/{alert_id} \
     -H Content-Type: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Content-Type: application/json,
     X-Auth-Token: string
   }

   r = requests.put(https://PEM-SERVER-IP/api/v14/alert/config/global/{alert_id}, headers = headers)

   print(r.json())

.. code:: javascript

   const inputBody = {
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "all_alert_enable": true,
     "email_group_id": 1,
     "low_alert_enable": true,
     "low_email_group_id": 1,
     "med_alert_enable": true,
     "med_email_group_id": 1,
     "high_alert_enable": true,
     "high_email_group_id": 1,
     "send_trap": false,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "params": [],
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": false,
     "low_webhook_ids": [],
     "med_webhook_ids": [],
     "high_webhook_ids": [],
     "cleared_webhook_ids": []
   };
   const headers = {
     Content-Type:application/json,
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/global/{alert_id},
   {
     method: PUT,
     body: inputBody,
     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``PUT /alert/config/global/{alert_id}``

Updates ``Alert`` for global level.

**Body parameter**

.. code:: json

   {
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "all_alert_enable": true,
     "email_group_id": 1,
     "low_alert_enable": true,
     "low_email_group_id": 1,
     "med_alert_enable": true,
     "med_email_group_id": 1,
     "high_alert_enable": true,
     "high_email_group_id": 1,
     "send_trap": false,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "params": [],
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": false,
     "low_webhook_ids": [],
     "med_webhook_ids": [],
     "high_webhook_ids": [],
     "cleared_webhook_ids": []
   }

.. _parameters-3:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  alert_id,path,integer,true,Alert ID
  X-Auth-Token,header,string,true,Token of authorization
  body,body,:ref:`AlertPayload<AlertPayload>` ,true,none

**Example responses**

.. _responses-3:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Status 200,None

.. _response-schema-2:

Response Schema
^^^^^^^^^^^^^^^

..  Note::
   This operation does not require authentication

delete\_\ *alert_config_global*\ {alert_id}
-------------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X DELETE https://PEM-SERVER-IP/api/v14/alert/config/global/{alert_id} \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     X-Auth-Token: string
   }

   r = requests.delete(https://PEM-SERVER-IP/api/v14/alert/config/global/{alert_id}, headers = headers)

   print(r.json())

.. code:: javascript


   const headers = {
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/global/{alert_id},
   {
     method: DELETE,

     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``DELETE /alert/config/global/{alert_id}``

Deletes the ``Alert`` object.

.. _parameters-4:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  alert_id,path,integer,true,Alert ID
  X-Auth-Token,header,string,true,Token of authorization

**Example responses**

.. _responses-4:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Successful deletion,None

.. _response-schema-3:

Response Schema
^^^^^^^^^^^^^^^

..  Note::
   This operation does not require authentication

get\_\ *alert_config_agent*\ {agent_id}
---------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X GET https://PEM-SERVER-IP/api/v14/alert/config/agent/{agent_id} \
     -H Accept: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Accept: application/json,
     X-Auth-Token: string
   }

   r = requests.get(https://PEM-SERVER-IP/api/v14/alert/config/agent/{agent_id}, headers = headers)

   print(r.json())

.. code:: javascript


   const headers = {
     Accept:application/json,
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/agent/{agent_id},
   {
     method: GET,

     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``GET /alert/config/agent/{agent_id}``

Gets ``Alerts`` for agent level by agent_id.

.. _parameters-5:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  agent_id,path,integer,true,Agent ID
  X-Auth-Token,header,string,true,Token of authorization

**Example responses**

.. raw:: html

   <Details summary="200 Response">

.. code:: json

   [
     {
       "id": 0,
       "alert_name": "string",
       "alert_template": 0,
       "description": "string",
       "enabled": true,
       "history_retention": 0,
       "frequency_min": 0,
       "auto_created": true,
       "template_id": "string",
       "params": [],
       "param_names": [
         "string"
       ],
       "param_types": "string",
       "params_units": [
         "string"
       ],
       "threshold_unit": "string",
       "operator": "string",
       "low_threshold_value": 0,
       "medium_threshold_value": 0,
       "high_threshold_value": 0,
       "send_email": true,
       "all_alert_enable": true,
       "email_group_id": 0,
       "low_alert_enable": true,
       "low_email_group_id": 0,
       "med_alert_enable": true,
       "med_email_group_id": 0,
       "high_alert_enable": true,
       "high_email_group_id": 0,
       "send_trap": true,
       "snmp_trap_version": 0,
       "low_send_trap": true,
       "med_send_trap": true,
       "high_send_trap": true,
       "cleared_alert_enable": true,
       "execute_script": true,
       "execute_script_on_clear": true,
       "execute_script_on_pem_server": true,
       "script_code": "string",
       "submit_to_nagios": true,
       "override_default_config": true,
       "send_notification": true,
       "low_webhook_ids": [
         0
       ],
       "med_webhook_ids": [
         0
       ],
       "high_webhook_ids": [
         0
       ],
       "cleared_webhook_ids": [
         0
       ]
     }
   ]

.. raw:: html

   </Details>

.. _responses-5:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Successful response,Inline

.. _response-schema-4:

Response Schema
^^^^^^^^^^^^^^^

Status Code **200**

.. csv-table::
  :header: Name,Type,Required,Restrictions,Description
  :widths: 12,8,8,8,12
  :align: left
  :class: longtable

  *anonymous*,\ :ref:`Query information <Schemas>` ],false,none,none
  » id,integer,false,none,Alert ID. NOTE: This property is not applicable for a POST request.
  » alert_name,string,false,none,Name of the alert. NOTE: This property is a mandatory parameter for a POST request.
  » alert_template,integer,false,none,ID of the alert template. This property must be a positive integer value. NOTE: It is a mandatory parameter for a POST request.
  » description,string,false,none,none
  » enabled,boolean,false,none,Determines whether this alert is enabled/disabled. NOTE: This property is a mandatory parameter for a POST request.
  » history_retention,integer,false,none,Specifies how many days to keep the history of this alert. Possible values are from 1 to 99999. NOTE: This property is a mandatory parameter for a POST request.
  » frequency_min,integer,false,none,Defines in minutes how frequently the alert must be checked on a PEM database server. Possible values are from 1 to 65534. NOTE: This property is a mandatory parameter for a POST request.
  » auto_created,boolean,false,none,Specifies whether the alert is auto-created.
  » template_id,string,false,none,Defines the alert template.
  » params,\ :ref:`Query information <Schemas>` ],false,none,List of parameter/value pairs to be used by the alert template for checking alerts. NOTE: The alert template requires the all parameter to be defined.
  »» paramname,string,false,none,Name of the parameter. NOTE: This property must present on the alert template parameter list.Example:
  »» paramvalue,string,false,none,Value for the given parameter
  » param_names,[string],false,none,Defines the name of parameters.
  » param_types,string,false,none,Defines the type of parameters. Example: INTEGER/STRING..
  » params_units,[string],false,none,"Defines the unit used for parameters.Example: 'DAYS','True or False','Hours','Minutes' etc"
  » threshold_unit,string,false,none,"Units used to calculate the threshold, such as MB/kB/seconds/days/... This value is only used for the GUI."
  » operator,string,false,none,"Defines the operator for checking threshold values. Valid strings are "">"" and ""&lt;"". NOTE: This property is a mandatory parameter for a POST request."
  » low_threshold_value,number,false,none,Threshold value for triggering the low alert. This property can be any valid integer/float value. NOTE: It is a mandatory parameter for the POST request.
  » medium_threshold_value,number,false,none,Threshold value for triggering the medium alert. This property can be any valid integer/float value. NOTE: It is a mandatory parameter for the POST request.
  » high_threshold_value,number,false,none,Threshold value for triggering the high alert. It can be any valid integer/float value. NOTE: It is a mandatory parameter for the POST request.
  » send_email,boolean,false,none,Determines whether to send an email when the state of the alert changes.
  » all_alert_enable,boolean,false,none,Determines whether to send an email notification to the group specified by the parameter 'email_group_id' when the state of the alert changes.
  » email_group_id,integer,false,none,Defines the email group to which email notification are sent when the state of the alert changes.
  » low_alert_enable,boolean,false,none,Determines whether to send an email notification to the group specified by the parameter 'low_email_group_id' when the state of the alert is set to LOW.
  » low_email_group_id,integer,false,none,Defines the email group to which email notification are sent when the state of the alert changes to LOW.
  » med_alert_enable,boolean,false,none,Determines whether to send an email notification to the group specified by the parameter 'medium_email_group_id' when the state of the alert is set to MEDIUM.
  » med_email_group_id,integer,false,none,Defines the email group to which email notification are sent when state of the alert changes to MEDIUM.
  » high_alert_enable,boolean,false,none,Determines whether to send an email notification to the group specified by the parameter 'high_email_group_id' when the state of the alert is set to HIGH.
  » high_email_group_id,integer,false,none,Defines the email group to which email notification are sent when the state of the alert changes to HIGH.
  » send_trap,boolean,false,none,Determines whether to send SNMP trap notifications when the state of the alert changes.
  » snmp_trap_version,integer,false,none,"Defines the SNMP trap version. Supported SNMP trap versions are 1, 2 or 3"
  » low_send_trap,boolean,false,none,Determines whether to send SNMP trap notifications when the state of the alert changes to LOW.
  » med_send_trap,boolean,false,none,Determines whether to send SNMP trap notification when the state of the alert changes to MEDIUM.
  » high_send_trap,boolean,false,none,Determines whether to send SNMP trap notification when the state of the alert changes to HIGH.
  » cleared_alert_enable,boolean,false,none,Determines whether to mute the notification for 'clear alert'.
  » execute_script,boolean,false,none,Determines whether to execute the provided script if the state of the alert changes to LOW/MEDIUM/HIGH.
  » execute_script_on_clear,boolean,false,none,Determines whether to execute the provided script if the state of the alert is cleared.
  » execute_script_on_pem_server,boolean,false,none,Determines whether to execute the provided script on the PEM host or the host where the agent is monitoring the object.
  » script_code,string,false,none,The shell or batch script to be executed. Please read the documentation for detailed information.
  » submit_to_nagios,boolean,false,none,Determines whether to send notification to the nagios when the state of the alert changes.
  » override_default_config,boolean,false,none,Determines whether to override the default webhook configuration.
  » send_notification,boolean,false,none,Determines whether to enable the webhook send notification.
  » low_webhook_ids,[integer],false,none,Webhook IDs for which low alerts are configured
  » med_webhook_ids,[integer],false,none,Webhook IDs for which medium alerts are configured
  » high_webhook_ids,[integer],false,none,Webhook IDs for which high alerts are configured
  » cleared_webhook_ids,[integer],false,none,Webhook IDs for which cleared alerts are configured

.. _enumerated-values-1:

Enumerated Values
'''''''''''''''''

.. csv-table::
  :header: Property,Value
  :widths: 25,25
  :align: left
  :class: longtable

  paramname,Exclude tables smaller than
  paramname,mount point
  paramname,Host IP Address
  paramname,Time interval to monitor
  paramname,Time since idle
  paramname,Per CPU utilization (K%)

..  Note::
   This operation does not require authentication

post\_\ *alert_config_agent*\ {agent_id}
----------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X POST https://PEM-SERVER-IP/api/v14/alert/config/agent/{agent_id} \
     -H Content-Type: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Content-Type: application/json,
     X-Auth-Token: string
   }

   r = requests.post(https://PEM-SERVER-IP/api/v14/alert/config/agent/{agent_id}, headers = headers)

   print(r.json())

.. code:: javascript

   const inputBody = {
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "all_alert_enable": true,
     "email_group_id": 1,
     "low_alert_enable": true,
     "low_email_group_id": 1,
     "med_alert_enable": true,
     "med_email_group_id": 1,
     "high_alert_enable": true,
     "high_email_group_id": 1,
     "send_trap": false,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "params": [],
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": false,
     "low_webhook_ids": [],
     "med_webhook_ids": [],
     "high_webhook_ids": [],
     "cleared_webhook_ids": []
   };
   const headers = {
     Content-Type:application/json,
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/agent/{agent_id},
   {
     method: POST,
     body: inputBody,
     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``POST /alert/config/agent/{agent_id}``

Creates ``Alert`` for agent level.

**Body parameter**

.. code:: json

   {
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "all_alert_enable": true,
     "email_group_id": 1,
     "low_alert_enable": true,
     "low_email_group_id": 1,
     "med_alert_enable": true,
     "med_email_group_id": 1,
     "high_alert_enable": true,
     "high_email_group_id": 1,
     "send_trap": false,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "params": [],
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": false,
     "low_webhook_ids": [],
     "med_webhook_ids": [],
     "high_webhook_ids": [],
     "cleared_webhook_ids": []
   }

.. _parameters-6:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  agent_id,path,integer,true,Agent ID
  X-Auth-Token,header,string,true,Token of authorization
  body,body,:ref:`AlertPayload<AlertPayload>` ,true,none

**Example responses**

.. _responses-6:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Status 200,None

.. _response-schema-5:

Response Schema
^^^^^^^^^^^^^^^

..  Note::
   This operation does not require authentication

get\_\ *alert_config_agent*\ {agent_id}\_{alert_id}
---------------------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X GET https://PEM-SERVER-IP/api/v14/alert/config/agent/{agent_id}/{alert_id} \
     -H Accept: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Accept: application/json,
     X-Auth-Token: string
   }

   r = requests.get(https://PEM-SERVER-IP/api/v14/alert/config/agent/{agent_id}/{alert_id}, headers = headers)

   print(r.json())

.. code:: javascript


   const headers = {
     Accept:application/json,
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/agent/{agent_id}/{alert_id},
   {
     method: GET,

     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``GET /alert/config/agent/{agent_id}/{alert_id}``

Gets ``Alerts`` for agent level by agent_id and alert_id.

.. _parameters-7:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  agent_id,path,integer,true,Agent ID
  alert_id,path,integer,true,Alert ID
  X-Auth-Token,header,string,true,Token of authorization

**Example responses**

.. raw:: html

   <Details summary="200 Response">

.. code:: json

   {
     "id": 0,
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "auto_created": true,
     "template_id": "string",
     "params": [],
     "param_names": [
       "string"
     ],
     "param_types": "string",
     "params_units": [
       "string"
     ],
     "threshold_unit": "string",
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "send_email": true,
     "all_alert_enable": true,
     "email_group_id": 0,
     "low_alert_enable": true,
     "low_email_group_id": 0,
     "med_alert_enable": true,
     "med_email_group_id": 0,
     "high_alert_enable": true,
     "high_email_group_id": 0,
     "send_trap": true,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": true,
     "low_webhook_ids": [
       0
     ],
     "med_webhook_ids": [
       0
     ],
     "high_webhook_ids": [
       0
     ],
     "cleared_webhook_ids": [
       0
     ]
   }

.. raw:: html

   </Details>

.. _responses-7:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Successful response,:ref:`About alert threads<About alert threads>` 

..  Note::
   This operation does not require authentication

put\_\ *alert_config_agent*\ {agent_id}\_{alert_id}
---------------------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X PUT https://PEM-SERVER-IP/api/v14/alert/config/agent/{agent_id}/{alert_id} \
     -H Content-Type: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Content-Type: application/json,
     X-Auth-Token: string
   }

   r = requests.put(https://PEM-SERVER-IP/api/v14/alert/config/agent/{agent_id}/{alert_id}, headers = headers)

   print(r.json())

.. code:: javascript

   const inputBody = {
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "all_alert_enable": true,
     "email_group_id": 1,
     "low_alert_enable": true,
     "low_email_group_id": 1,
     "med_alert_enable": true,
     "med_email_group_id": 1,
     "high_alert_enable": true,
     "high_email_group_id": 1,
     "send_trap": false,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "params": [],
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": false,
     "low_webhook_ids": [],
     "med_webhook_ids": [],
     "high_webhook_ids": [],
     "cleared_webhook_ids": []
   };
   const headers = {
     Content-Type:application/json,
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/agent/{agent_id}/{alert_id},
   {
     method: PUT,
     body: inputBody,
     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``PUT /alert/config/agent/{agent_id}/{alert_id}``

Updates ``Alert`` for agent level.

**Body parameter**

.. code:: json

   {
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "all_alert_enable": true,
     "email_group_id": 1,
     "low_alert_enable": true,
     "low_email_group_id": 1,
     "med_alert_enable": true,
     "med_email_group_id": 1,
     "high_alert_enable": true,
     "high_email_group_id": 1,
     "send_trap": false,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "params": [],
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": false,
     "low_webhook_ids": [],
     "med_webhook_ids": [],
     "high_webhook_ids": [],
     "cleared_webhook_ids": []
   }

.. _parameters-8:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  agent_id,path,integer,true,Agent ID
  alert_id,path,integer,true,Alert ID
  X-Auth-Token,header,string,true,Token of authorization
  body,body,:ref:`AlertPayload<AlertPayload>` ,true,none

**Example responses**

.. _responses-8:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Status 200,None

.. _response-schema-6:

Response Schema
^^^^^^^^^^^^^^^

..  Note::
   This operation does not require authentication

delete\_\ *alert_config_agent*\ {agent_id}\_{alert_id}
------------------------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X DELETE https://PEM-SERVER-IP/api/v14/alert/config/agent/{agent_id}/{alert_id} \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     X-Auth-Token: string
   }

   r = requests.delete(https://PEM-SERVER-IP/api/v14/alert/config/agent/{agent_id}/{alert_id}, headers = headers)

   print(r.json())

.. code:: javascript


   const headers = {
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/agent/{agent_id}/{alert_id},
   {
     method: DELETE,

     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``DELETE /alert/config/agent/{agent_id}/{alert_id}``

Deletes the ``Alert`` object.

.. _parameters-9:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  agent_id,path,integer,true,Agent ID
  alert_id,path,integer,true,Alert ID
  X-Auth-Token,header,string,true,Token of authorization

**Example responses**

.. _responses-9:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Successful deletion,None

.. _response-schema-7:

Response Schema
^^^^^^^^^^^^^^^

..  Note::
   This operation does not require authentication

get\_\ *alert_config_server*\ {server_id}
-----------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X GET https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id} \
     -H Accept: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Accept: application/json,
     X-Auth-Token: string
   }

   r = requests.get(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}, headers = headers)

   print(r.json())

.. code:: javascript


   const headers = {
     Accept:application/json,
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id},
   {
     method: GET,

     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``GET /alert/config/server/{server_id}``

Gets ``Alerts`` for server level by server_id.

.. _parameters-10:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  server_id,path,integer,true,Server ID
  X-Auth-Token,header,string,true,Token of authorization

**Example responses**

.. raw:: html

   <Details summary="200 Response">

.. code:: json

   [
     {
       "id": 0,
       "alert_name": "string",
       "alert_template": 0,
       "description": "string",
       "enabled": true,
       "history_retention": 0,
       "frequency_min": 0,
       "auto_created": true,
       "template_id": "string",
       "params": [],
       "param_names": [
         "string"
       ],
       "param_types": "string",
       "params_units": [
         "string"
       ],
       "threshold_unit": "string",
       "operator": "string",
       "low_threshold_value": 0,
       "medium_threshold_value": 0,
       "high_threshold_value": 0,
       "send_email": true,
       "all_alert_enable": true,
       "email_group_id": 0,
       "low_alert_enable": true,
       "low_email_group_id": 0,
       "med_alert_enable": true,
       "med_email_group_id": 0,
       "high_alert_enable": true,
       "high_email_group_id": 0,
       "send_trap": true,
       "snmp_trap_version": 0,
       "low_send_trap": true,
       "med_send_trap": true,
       "high_send_trap": true,
       "cleared_alert_enable": true,
       "execute_script": true,
       "execute_script_on_clear": true,
       "execute_script_on_pem_server": true,
       "script_code": "string",
       "submit_to_nagios": true,
       "override_default_config": true,
       "send_notification": true,
       "low_webhook_ids": [
         0
       ],
       "med_webhook_ids": [
         0
       ],
       "high_webhook_ids": [
         0
       ],
       "cleared_webhook_ids": [
         0
       ]
     }
   ]

.. raw:: html

   </Details>

.. _responses-10:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Successful response,Inline

.. _response-schema-8:

Response Schema
^^^^^^^^^^^^^^^

Status Code **200**

.. csv-table::
  :header: Name,Type,Required,Restrictions,Description
  :widths: 12,8,8,8,12
  :align: left
  :class: longtable

  *anonymous*,\ :ref:`Query information <Schemas>` ],false,none,none
  » id,integer,false,none,Alert ID. NOTE: This property is not applicable for a POST request.
  » alert_name,string,false,none,Name of the alert. NOTE: This property is a mandatory parameter for a POST request.
  » alert_template,integer,false,none,ID of the alert template. This property must be a positive integer value. NOTE: It is a mandatory parameter for a POST request.
  » description,string,false,none,none
  » enabled,boolean,false,none,Determines whether this alert is enabled/disabled. NOTE: This property is a mandatory parameter for a POST request.
  » history_retention,integer,false,none,Specifies how many days to keep the history of this alert. Possible values are from 1 to 99999. NOTE: This property is a mandatory parameter for a POST request.
  » frequency_min,integer,false,none,Defines in minutes how frequently the alert must be checked on a PEM database server. Possible values are from 1 to 65534. NOTE: This property is a mandatory parameter for a POST request.
  » auto_created,boolean,false,none,Specifies whether the alert is auto-created.
  » template_id,string,false,none,Defines the alert template.
  » params,\ :ref:`Query information <Schemas>` ],false,none,List of parameter/value pairs to be used by the alert template for checking alerts. NOTE: The alert template requires the all parameter to be defined.
  »» paramname,string,false,none,Name of the parameter. NOTE: This property must present on the alert template parameter list.Example:
  »» paramvalue,string,false,none,Value for the given parameter
  » param_names,[string],false,none,Defines the name of parameters.
  » param_types,string,false,none,Defines the type of parameters. Example: INTEGER/STRING..
  » params_units,[string],false,none,"Defines the unit used for parameters.Example: 'DAYS','True or False','Hours','Minutes' etc"
  » threshold_unit,string,false,none,"Units used to calculate the threshold, such as MB/kB/seconds/days/... This value is only used for the GUI."
  » operator,string,false,none,"Defines the operator for checking threshold values. Valid strings are "">"" and ""&lt;"". NOTE: This property is a mandatory parameter for a POST request."
  » low_threshold_value,number,false,none,Threshold value for triggering the low alert. This property can be any valid integer/float value. NOTE: It is a mandatory parameter for the POST request.
  » medium_threshold_value,number,false,none,Threshold value for triggering the medium alert. This property can be any valid integer/float value. NOTE: It is a mandatory parameter for the POST request.
  » high_threshold_value,number,false,none,Threshold value for triggering the high alert. It can be any valid integer/float value. NOTE: It is a mandatory parameter for the POST request.
  » send_email,boolean,false,none,Determines whether to send an email when the state of the alert changes.
  » all_alert_enable,boolean,false,none,Determines whether to send an email notification to the group specified by the parameter 'email_group_id' when the state of the alert changes.
  » email_group_id,integer,false,none,Defines the email group to which email notification are sent when the state of the alert changes.
  » low_alert_enable,boolean,false,none,Determines whether to send an email notification to the group specified by the parameter 'low_email_group_id' when the state of the alert is set to LOW.
  » low_email_group_id,integer,false,none,Defines the email group to which email notification are sent when the state of the alert changes to LOW.
  » med_alert_enable,boolean,false,none,Determines whether to send an email notification to the group specified by the parameter 'medium_email_group_id' when the state of the alert is set to MEDIUM.
  » med_email_group_id,integer,false,none,Defines the email group to which email notification are sent when state of the alert changes to MEDIUM.
  » high_alert_enable,boolean,false,none,Determines whether to send an email notification to the group specified by the parameter 'high_email_group_id' when the state of the alert is set to HIGH.
  » high_email_group_id,integer,false,none,Defines the email group to which email notification are sent when the state of the alert changes to HIGH.
  » send_trap,boolean,false,none,Determines whether to send SNMP trap notifications when the state of the alert changes.
  » snmp_trap_version,integer,false,none,"Defines the SNMP trap version. Supported SNMP trap versions are 1, 2 or 3"
  » low_send_trap,boolean,false,none,Determines whether to send SNMP trap notifications when the state of the alert changes to LOW.
  » med_send_trap,boolean,false,none,Determines whether to send SNMP trap notification when the state of the alert changes to MEDIUM.
  » high_send_trap,boolean,false,none,Determines whether to send SNMP trap notification when the state of the alert changes to HIGH.
  » cleared_alert_enable,boolean,false,none,Determines whether to mute the notification for 'clear alert'.
  » execute_script,boolean,false,none,Determines whether to execute the provided script if the state of the alert changes to LOW/MEDIUM/HIGH.
  » execute_script_on_clear,boolean,false,none,Determines whether to execute the provided script if the state of the alert is cleared.
  » execute_script_on_pem_server,boolean,false,none,Determines whether to execute the provided script on the PEM host or the host where the agent is monitoring the object.
  » script_code,string,false,none,The shell or batch script to be executed. Please read the documentation for detailed information.
  » submit_to_nagios,boolean,false,none,Determines whether to send notification to the nagios when the state of the alert changes.
  » override_default_config,boolean,false,none,Determines whether to override the default webhook configuration.
  » send_notification,boolean,false,none,Determines whether to enable the webhook send notification.
  » low_webhook_ids,[integer],false,none,Webhook IDs for which low alerts are configured
  » med_webhook_ids,[integer],false,none,Webhook IDs for which medium alerts are configured
  » high_webhook_ids,[integer],false,none,Webhook IDs for which high alerts are configured
  » cleared_webhook_ids,[integer],false,none,Webhook IDs for which cleared alerts are configured

.. _enumerated-values-2:

Enumerated Values
'''''''''''''''''

.. csv-table::
  :header: Property,Value
  :widths: 25,25
  :align: left
  :class: longtable

  paramname,Exclude tables smaller than
  paramname,mount point
  paramname,Host IP Address
  paramname,Time interval to monitor
  paramname,Time since idle
  paramname,Per CPU utilization (K%)

..  Note::
   This operation does not require authentication

post\_\ *alert_config_server*\ {server_id}
------------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X POST https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id} \
     -H Content-Type: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Content-Type: application/json,
     X-Auth-Token: string
   }

   r = requests.post(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}, headers = headers)

   print(r.json())

.. code:: javascript

   const inputBody = {
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "all_alert_enable": true,
     "email_group_id": 1,
     "low_alert_enable": true,
     "low_email_group_id": 1,
     "med_alert_enable": true,
     "med_email_group_id": 1,
     "high_alert_enable": true,
     "high_email_group_id": 1,
     "send_trap": false,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "params": [],
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": false,
     "low_webhook_ids": [],
     "med_webhook_ids": [],
     "high_webhook_ids": [],
     "cleared_webhook_ids": []
   };
   const headers = {
     Content-Type:application/json,
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id},
   {
     method: POST,
     body: inputBody,
     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``POST /alert/config/server/{server_id}``

Creates ``Alert`` for server level.

**Body parameter**

.. code:: json

   {
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "all_alert_enable": true,
     "email_group_id": 1,
     "low_alert_enable": true,
     "low_email_group_id": 1,
     "med_alert_enable": true,
     "med_email_group_id": 1,
     "high_alert_enable": true,
     "high_email_group_id": 1,
     "send_trap": false,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "params": [],
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": false,
     "low_webhook_ids": [],
     "med_webhook_ids": [],
     "high_webhook_ids": [],
     "cleared_webhook_ids": []
   }

.. _parameters-11:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  server_id,path,integer,true,Server ID
  X-Auth-Token,header,string,true,Token of authorization
  body,body,:ref:`AlertPayload<AlertPayload>` ,true,none

**Example responses**

.. _responses-11:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Status 200,None

.. _response-schema-9:

Response Schema
^^^^^^^^^^^^^^^

..  Note::
   This operation does not require authentication

get\_\ *alert_config_server*\ {server_id}\_{alert_id}
-----------------------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X GET https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/{alert_id} \
     -H Accept: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Accept: application/json,
     X-Auth-Token: string
   }

   r = requests.get(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/{alert_id}, headers = headers)

   print(r.json())

.. code:: javascript


   const headers = {
     Accept:application/json,
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/{alert_id},
   {
     method: GET,

     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``GET /alert/config/server/{server_id}/{alert_id}``

Gets ``Alerts`` for server level by server_id and alert_id.

.. _parameters-12:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  server_id,path,integer,true,Server ID
  alert_id,path,integer,true,Alert ID
  X-Auth-Token,header,string,true,Token of authorization

**Example responses**

.. raw:: html

   <Details summary="200 Response">

.. code:: json

   {
     "id": 0,
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "auto_created": true,
     "template_id": "string",
     "params": [],
     "param_names": [
       "string"
     ],
     "param_types": "string",
     "params_units": [
       "string"
     ],
     "threshold_unit": "string",
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "send_email": true,
     "all_alert_enable": true,
     "email_group_id": 0,
     "low_alert_enable": true,
     "low_email_group_id": 0,
     "med_alert_enable": true,
     "med_email_group_id": 0,
     "high_alert_enable": true,
     "high_email_group_id": 0,
     "send_trap": true,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": true,
     "low_webhook_ids": [
       0
     ],
     "med_webhook_ids": [
       0
     ],
     "high_webhook_ids": [
       0
     ],
     "cleared_webhook_ids": [
       0
     ]
   }

.. raw:: html

   </Details>

.. _responses-12:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Successful response,:ref:`About alert threads<About alert threads>` 

..  Note::
   This operation does not require authentication

put\_\ *alert_config_server*\ {server_id}\_{alert_id}
-----------------------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X PUT https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/{alert_id} \
     -H Content-Type: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Content-Type: application/json,
     X-Auth-Token: string
   }

   r = requests.put(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/{alert_id}, headers = headers)

   print(r.json())

.. code:: javascript

   const inputBody = {
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "all_alert_enable": true,
     "email_group_id": 1,
     "low_alert_enable": true,
     "low_email_group_id": 1,
     "med_alert_enable": true,
     "med_email_group_id": 1,
     "high_alert_enable": true,
     "high_email_group_id": 1,
     "send_trap": false,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "params": [],
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": false,
     "low_webhook_ids": [],
     "med_webhook_ids": [],
     "high_webhook_ids": [],
     "cleared_webhook_ids": []
   };
   const headers = {
     Content-Type:application/json,
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/{alert_id},
   {
     method: PUT,
     body: inputBody,
     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``PUT /alert/config/server/{server_id}/{alert_id}``

Updates ``Alert`` for server level.

**Body parameter**

.. code:: json

   {
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "all_alert_enable": true,
     "email_group_id": 1,
     "low_alert_enable": true,
     "low_email_group_id": 1,
     "med_alert_enable": true,
     "med_email_group_id": 1,
     "high_alert_enable": true,
     "high_email_group_id": 1,
     "send_trap": false,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "params": [],
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": false,
     "low_webhook_ids": [],
     "med_webhook_ids": [],
     "high_webhook_ids": [],
     "cleared_webhook_ids": []
   }

.. _parameters-13:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  server_id,path,integer,true,Server ID
  alert_id,path,integer,true,Alert ID
  X-Auth-Token,header,string,true,Token of authorization
  body,body,:ref:`AlertPayload<AlertPayload>` ,true,none

**Example responses**

.. _responses-13:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Status 200,None

.. _response-schema-10:

Response Schema
^^^^^^^^^^^^^^^

..  Note::
   This operation does not require authentication

delete\_\ *alert_config_server*\ {server_id}\_{alert_id}
--------------------------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X DELETE https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/{alert_id} \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     X-Auth-Token: string
   }

   r = requests.delete(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/{alert_id}, headers = headers)

   print(r.json())

.. code:: javascript


   const headers = {
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/{alert_id},
   {
     method: DELETE,

     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``DELETE /alert/config/server/{server_id}/{alert_id}``

Deletes the ``Alert`` object.

.. _parameters-14:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  server_id,path,integer,true,Server ID
  alert_id,path,integer,true,Alert ID
  X-Auth-Token,header,string,true,Token of authorization

**Example responses**

.. _responses-14:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Successful deletion,None

.. _response-schema-11:

Response Schema
^^^^^^^^^^^^^^^

..  Note::
   This operation does not require authentication

get\_\ *alert_config_server*\ {server_id}\ *database*\ {database_name}
----------------------------------------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X GET https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name} \
     -H Accept: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Accept: application/json,
     X-Auth-Token: string
   }

   r = requests.get(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}, headers = headers)

   print(r.json())

.. code:: javascript


   const headers = {
     Accept:application/json,
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name},
   {
     method: GET,

     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``GET /alert/config/server/{server_id}/database/{database_name}``

Gets ``Alerts`` for database level by server_id and database_name.

.. _parameters-15:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  server_id,path,integer,true,Server ID
  database_name,path,string,true,Database Name
  X-Auth-Token,header,string,true,Token of authorization

**Example responses**

.. raw:: html

   <Details summary="200 Response">

.. code:: json

   [
     {
       "id": 0,
       "alert_name": "string",
       "alert_template": 0,
       "description": "string",
       "enabled": true,
       "history_retention": 0,
       "frequency_min": 0,
       "auto_created": true,
       "template_id": "string",
       "params": [],
       "param_names": [
         "string"
       ],
       "param_types": "string",
       "params_units": [
         "string"
       ],
       "threshold_unit": "string",
       "operator": "string",
       "low_threshold_value": 0,
       "medium_threshold_value": 0,
       "high_threshold_value": 0,
       "send_email": true,
       "all_alert_enable": true,
       "email_group_id": 0,
       "low_alert_enable": true,
       "low_email_group_id": 0,
       "med_alert_enable": true,
       "med_email_group_id": 0,
       "high_alert_enable": true,
       "high_email_group_id": 0,
       "send_trap": true,
       "snmp_trap_version": 0,
       "low_send_trap": true,
       "med_send_trap": true,
       "high_send_trap": true,
       "cleared_alert_enable": true,
       "execute_script": true,
       "execute_script_on_clear": true,
       "execute_script_on_pem_server": true,
       "script_code": "string",
       "submit_to_nagios": true,
       "override_default_config": true,
       "send_notification": true,
       "low_webhook_ids": [
         0
       ],
       "med_webhook_ids": [
         0
       ],
       "high_webhook_ids": [
         0
       ],
       "cleared_webhook_ids": [
         0
       ]
     }
   ]

.. raw:: html

   </Details>

.. _responses-15:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Successful response,Inline

.. _response-schema-12:

Response Schema
^^^^^^^^^^^^^^^

Status Code **200**

.. csv-table::
  :header: Name,Type,Required,Restrictions,Description
  :widths: 12,8,8,8,12
  :align: left
  :class: longtable

  *anonymous*,\ :ref:`Query information <Schemas>` ],false,none,none
  » id,integer,false,none,Alert ID. NOTE: This property is not applicable for a POST request.
  » alert_name,string,false,none,Name of the alert. NOTE: This property is a mandatory parameter for a POST request.
  » alert_template,integer,false,none,ID of the alert template. This property must be a positive integer value. NOTE: It is a mandatory parameter for a POST request.
  » description,string,false,none,none
  » enabled,boolean,false,none,Determines whether this alert is enabled/disabled. NOTE: This property is a mandatory parameter for a POST request.
  » history_retention,integer,false,none,Specifies how many days to keep the history of this alert. Possible values are from 1 to 99999. NOTE: This property is a mandatory parameter for a POST request.
  » frequency_min,integer,false,none,Defines in minutes how frequently the alert must be checked on a PEM database server. Possible values are from 1 to 65534. NOTE: This property is a mandatory parameter for a POST request.
  » auto_created,boolean,false,none,Specifies whether the alert is auto-created.
  » template_id,string,false,none,Defines the alert template.
  » params,\ :ref:`Query information <Schemas>` ],false,none,List of parameter/value pairs to be used by the alert template for checking alerts. NOTE: The alert template requires the all parameter to be defined.
  »» paramname,string,false,none,Name of the parameter. NOTE: This property must present on the alert template parameter list.Example:
  »» paramvalue,string,false,none,Value for the given parameter
  » param_names,[string],false,none,Defines the name of parameters.
  » param_types,string,false,none,Defines the type of parameters. Example: INTEGER/STRING..
  » params_units,[string],false,none,"Defines the unit used for parameters.Example: 'DAYS','True or False','Hours','Minutes' etc"
  » threshold_unit,string,false,none,"Units used to calculate the threshold, such as MB/kB/seconds/days/... This value is only used for the GUI."
  » operator,string,false,none,"Defines the operator for checking threshold values. Valid strings are "">"" and ""&lt;"". NOTE: This property is a mandatory parameter for a POST request."
  » low_threshold_value,number,false,none,Threshold value for triggering the low alert. This property can be any valid integer/float value. NOTE: It is a mandatory parameter for the POST request.
  » medium_threshold_value,number,false,none,Threshold value for triggering the medium alert. This property can be any valid integer/float value. NOTE: It is a mandatory parameter for the POST request.
  » high_threshold_value,number,false,none,Threshold value for triggering the high alert. It can be any valid integer/float value. NOTE: It is a mandatory parameter for the POST request.
  » send_email,boolean,false,none,Determines whether to send an email when the state of the alert changes.
  » all_alert_enable,boolean,false,none,Determines whether to send an email notification to the group specified by the parameter 'email_group_id' when the state of the alert changes.
  » email_group_id,integer,false,none,Defines the email group to which email notification are sent when the state of the alert changes.
  » low_alert_enable,boolean,false,none,Determines whether to send an email notification to the group specified by the parameter 'low_email_group_id' when the state of the alert is set to LOW.
  » low_email_group_id,integer,false,none,Defines the email group to which email notification are sent when the state of the alert changes to LOW.
  » med_alert_enable,boolean,false,none,Determines whether to send an email notification to the group specified by the parameter 'medium_email_group_id' when the state of the alert is set to MEDIUM.
  » med_email_group_id,integer,false,none,Defines the email group to which email notification are sent when state of the alert changes to MEDIUM.
  » high_alert_enable,boolean,false,none,Determines whether to send an email notification to the group specified by the parameter 'high_email_group_id' when the state of the alert is set to HIGH.
  » high_email_group_id,integer,false,none,Defines the email group to which email notification are sent when the state of the alert changes to HIGH.
  » send_trap,boolean,false,none,Determines whether to send SNMP trap notifications when the state of the alert changes.
  » snmp_trap_version,integer,false,none,"Defines the SNMP trap version. Supported SNMP trap versions are 1, 2 or 3"
  » low_send_trap,boolean,false,none,Determines whether to send SNMP trap notifications when the state of the alert changes to LOW.
  » med_send_trap,boolean,false,none,Determines whether to send SNMP trap notification when the state of the alert changes to MEDIUM.
  » high_send_trap,boolean,false,none,Determines whether to send SNMP trap notification when the state of the alert changes to HIGH.
  » cleared_alert_enable,boolean,false,none,Determines whether to mute the notification for 'clear alert'.
  » execute_script,boolean,false,none,Determines whether to execute the provided script if the state of the alert changes to LOW/MEDIUM/HIGH.
  » execute_script_on_clear,boolean,false,none,Determines whether to execute the provided script if the state of the alert is cleared.
  » execute_script_on_pem_server,boolean,false,none,Determines whether to execute the provided script on the PEM host or the host where the agent is monitoring the object.
  » script_code,string,false,none,The shell or batch script to be executed. Please read the documentation for detailed information.
  » submit_to_nagios,boolean,false,none,Determines whether to send notification to the nagios when the state of the alert changes.
  » override_default_config,boolean,false,none,Determines whether to override the default webhook configuration.
  » send_notification,boolean,false,none,Determines whether to enable the webhook send notification.
  » low_webhook_ids,[integer],false,none,Webhook IDs for which low alerts are configured
  » med_webhook_ids,[integer],false,none,Webhook IDs for which medium alerts are configured
  » high_webhook_ids,[integer],false,none,Webhook IDs for which high alerts are configured
  » cleared_webhook_ids,[integer],false,none,Webhook IDs for which cleared alerts are configured

.. _enumerated-values-3:

Enumerated Values
'''''''''''''''''

.. csv-table::
  :header: Property,Value
  :widths: 25,25
  :align: left
  :class: longtable

  paramname,Exclude tables smaller than
  paramname,mount point
  paramname,Host IP Address
  paramname,Time interval to monitor
  paramname,Time since idle
  paramname,Per CPU utilization (K%)

..  Note::
   This operation does not require authentication

post\_\ *alert_config_server*\ {server_id}\ *database*\ {database_name}
-----------------------------------------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X POST https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name} \
     -H Content-Type: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Content-Type: application/json,
     X-Auth-Token: string
   }

   r = requests.post(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}, headers = headers)

   print(r.json())

.. code:: javascript

   const inputBody = {
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "all_alert_enable": true,
     "email_group_id": 1,
     "low_alert_enable": true,
     "low_email_group_id": 1,
     "med_alert_enable": true,
     "med_email_group_id": 1,
     "high_alert_enable": true,
     "high_email_group_id": 1,
     "send_trap": false,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "params": [],
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": false,
     "low_webhook_ids": [],
     "med_webhook_ids": [],
     "high_webhook_ids": [],
     "cleared_webhook_ids": []
   };
   const headers = {
     Content-Type:application/json,
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name},
   {
     method: POST,
     body: inputBody,
     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``POST /alert/config/server/{server_id}/database/{database_name}``

Creates ``Alert`` for database level.

**Body parameter**

.. code:: json

   {
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "all_alert_enable": true,
     "email_group_id": 1,
     "low_alert_enable": true,
     "low_email_group_id": 1,
     "med_alert_enable": true,
     "med_email_group_id": 1,
     "high_alert_enable": true,
     "high_email_group_id": 1,
     "send_trap": false,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "params": [],
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": false,
     "low_webhook_ids": [],
     "med_webhook_ids": [],
     "high_webhook_ids": [],
     "cleared_webhook_ids": []
   }

.. _parameters-16:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  server_id,path,integer,true,Server ID
  database_name,path,string,true,Database Name
  X-Auth-Token,header,string,true,Token of authorization
  body,body,:ref:`AlertPayload<AlertPayload>` ,true,none

**Example responses**

.. _responses-16:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Status 200,None

.. _response-schema-13:

Response Schema
^^^^^^^^^^^^^^^

..  Note::
   This operation does not require authentication

get\_\ *alert_config_server*\ {server_id}\ *database*\ {database_name}\_{alert_id}
----------------------------------------------------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X GET https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/{alert_id} \
     -H Accept: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Accept: application/json,
     X-Auth-Token: string
   }

   r = requests.get(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/{alert_id}, headers = headers)

   print(r.json())

.. code:: javascript


   const headers = {
     Accept:application/json,
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/{alert_id},
   {
     method: GET,

     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``GET /alert/config/server/{server_id}/database/{database_name}/{alert_id}``

Gets ``Alerts`` for database level by server_id, database_name, and
alert_id.

.. _parameters-17:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  server_id,path,integer,true,Server ID
  database_name,path,string,true,Database name
  alert_id,path,integer,true,Alert ID
  X-Auth-Token,header,string,true,Token of authorization

**Example responses**

.. raw:: html

   <Details summary="200 Response">

.. code:: json

   {
     "id": 0,
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "auto_created": true,
     "template_id": "string",
     "params": [],
     "param_names": [
       "string"
     ],
     "param_types": "string",
     "params_units": [
       "string"
     ],
     "threshold_unit": "string",
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "send_email": true,
     "all_alert_enable": true,
     "email_group_id": 0,
     "low_alert_enable": true,
     "low_email_group_id": 0,
     "med_alert_enable": true,
     "med_email_group_id": 0,
     "high_alert_enable": true,
     "high_email_group_id": 0,
     "send_trap": true,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": true,
     "low_webhook_ids": [
       0
     ],
     "med_webhook_ids": [
       0
     ],
     "high_webhook_ids": [
       0
     ],
     "cleared_webhook_ids": [
       0
     ]
   }

.. raw:: html

   </Details>

.. _responses-17:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Successful response,:ref:`About alert threads<About alert threads>` 

..  Note::
   This operation does not require authentication

put\_\ *alert_config_server*\ {server_id}\ *database*\ {database_name}\_{alert_id}
----------------------------------------------------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X PUT https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/{alert_id} \
     -H Content-Type: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Content-Type: application/json,
     X-Auth-Token: string
   }

   r = requests.put(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/{alert_id}, headers = headers)

   print(r.json())

.. code:: javascript

   const inputBody = {
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "all_alert_enable": true,
     "email_group_id": 1,
     "low_alert_enable": true,
     "low_email_group_id": 1,
     "med_alert_enable": true,
     "med_email_group_id": 1,
     "high_alert_enable": true,
     "high_email_group_id": 1,
     "send_trap": false,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "params": [],
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": false,
     "low_webhook_ids": [],
     "med_webhook_ids": [],
     "high_webhook_ids": [],
     "cleared_webhook_ids": []
   };
   const headers = {
     Content-Type:application/json,
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/{alert_id},
   {
     method: PUT,
     body: inputBody,
     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``PUT /alert/config/server/{server_id}/database/{database_name}/{alert_id}``

Updates ``Alert`` for database level.

**Body parameter**

.. code:: json

   {
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "all_alert_enable": true,
     "email_group_id": 1,
     "low_alert_enable": true,
     "low_email_group_id": 1,
     "med_alert_enable": true,
     "med_email_group_id": 1,
     "high_alert_enable": true,
     "high_email_group_id": 1,
     "send_trap": false,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "params": [],
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": false,
     "low_webhook_ids": [],
     "med_webhook_ids": [],
     "high_webhook_ids": [],
     "cleared_webhook_ids": []
   }

.. _parameters-18:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  server_id,path,integer,true,Server ID
  database_name,path,string,true,Database name
  alert_id,path,integer,true,Alert ID
  X-Auth-Token,header,string,true,Token of authorization
  body,body,:ref:`AlertPayload<AlertPayload>` ,true,none

**Example responses**

.. _responses-18:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Status 200,None

.. _response-schema-14:

Response Schema
^^^^^^^^^^^^^^^

..  Note::
   This operation does not require authentication

delete\_\ *alert_config_server*\ {server_id}\ *database*\ {database_name}\_{alert_id}
-------------------------------------------------------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X DELETE https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/{alert_id} \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     X-Auth-Token: string
   }

   r = requests.delete(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/{alert_id}, headers = headers)

   print(r.json())

.. code:: javascript


   const headers = {
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/{alert_id},
   {
     method: DELETE,

     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``DELETE /alert/config/server/{server_id}/database/{database_name}/{alert_id}``

Deletes the ``Alert`` object.

.. _parameters-19:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  server_id,path,integer,true,Server ID
  database_name,path,string,true,Database name
  alert_id,path,integer,true,Alert ID
  X-Auth-Token,header,string,true,Token of authorization

**Example responses**

.. _responses-19:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Successful deletion,None

.. _response-schema-15:

Response Schema
^^^^^^^^^^^^^^^

..  Note::
   This operation does not require authentication

get\_\ *alert_config_server*\ {server_id}\ *database*\ {database_name}\ *schema*\ {schema_name}
-----------------------------------------------------------------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X GET https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name} \
     -H Accept: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Accept: application/json,
     X-Auth-Token: string
   }

   r = requests.get(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}, headers = headers)

   print(r.json())

.. code:: javascript


   const headers = {
     Accept:application/json,
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name},
   {
     method: GET,

     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``GET /alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}``

Gets ``Alerts`` for schema level by server_id, database_name, and
schema_name.

.. _parameters-20:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  server_id,path,integer,true,Server ID
  database_name,path,string,true,Database Name
  schema_name,path,string,true,Schema Name
  X-Auth-Token,header,string,true,Token of authorization

**Example responses**

.. raw:: html

   <Details summary="200 Response">

.. code:: json

   [
     {
       "id": 0,
       "alert_name": "string",
       "alert_template": 0,
       "description": "string",
       "enabled": true,
       "history_retention": 0,
       "frequency_min": 0,
       "auto_created": true,
       "template_id": "string",
       "params": [],
       "param_names": [
         "string"
       ],
       "param_types": "string",
       "params_units": [
         "string"
       ],
       "threshold_unit": "string",
       "operator": "string",
       "low_threshold_value": 0,
       "medium_threshold_value": 0,
       "high_threshold_value": 0,
       "send_email": true,
       "all_alert_enable": true,
       "email_group_id": 0,
       "low_alert_enable": true,
       "low_email_group_id": 0,
       "med_alert_enable": true,
       "med_email_group_id": 0,
       "high_alert_enable": true,
       "high_email_group_id": 0,
       "send_trap": true,
       "snmp_trap_version": 0,
       "low_send_trap": true,
       "med_send_trap": true,
       "high_send_trap": true,
       "cleared_alert_enable": true,
       "execute_script": true,
       "execute_script_on_clear": true,
       "execute_script_on_pem_server": true,
       "script_code": "string",
       "submit_to_nagios": true,
       "override_default_config": true,
       "send_notification": true,
       "low_webhook_ids": [
         0
       ],
       "med_webhook_ids": [
         0
       ],
       "high_webhook_ids": [
         0
       ],
       "cleared_webhook_ids": [
         0
       ]
     }
   ]

.. raw:: html

   </Details>

.. _responses-20:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Successful response,Inline

.. _response-schema-16:

Response Schema
^^^^^^^^^^^^^^^

Status Code **200**

.. csv-table::
  :header: Name,Type,Required,Restrictions,Description
  :widths: 12,8,8,8,12
  :align: left
  :class: longtable

  *anonymous*,\ :ref:`Query information <Schemas>` ],false,none,none
  » id,integer,false,none,Alert ID. NOTE: This property is not applicable for a POST request.
  » alert_name,string,false,none,Name of the alert. NOTE: This property is a mandatory parameter for a POST request.
  » alert_template,integer,false,none,ID of the alert template. This property must be a positive integer value. NOTE: It is a mandatory parameter for a POST request.
  » description,string,false,none,none
  » enabled,boolean,false,none,Determines whether this alert is enabled/disabled. NOTE: This property is a mandatory parameter for a POST request.
  » history_retention,integer,false,none,Specifies how many days to keep the history of this alert. Possible values are from 1 to 99999. NOTE: This property is a mandatory parameter for a POST request.
  » frequency_min,integer,false,none,Defines in minutes how frequently the alert must be checked on a PEM database server. Possible values are from 1 to 65534. NOTE: This property is a mandatory parameter for a POST request.
  » auto_created,boolean,false,none,Specifies whether the alert is auto-created.
  » template_id,string,false,none,Defines the alert template.
  » params,\ :ref:`Query information <Schemas>` ],false,none,List of parameter/value pairs to be used by the alert template for checking alerts. NOTE: The alert template requires the all parameter to be defined.
  »» paramname,string,false,none,Name of the parameter. NOTE: This property must present on the alert template parameter list.Example:
  »» paramvalue,string,false,none,Value for the given parameter
  » param_names,[string],false,none,Defines the name of parameters.
  » param_types,string,false,none,Defines the type of parameters. Example: INTEGER/STRING..
  » params_units,[string],false,none,"Defines the unit used for parameters.Example: 'DAYS','True or False','Hours','Minutes' etc"
  » threshold_unit,string,false,none,"Units used to calculate the threshold, such as MB/kB/seconds/days/... This value is only used for the GUI."
  » operator,string,false,none,"Defines the operator for checking threshold values. Valid strings are "">"" and ""&lt;"". NOTE: This property is a mandatory parameter for a POST request."
  » low_threshold_value,number,false,none,Threshold value for triggering the low alert. This property can be any valid integer/float value. NOTE: It is a mandatory parameter for the POST request.
  » medium_threshold_value,number,false,none,Threshold value for triggering the medium alert. This property can be any valid integer/float value. NOTE: It is a mandatory parameter for the POST request.
  » high_threshold_value,number,false,none,Threshold value for triggering the high alert. It can be any valid integer/float value. NOTE: It is a mandatory parameter for the POST request.
  » send_email,boolean,false,none,Determines whether to send an email when the state of the alert changes.
  » all_alert_enable,boolean,false,none,Determines whether to send an email notification to the group specified by the parameter 'email_group_id' when the state of the alert changes.
  » email_group_id,integer,false,none,Defines the email group to which email notification are sent when the state of the alert changes.
  » low_alert_enable,boolean,false,none,Determines whether to send an email notification to the group specified by the parameter 'low_email_group_id' when the state of the alert is set to LOW.
  » low_email_group_id,integer,false,none,Defines the email group to which email notification are sent when the state of the alert changes to LOW.
  » med_alert_enable,boolean,false,none,Determines whether to send an email notification to the group specified by the parameter 'medium_email_group_id' when the state of the alert is set to MEDIUM.
  » med_email_group_id,integer,false,none,Defines the email group to which email notification are sent when state of the alert changes to MEDIUM.
  » high_alert_enable,boolean,false,none,Determines whether to send an email notification to the group specified by the parameter 'high_email_group_id' when the state of the alert is set to HIGH.
  » high_email_group_id,integer,false,none,Defines the email group to which email notification are sent when the state of the alert changes to HIGH.
  » send_trap,boolean,false,none,Determines whether to send SNMP trap notifications when the state of the alert changes.
  » snmp_trap_version,integer,false,none,"Defines the SNMP trap version. Supported SNMP trap versions are 1, 2 or 3"
  » low_send_trap,boolean,false,none,Determines whether to send SNMP trap notifications when the state of the alert changes to LOW.
  » med_send_trap,boolean,false,none,Determines whether to send SNMP trap notification when the state of the alert changes to MEDIUM.
  » high_send_trap,boolean,false,none,Determines whether to send SNMP trap notification when the state of the alert changes to HIGH.
  » cleared_alert_enable,boolean,false,none,Determines whether to mute the notification for 'clear alert'.
  » execute_script,boolean,false,none,Determines whether to execute the provided script if the state of the alert changes to LOW/MEDIUM/HIGH.
  » execute_script_on_clear,boolean,false,none,Determines whether to execute the provided script if the state of the alert is cleared.
  » execute_script_on_pem_server,boolean,false,none,Determines whether to execute the provided script on the PEM host or the host where the agent is monitoring the object.
  » script_code,string,false,none,The shell or batch script to be executed. Please read the documentation for detailed information.
  » submit_to_nagios,boolean,false,none,Determines whether to send notification to the nagios when the state of the alert changes.
  » override_default_config,boolean,false,none,Determines whether to override the default webhook configuration.
  » send_notification,boolean,false,none,Determines whether to enable the webhook send notification.
  » low_webhook_ids,[integer],false,none,Webhook IDs for which low alerts are configured
  » med_webhook_ids,[integer],false,none,Webhook IDs for which medium alerts are configured
  » high_webhook_ids,[integer],false,none,Webhook IDs for which high alerts are configured
  » cleared_webhook_ids,[integer],false,none,Webhook IDs for which cleared alerts are configured

.. _enumerated-values-4:

Enumerated Values
'''''''''''''''''

.. csv-table::
  :header: Property,Value
  :widths: 25,25
  :align: left
  :class: longtable

  paramname,Exclude tables smaller than
  paramname,mount point
  paramname,Host IP Address
  paramname,Time interval to monitor
  paramname,Time since idle
  paramname,Per CPU utilization (K%)

..  Note::
   This operation does not require authentication

post\_\ *alert_config_server*\ {server_id}\ *database*\ {database_name}\ *schema*\ {schema_name}
------------------------------------------------------------------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X POST https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name} \
     -H Content-Type: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Content-Type: application/json,
     X-Auth-Token: string
   }

   r = requests.post(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}, headers = headers)

   print(r.json())

.. code:: javascript

   const inputBody = {
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "all_alert_enable": true,
     "email_group_id": 1,
     "low_alert_enable": true,
     "low_email_group_id": 1,
     "med_alert_enable": true,
     "med_email_group_id": 1,
     "high_alert_enable": true,
     "high_email_group_id": 1,
     "send_trap": false,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "params": [],
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": false,
     "low_webhook_ids": [],
     "med_webhook_ids": [],
     "high_webhook_ids": [],
     "cleared_webhook_ids": []
   };
   const headers = {
     Content-Type:application/json,
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name},
   {
     method: POST,
     body: inputBody,
     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``POST /alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}``

Creates ``Alert`` for schema level.

**Body parameter**

.. code:: json

   {
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "all_alert_enable": true,
     "email_group_id": 1,
     "low_alert_enable": true,
     "low_email_group_id": 1,
     "med_alert_enable": true,
     "med_email_group_id": 1,
     "high_alert_enable": true,
     "high_email_group_id": 1,
     "send_trap": false,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "params": [],
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": false,
     "low_webhook_ids": [],
     "med_webhook_ids": [],
     "high_webhook_ids": [],
     "cleared_webhook_ids": []
   }

.. _parameters-21:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  server_id,path,integer,true,Server ID
  database_name,path,string,true,Database Name
  schema_name,path,string,true,Schema Name
  X-Auth-Token,header,string,true,Token of authorization
  body,body,:ref:`AlertPayload<AlertPayload>` ,true,none

**Example responses**

.. _responses-21:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Status 200,None

.. _response-schema-17:

Response Schema
^^^^^^^^^^^^^^^

..  Note::
   This operation does not require authentication

get\_\ *alert_config_server*\ {server_id}\ *database*\ {database_name}\ *schema*\ {schema_name}\_{alert_id}
-----------------------------------------------------------------------------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X GET https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/{alert_id} \
     -H Accept: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Accept: application/json,
     X-Auth-Token: string
   }

   r = requests.get(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/{alert_id}, headers = headers)

   print(r.json())

.. code:: javascript


   const headers = {
     Accept:application/json,
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/{alert_id},
   {
     method: GET,

     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``GET /alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/{alert_id}``

Gets ``Alerts`` for schema level by server_id, database_name,
schema_name, and alert_id.

.. _parameters-22:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  server_id,path,integer,true,Server ID
  database_name,path,string,true,Database name
  schema_name,path,string,true,Schema name
  alert_id,path,integer,true,Alert ID
  X-Auth-Token,header,string,true,Token of authorization

**Example responses**

.. raw:: html

   <Details summary="200 Response">

.. code:: json

   {
     "id": 0,
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "auto_created": true,
     "template_id": "string",
     "params": [],
     "param_names": [
       "string"
     ],
     "param_types": "string",
     "params_units": [
       "string"
     ],
     "threshold_unit": "string",
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "send_email": true,
     "all_alert_enable": true,
     "email_group_id": 0,
     "low_alert_enable": true,
     "low_email_group_id": 0,
     "med_alert_enable": true,
     "med_email_group_id": 0,
     "high_alert_enable": true,
     "high_email_group_id": 0,
     "send_trap": true,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": true,
     "low_webhook_ids": [
       0
     ],
     "med_webhook_ids": [
       0
     ],
     "high_webhook_ids": [
       0
     ],
     "cleared_webhook_ids": [
       0
     ]
   }

.. raw:: html

   </Details>

.. _responses-22:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Successful response,:ref:`About alert threads<About alert threads>` 

..  Note::
   This operation does not require authentication

put\_\ *alert_config_server*\ {server_id}\ *database*\ {database_name}\ *schema*\ {schema_name}\_{alert_id}
-----------------------------------------------------------------------------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X PUT https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/{alert_id} \
     -H Content-Type: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Content-Type: application/json,
     X-Auth-Token: string
   }

   r = requests.put(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/{alert_id}, headers = headers)

   print(r.json())

.. code:: javascript

   const inputBody = {
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "all_alert_enable": true,
     "email_group_id": 1,
     "low_alert_enable": true,
     "low_email_group_id": 1,
     "med_alert_enable": true,
     "med_email_group_id": 1,
     "high_alert_enable": true,
     "high_email_group_id": 1,
     "send_trap": false,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "params": [],
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": false,
     "low_webhook_ids": [],
     "med_webhook_ids": [],
     "high_webhook_ids": [],
     "cleared_webhook_ids": []
   };
   const headers = {
     Content-Type:application/json,
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/{alert_id},
   {
     method: PUT,
     body: inputBody,
     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``PUT /alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/{alert_id}``

Updates ``Alert`` for schema level.

**Body parameter**

.. code:: json

   {
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "all_alert_enable": true,
     "email_group_id": 1,
     "low_alert_enable": true,
     "low_email_group_id": 1,
     "med_alert_enable": true,
     "med_email_group_id": 1,
     "high_alert_enable": true,
     "high_email_group_id": 1,
     "send_trap": false,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "params": [],
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": false,
     "low_webhook_ids": [],
     "med_webhook_ids": [],
     "high_webhook_ids": [],
     "cleared_webhook_ids": []
   }

.. _parameters-23:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  server_id,path,integer,true,Server ID
  database_name,path,string,true,Database name
  schema_name,path,string,true,Schema name
  alert_id,path,integer,true,Alert ID
  X-Auth-Token,header,string,true,Token of authorization
  body,body,:ref:`AlertPayload<AlertPayload>` ,true,none

**Example responses**

.. _responses-23:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Status 200,None

.. _response-schema-18:

Response Schema
^^^^^^^^^^^^^^^

..  Note::
   This operation does not require authentication

delete\_\ *alert_config_server*\ {server_id}\ *database*\ {database_name}\ *schema*\ {schema_name}\_{alert_id}
--------------------------------------------------------------------------------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X DELETE https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/{alert_id} \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     X-Auth-Token: string
   }

   r = requests.delete(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/{alert_id}, headers = headers)

   print(r.json())

.. code:: javascript


   const headers = {
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/{alert_id},
   {
     method: DELETE,

     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``DELETE /alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/{alert_id}``

Deletes the ``Alert`` object.

.. _parameters-24:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  server_id,path,integer,true,Server ID
  database_name,path,string,true,Database name
  schema_name,path,string,true,Schema name
  alert_id,path,integer,true,Alert ID
  X-Auth-Token,header,string,true,Token of authorization

**Example responses**

.. _responses-24:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Successful deletion,None

.. _response-schema-19:

Response Schema
^^^^^^^^^^^^^^^

..  Note::
   This operation does not require authentication

get\_\ *alert_config_server*\ {server_id}\ *database*\ {database_name}\ *schema*\ {schema_name}\ *table*\ {table_name}
----------------------------------------------------------------------------------------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X GET https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/table/{table_name} \
     -H Accept: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Accept: application/json,
     X-Auth-Token: string
   }

   r = requests.get(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/table/{table_name}, headers = headers)

   print(r.json())

.. code:: javascript


   const headers = {
     Accept:application/json,
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/table/{table_name},
   {
     method: GET,

     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``GET /alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/table/{table_name}``

Gets ``Alerts`` for table level by server_id, database_name,
schema_name, and table_name.

.. _parameters-25:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  server_id,path,integer,true,Server ID
  database_name,path,string,true,Database name
  schema_name,path,string,true,Schema name
  table_name,path,string,true,Table name
  X-Auth-Token,header,string,true,Token of authorization

**Example responses**

.. raw:: html

   <Details summary="200 Response">

.. code:: json

   [
     {
       "id": 0,
       "alert_name": "string",
       "alert_template": 0,
       "description": "string",
       "enabled": true,
       "history_retention": 0,
       "frequency_min": 0,
       "auto_created": true,
       "template_id": "string",
       "params": [],
       "param_names": [
         "string"
       ],
       "param_types": "string",
       "params_units": [
         "string"
       ],
       "threshold_unit": "string",
       "operator": "string",
       "low_threshold_value": 0,
       "medium_threshold_value": 0,
       "high_threshold_value": 0,
       "send_email": true,
       "all_alert_enable": true,
       "email_group_id": 0,
       "low_alert_enable": true,
       "low_email_group_id": 0,
       "med_alert_enable": true,
       "med_email_group_id": 0,
       "high_alert_enable": true,
       "high_email_group_id": 0,
       "send_trap": true,
       "snmp_trap_version": 0,
       "low_send_trap": true,
       "med_send_trap": true,
       "high_send_trap": true,
       "cleared_alert_enable": true,
       "execute_script": true,
       "execute_script_on_clear": true,
       "execute_script_on_pem_server": true,
       "script_code": "string",
       "submit_to_nagios": true,
       "override_default_config": true,
       "send_notification": true,
       "low_webhook_ids": [
         0
       ],
       "med_webhook_ids": [
         0
       ],
       "high_webhook_ids": [
         0
       ],
       "cleared_webhook_ids": [
         0
       ]
     }
   ]

.. raw:: html

   </Details>

.. _responses-25:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Successful response,Inline

.. _response-schema-20:

Response Schema
^^^^^^^^^^^^^^^

Status Code **200**

.. csv-table::
  :header: Name,Type,Required,Restrictions,Description
  :widths: 12,8,8,8,12
  :align: left
  :class: longtable

  *anonymous*,\ :ref:`Query information <Schemas>` ],false,none,none
  » id,integer,false,none,Alert ID. NOTE: This property is not applicable for a POST request.
  » alert_name,string,false,none,Name of the alert. NOTE: This property is a mandatory parameter for a POST request.
  » alert_template,integer,false,none,ID of the alert template. This property must be a positive integer value. NOTE: It is a mandatory parameter for a POST request.
  » description,string,false,none,none
  » enabled,boolean,false,none,Determines whether this alert is enabled/disabled. NOTE: This property is a mandatory parameter for a POST request.
  » history_retention,integer,false,none,Specifies how many days to keep the history of this alert. Possible values are from 1 to 99999. NOTE: This property is a mandatory parameter for a POST request.
  » frequency_min,integer,false,none,Defines in minutes how frequently the alert must be checked on a PEM database server. Possible values are from 1 to 65534. NOTE: This property is a mandatory parameter for a POST request.
  » auto_created,boolean,false,none,Specifies whether the alert is auto-created.
  » template_id,string,false,none,Defines the alert template.
  » params,\ :ref:`Query information <Schemas>` ],false,none,List of parameter/value pairs to be used by the alert template for checking alerts. NOTE: The alert template requires the all parameter to be defined.
  »» paramname,string,false,none,Name of the parameter. NOTE: This property must present on the alert template parameter list.Example:
  »» paramvalue,string,false,none,Value for the given parameter
  » param_names,[string],false,none,Defines the name of parameters.
  » param_types,string,false,none,Defines the type of parameters. Example: INTEGER/STRING..
  » params_units,[string],false,none,"Defines the unit used for parameters.Example: 'DAYS','True or False','Hours','Minutes' etc"
  » threshold_unit,string,false,none,"Units used to calculate the threshold, such as MB/kB/seconds/days/... This value is only used for the GUI."
  » operator,string,false,none,"Defines the operator for checking threshold values. Valid strings are "">"" and ""&lt;"". NOTE: This property is a mandatory parameter for a POST request."
  » low_threshold_value,number,false,none,Threshold value for triggering the low alert. This property can be any valid integer/float value. NOTE: It is a mandatory parameter for the POST request.
  » medium_threshold_value,number,false,none,Threshold value for triggering the medium alert. This property can be any valid integer/float value. NOTE: It is a mandatory parameter for the POST request.
  » high_threshold_value,number,false,none,Threshold value for triggering the high alert. It can be any valid integer/float value. NOTE: It is a mandatory parameter for the POST request.
  » send_email,boolean,false,none,Determines whether to send an email when the state of the alert changes.
  » all_alert_enable,boolean,false,none,Determines whether to send an email notification to the group specified by the parameter 'email_group_id' when the state of the alert changes.
  » email_group_id,integer,false,none,Defines the email group to which email notification are sent when the state of the alert changes.
  » low_alert_enable,boolean,false,none,Determines whether to send an email notification to the group specified by the parameter 'low_email_group_id' when the state of the alert is set to LOW.
  » low_email_group_id,integer,false,none,Defines the email group to which email notification are sent when the state of the alert changes to LOW.
  » med_alert_enable,boolean,false,none,Determines whether to send an email notification to the group specified by the parameter 'medium_email_group_id' when the state of the alert is set to MEDIUM.
  » med_email_group_id,integer,false,none,Defines the email group to which email notification are sent when state of the alert changes to MEDIUM.
  » high_alert_enable,boolean,false,none,Determines whether to send an email notification to the group specified by the parameter 'high_email_group_id' when the state of the alert is set to HIGH.
  » high_email_group_id,integer,false,none,Defines the email group to which email notification are sent when the state of the alert changes to HIGH.
  » send_trap,boolean,false,none,Determines whether to send SNMP trap notifications when the state of the alert changes.
  » snmp_trap_version,integer,false,none,"Defines the SNMP trap version. Supported SNMP trap versions are 1, 2 or 3"
  » low_send_trap,boolean,false,none,Determines whether to send SNMP trap notifications when the state of the alert changes to LOW.
  » med_send_trap,boolean,false,none,Determines whether to send SNMP trap notification when the state of the alert changes to MEDIUM.
  » high_send_trap,boolean,false,none,Determines whether to send SNMP trap notification when the state of the alert changes to HIGH.
  » cleared_alert_enable,boolean,false,none,Determines whether to mute the notification for 'clear alert'.
  » execute_script,boolean,false,none,Determines whether to execute the provided script if the state of the alert changes to LOW/MEDIUM/HIGH.
  » execute_script_on_clear,boolean,false,none,Determines whether to execute the provided script if the state of the alert is cleared.
  » execute_script_on_pem_server,boolean,false,none,Determines whether to execute the provided script on the PEM host or the host where the agent is monitoring the object.
  » script_code,string,false,none,The shell or batch script to be executed. Please read the documentation for detailed information.
  » submit_to_nagios,boolean,false,none,Determines whether to send notification to the nagios when the state of the alert changes.
  » override_default_config,boolean,false,none,Determines whether to override the default webhook configuration.
  » send_notification,boolean,false,none,Determines whether to enable the webhook send notification.
  » low_webhook_ids,[integer],false,none,Webhook IDs for which low alerts are configured
  » med_webhook_ids,[integer],false,none,Webhook IDs for which medium alerts are configured
  » high_webhook_ids,[integer],false,none,Webhook IDs for which high alerts are configured
  » cleared_webhook_ids,[integer],false,none,Webhook IDs for which cleared alerts are configured

.. _enumerated-values-5:

Enumerated Values
'''''''''''''''''

.. csv-table::
  :header: Property,Value
  :widths: 25,25
  :align: left
  :class: longtable

  paramname,Exclude tables smaller than
  paramname,mount point
  paramname,Host IP Address
  paramname,Time interval to monitor
  paramname,Time since idle
  paramname,Per CPU utilization (K%)

..  Note::
   This operation does not require authentication

post\_\ *alert_config_server*\ {server_id}\ *database*\ {database_name}\ *schema*\ {schema_name}\ *table*\ {table_name}
-----------------------------------------------------------------------------------------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X POST https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/table/{table_name} \
     -H Content-Type: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Content-Type: application/json,
     X-Auth-Token: string
   }

   r = requests.post(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/table/{table_name}, headers = headers)

   print(r.json())

.. code:: javascript

   const inputBody = {
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "all_alert_enable": true,
     "email_group_id": 1,
     "low_alert_enable": true,
     "low_email_group_id": 1,
     "med_alert_enable": true,
     "med_email_group_id": 1,
     "high_alert_enable": true,
     "high_email_group_id": 1,
     "send_trap": false,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "params": [],
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": false,
     "low_webhook_ids": [],
     "med_webhook_ids": [],
     "high_webhook_ids": [],
     "cleared_webhook_ids": []
   };
   const headers = {
     Content-Type:application/json,
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/table/{table_name},
   {
     method: POST,
     body: inputBody,
     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``POST /alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/table/{table_name}``

Creates ``Alert`` for table level.

**Body parameter**

.. code:: json

   {
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "all_alert_enable": true,
     "email_group_id": 1,
     "low_alert_enable": true,
     "low_email_group_id": 1,
     "med_alert_enable": true,
     "med_email_group_id": 1,
     "high_alert_enable": true,
     "high_email_group_id": 1,
     "send_trap": false,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "params": [],
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": false,
     "low_webhook_ids": [],
     "med_webhook_ids": [],
     "high_webhook_ids": [],
     "cleared_webhook_ids": []
   }

.. _parameters-26:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  server_id,path,integer,true,Server ID
  database_name,path,string,true,Database name
  schema_name,path,string,true,Schema name
  table_name,path,string,true,Table name
  X-Auth-Token,header,string,true,Token of authorization
  body,body,:ref:`AlertPayload<AlertPayload>` ,true,none

**Example responses**

.. _responses-26:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Status 200,None

.. _response-schema-21:

Response Schema
^^^^^^^^^^^^^^^

..  Note::
   This operation does not require authentication

get\_\ *alert_config_server*\ {server_id}\ *database*\ {database_name}\ *schema*\ {schema_name}\ *table*\ {table_name}\_{alert_id}
----------------------------------------------------------------------------------------------------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X GET https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/table/{table_name}/{alert_id} \
     -H Accept: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Accept: application/json,
     X-Auth-Token: string
   }

   r = requests.get(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/table/{table_name}/{alert_id}, headers = headers)

   print(r.json())

.. code:: javascript


   const headers = {
     Accept:application/json,
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/table/{table_name}/{alert_id},
   {
     method: GET,

     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``GET /alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/table/{table_name}/{alert_id}``

Gets ``Alerts`` for table level by server_id, database_name,
schema_name, table_name, and alert_id.

.. _parameters-27:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  server_id,path,integer,true,Server ID
  database_name,path,string,true,Database Name
  schema_name,path,string,true,Schema name
  table_name,path,string,true,Table name
  alert_id,path,integer,true,Alert ID
  X-Auth-Token,header,string,true,Token of authorization

**Example responses**

.. raw:: html

   <Details summary="200 Response">

.. code:: json

   {
     "id": 0,
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "auto_created": true,
     "template_id": "string",
     "params": [],
     "param_names": [
       "string"
     ],
     "param_types": "string",
     "params_units": [
       "string"
     ],
     "threshold_unit": "string",
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "send_email": true,
     "all_alert_enable": true,
     "email_group_id": 0,
     "low_alert_enable": true,
     "low_email_group_id": 0,
     "med_alert_enable": true,
     "med_email_group_id": 0,
     "high_alert_enable": true,
     "high_email_group_id": 0,
     "send_trap": true,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": true,
     "low_webhook_ids": [
       0
     ],
     "med_webhook_ids": [
       0
     ],
     "high_webhook_ids": [
       0
     ],
     "cleared_webhook_ids": [
       0
     ]
   }

.. raw:: html

   </Details>

.. _responses-27:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Successful response,:ref:`About alert threads<About alert threads>` 

..  Note::
   This operation does not require authentication

put\_\ *alert_config_server*\ {server_id}\ *database*\ {database_name}\ *schema*\ {schema_name}\ *table*\ {table_name}\_{alert_id}
----------------------------------------------------------------------------------------------------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X PUT https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/table/{table_name}/{alert_id} \
     -H Content-Type: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Content-Type: application/json,
     X-Auth-Token: string
   }

   r = requests.put(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/table/{table_name}/{alert_id}, headers = headers)

   print(r.json())

.. code:: javascript

   const inputBody = {
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "all_alert_enable": true,
     "email_group_id": 1,
     "low_alert_enable": true,
     "low_email_group_id": 1,
     "med_alert_enable": true,
     "med_email_group_id": 1,
     "high_alert_enable": true,
     "high_email_group_id": 1,
     "send_trap": false,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "params": [],
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": false,
     "low_webhook_ids": [],
     "med_webhook_ids": [],
     "high_webhook_ids": [],
     "cleared_webhook_ids": []
   };
   const headers = {
     Content-Type:application/json,
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/table/{table_name}/{alert_id},
   {
     method: PUT,
     body: inputBody,
     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``PUT /alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/table/{table_name}/{alert_id}``

Updates ``Alert`` for table level.

**Body parameter**

.. code:: json

   {
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "all_alert_enable": true,
     "email_group_id": 1,
     "low_alert_enable": true,
     "low_email_group_id": 1,
     "med_alert_enable": true,
     "med_email_group_id": 1,
     "high_alert_enable": true,
     "high_email_group_id": 1,
     "send_trap": false,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "params": [],
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": false,
     "low_webhook_ids": [],
     "med_webhook_ids": [],
     "high_webhook_ids": [],
     "cleared_webhook_ids": []
   }

.. _parameters-28:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  server_id,path,integer,true,Server ID
  database_name,path,string,true,Database name
  schema_name,path,string,true,Schema name
  table_name,path,string,true,Table name
  alert_id,path,integer,true,Alert ID
  X-Auth-Token,header,string,true,Token of authorization
  body,body,:ref:`AlertPayload<AlertPayload>` ,true,none

**Example responses**

.. _responses-28:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Status 200,None

.. _response-schema-22:

Response Schema
^^^^^^^^^^^^^^^

..  Note::
   This operation does not require authentication

delete\_\ *alert_config_server*\ {server_id}\ *database*\ {database_name}\ *schema*\ {schema_name}\ *table*\ {table_name}\_{alert_id}
-------------------------------------------------------------------------------------------------------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X DELETE https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/table/{table_name}/{alert_id} \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     X-Auth-Token: string
   }

   r = requests.delete(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/table/{table_name}/{alert_id}, headers = headers)

   print(r.json())

.. code:: javascript


   const headers = {
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/table/{table_name}/{alert_id},
   {
     method: DELETE,

     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``DELETE /alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/table/{table_name}/{alert_id}``

Deletes the ``Alert`` object.

.. _parameters-29:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  server_id,path,integer,true,Server ID
  database_name,path,string,true,Database name
  schema_name,path,string,true,Schema name
  table_name,path,string,true,Table name
  alert_id,path,integer,true,Alert ID
  X-Auth-Token,header,string,true,Token of authorization

**Example responses**

.. _responses-29:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Successful deletion,None

.. _response-schema-23:

Response Schema
^^^^^^^^^^^^^^^

..  Note::
   This operation does not require authentication

get\_\ *alert_config_server*\ {server_id}\ *database*\ {database_name}\ *schema*\ {schema_name}\ *index*\ {index_name}
----------------------------------------------------------------------------------------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X GET https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/index/{index_name} \
     -H Accept: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Accept: application/json,
     X-Auth-Token: string
   }

   r = requests.get(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/index/{index_name}, headers = headers)

   print(r.json())

.. code:: javascript


   const headers = {
     Accept:application/json,
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/index/{index_name},
   {
     method: GET,

     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``GET /alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/index/{index_name}``

Gets ``Alerts`` for index level by server_id, database_name,
schema_name, and index_name.

.. _parameters-30:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  server_id,path,integer,true,Server ID
  database_name,path,string,true,Database name
  schema_name,path,string,true,Schema name
  index_name,path,string,true,Index name
  X-Auth-Token,header,string,true,Token of authorization

**Example responses**

.. raw:: html

   <Details summary="200 Response">

.. code:: json

   [
     {
       "id": 0,
       "alert_name": "string",
       "alert_template": 0,
       "description": "string",
       "enabled": true,
       "history_retention": 0,
       "frequency_min": 0,
       "auto_created": true,
       "template_id": "string",
       "params": [],
       "param_names": [
         "string"
       ],
       "param_types": "string",
       "params_units": [
         "string"
       ],
       "threshold_unit": "string",
       "operator": "string",
       "low_threshold_value": 0,
       "medium_threshold_value": 0,
       "high_threshold_value": 0,
       "send_email": true,
       "all_alert_enable": true,
       "email_group_id": 0,
       "low_alert_enable": true,
       "low_email_group_id": 0,
       "med_alert_enable": true,
       "med_email_group_id": 0,
       "high_alert_enable": true,
       "high_email_group_id": 0,
       "send_trap": true,
       "snmp_trap_version": 0,
       "low_send_trap": true,
       "med_send_trap": true,
       "high_send_trap": true,
       "cleared_alert_enable": true,
       "execute_script": true,
       "execute_script_on_clear": true,
       "execute_script_on_pem_server": true,
       "script_code": "string",
       "submit_to_nagios": true,
       "override_default_config": true,
       "send_notification": true,
       "low_webhook_ids": [
         0
       ],
       "med_webhook_ids": [
         0
       ],
       "high_webhook_ids": [
         0
       ],
       "cleared_webhook_ids": [
         0
       ]
     }
   ]

.. raw:: html

   </Details>

.. _responses-30:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Successful response,Inline

.. _response-schema-24:

Response Schema
^^^^^^^^^^^^^^^

Status Code **200**

.. csv-table::
  :header: Name,Type,Required,Restrictions,Description
  :widths: 12,8,8,8,12
  :align: left
  :class: longtable

  *anonymous*,\ :ref:`Query information <Schemas>` ],false,none,none
  » id,integer,false,none,Alert ID. NOTE: This property is not applicable for a POST request.
  » alert_name,string,false,none,Name of the alert. NOTE: This property is a mandatory parameter for a POST request.
  » alert_template,integer,false,none,ID of the alert template. This property must be a positive integer value. NOTE: It is a mandatory parameter for a POST request.
  » description,string,false,none,none
  » enabled,boolean,false,none,Determines whether this alert is enabled/disabled. NOTE: This property is a mandatory parameter for a POST request.
  » history_retention,integer,false,none,Specifies how many days to keep the history of this alert. Possible values are from 1 to 99999. NOTE: This property is a mandatory parameter for a POST request.
  » frequency_min,integer,false,none,Defines in minutes how frequently the alert must be checked on a PEM database server. Possible values are from 1 to 65534. NOTE: This property is a mandatory parameter for a POST request.
  » auto_created,boolean,false,none,Specifies whether the alert is auto-created.
  » template_id,string,false,none,Defines the alert template.
  » params,\ :ref:`Query information <Schemas>` ],false,none,List of parameter/value pairs to be used by the alert template for checking alerts. NOTE: The alert template requires the all parameter to be defined.
  »» paramname,string,false,none,Name of the parameter. NOTE: This property must present on the alert template parameter list.Example:
  »» paramvalue,string,false,none,Value for the given parameter
  » param_names,[string],false,none,Defines the name of parameters.
  » param_types,string,false,none,Defines the type of parameters. Example: INTEGER/STRING..
  » params_units,[string],false,none,"Defines the unit used for parameters.Example: 'DAYS','True or False','Hours','Minutes' etc"
  » threshold_unit,string,false,none,"Units used to calculate the threshold, such as MB/kB/seconds/days/... This value is only used for the GUI."
  » operator,string,false,none,"Defines the operator for checking threshold values. Valid strings are "">"" and ""&lt;"". NOTE: This property is a mandatory parameter for a POST request."
  » low_threshold_value,number,false,none,Threshold value for triggering the low alert. This property can be any valid integer/float value. NOTE: It is a mandatory parameter for the POST request.
  » medium_threshold_value,number,false,none,Threshold value for triggering the medium alert. This property can be any valid integer/float value. NOTE: It is a mandatory parameter for the POST request.
  » high_threshold_value,number,false,none,Threshold value for triggering the high alert. It can be any valid integer/float value. NOTE: It is a mandatory parameter for the POST request.
  » send_email,boolean,false,none,Determines whether to send an email when the state of the alert changes.
  » all_alert_enable,boolean,false,none,Determines whether to send an email notification to the group specified by the parameter 'email_group_id' when the state of the alert changes.
  » email_group_id,integer,false,none,Defines the email group to which email notification are sent when the state of the alert changes.
  » low_alert_enable,boolean,false,none,Determines whether to send an email notification to the group specified by the parameter 'low_email_group_id' when the state of the alert is set to LOW.
  » low_email_group_id,integer,false,none,Defines the email group to which email notification are sent when the state of the alert changes to LOW.
  » med_alert_enable,boolean,false,none,Determines whether to send an email notification to the group specified by the parameter 'medium_email_group_id' when the state of the alert is set to MEDIUM.
  » med_email_group_id,integer,false,none,Defines the email group to which email notification are sent when state of the alert changes to MEDIUM.
  » high_alert_enable,boolean,false,none,Determines whether to send an email notification to the group specified by the parameter 'high_email_group_id' when the state of the alert is set to HIGH.
  » high_email_group_id,integer,false,none,Defines the email group to which email notification are sent when the state of the alert changes to HIGH.
  » send_trap,boolean,false,none,Determines whether to send SNMP trap notifications when the state of the alert changes.
  » snmp_trap_version,integer,false,none,"Defines the SNMP trap version. Supported SNMP trap versions are 1, 2 or 3"
  » low_send_trap,boolean,false,none,Determines whether to send SNMP trap notifications when the state of the alert changes to LOW.
  » med_send_trap,boolean,false,none,Determines whether to send SNMP trap notification when the state of the alert changes to MEDIUM.
  » high_send_trap,boolean,false,none,Determines whether to send SNMP trap notification when the state of the alert changes to HIGH.
  » cleared_alert_enable,boolean,false,none,Determines whether to mute the notification for 'clear alert'.
  » execute_script,boolean,false,none,Determines whether to execute the provided script if the state of the alert changes to LOW/MEDIUM/HIGH.
  » execute_script_on_clear,boolean,false,none,Determines whether to execute the provided script if the state of the alert is cleared.
  » execute_script_on_pem_server,boolean,false,none,Determines whether to execute the provided script on the PEM host or the host where the agent is monitoring the object.
  » script_code,string,false,none,The shell or batch script to be executed. Please read the documentation for detailed information.
  » submit_to_nagios,boolean,false,none,Determines whether to send notification to the nagios when the state of the alert changes.
  » override_default_config,boolean,false,none,Determines whether to override the default webhook configuration.
  » send_notification,boolean,false,none,Determines whether to enable the webhook send notification.
  » low_webhook_ids,[integer],false,none,Webhook IDs for which low alerts are configured
  » med_webhook_ids,[integer],false,none,Webhook IDs for which medium alerts are configured
  » high_webhook_ids,[integer],false,none,Webhook IDs for which high alerts are configured
  » cleared_webhook_ids,[integer],false,none,Webhook IDs for which cleared alerts are configured

.. _enumerated-values-6:

Enumerated Values
'''''''''''''''''

.. csv-table::
  :header: Property,Value
  :widths: 25,25
  :align: left
  :class: longtable

  paramname,Exclude tables smaller than
  paramname,mount point
  paramname,Host IP Address
  paramname,Time interval to monitor
  paramname,Time since idle
  paramname,Per CPU utilization (K%)

..  Note::
   This operation does not require authentication

post\_\ *alert_config_server*\ {server_id}\ *database*\ {database_name}\ *schema*\ {schema_name}\ *index*\ {index_name}
-----------------------------------------------------------------------------------------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X POST https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/index/{index_name} \
     -H Content-Type: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Content-Type: application/json,
     X-Auth-Token: string
   }

   r = requests.post(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/index/{index_name}, headers = headers)

   print(r.json())

.. code:: javascript

   const inputBody = {
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "all_alert_enable": true,
     "email_group_id": 1,
     "low_alert_enable": true,
     "low_email_group_id": 1,
     "med_alert_enable": true,
     "med_email_group_id": 1,
     "high_alert_enable": true,
     "high_email_group_id": 1,
     "send_trap": false,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "params": [],
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": false,
     "low_webhook_ids": [],
     "med_webhook_ids": [],
     "high_webhook_ids": [],
     "cleared_webhook_ids": []
   };
   const headers = {
     Content-Type:application/json,
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/index/{index_name},
   {
     method: POST,
     body: inputBody,
     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``POST /alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/index/{index_name}``

Create ``Alert`` for index level.

**Body parameter**

.. code:: json

   {
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "all_alert_enable": true,
     "email_group_id": 1,
     "low_alert_enable": true,
     "low_email_group_id": 1,
     "med_alert_enable": true,
     "med_email_group_id": 1,
     "high_alert_enable": true,
     "high_email_group_id": 1,
     "send_trap": false,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "params": [],
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": false,
     "low_webhook_ids": [],
     "med_webhook_ids": [],
     "high_webhook_ids": [],
     "cleared_webhook_ids": []
   }

.. _parameters-31:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  server_id,path,integer,true,Server ID
  database_name,path,string,true,Database name
  schema_name,path,string,true,Schema name
  index_name,path,string,true,Index name
  X-Auth-Token,header,string,true,Token of authorization
  body,body,:ref:`AlertPayload<AlertPayload>` ,true,none

**Example responses**

.. _responses-31:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Status 200,None

.. _response-schema-25:

Response Schema
^^^^^^^^^^^^^^^

..  Note::
   This operation does not require authentication

get\_\ *alert_config_server*\ {server_id}\ *database*\ {database_name}\ *schema*\ {schema_name}\ *index*\ {index_name}\_{alert_id}
----------------------------------------------------------------------------------------------------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X GET https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/index/{index_name}/{alert_id} \
     -H Accept: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Accept: application/json,
     X-Auth-Token: string
   }

   r = requests.get(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/index/{index_name}/{alert_id}, headers = headers)

   print(r.json())

.. code:: javascript


   const headers = {
     Accept:application/json,
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/index/{index_name}/{alert_id},
   {
     method: GET,

     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``GET /alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/index/{index_name}/{alert_id}``

Gets ``Alerts`` for index level by server_id, database_name,
schema_name, index_name, and alert_id.

.. _parameters-32:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  server_id,path,integer,true,Server ID
  database_name,path,string,true,Database name
  schema_name,path,string,true,Schema name
  index_name,path,string,true,Index name
  alert_id,path,integer,true,Alert ID
  X-Auth-Token,header,string,true,Token of authorization

**Example responses**

.. raw:: html

   <Details summary="200 Response">

.. code:: json

   {
     "id": 0,
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "auto_created": true,
     "template_id": "string",
     "params": [],
     "param_names": [
       "string"
     ],
     "param_types": "string",
     "params_units": [
       "string"
     ],
     "threshold_unit": "string",
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "send_email": true,
     "all_alert_enable": true,
     "email_group_id": 0,
     "low_alert_enable": true,
     "low_email_group_id": 0,
     "med_alert_enable": true,
     "med_email_group_id": 0,
     "high_alert_enable": true,
     "high_email_group_id": 0,
     "send_trap": true,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": true,
     "low_webhook_ids": [
       0
     ],
     "med_webhook_ids": [
       0
     ],
     "high_webhook_ids": [
       0
     ],
     "cleared_webhook_ids": [
       0
     ]
   }

.. raw:: html

   </Details>

.. _responses-32:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Successful response,:ref:`About alert threads<About alert threads>` 

..  Note::
   This operation does not require authentication

put\_\ *alert_config_server*\ {server_id}\ *database*\ {database_name}\ *schema*\ {schema_name}\ *index*\ {index_name}\_{alert_id}
----------------------------------------------------------------------------------------------------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X PUT https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/index/{index_name}/{alert_id} \
     -H Content-Type: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Content-Type: application/json,
     X-Auth-Token: string
   }

   r = requests.put(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/index/{index_name}/{alert_id}, headers = headers)

   print(r.json())

.. code:: javascript

   const inputBody = {
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "all_alert_enable": true,
     "email_group_id": 1,
     "low_alert_enable": true,
     "low_email_group_id": 1,
     "med_alert_enable": true,
     "med_email_group_id": 1,
     "high_alert_enable": true,
     "high_email_group_id": 1,
     "send_trap": false,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "params": [],
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": false,
     "low_webhook_ids": [],
     "med_webhook_ids": [],
     "high_webhook_ids": [],
     "cleared_webhook_ids": []
   };
   const headers = {
     Content-Type:application/json,
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/index/{index_name}/{alert_id},
   {
     method: PUT,
     body: inputBody,
     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``PUT /alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/index/{index_name}/{alert_id}``

Updates ``Alert`` for index level.

**Body parameter**

.. code:: json

   {
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "all_alert_enable": true,
     "email_group_id": 1,
     "low_alert_enable": true,
     "low_email_group_id": 1,
     "med_alert_enable": true,
     "med_email_group_id": 1,
     "high_alert_enable": true,
     "high_email_group_id": 1,
     "send_trap": false,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "params": [],
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": false,
     "low_webhook_ids": [],
     "med_webhook_ids": [],
     "high_webhook_ids": [],
     "cleared_webhook_ids": []
   }

.. _parameters-33:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  server_id,path,integer,true,Server ID
  database_name,path,string,true,Database name
  schema_name,path,string,true,Schema name
  index_name,path,string,true,Index name
  alert_id,path,integer,true,Alert ID
  X-Auth-Token,header,string,true,Token of authorization
  body,body,:ref:`AlertPayload<AlertPayload>` ,true,none

**Example responses**

.. _responses-33:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Status 200,None

.. _response-schema-26:

Response Schema
^^^^^^^^^^^^^^^

..  Note::
   This operation does not require authentication

delete\_\ *alert_config_server*\ {server_id}\ *database*\ {database_name}\ *schema*\ {schema_name}\ *index*\ {index_name}\_{alert_id}
-------------------------------------------------------------------------------------------------------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X DELETE https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/index/{index_name}/{alert_id} \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     X-Auth-Token: string
   }

   r = requests.delete(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/index/{index_name}/{alert_id}, headers = headers)

   print(r.json())

.. code:: javascript


   const headers = {
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/index/{index_name}/{alert_id},
   {
     method: DELETE,

     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``DELETE /alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/index/{index_name}/{alert_id}``

Deletes the ``Alert`` object.

.. _parameters-34:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  server_id,path,integer,true,Server ID
  database_name,path,string,true,Database name
  schema_name,path,string,true,Schema name
  index_name,path,string,true,Index name
  alert_id,path,integer,true,Alert ID
  X-Auth-Token,header,string,true,Token of authorization

**Example responses**

.. _responses-34:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Successful deletion,None

.. _response-schema-27:

Response Schema
^^^^^^^^^^^^^^^

..  Note::
   This operation does not require authentication

get\_\ *alert_config_server*\ {server_id}\ *database*\ {database_name}\ *schema*\ {schema_name}\ *sequence*\ {sequence_name}
----------------------------------------------------------------------------------------------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X GET https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/sequence/{sequence_name} \
     -H Accept: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Accept: application/json,
     X-Auth-Token: string
   }

   r = requests.get(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/sequence/{sequence_name}, headers = headers)

   print(r.json())

.. code:: javascript


   const headers = {
     Accept:application/json,
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/sequence/{sequence_name},
   {
     method: GET,

     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``GET /alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/sequence/{sequence_name}``

Gets ``Alerts`` for sequence level by server_id, database_name,
schema_name, and sequence_name.

.. _parameters-35:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  server_id,path,integer,true,Server ID
  database_name,path,string,true,Database name
  schema_name,path,string,true,Schema name
  sequence_name,path,string,true,Sequence name
  X-Auth-Token,header,string,true,Token of authorization

**Example responses**

.. raw:: html

   <Details summary="200 Response">

.. code:: json

   [
     {
       "id": 0,
       "alert_name": "string",
       "alert_template": 0,
       "description": "string",
       "enabled": true,
       "history_retention": 0,
       "frequency_min": 0,
       "auto_created": true,
       "template_id": "string",
       "params": [],
       "param_names": [
         "string"
       ],
       "param_types": "string",
       "params_units": [
         "string"
       ],
       "threshold_unit": "string",
       "operator": "string",
       "low_threshold_value": 0,
       "medium_threshold_value": 0,
       "high_threshold_value": 0,
       "send_email": true,
       "all_alert_enable": true,
       "email_group_id": 0,
       "low_alert_enable": true,
       "low_email_group_id": 0,
       "med_alert_enable": true,
       "med_email_group_id": 0,
       "high_alert_enable": true,
       "high_email_group_id": 0,
       "send_trap": true,
       "snmp_trap_version": 0,
       "low_send_trap": true,
       "med_send_trap": true,
       "high_send_trap": true,
       "cleared_alert_enable": true,
       "execute_script": true,
       "execute_script_on_clear": true,
       "execute_script_on_pem_server": true,
       "script_code": "string",
       "submit_to_nagios": true,
       "override_default_config": true,
       "send_notification": true,
       "low_webhook_ids": [
         0
       ],
       "med_webhook_ids": [
         0
       ],
       "high_webhook_ids": [
         0
       ],
       "cleared_webhook_ids": [
         0
       ]
     }
   ]

.. raw:: html

   </Details>

.. _responses-35:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Successful response,Inline

.. _response-schema-28:

Response Schema
^^^^^^^^^^^^^^^

Status Code **200**

.. csv-table::
  :header: Name,Type,Required,Restrictions,Description
  :widths: 12,8,8,8,12
  :align: left
  :class: longtable

  *anonymous*,\ :ref:`Query information <Schemas>` ],false,none,none
  » id,integer,false,none,Alert ID. NOTE: This property is not applicable for a POST request.
  » alert_name,string,false,none,Name of the alert. NOTE: This property is a mandatory parameter for a POST request.
  » alert_template,integer,false,none,ID of the alert template. This property must be a positive integer value. NOTE: It is a mandatory parameter for a POST request.
  » description,string,false,none,none
  » enabled,boolean,false,none,Determines whether this alert is enabled/disabled. NOTE: This property is a mandatory parameter for a POST request.
  » history_retention,integer,false,none,Specifies how many days to keep the history of this alert. Possible values are from 1 to 99999. NOTE: This property is a mandatory parameter for a POST request.
  » frequency_min,integer,false,none,Defines in minutes how frequently the alert must be checked on a PEM database server. Possible values are from 1 to 65534. NOTE: This property is a mandatory parameter for a POST request.
  » auto_created,boolean,false,none,Specifies whether the alert is auto-created.
  » template_id,string,false,none,Defines the alert template.
  » params,\ :ref:`Query information <Schemas>` ],false,none,List of parameter/value pairs to be used by the alert template for checking alerts. NOTE: The alert template requires the all parameter to be defined.
  »» paramname,string,false,none,Name of the parameter. NOTE: This property must present on the alert template parameter list.Example:
  »» paramvalue,string,false,none,Value for the given parameter
  » param_names,[string],false,none,Defines the name of parameters.
  » param_types,string,false,none,Defines the type of parameters. Example: INTEGER/STRING..
  » params_units,[string],false,none,"Defines the unit used for parameters.Example: 'DAYS','True or False','Hours','Minutes' etc"
  » threshold_unit,string,false,none,"Units used to calculate the threshold, such as MB/kB/seconds/days/... This value is only used for the GUI."
  » operator,string,false,none,"Defines the operator for checking threshold values. Valid strings are "">"" and ""&lt;"". NOTE: This property is a mandatory parameter for a POST request."
  » low_threshold_value,number,false,none,Threshold value for triggering the low alert. This property can be any valid integer/float value. NOTE: It is a mandatory parameter for the POST request.
  » medium_threshold_value,number,false,none,Threshold value for triggering the medium alert. This property can be any valid integer/float value. NOTE: It is a mandatory parameter for the POST request.
  » high_threshold_value,number,false,none,Threshold value for triggering the high alert. It can be any valid integer/float value. NOTE: It is a mandatory parameter for the POST request.
  » send_email,boolean,false,none,Determines whether to send an email when the state of the alert changes.
  » all_alert_enable,boolean,false,none,Determines whether to send an email notification to the group specified by the parameter 'email_group_id' when the state of the alert changes.
  » email_group_id,integer,false,none,Defines the email group to which email notification are sent when the state of the alert changes.
  » low_alert_enable,boolean,false,none,Determines whether to send an email notification to the group specified by the parameter 'low_email_group_id' when the state of the alert is set to LOW.
  » low_email_group_id,integer,false,none,Defines the email group to which email notification are sent when the state of the alert changes to LOW.
  » med_alert_enable,boolean,false,none,Determines whether to send an email notification to the group specified by the parameter 'medium_email_group_id' when the state of the alert is set to MEDIUM.
  » med_email_group_id,integer,false,none,Defines the email group to which email notification are sent when state of the alert changes to MEDIUM.
  » high_alert_enable,boolean,false,none,Determines whether to send an email notification to the group specified by the parameter 'high_email_group_id' when the state of the alert is set to HIGH.
  » high_email_group_id,integer,false,none,Defines the email group to which email notification are sent when the state of the alert changes to HIGH.
  » send_trap,boolean,false,none,Determines whether to send SNMP trap notifications when the state of the alert changes.
  » snmp_trap_version,integer,false,none,"Defines the SNMP trap version. Supported SNMP trap versions are 1, 2 or 3"
  » low_send_trap,boolean,false,none,Determines whether to send SNMP trap notifications when the state of the alert changes to LOW.
  » med_send_trap,boolean,false,none,Determines whether to send SNMP trap notification when the state of the alert changes to MEDIUM.
  » high_send_trap,boolean,false,none,Determines whether to send SNMP trap notification when the state of the alert changes to HIGH.
  » cleared_alert_enable,boolean,false,none,Determines whether to mute the notification for 'clear alert'.
  » execute_script,boolean,false,none,Determines whether to execute the provided script if the state of the alert changes to LOW/MEDIUM/HIGH.
  » execute_script_on_clear,boolean,false,none,Determines whether to execute the provided script if the state of the alert is cleared.
  » execute_script_on_pem_server,boolean,false,none,Determines whether to execute the provided script on the PEM host or the host where the agent is monitoring the object.
  » script_code,string,false,none,The shell or batch script to be executed. Please read the documentation for detailed information.
  » submit_to_nagios,boolean,false,none,Determines whether to send notification to the nagios when the state of the alert changes.
  » override_default_config,boolean,false,none,Determines whether to override the default webhook configuration.
  » send_notification,boolean,false,none,Determines whether to enable the webhook send notification.
  » low_webhook_ids,[integer],false,none,Webhook IDs for which low alerts are configured
  » med_webhook_ids,[integer],false,none,Webhook IDs for which medium alerts are configured
  » high_webhook_ids,[integer],false,none,Webhook IDs for which high alerts are configured
  » cleared_webhook_ids,[integer],false,none,Webhook IDs for which cleared alerts are configured

.. _enumerated-values-7:

Enumerated Values
'''''''''''''''''

.. csv-table::
  :header: Property,Value
  :widths: 25,25
  :align: left
  :class: longtable

  paramname,Exclude tables smaller than
  paramname,mount point
  paramname,Host IP Address
  paramname,Time interval to monitor
  paramname,Time since idle
  paramname,Per CPU utilization (K%)

..  Note::
   This operation does not require authentication

post\_\ *alert_config_server*\ {server_id}\ *database*\ {database_name}\ *schema*\ {schema_name}\ *sequence*\ {sequence_name}
-----------------------------------------------------------------------------------------------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X POST https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/sequence/{sequence_name} \
     -H Content-Type: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Content-Type: application/json,
     X-Auth-Token: string
   }

   r = requests.post(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/sequence/{sequence_name}, headers = headers)

   print(r.json())

.. code:: javascript

   const inputBody = {
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "all_alert_enable": true,
     "email_group_id": 1,
     "low_alert_enable": true,
     "low_email_group_id": 1,
     "med_alert_enable": true,
     "med_email_group_id": 1,
     "high_alert_enable": true,
     "high_email_group_id": 1,
     "send_trap": false,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "params": [],
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": false,
     "low_webhook_ids": [],
     "med_webhook_ids": [],
     "high_webhook_ids": [],
     "cleared_webhook_ids": []
   };
   const headers = {
     Content-Type:application/json,
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/sequence/{sequence_name},
   {
     method: POST,
     body: inputBody,
     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``POST /alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/sequence/{sequence_name}``

Creates ``Alert`` for sequence level.

**Body parameter**

.. code:: json

   {
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "all_alert_enable": true,
     "email_group_id": 1,
     "low_alert_enable": true,
     "low_email_group_id": 1,
     "med_alert_enable": true,
     "med_email_group_id": 1,
     "high_alert_enable": true,
     "high_email_group_id": 1,
     "send_trap": false,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "params": [],
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": false,
     "low_webhook_ids": [],
     "med_webhook_ids": [],
     "high_webhook_ids": [],
     "cleared_webhook_ids": []
   }

.. _parameters-36:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  server_id,path,integer,true,Server ID
  database_name,path,string,true,Database name
  schema_name,path,string,true,Schema name
  sequence_name,path,string,true,Sequence Name
  X-Auth-Token,header,string,true,Token of authorization
  body,body,:ref:`AlertPayload<AlertPayload>` ,true,none

**Example responses**

.. _responses-36:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Status 200,None

.. _response-schema-29:

Response Schema
^^^^^^^^^^^^^^^

..  Note::
   This operation does not require authentication

get\_\ *alert_config_server*\ {server_id}\ *database*\ {database_name}\ *schema*\ {schema_name}\ *sequence*\ {sequence_name}\_{alert_id}
----------------------------------------------------------------------------------------------------------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X GET https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/sequence/{sequence_name}/{alert_id} \
     -H Accept: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Accept: application/json,
     X-Auth-Token: string
   }

   r = requests.get(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/sequence/{sequence_name}/{alert_id}, headers = headers)

   print(r.json())

.. code:: javascript


   const headers = {
     Accept:application/json,
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/sequence/{sequence_name}/{alert_id},
   {
     method: GET,

     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``GET /alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/sequence/{sequence_name}/{alert_id}``

Gets ``Alerts`` for sequence level by server_id, database_name,
schema_name, sequence_name, and alert_id.

.. _parameters-37:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  server_id,path,integer,true,Server ID
  database_name,path,string,true,Database name
  schema_name,path,string,true,Schema name
  sequence_name,path,string,true,Sequence name
  alert_id,path,integer,true,Alert ID
  X-Auth-Token,header,string,true,Token of authorization

**Example responses**

.. raw:: html

   <Details summary="200 Response">

.. code:: json

   {
     "id": 0,
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "auto_created": true,
     "template_id": "string",
     "params": [],
     "param_names": [
       "string"
     ],
     "param_types": "string",
     "params_units": [
       "string"
     ],
     "threshold_unit": "string",
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "send_email": true,
     "all_alert_enable": true,
     "email_group_id": 0,
     "low_alert_enable": true,
     "low_email_group_id": 0,
     "med_alert_enable": true,
     "med_email_group_id": 0,
     "high_alert_enable": true,
     "high_email_group_id": 0,
     "send_trap": true,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": true,
     "low_webhook_ids": [
       0
     ],
     "med_webhook_ids": [
       0
     ],
     "high_webhook_ids": [
       0
     ],
     "cleared_webhook_ids": [
       0
     ]
   }

.. raw:: html

   </Details>

.. _responses-37:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Successful response,:ref:`About alert threads<About alert threads>` 

..  Note::
   This operation does not require authentication

put\_\ *alert_config_server*\ {server_id}\ *database*\ {database_name}\ *schema*\ {schema_name}\ *sequence*\ {sequence_name}\_{alert_id}
----------------------------------------------------------------------------------------------------------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X PUT https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/sequence/{sequence_name}/{alert_id} \
     -H Content-Type: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Content-Type: application/json,
     X-Auth-Token: string
   }

   r = requests.put(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/sequence/{sequence_name}/{alert_id}, headers = headers)

   print(r.json())

.. code:: javascript

   const inputBody = {
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "all_alert_enable": true,
     "email_group_id": 1,
     "low_alert_enable": true,
     "low_email_group_id": 1,
     "med_alert_enable": true,
     "med_email_group_id": 1,
     "high_alert_enable": true,
     "high_email_group_id": 1,
     "send_trap": false,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "params": [],
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": false,
     "low_webhook_ids": [],
     "med_webhook_ids": [],
     "high_webhook_ids": [],
     "cleared_webhook_ids": []
   };
   const headers = {
     Content-Type:application/json,
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/sequence/{sequence_name}/{alert_id},
   {
     method: PUT,
     body: inputBody,
     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``PUT /alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/sequence/{sequence_name}/{alert_id}``

Updates ``Alert`` for sequence level.

**Body parameter**

.. code:: json

   {
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "all_alert_enable": true,
     "email_group_id": 1,
     "low_alert_enable": true,
     "low_email_group_id": 1,
     "med_alert_enable": true,
     "med_email_group_id": 1,
     "high_alert_enable": true,
     "high_email_group_id": 1,
     "send_trap": false,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "params": [],
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": false,
     "low_webhook_ids": [],
     "med_webhook_ids": [],
     "high_webhook_ids": [],
     "cleared_webhook_ids": []
   }

.. _parameters-38:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  server_id,path,integer,true,Server ID
  database_name,path,string,true,Database name
  schema_name,path,string,true,Schema name
  sequence_name,path,string,true,Sequence name
  alert_id,path,integer,true,Alert ID
  X-Auth-Token,header,string,true,Token of authorization
  body,body,:ref:`AlertPayload<AlertPayload>` ,true,none

**Example responses**

.. _responses-38:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Status 200,None

.. _response-schema-30:

Response Schema
^^^^^^^^^^^^^^^

..  Note::
   This operation does not require authentication

delete\_\ *alert_config_server*\ {server_id}\ *database*\ {database_name}\ *schema*\ {schema_name}\ *sequence*\ {sequence_name}\_{alert_id}
-------------------------------------------------------------------------------------------------------------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X DELETE https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/sequence/{sequence_name}/{alert_id} \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     X-Auth-Token: string
   }

   r = requests.delete(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/sequence/{sequence_name}/{alert_id}, headers = headers)

   print(r.json())

.. code:: javascript


   const headers = {
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/sequence/{sequence_name}/{alert_id},
   {
     method: DELETE,

     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``DELETE /alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/sequence/{sequence_name}/{alert_id}``

Delete the ``Alert`` object.

.. _parameters-39:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  server_id,path,integer,true,Server ID
  database_name,path,string,true,Database name
  schema_name,path,string,true,Schema name
  sequence_name,path,string,true,Sequence name
  alert_id,path,integer,true,Alert ID
  X-Auth-Token,header,string,true,Token of authorization

**Example responses**

.. _responses-39:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Successful deletion,None

.. _response-schema-31:

Response Schema
^^^^^^^^^^^^^^^

..  Note::
   This operation does not require authentication

get\_\ *alert_config_server*\ {server_id}\ *database*\ {database_name}\ *schema*\ {schema_name}\ *function*\ {function_name}\ *args*\ {function_arguments}\_
------------------------------------------------------------------------------------------------------------------------------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X GET https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/function/{function_name}/args/{function_arguments}/ \
     -H Accept: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Accept: application/json,
     X-Auth-Token: string
   }

   r = requests.get(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/function/{function_name}/args/{function_arguments}/, headers = headers)

   print(r.json())

.. code:: javascript


   const headers = {
     Accept:application/json,
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/function/{function_name}/args/{function_arguments}/,
   {
     method: GET,

     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``GET /alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/function/{function_name}/args/{function_arguments}/``

Gets ``Alerts`` for function level by server_id, database_name,
schema_name, and function_name.

.. _parameters-40:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  server_id,path,integer,true,Server ID
  database_name,path,string,true,Database name
  schema_name,path,string,true,Schema name
  function_name,path,string,true,Function name
  function_arguments,path,string,true,Comma-separated list of function arguments.
  X-Auth-Token,header,string,true,Token of authorization

Detailed descriptions
'''''''''''''''''''''

**function_arguments**: Comma-separated list of function arguments.

Note: Provide space if no function argument

**Example responses**

.. raw:: html

   <Details summary="200 Response">

.. code:: json

   [
     {
       "id": 0,
       "alert_name": "string",
       "alert_template": 0,
       "description": "string",
       "enabled": true,
       "history_retention": 0,
       "frequency_min": 0,
       "auto_created": true,
       "template_id": "string",
       "params": [],
       "param_names": [
         "string"
       ],
       "param_types": "string",
       "params_units": [
         "string"
       ],
       "threshold_unit": "string",
       "operator": "string",
       "low_threshold_value": 0,
       "medium_threshold_value": 0,
       "high_threshold_value": 0,
       "send_email": true,
       "all_alert_enable": true,
       "email_group_id": 0,
       "low_alert_enable": true,
       "low_email_group_id": 0,
       "med_alert_enable": true,
       "med_email_group_id": 0,
       "high_alert_enable": true,
       "high_email_group_id": 0,
       "send_trap": true,
       "snmp_trap_version": 0,
       "low_send_trap": true,
       "med_send_trap": true,
       "high_send_trap": true,
       "cleared_alert_enable": true,
       "execute_script": true,
       "execute_script_on_clear": true,
       "execute_script_on_pem_server": true,
       "script_code": "string",
       "submit_to_nagios": true,
       "override_default_config": true,
       "send_notification": true,
       "low_webhook_ids": [
         0
       ],
       "med_webhook_ids": [
         0
       ],
       "high_webhook_ids": [
         0
       ],
       "cleared_webhook_ids": [
         0
       ]
     }
   ]

.. raw:: html

   </Details>

.. _responses-40:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Successful response,Inline

.. _response-schema-32:

Response Schema
^^^^^^^^^^^^^^^

Status Code **200**

.. csv-table::
  :header: Name,Type,Required,Restrictions,Description
  :widths: 12,8,8,8,12
  :align: left
  :class: longtable

  *anonymous*,\ :ref:`Query information <Schemas>` ],false,none,none
  » id,integer,false,none,Alert ID. NOTE: This property is not applicable for a POST request.
  » alert_name,string,false,none,Name of the alert. NOTE: This property is a mandatory parameter for a POST request.
  » alert_template,integer,false,none,ID of the alert template. This property must be a positive integer value. NOTE: It is a mandatory parameter for a POST request.
  » description,string,false,none,none
  » enabled,boolean,false,none,Determines whether this alert is enabled/disabled. NOTE: This property is a mandatory parameter for a POST request.
  » history_retention,integer,false,none,Specifies how many days to keep the history of this alert. Possible values are from 1 to 99999. NOTE: This property is a mandatory parameter for a POST request.
  » frequency_min,integer,false,none,Defines in minutes how frequently the alert must be checked on a PEM database server. Possible values are from 1 to 65534. NOTE: This property is a mandatory parameter for a POST request.
  » auto_created,boolean,false,none,Specifies whether the alert is auto-created.
  » template_id,string,false,none,Defines the alert template.
  » params,\ :ref:`Query information <Schemas>` ],false,none,List of parameter/value pairs to be used by the alert template for checking alerts. NOTE: The alert template requires the all parameter to be defined.
  »» paramname,string,false,none,Name of the parameter. NOTE: This property must present on the alert template parameter list.Example:
  »» paramvalue,string,false,none,Value for the given parameter
  » param_names,[string],false,none,Defines the name of parameters.
  » param_types,string,false,none,Defines the type of parameters. Example: INTEGER/STRING..
  » params_units,[string],false,none,"Defines the unit used for parameters.Example: 'DAYS','True or False','Hours','Minutes' etc"
  » threshold_unit,string,false,none,"Units used to calculate the threshold, such as MB/kB/seconds/days/... This value is only used for the GUI."
  » operator,string,false,none,"Defines the operator for checking threshold values. Valid strings are "">"" and ""&lt;"". NOTE: This property is a mandatory parameter for a POST request."
  » low_threshold_value,number,false,none,Threshold value for triggering the low alert. This property can be any valid integer/float value. NOTE: It is a mandatory parameter for the POST request.
  » medium_threshold_value,number,false,none,Threshold value for triggering the medium alert. This property can be any valid integer/float value. NOTE: It is a mandatory parameter for the POST request.
  » high_threshold_value,number,false,none,Threshold value for triggering the high alert. It can be any valid integer/float value. NOTE: It is a mandatory parameter for the POST request.
  » send_email,boolean,false,none,Determines whether to send an email when the state of the alert changes.
  » all_alert_enable,boolean,false,none,Determines whether to send an email notification to the group specified by the parameter 'email_group_id' when the state of the alert changes.
  » email_group_id,integer,false,none,Defines the email group to which email notification are sent when the state of the alert changes.
  » low_alert_enable,boolean,false,none,Determines whether to send an email notification to the group specified by the parameter 'low_email_group_id' when the state of the alert is set to LOW.
  » low_email_group_id,integer,false,none,Defines the email group to which email notification are sent when the state of the alert changes to LOW.
  » med_alert_enable,boolean,false,none,Determines whether to send an email notification to the group specified by the parameter 'medium_email_group_id' when the state of the alert is set to MEDIUM.
  » med_email_group_id,integer,false,none,Defines the email group to which email notification are sent when state of the alert changes to MEDIUM.
  » high_alert_enable,boolean,false,none,Determines whether to send an email notification to the group specified by the parameter 'high_email_group_id' when the state of the alert is set to HIGH.
  » high_email_group_id,integer,false,none,Defines the email group to which email notification are sent when the state of the alert changes to HIGH.
  » send_trap,boolean,false,none,Determines whether to send SNMP trap notifications when the state of the alert changes.
  » snmp_trap_version,integer,false,none,"Defines the SNMP trap version. Supported SNMP trap versions are 1, 2 or 3"
  » low_send_trap,boolean,false,none,Determines whether to send SNMP trap notifications when the state of the alert changes to LOW.
  » med_send_trap,boolean,false,none,Determines whether to send SNMP trap notification when the state of the alert changes to MEDIUM.
  » high_send_trap,boolean,false,none,Determines whether to send SNMP trap notification when the state of the alert changes to HIGH.
  » cleared_alert_enable,boolean,false,none,Determines whether to mute the notification for 'clear alert'.
  » execute_script,boolean,false,none,Determines whether to execute the provided script if the state of the alert changes to LOW/MEDIUM/HIGH.
  » execute_script_on_clear,boolean,false,none,Determines whether to execute the provided script if the state of the alert is cleared.
  » execute_script_on_pem_server,boolean,false,none,Determines whether to execute the provided script on the PEM host or the host where the agent is monitoring the object.
  » script_code,string,false,none,The shell or batch script to be executed. Please read the documentation for detailed information.
  » submit_to_nagios,boolean,false,none,Determines whether to send notification to the nagios when the state of the alert changes.
  » override_default_config,boolean,false,none,Determines whether to override the default webhook configuration.
  » send_notification,boolean,false,none,Determines whether to enable the webhook send notification.
  » low_webhook_ids,[integer],false,none,Webhook IDs for which low alerts are configured
  » med_webhook_ids,[integer],false,none,Webhook IDs for which medium alerts are configured
  » high_webhook_ids,[integer],false,none,Webhook IDs for which high alerts are configured
  » cleared_webhook_ids,[integer],false,none,Webhook IDs for which cleared alerts are configured

.. _enumerated-values-8:

Enumerated Values
'''''''''''''''''

.. csv-table::
  :header: Property,Value
  :widths: 25,25
  :align: left
  :class: longtable

  paramname,Exclude tables smaller than
  paramname,mount point
  paramname,Host IP Address
  paramname,Time interval to monitor
  paramname,Time since idle
  paramname,Per CPU utilization (K%)

..  Note::
   This operation does not require authentication

post\_\ *alert_config_server*\ {server_id}\ *database*\ {database_name}\ *schema*\ {schema_name}\ *function*\ {function_name}\ *args*\ {function_arguments}\_
-------------------------------------------------------------------------------------------------------------------------------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X POST https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/function/{function_name}/args/{function_arguments}/ \
     -H Content-Type: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Content-Type: application/json,
     X-Auth-Token: string
   }

   r = requests.post(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/function/{function_name}/args/{function_arguments}/, headers = headers)

   print(r.json())

.. code:: javascript

   const inputBody = {
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "all_alert_enable": true,
     "email_group_id": 1,
     "low_alert_enable": true,
     "low_email_group_id": 1,
     "med_alert_enable": true,
     "med_email_group_id": 1,
     "high_alert_enable": true,
     "high_email_group_id": 1,
     "send_trap": false,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "params": [],
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": false,
     "low_webhook_ids": [],
     "med_webhook_ids": [],
     "high_webhook_ids": [],
     "cleared_webhook_ids": []
   };
   const headers = {
     Content-Type:application/json,
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/function/{function_name}/args/{function_arguments}/,
   {
     method: POST,
     body: inputBody,
     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``POST /alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/function/{function_name}/args/{function_arguments}/``

Creates ``Alert`` for function level.

**Body parameter**

.. code:: json

   {
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "all_alert_enable": true,
     "email_group_id": 1,
     "low_alert_enable": true,
     "low_email_group_id": 1,
     "med_alert_enable": true,
     "med_email_group_id": 1,
     "high_alert_enable": true,
     "high_email_group_id": 1,
     "send_trap": false,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "params": [],
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": false,
     "low_webhook_ids": [],
     "med_webhook_ids": [],
     "high_webhook_ids": [],
     "cleared_webhook_ids": []
   }

.. _parameters-41:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  server_id,path,integer,true,Server ID
  database_name,path,string,true,Database name
  schema_name,path,string,true,Schema name
  function_name,path,string,true,Function name
  function_arguments,path,string,true,Comma-separated list of function arguments.
  X-Auth-Token,header,string,true,Token of authorization
  body,body,:ref:`AlertPayload<AlertPayload>` ,true,none

.. _detailed-descriptions-1:

Detailed descriptions
'''''''''''''''''''''

**function_arguments**: Comma-separated list of function arguments.

Note: Provide space if no function argument

**Example responses**

.. _responses-41:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Status 200,None

.. _response-schema-33:

Response Schema
^^^^^^^^^^^^^^^

..  Note::
   This operation does not require authentication

get\_\ *alert_config_server*\ {server_id}\ *database*\ {database_name}\ *schema*\ {schema_name}\ *function*\ {function_name}\ *args*\ {function_arguments}\_{alert_id}
----------------------------------------------------------------------------------------------------------------------------------------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X GET https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/function/{function_name}/args/{function_arguments}/{alert_id} \
     -H Accept: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Accept: application/json,
     X-Auth-Token: string
   }

   r = requests.get(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/function/{function_name}/args/{function_arguments}/{alert_id}, headers = headers)

   print(r.json())

.. code:: javascript


   const headers = {
     Accept:application/json,
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/function/{function_name}/args/{function_arguments}/{alert_id},
   {
     method: GET,

     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``GET /alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/function/{function_name}/args/{function_arguments}/{alert_id}``

Gets ``Alerts`` for function level by server_id, database_name,
schema_name, function_name, and alert_id.

.. _parameters-42:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  server_id,path,integer,true,Server ID
  database_name,path,string,true,Database name
  schema_name,path,string,true,Schema name
  function_name,path,string,true,Function name
  function_arguments,path,string,true,Comma-separated list of function arguments.
  alert_id,path,integer,true,Alert ID
  X-Auth-Token,header,string,true,Token of authorization

.. _detailed-descriptions-2:

Detailed descriptions
'''''''''''''''''''''

**function_arguments**: Comma-separated list of function arguments.

Note: Provide space if no function argument

**Example responses**

.. raw:: html

   <Details summary="200 Response">

.. code:: json

   {
     "id": 0,
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "auto_created": true,
     "template_id": "string",
     "params": [],
     "param_names": [
       "string"
     ],
     "param_types": "string",
     "params_units": [
       "string"
     ],
     "threshold_unit": "string",
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "send_email": true,
     "all_alert_enable": true,
     "email_group_id": 0,
     "low_alert_enable": true,
     "low_email_group_id": 0,
     "med_alert_enable": true,
     "med_email_group_id": 0,
     "high_alert_enable": true,
     "high_email_group_id": 0,
     "send_trap": true,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": true,
     "low_webhook_ids": [
       0
     ],
     "med_webhook_ids": [
       0
     ],
     "high_webhook_ids": [
       0
     ],
     "cleared_webhook_ids": [
       0
     ]
   }

.. raw:: html

   </Details>

.. _responses-42:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Successful response,:ref:`About alert threads<About alert threads>` 

..  Note::
   This operation does not require authentication

put\_\ *alert_config_server*\ {server_id}\ *database*\ {database_name}\ *schema*\ {schema_name}\ *function*\ {function_name}\ *args*\ {function_arguments}\_{alert_id}
----------------------------------------------------------------------------------------------------------------------------------------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X PUT https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/function/{function_name}/args/{function_arguments}/{alert_id} \
     -H Content-Type: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Content-Type: application/json,
     X-Auth-Token: string
   }

   r = requests.put(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/function/{function_name}/args/{function_arguments}/{alert_id}, headers = headers)

   print(r.json())

.. code:: javascript

   const inputBody = {
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "all_alert_enable": true,
     "email_group_id": 1,
     "low_alert_enable": true,
     "low_email_group_id": 1,
     "med_alert_enable": true,
     "med_email_group_id": 1,
     "high_alert_enable": true,
     "high_email_group_id": 1,
     "send_trap": false,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "params": [],
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": false,
     "low_webhook_ids": [],
     "med_webhook_ids": [],
     "high_webhook_ids": [],
     "cleared_webhook_ids": []
   };
   const headers = {
     Content-Type:application/json,
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/function/{function_name}/args/{function_arguments}/{alert_id},
   {
     method: PUT,
     body: inputBody,
     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``PUT /alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/function/{function_name}/args/{function_arguments}/{alert_id}``

Updates ``Alert`` for function level.

**Body parameter**

.. code:: json

   {
     "alert_name": "string",
     "alert_template": 0,
     "description": "string",
     "enabled": true,
     "history_retention": 0,
     "frequency_min": 0,
     "operator": "string",
     "low_threshold_value": 0,
     "medium_threshold_value": 0,
     "high_threshold_value": 0,
     "all_alert_enable": true,
     "email_group_id": 1,
     "low_alert_enable": true,
     "low_email_group_id": 1,
     "med_alert_enable": true,
     "med_email_group_id": 1,
     "high_alert_enable": true,
     "high_email_group_id": 1,
     "send_trap": false,
     "snmp_trap_version": 0,
     "low_send_trap": true,
     "med_send_trap": true,
     "high_send_trap": true,
     "cleared_alert_enable": true,
     "params": [],
     "execute_script": true,
     "execute_script_on_clear": true,
     "execute_script_on_pem_server": true,
     "script_code": "string",
     "submit_to_nagios": true,
     "override_default_config": true,
     "send_notification": false,
     "low_webhook_ids": [],
     "med_webhook_ids": [],
     "high_webhook_ids": [],
     "cleared_webhook_ids": []
   }

.. _parameters-43:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  server_id,path,integer,true,Server ID
  database_name,path,string,true,Database name
  schema_name,path,string,true,Schema name
  function_name,path,string,true,Function name
  function_arguments,path,string,true,Comma-separated list of function arguments.
  alert_id,path,integer,true,Alert ID
  X-Auth-Token,header,string,true,Token of authorization
  body,body,:ref:`AlertPayload<AlertPayload>` ,true,none

.. _detailed-descriptions-3:

Detailed descriptions
'''''''''''''''''''''

**function_arguments**: Comma-separated list of function arguments.

Note: Provide space if no function argument

**Example responses**

.. _responses-43:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Status 200,None

.. _response-schema-34:

Response Schema
^^^^^^^^^^^^^^^

..  Note::
   This operation does not require authentication

delete\_\ *alert_config_server*\ {server_id}\ *database*\ {database_name}\ *schema*\ {schema_name}\ *function*\ {function_name}\ *args*\ {function_arguments}\_{alert_id}
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X DELETE https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/function/{function_name}/args/{function_arguments}/{alert_id} \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     X-Auth-Token: string
   }

   r = requests.delete(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/function/{function_name}/args/{function_arguments}/{alert_id}, headers = headers)

   print(r.json())

.. code:: javascript


   const headers = {
     X-Auth-Token:string
   };

   fetch(https://PEM-SERVER-IP/api/v14/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/function/{function_name}/args/{function_arguments}/{alert_id},
   {
     method: DELETE,

     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``DELETE /alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/function/{function_name}/args/{function_arguments}/{alert_id}``

Deletes the ``Alert`` object.

.. _parameters-44:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 11,7,7,7,17
  :align: left
  :class: longtable

  server_id,path,integer,true,Server ID
  database_name,path,string,true,Database name
  schema_name,path,string,true,Schema name
  function_name,path,string,true,Function name
  function_arguments,path,string,true,Comma-separated list of function arguments.
  alert_id,path,integer,true,Alert ID
  X-Auth-Token,header,string,true,Token of authorization

.. _detailed-descriptions-4:

Detailed descriptions
'''''''''''''''''''''

**function_arguments**: Comma-separated list of function arguments.

Note: Provide space if no function argument

**Example responses**

.. _responses-44:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Successful deletion,None

.. _response-schema-35:

Response Schema
^^^^^^^^^^^^^^^

..  Note::
   This operation does not require authentication
