WebAPI Reference Guide > Available API Methods > Server and Cluster Management Methods > The clusterReconfigureServer Method

The clusterReconfigureServer Method

Re-configure a cluster member to match the cluster's profile. This operation will fail on a Zend Server with no valid license.

Version: 1.0

Required Permissions: full

HTTP method: POST

Supported by Editions: Zend Server

Request Parameters:

Parameter

 Type

Required

Description

serverId

String

Yes

The server ID.

doRestart

Boolean

No

Specify if the re-configured server should be restarted after the re-configure action. The default is FALSE.

Expected Response Code:

Response Type: serverInfo with the status of the server which is being re-configured. The status is expected to be either:

Possible Action Specific Error Codes:

HTTP Code

 Error Code

Description

404

noSuchServer

There is no server with the provided server ID.

500

cantConnectToServer

Zend Server is unable to connect to the specified server.

500

invalidServerResponse

An invalid or unexpected response from the server.

503

temporarilyLocked

The server cannot be re-configured because it is currently in the middle of another operation (e.g. being disabled).

405

notImplementedByEdition

The method cannot executed by this edition of Zend Server.

500

serverNotLicensed

Zend Server does not have a valid license.

500

restartFailed

Restarting the server failed.

Example

Usage Example

Request (headers removed for clarity)

POST /ZendServerManager/Api/clusterReconfigureServer

serverID=5

Response

HTTP/1.0 200 OK

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

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

<requestData>

<apiKeyName>angel.eyes</apiKeyName>

<method>clusterReconfigureServer</method>

</requestData>

<responseData>

<serverInfo>

<id>5</id>

<name>www-02</name>

<address>www-02.local</address>

<status>pendingRestart</status>

<messageList />

</serverInfo>

</responseData>

</zendServerAPIResponse>

Important Note:

For Zend Server on Mac or Linux, this action is also available via the command line using CLI Tools. For more information see CLI Tools.

 

 

Related Links

Related Links:

Server and Cluster Management Methods

 

 

 

© 1999-2013 Zend Technologies, Ltd. All rights reserved.