Share this page

# Get host pool list by query

## Description

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

## URL

Copy code

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

## Remarks

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

## Host Pool query values

QUERY_NAME options:

-     Name

-     ID

## HTTP method

GET: Returns a list of host pools by query.

## Request

Headers:

One of the following:

- Content-Type: application/xml

- Content-Type: application/json

Cookies:

Version | Cookie
--- | ---
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:

None

Request examples:

Copy code
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: ADM_LWSSO={AdmLwssoCookie};

Copy code
Pools with a specific ID:

    GET http://<LRE_Server>/Admin/rest/v1/pools?query={ID[1102]}
    Content-Type: application/xml
    Accept: application/xml
    Cookie: ADM_LWSSO={AdmLwssoCookie};

Copy code
Pools with a specific name:

    GET http://<LRE_Server>/Admin/rest/v1/pools?query={Name[Test_Pool]}
    Content-Type: application/xml
    Accept: application/xml
    Cookie: ADM_LWSSO={AdmLwssoCookie};

## Response

Headers:

One of:

- Accept: application/xml

- Accept: application/json

Cookies:

None

HTML return code:

One of the HTTP return codes.

HTML body:

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

The response contains the following fields.

Element | Description
--- | ---
HostPools | The top-level element. Contains HostPool sub elements with the elements listed below.
Name | The name of the host pool.
Description | An optional description of the host pool.
Hosts | Can contain HostID sub elements which lists the ID of the hosts assigned to the pool.
ID | The ID of the host pool.

Response examples:

Copy code
XML 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>

Copy code
JSON example:

    [
        {
            "ID": 1100,
            "Name": "Radu_Pool",
            "Description": "",
            "Hosts": null
        }
    ]

See also:

- Host pools
- Return, update, or delete a host pool by ID

Tips to improve your search results... OpenText™ Enterprise Performance Engineering Admin API Reference OpenText™ Enterprise Performance Engineering All View Local Help Center View Online Help Center(Undefined variable: _rscC_Basic_Variables.VersionLabel)