The vhostGetDetails Web API Method

Get the list of virtual hosts currently used by the web server and full information about each virtual host.

Version: 1.6

Required Permissions: Read-only

HTTP method: GET

Supported by Editions: Zend Server

Request Parameters:

Parameter

 Type

Required

Description

vhost

Integer

Yes

The ID of a single virtual host.

Expected Response Code: 200 OK  - For more information see Response Format.

Response Type: vhostDetails

Possible Action Specific Error Codes:

HTTP Code

 Error Code

Description

404

noSuchVhost

One or more of the requested virtual hosts does not exist.

Example

Usage Example

Request

GET  /ZendServer/Api/vhostGetDetails?vhost=1

Response

<?xml version="1.0" encoding="UTF-8"?>
<zendServerAPIResponse xmlns="http://www.zend.com/server/api/1.6">
	<requestData>
		<apiKeyName>angel.eyes</apiKeyName>
		<method>vhostGetDetails</method>
	</requestData>
	<responseData>
		<vhostDetails>
			<vhostInfo>
				<id>1</id>
				<name>foo</name>
				<port>80</port>
				<fullName>foo:80</fullName>
				<status>Ok</status>
				<default>true</default>
				<zendDefined>true</zendDefined>
				<zendManaged>true</zendManaged>
				<ssl>false</ssl>
				<created>1970-01-01T02:00:00+02:00</created>
				<lastUpdated>1970-01-01T02:00:00+02:00</lastUpdated>
				<createdTimestamp>1367237856</createdimestamp>
				<lastUpdatedTimestamp>1367237856</lastUpdatedTimestamp>	
				<servers>
					<vhostServer>
						<id>1</id>
						<status>Ok</status>
						<lastMessage><![CDATA[]]></lastMessage>
					</vhostServer>
					...
				</servers>
			</vhostInfo>
			<vhostExtended>
				<template><![CDATA[...]]></template>
				<docRoot><![CDATA[...]]></docRoot>
				<sslCertificatePath><![CDATA[...]]></sslCertificatePath>
				<sslCertificateKeyPath><![CDATA[...]]></sslCertificateKeyPath>
				<sslCertificateChainPath><![CDATA[...]]></sslCertificateChainPath>	
				<sslAppName><![CDATA[...]]></sslAppName>
				<vhostApplications>
					<vhostApplication>
						<appllicationId>1</applicationId>
						<applicationName>app1</applicationName>
					</vhostApplication>
					<vhostApplication>
						<applicationId>2</applicationId>
						<applicationName>app2</applicationName>
					</vhostApplication>
				</vhostApplications>
			</vhostExtended>
		</vhostDetails>
	</responseData>
</zendServerAPIResponse>