Open topic with navigation

# MI Listeners (Get MI Listeners)

## Description

Add an MI Listener or return a list of MI Listeners.

## URL

    /Admin/rest/v1/milisteners

## Remarks

The MI Listener data can be passed as XML containing the equivalent data.

To add an MI Listener, you need to send an HTTP request to create an MI Listener resource.

## HTTP Method

POST: Creates the MI Listener.

GET: Returns a list of MI Listeners.

## Request

Headers:

Content-Type: application/xml

Accept: application/xml

Cookies:

Version 2020 (or later) | LWSSO_COOKIE_KEY={LwssoCookie};
Versions earlier than 2020 | LWSSO_COOKIE_KEY={LwssoCookie};QCSession={QCSessionCookie};

Request Body:

GET: No request body.

POST: An XML describing the MI Listener.

The mandatory fields in the request are:

Element | Description
--- | ---
Name | The name of the MI Listener.
IP | The MI Listener IP.
Purposes | The purposes the MI Listener is used for: RunningVusers, Monitoring, Diagnostics.

Request Example - POST

    POST http://<LRE_Server>/Admin/rest/v1/milisteners
    Content-Type: application/xml
    Accept: application/xml
    Cookie: LWSSO_COOKIE_KEY={LwssoCookie};

    <MIListener>
         <Name>MIL_4</Name>
         <IP>123.123.123.321</IP>
         <Purposes>
           <Purpose>Monitoring</Purpose>
           <Purpose>RunningVusers</Purpose>
         </Purposes>
     </MIListener>

## Response

Headers:

Content-Type: application/xml

Cookies:

None

HTML Return Code:

One of the HTTP Return Codes

Upon successful deletion, returns HTTP status 201 (Created).

HTML Body:

GET: Returns the data on the entity in the response. See MI Listeners response.

POST: Returns XML of the MI Listener.

Response Example - POST

    <MIListener>
         <Name>MIL_4</Name>
         <IP>123.123.123.321</IP>
         <Purposes>
           <Purpose>Monitoring</Purpose>
           <Purpose>RunningVusers</Purpose>
         </Purposes>
         <ID>1004</ID>
     </MIListener>

## See Also

MI Listeners/{milistenersID}
Get MI Listeners by Query