GET/hosts/{HostId}

Applies to QAComplete 12.84 SaaS, last modified on July 19, 2021

Returns a test host by ID.

An agent can retrieve information about its host that is shown on the Test Management > Test Hosts tab in QAComplete. The host information includes:

  • the host ID and computer name,

  • the operating system name and version,

  • hardware and software configuration,

  • installed agents (automated test runners),

  • whether the host is active (that is, can be used for test runs).

Authentication

Basic authentication using the host ID and security token. See Authentication for details.

Request Format

To get information about the current test host, send a GET request to the following URL ending with the integer host ID:

http://{server}/rest-api/service/automation/v2/{HostId}

A sample request:

GET http://yourserver.com/rest-api/service/automation/v2/hosts/143 HTTP/1.1
Host: yourserver.com
Connection: keep-alive
Accept: application/json
Authorization: Basic am9obkBleGFtcGxlLmNvbTpwQHNzd29yZA==

A sample request made by using cURL:

curl -u &id-token; http://yourserver.com/rest-api/service/automation/v2/hosts/143

Response Format

On success, the operation responds with HTTP status code 200 and returns a JSON object with the host information.

If the operation fails, it returns the appropriate status code and (optionally) the error description in the response body.

A sample response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 443



{
  "id": 143,
  "host_name": "RACK11-W7X64",
  "host_configuration": "x64, net45, firefox, chrome, flash",
  "agents": [
    "TestComplete/TestExecute",
    "JUnit (Selenium)",
    "NUnit (Selenium)",
    "TestNG (Selenium)",
    "ReadyAPI / SoapUI OS"
  ],
  "os": "Windows 7 Ultimate 64-bit SP1",
  "is_active": true,
  "security_token": "d2e1ffd1-3c74-4ccf-738b-10997283e35f",
  "agent_version": "2.10.1607"
}

See Also

QAComplete Test Automation REST API Reference

Highlight search results