StarterTemplate ASP.NET Host

<back to all web services

RequestHostByNameV2

TestHost Service

The following routes are available for this service:
GET/service/automation/v2/hostsReturns a test host by its nameThe authenticating user must have Read access to Test Hosts. The specified test host must exist.
Parameters:
NameParameterData TypeRequiredDescription
NamequerystringYesThe host computer name
DeptIdqueryintNoThe ID of the department that includes the host

To override the Content-type in your clients HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /xml/reply/RequestHostByNameV2 HTTP/1.1 
Host: rest.qacomplete.smartbear.com 
Content-Type: application/xml
Content-Length: length

<RequestHostByNameV2 xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SwpStack.AutomationService.DTO.V2.TestHost">
  <DeptId xmlns="http://schemas.datacontract.org/2004/07/SwpStack.AutomationService.DTO.Common.TestHost">0</DeptId>
  <Name xmlns="http://schemas.datacontract.org/2004/07/SwpStack.AutomationService.DTO.Common.TestHost">String</Name>
</RequestHostByNameV2>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ResponseSingleHost xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SwpStack.AutomationService.DTO.Common.TestHost">
  <AgentVersion>String</AgentVersion>
  <Agents xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </Agents>
  <HostConfiguration>String</HostConfiguration>
  <HostName>String</HostName>
  <Id>0</Id>
  <IsActive>false</IsActive>
  <OS>String</OS>
  <SecurityToken>String</SecurityToken>
</ResponseSingleHost>