Get or delete a host by ID

Description

Gets or deletes a host by the specified hostID.

  • 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 a host ) 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.
  • To delete a host, an HTTP request should be sent to the URL below. Note that only private hosts can be deleted (hosts that were added from the REST API or from the LRE Application).

URL

Copy code
/LoadTest/rest/domains/{domainName}/projects/{projectName}/hosts/{hostID}

HTTP Method

GET: Returns the host information.

DELETE: Deletes the host.

Request

Headers:

One of the following:

  • Content-Type: application/xml

  • Content-Type: application/json

Cookies:

Version 2020 (or later)

LWSSO_COOKIE_KEY={LwssoCookie};

Versions earlier than 2020

LWSSO_COOKIE_KEY={LwssoCookie};QCSession={QCSessionCookie};

Request Body:

GET: No request body.

DELETE: No request body.

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:

GET: Returns the data on the entity in the response. The fields in the response are:

ElementDescription
LabHostThe top-level element.
NameThe host name.
InstallationThe installation type:
  • Unix
  • WindowsHost
  • WindowsStandaloneLG

HostPurposesCan contain HostPurpose sub elements with any combination of the following:
  • Controller
  • LoadGenerator
  • DataProcessor

StatusThe status can be:
  • Operational
  • NonOperational
  • Unavailable
Location(Optional) A valid location name defined in LAB_PPROJECT. If not provided, the default location is used.
MIListener

Optional when the location is not defined as over a firewall (OFW).

When the location is an OFW location, the value should be the name of a valid MIListener that is defined in LAB_PPROJECT.

Attributes

Can contain Attribute sub elements in order to set Host properties values.

Attribute

Attribute value should contain Host Properties values as defined in LAB_PROJECT under Project Customization > Project Lists > Host Properties.

You can specify multiple Attribute elements using either the default host attributes (as in the example below) or any custom attribute defined by the user.

PriorityA numeric value between 1 and 9.
SslEnabled

One of:

  • true
  • false
Enable IPv6

One of:

  • true
  • false
IDThe host ID.

DELETE: No body returned.

See Also

Add a host