Web API Reference Guide > Available API Methods > Virtual Hosts Methods > The vhostGetStatus Method

The vhostGetStatus Method

Get the list of virtual hosts currently used by the web server and information about each virtual host. If vhost names are specified, will return information about the specific virtual host. If no names are specified, will return details about all virtual hosts.

Version: 1.6

Required Permissions: Read-only

HTTP method: GET

Supported by Editions: Zend Server

Request Parameters:

Parameter

 Type

Required

Description

vhosts

Array

No

List of virtual host IDs. If specified, details will be returned about these virtual hosts only. If not specified, details about all virtual hosts will be returned.

limit

Integer

No

The number of rows to retrieve. Default lists all vhosts up to an arbitrary limit set by the system

offset

Integer

No

A paging offset to begin the vhost list from. Default is 0

order

String

No

Column identifier for sorting the result set (id, name, port, last_updated, owner). Default is name

direction

String

No

Sorting direction: ASC or DESC. Default is ASC

filters Array No

Add filter parameters in an ad-hoc manner. These filters will be added to the predefined filter that was passed.

This parameter is an array with a predefined set of parameters that accept strings or arrays to hold multiple values:

  • ssl: array, a list of ssl support (ssl_enabled, ssl_disabled)
  • type: array, a list of vhost type (system_defined, zs_defined)
  • deployment: array, a list of deployment status (deployment_enabled, deployment_disabled)
  • freeText: string

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

Response Type: vhostList

Possible Action Specific Error Codes: This action has no specific error codes

Example

Usage Example

Request

GET /ZendServer/Api/vhostGetStatus?vhosts[]=1&vhosts[]=2

Response

<?xml version="1.0" encoding="UTF-8"?>

<zendServerAPIResponse xmlns="http://www.zend.com/server/api/1.6">

<requestData>

<apiKeyName>angel.eyes</apiKeyName>

<method>vhostGetStatus</method>

</requestData>

<responseData>

<vhostList>

<vhostInfo>

<id>1</id>

<name>foo</name>

<port>80</port>

<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>

...

</vhostList>

</responseData>

</zendServerAPIResponse>

 

Read Also

  Available API Methods    
  Virtual Hosts Methods