Web API Reference Guide > Available API Methods > Configuration Management Methods > The configurationStoreDirectives Method

The configurationStoreDirectives Method

Validate and store a list of directives and their corresponding values in the server’s configuration. Directives are validated according to their type and a predefined validation scheme.

Version: 1.3

Required Permissions: Full

HTTP method: POST

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

The directives to store.

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.

Example

Usage Example

Request

POST /ZendServerManager/Api/configurationStoreDirectives

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>configurationStoreDirectives</method>

</requestData>

<responseData>

<directives>

<directive>

<name>directive_name</name>

<extension>extension_name</extension>

<section>server</section>

<type>string</type>

<fileValue><![CDATA[directive value]]></fileValue>

<defaultValue><![CDATA[directive default value]]><</defaultValue>

<previousValue></previousValue>

<description>...</description>

<type>int</type>

<units>digits</units>

<listValues></listValues>

</directive>

<directive>

<name>directive_name2</name>

<extension>extension_name</extension>

<section>server</section>

<type>string</type>

<fileValue><![CDATA[directive value]]></fileValue>

<defaultValue><![CDATA[directive default value]]><</defaultValue>

<previousValue></previousValue>

<description>...</description>

<type>int</type>

<units>digits</units>

<listValues></listValues>

</directive>

</directives>

</responseData>

</zendServerAPIResponse>

 

Read Also

  Available API Methods    
  Configuration Management Methods