Share this page

# Get hosts list by query

## Description

Returns a list of hosts by query (filter).

## URL

Copy code

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

## Remarks

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

## Hosts query values

QUERY_NAME options:

-     Name

-     ID

-     Installation

- `HostPurposes` The available host purposes are Controller, Load Generator, and Data Processor.

-     Status

-     Attributes

-     Priority

-     SslEnabled

-     Enable IPv6 (Available in versions: 24.3 and later)

Note: To get hosts that have a specific purpose, but may have other purposes as well, you must surround the value with asterisks (*). For example:

`{HostPurposes['*Controller*']}`

## Remarks

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

## HTTP method

GET: Returns a list of hosts by query.

## Request

Headers:

- Content-Type: application/xml

- Accept: application/xml

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

Copy code

    GET http://<LRE_Server>/Admin/rest/v1/Hosts?query={name["host name"]}
    Content-Type: application/xml
    Accept: application/xml
    Cookie: ADM_LWSSO={AdmLwssoCookie};

## 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 Hosts response.

See also:

- Add hosts and return list of hosts
- Return, delete, reconfigure, or update a host 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)