Web API Reference Guide > Available API Methods > Server and Cluster Management Methods > The clusterAddServer Method

The clusterAddServer 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:

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>

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.

 

Read Also

  Available API Methods    
  Server and Cluster Management Methods