Open topic with navigation

# Get MI Listeners by Query

## Description

Returns a list of MI Listeners by query (filter).

## URL

    /Admin/rest/v1/milisteners?query={<QUERY_NAME>["<YOUR_QUERY_VALUE>"]}

## MI Listener Query Values

QUERY_NAME options

-     Purpose

-     ID

-     Name

-     IP

## Remarks

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

## HTTP Method

GET: Returns a list of MI listeners by query.

## 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:

None

Example of a request that retrieves ID and Name of an MI Listener that has "Diagnostics" purpose:

    GET http://<LRE_Server>/Admin/rest/v1/milisteners?fields=ID,Name&query={Purpose[Diagnostics]}
    Content-Type: application/xml
    Accept: application/xml
    Cookie: LWSSO_COOKIE_KEY={LwssoCookie};

## Response

Headers:

Content-Type: application/xml

Cookies:

None

HTML Return Code:

One of the HTTP Return Codes.

HTML Body:

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

Response Example

    </MIListeners>
       <MIListener>
          <Name>MIL_3</Name>
          <ID>1003</ID>
        </MIListener>
    </MIListeners>

## See Also

MI Listeners (Get MI Listeners)
MI Listeners/{milistenersID}