Add a host

Description

Adds a host or returns a list of hosts.

URL

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

Remarks

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

To add a host to LAB_PROJECT, you need to send an HTTP request to create a Host resource. The host will be added as a private host. The host is added to the pool assigned to the project used in the request URL (the part being sent in the domainName and projectName fields).

HTTP Method

POST: Creates the host.

GET: Returns a list of hosts.

Request

Headers:

Content-Type: application/xml

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.

POST: An XML describing the host. See hosts XML.

Response

Headers:

Content-Type: application/xml

Cookies:

None

HTML Return Code:

One of the HTTP Return Codes

Upon successful deletion, returns HTTP status 201 (Created).

HTML Body:

The data on the entity in the response. See hosts XML.

The Location contains the link to the newly created entity.

See Also

Get or delete a host by ID
Get Hosts List by Query