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

The changeServerNameById Method

Replace the current server name with a new one. This change is purely cosmetic - the server’s name does not influence any aspect of its accessibility or functionality.

Version: 1.3

Required Permissions: full

HTTP method: POST

Request Parameters:

Parameter

 Type

Required

Description

serverName

String

Yes

Server name

serverId

Integer

Yes

Server ID

Expected Response Code: 202 Accepted

Response Type: serverInfo with information about theadded server

Possible Action Specific Error Codes:

HTTP Code

 Error Code

Description

400

alreadyConnected

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

400

wrongPassword

Provided GUI password is incorrect

405

notImplementedByEdition

This method is only available on Zend Server Professional or Enterprise edition

500

invalidServerResponse

Invalid or unexpected response from new server

500

serverNotLicensed

Zend Server is not licensed

500

noActiveServers

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

500

cantConnectToServer

Zend Server is unable to connect to the specified Server URL

503

temporarilyLocked

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

Example

Usage Example

Request (URI broken for readability)

POST /ZendServerManager/Api/changeServerNameById

serverName=www-05&serverId=0

Response

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

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

<requestData>

<apiKeyName>angel.eyes</apiKeyName>

<method>changeServerNameById</method>

</requestData>

<responseData>

<serverInfo>

<id>25</id>

<name>www-05</name>

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

<status>OK</status>

<messageList />

</serverInfo>

</responseData>

</zendServerAPIResponse>

 

 

Related Links

Related Links:

Server and Cluster Management Methods

 

 

 

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