The clusterReconfigureServer Web API 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:

  • 200 OK - The server was re-configured successfully.
  • 202 Accepted - The server was re-configured successfully and is now in the process of being restarted.

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

  • OK - If the server was restarted successfully, or if a restart was not needed.  
  • pendingRestart - If the server was re-configured but not restarted (and doRestart was FALSE).
  • restarting - If the server was re-configured and is in the process of restarting.

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 /ZendServer/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 />
			<debugModeEnabled>true</debugModeEnabled>
		</serverInfo>
	</responseData>
</zendServerAPIResponse>
For Zend Server on Linux, this action is also available via the command line using CLI tools. For more information, see ZendServerSDK.