The clusterAddServer Web API Method

Add a new server to the cluster. On a Zend Server Cluster Manager with no valid license, this operation fails.

Version: 1.0

Required Permissions: full

HTTP method: POST

Supported by Editions: Zend Server

Request Parameters:

Parameter

 Type

Required

Description

serverName

String

Yes

The server name.

serverIp

String

Yes

The server IP.

Expected Response Code:

  • 200 OK - The operation was successful.
  • 202 Accepted - The server was added successfully, but setting propagation failed. (This can only happen if propagateSettings was set to "TRUE".)

Response Type:serverInfo with information about the added server.

Possible Action Specific Error Codes:

HTTP Code

 Error Code

Description

500

cantConnectToServer

Zend Server is unable to connect to the specified server URL.

500

invalidServerResponse

An invalid or unexpected response from a new server.

400

wrongPassword

The provided GUI password is incorrect.

400

alreadyConnected

The server is already a member of a cluster (not necessarily the current cluster).

503

temporarilyLocked

The server cannot be added because a cluster member is in graceful startup/shutdown mode.

500

noActiveServers

The server cannot be added because all servers in the cluster are disabled or unreachable.

500

serverNotLicensed

Zend Server is not licensed.

405

notImplementedByEdition

This method is only available on Professional and Enterprise editions.

Example

Usage Example

Request (headers removed for clarity)

POST /ZendServer/Api/clusterAddServer
serverName=www-05&serverIp=10.9.7.201

Response

<?xml version="1.0" encoding="UTF-8"?>
<zendServerAPIResponse xmlns="http://www.zend.com/server/api/1.0">
	<requestData>
		<apiKeyName>angel.eyes</apiKeyName>
		<method>clusterAddServer</method>
	</requestData>
	<responseData>
		<serverInfo>
			<id>25</id>
			<name>www-05</name>
			<address>10.9.7.201</address>
			<status>OK</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.