Open topic with navigation

# Get Host Pool List by Query

## Description

Returns a list of host pools by query (filter).

## URL

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

## Host Pool Query Values

QUERY_NAME options

-     Name

-     ID

## Remarks

The host pool data can be passed as XML containing the equivalent data.

## HTTP Method

GET: Returns a list of host pools 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

Request Example for pools with names that start with letter ‘T’

    GET http://<LRE_Server>/Admin/rest/v1/pools?query={Name[T*]}
    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 host pool response.

Response Example

    <HostPools>
       <HostPool>
        <Name>TestPool<Name>
         <Description>Some description</Description>
         <ID>1001<ID>
       </HostPool>
       <HostPool>
        <Name>TestPool2</Name>
         <Description>Some description</Description>
         <Hosts>
           <HostID>1026</HostID>
           <HostID>1029</HostID>
         </Hosts>
         <ID>1002<ID>
       </HostPool>
       <HostPool>
        <Name>TestPool4</Name>
         <Description>Some description</Description>
         <ID>1003<ID>
       </HostPool>
    </HostPools>

## See Also

host pools
host pools/{poolID}