Open topic with navigation

# MI Listeners/{milistenersID}

## Description

Returns, updates, or deletes an MI Listener (per the specified MI Listener ID).

- To get MI Listener information, an HTTP request should be sent to the URL returned in the Location header of the response of the MI Listener entity creation (see Manage MI Listeners) or the URL can be composed by concatenating the returned milistenerID to the URL that was used for the MI Listener creation. For existing MI Listeners in LAB_MANAGEMENT project, you can concatenate the value in the “MI Listener ID” field to the URL that was used for the MI Listener creation.
- To delete an MI Listener, an HTTP request should be sent to the URL below.

## URL

    /Admin/rest/v1/milisteners/{milistenersID}

## Remarks

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

## HTTP Method

GET: Returns the MI Listener information.

PATCH: Updates the MI Listener.

DELETE: Deletes the MI Listener.

## 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, DELETE: No request body.

PATCH: An XML describing the data to be updated in the MI Listener.

An XML describing the MI Listener.

Request Example - GET

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

Request Example - PATCH

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

    <MIListener>
         <Name>MIL_3</Name>
         <IP>123.123.123.321</IP>
         <Purposes>
           <Purpose>Monitoring</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 200 (OK).

HTML Body:

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

DELETE, PATCH: No body returned.

## See Also

MI Listeners (Get MI Listeners)
Get MI Listeners by Query