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

The vhostValidateTemplate Method

Validate the structure and syntax of a virtual host template.

Version: 1.6

Required Permissions: Read-only

HTTP method: POST

Supported by Editions: Zend Server

Request Parameters:

Parameter

 Type

Required

Description

name

String

Yes

Virtual hostname to use in template

port

Integer

Yes

Virtual host listen port to be used in template

template

String

Yes

Template text to be validated

sslEnabled

Boolean

No

Indicates if the provided template to be used an SSL template

sslCertificatePath

String

No

Full filepath to the ssl certificate file

sslCertificateKeyPath

String

No

Full filepath to the ssl key file

sslChainPath

String

No

Full filepath to the chain file

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

Response Type: Validation

Success Codes (literal):

Failure: indicates syntax validation was executed and the template failed. A detailed message will be provided in the message field.

Success: syntax validation passed successfully.

Warning: syntax validation could not be executed.

Example

Usage Example

Request

POST /ZendServerManager/Api/vhostValidateTemplate?template=....

Response

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

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

<requestData>

<apiKeyName>angel.eyes</apiKeyName>

<method>vhostValidateTemplate</method>

</requestData>

<responseData>

<validation>

<success>failure</success>

<message><![CDATA[Template failed <error> ...]]></message>

<data><![CDATA[error]]></data>

</validation>

</responseData>

</zendServerAPIResponse>

 

Read Also

  Available API Methods    
  Virtual Hosts Methods