The configurationValidateDirectives Web API Method

Validate and list directives and their corresponding values. Directives are validated according to their type and a predefined validation scheme. This action does not make any configuration changes.

Version: 1.3

Required Permissions: Read-only

HTTP method: GET

Supported by Editions: All

Request Parameters:

Directives and their values are passed as HTTP parameters in the “directives” namespace, directly into the query part of the Request

Parameter

 Type

Required

Description

directives

Array

Yes

Associative array of directive names and values to be validated

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

Response Type: A list of directives and their current values, not the values that were validated

Possible Action Specific Error Codes:

HTTP Code

 Error Code

Description

400

InvalidParameter

A directive’s value failed validation. A list of messages describing the failure will be part of the error message.

500

internalServerError

The system could not retrieve the requested extensions’ information, possibly due to a database error.

404

noSuchDirective

A directive sent for validation was not found and cannot be validated

Example

Usage Example

Request

GET /ZendServer/Api/configurationValidateDirectives?directives[directive_name]=directive_value&directives[directive_name2]=directive_value

Response

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

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

<requestData>

<apiKeyName>angel.eyes</apiKeyName>

<method>configurationValidateDirectives</method>

</requestData>

<responseData>

<validates>

<validate>

<name>directive_name</name>

<valid>No</valid>

<messageList>

<error><![CDATA[Not a valid directive value]]></error>

</messageList>

</validate>

<validate>

<name>directive_name2</name>

<valid>Yes</valid>

<messageList>

</messageList>

</validate>

</validates>

</responseData>

</zendServerAPIResponse>