Alerts Status
=============

get\_\ *alert_status*
---------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X GET https://PEM-SERVER-IP/api/v14/alert/status/ \
     -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/status/, headers = headers)

   print(r.json())

.. code:: javascript


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

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

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

``GET /alert/status/``

Gets the current status of all the alerts.

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

   [
     {
       "alert_since": "string",
       "alert_id": 0,
       "alert_name": "string",
       "alert_state": "High",
       "value": "string",
       "object_description": "string",
       "server_id": 0,
       "agent_id": 0,
       "database": "string",
       "schema": "string",
       "package": "string",
       "object": "string",
       "alert_target_level": "Global",
       "last_processed": "string",
       "info": "string",
       "info_cols": [
         "string"
       ],
       "info_vals": [
         [
           "string"
         ]
       ]
     }
   ]

.. 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 <Alerts>` ],false,none,none
  » alert_since,string,false,none,Unix time when alert state last changed
  » alert_id,integer,false,none,Alert internal identification number
  » alert_name,string,false,none,Name of the alert
  » alert_state,string,false,none,Current state of the alert. A 'null' value suggests alert threshold values have not currently been violated for the alert.
  » value,string,false,none,Current value of the alert
  » object_description,string,false,none,Monitoring object description/name
  » server_id,integer,false,none,null or ID of the server
  » agent_id,integer,false,none,null or ID of the agent
  » database,string,false,none,null or name of the database
  » schema,string,false,none,null or name of the schema/namespace
  » package,string,false,none,null or name of the EDB package
  » object,string,false,none,null or name of any other type of object
  » alert_target_level,string,false,none,Alert target level
  » last_processed,string,false,none,String reprenting Unix time when the alert was processed
  » info,string,false,none,Some information at the time when the alert was generated
  » info_cols,[string],false,none,Array of column names for the information
  » info_vals,[array],false,none,Detailed information associated with the alert in the form of a table (an array of an array)

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

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

  alert_state,High
  alert_state,Medium
  alert_state,Low
  alert_target_level,Global
  alert_target_level,Agent
  alert_target_level,Server
  alert_target_level,Database
  alert_target_level,Schema
  alert_target_level,Table
  alert_target_level,Index
  alert_target_level,Sequence
  alert_target_level,Function
  alert_target_level,View

..  Note::
   This operation does not require authentication

get\_\ *alert_status*\ {since}
------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X GET https://PEM-SERVER-IP/api/v14/alert/status/{since} \
     -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/status/{since}, headers = headers)

   print(r.json())

.. code:: javascript


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

   fetch(https://PEM-SERVER-IP/api/v14/alert/status/{since},
   {
     method: GET,

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

``GET /alert/status/{since}``

Gets the list of alert state changes after the given time.

.. _parameters-1:

Parameters
^^^^^^^^^^

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

  since,path,number,true,Unix timeline
  X-Auth-Token,header,string,true,Token of authorization

**Example responses**

.. raw:: html

   <Details summary="200 Response">

.. code:: json

   {
     "alert_since": "string",
     "alert_id": 0,
     "alert_name": "string",
     "alert_state": "High",
     "value": "string",
     "object_description": "string",
     "server_id": 0,
     "agent_id": 0,
     "database": "string",
     "schema": "string",
     "package": "string",
     "object": "string",
     "alert_target_level": "Global",
     "last_processed": "string",
     "info": "string",
     "info_cols": [
       "string"
     ],
     "info_vals": [
       [
         "string"
       ]
     ]
   }

.. raw:: html

   </Details>

.. _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>` ,Successful response,:ref:`AlertStatus<AlertStatus>` 

..  Note::
   This operation does not require authentication
