Share this page

# Return, delete, reconfigure, or update a host by ID

## Description

Returns, deletes, reconfigures, or updates a host (per the specified host ID).

To get host information, an HTTP request should be sent to the URL returned in the Location header of the response of the Host entity creation (see Add hosts and return list of hosts) or the URL can be composed by concatenating the returned Host ID to the URL that was used for the Host creation. For existing hosts in LAB_MANAGEMENT project, you can concatenate the value in the “Host ID” field to the URL that was used for the Host creation.

## URL

Copy code

    /Admin/rest/v1/hosts/{hostID}

## Remarks

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

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

## HTTP method

- GET: Returns the host information.

- POST: Reconfigures the host.

- PATCH: Updates the host.

- DELETE: Deletes the host.

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

- GET, POST, DELETE: No request body.

- PATCH: An XML describing the host property to be updated in the host.

Request examples:

Copy code
XML example - GET:

    GET http://<LRE_Server>/Admin/rest/v1/hosts/1402
    Content-Type: application/xml
    Accept: application/xml
    Cookie: ADM_LWSSO={AdmLwssoCookie};

Copy code
XML example - POST:

    POST http://<LRE_Server>/Admin/rest/v1/hosts/1001/reconfigure
    Content-Type: application/xml
    Accept: application/xml
    Cookie: ADM_LWSSO={AdmLwssoCookie};

Copy code
XML example - PATCH:

    PATCH http://<LRE_Server>/Admin/rest/v1/hosts/1029
    Content-Type: application/xml
    Accept: application/xml
    Cookie: ADM_LWSSO={AdmLwssoCookie};

    <LabHost>
      <Pools>
        <PoolID>1000</PoolID>
        <PoolID>1001</PoolID>
      </Pools>
    </LabHost>

## Response

Headers:

None

Cookies:

None

HTML return code:

One of the HTTP return codes.

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

HTML body:

- GET, POST: Returns the data on the entity in the response. See Hosts response.

- DELETE, PATCH: No body returned.

See also:

- Add hosts and return list of hosts
- Get hosts list by query

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)