Get MI Listeners by ID

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

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

Remarks

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

This API should be authorized for the Application, Tenant, and Site Admin permission levels.

HTTP method

  • GET: Returns the MI Listener information.

  • PATCH: Updates the MI Listener.

  • DELETE: Deletes the MI Listener.

Request

Headers:

One of the following:

  • Content-Type: application/xml

  • Content-Type: application/json

Cookies:

VersionCookie
2023, 24.1, and later

ADM_LWSSO={ADM_LWSSO_COOKIE_VALUE};

2022 - 2022 R2

ADM_LWSSO={ADM_LWSSO_COOKIE_VALUE};

ASP.NET_SessionId_Adm={ASP.NET_SessionId_Adm_COOKIE_VALUE};

LWSSO_COOKIE_KEY={LWSSO_COOKIE_KEY_COOKIE_VALUE};

2021 - 2021 R2

ADM_LWSSO={ADM_LWSSO_COOKIE_VALUE};

ASP.NET_SessionId_Adm={ASP.NET_SessionId_Adm_COOKIE_VALUE};

2020 - 2020 SP3

ADM_LWSSO={ADM_LWSSO_COOKIE_VALUE};

Earlier than 2020

LWSSO_COOKIE_KEY={LWSSO_COOKIE_KEY_COOKIE_VALUE};

QCSession={QC_SESSION_COOKIE_VALUE};

Request body:

  • GET, DELETE: No request body.

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

Request examples:

Copy code
XML example - GET:
GET http://<LRE_Server>/Admin/rest/v1/milisteners/1000
Content-Type: application/xml
Accept: application/xml
Cookie: ADM_LWSSO={AdmLwssoCookie};
Copy code
XML example - PATCH:
PATCH http://<LRE_Server>/Admin/rest/v1/milisteners/1000
Content-Type: application/xml
Accept: application/xml
Cookie: ADM_LWSSO={AdmLwssoCookie};

<MIListener> 
     <Name>MIL_3</Name>
     <IP>123.123.123.321</IP>  
     <Purposes> 
       <Purpose>Monitoring</Purpose>
     </Purposes> 
 </MIListener> 
Copy code
JSON example - PATCH:
PATCH http://<LRE_Server>/Admin/rest/v1/milisteners/1000
Content-Type: application/json
Accept: application/json
Cookie: ADM_LWSSO={AdmLwssoCookie};

{
        "Name": "MIL_455555_updated",
        "IP": "123.0.0.1",
        "Purposes": [
                "Monitoring",
                "RunningVusers"
            ]
}

Response

Headers:

One of:

  • Accept: application/xml

  • Accept: application/json

Cookies:

None

HTML return code:

One of the HTTP return codes

Upon successful deletion, returns HTTP status 200 (OK).

HTML body:

  • DELETE, PATCH: No body returned.

  • GET: Returns the data on the entity in the response.

    The response contains the following fields.

    FieldTypeDescription
    IDIntegerThe ID of the MI Listener.
    IPStringThe IP address of the MI Listener.
    NameStringThe name of the MI Listener.
    CommentsString 
    PurposesList 
    Purpose 

    Diagnostics

    Monitoring

    RunningVusers

Response examples:

Copy code
XML example:
<MIListener>
    <ID>1053</ID>
    <Name>MIL_3</Name>
    <IP>123.123.123.321</IP>
    <Purposes>
        <Purpose>Monitoring</Purpose>
    </Purposes>
</MIListener>
Copy code
JSON example:
{
    "ID": 1053,
    "Name": "MIL_3",
    "IP": "123.123.123.321",
    "Purposes": [
        "Monitoring"
    ],
    "Comments": null
}

See also: