The applicationSynchronize Method

Synchronizing an existing application, whether in order to fix a problem or to reset an installation. This process is asynchronous, meaning the initial request will start the synchronize process and the initial response will show information about the application being synchronized. However, the synchronize process will proceed after the response is returned. You must continue checking the application status using the applicationGetStatus method until the process is complete.

 

 

Required Permissions: full

HTTP method: POST

Supported by Editions: Zend Server, Zend Server Cluster Manager

Request Parameters:

Parameter

 Type

Required

Description

appId

String

Yes

The application ID you would like to synchronize.

servers

Array

No

A List of server ID's. If defined, the action will be done only on the servers whose ID's are specified and which are currently members of the cluster.

ignoreFailures

Boolean

No

Ignore failures during staging or activation if only some servers report failures. If all servers report failures the operation will fail in any case.
The default value is FALSE, meaning any failure will return an error.

 

Expected Response Code: 202 Accepted - For more information see Response Format.

Response Type: applicationsList

Possible Action Specific Error Codes:

HTTP Code

 Error Code

Description

404

noSuchApplication

The provided application ID does not exist.

 

Usage Example

Example:

Request:

POST /ZendServerManager/Api/applicationSynchronize
Content-type: application/x-www-form-urlencoded

appId=5&servers=...

Response:

<?xml version="1.0" encoding="UTF-8"?>
<zendServerAPIResponse xmlns="http://www.zend.com/server/api/1.1">
    <requestData>
        <apiKeyName>angel.eyes</apiKeyName>
        <method>applicationSynchronize</method>
    </requestData>
    
    <responseData>
        <applicationsList>
            <applicationInfo>
                <id>1</id>
                <baseUrl>http://example.com/myapp</baseUrl>
                <appName>Wordpress</appName>
                <userAppName>Wolfgang's Blog</userAppName>
                <installedLocation>/usr/local/somewhere</installedLocation>
                <status>activating</status>
                <servers>
                            <applicationServer>
                                 <id>1</id>
                                 <deployedVersion>1.6</deployedVersion>
                                 <status>activating</status>
                            </applicationServer>
                            <applicationServer>
                                 <id>4</id>
                                 <deployedVersion>1.6</deployedVersion>
                                 <status>activating</status>
                            </applicationServer>
                            <applicationServer>
                                 <id>8</id>
                                 <deployedVersion>1.5</deployedVersion>
                                 <status>activating</status>
                            </applicationServer>
                            </servers>
                            <deployedVersions>
                                 <deployedVersion>1.6</deployedVersion>
                                 <deployedVersion>1.5</deployedVersion>
                            </deployedVersions>
                            <messageList />
            </applicationInfo>
            
        </applicationsList>
    </responseData>
</zendServerAPIResponse>

 

Important Note:

For Zend Server or Zend Server Cluster Manager 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:

Deployment Methods