WebAPI Reference Guide > Available API Methods > Configuration Management Methods > The configurationExport Method

The configurationExport Method

Export the current server/cluster configuration into a file.

Version: 1.1

Required Permissions:Full

HTTP method: GET

Supported by Editions: All

Request Parameters:

Parameter

 Type

Required

Description

directivesBlacklist

Array

No

(Added in v1.3)

Allows passing an array of blacklist directives which will not be exported. If the parameter is not passed, the list of blacklist directives is taken from <ZendGuiDir>/config/autoload/global.config.php.

snapshotName

String

No

Added on V1.3. If this argument is passed, then a a snapshot will be created from the exported configuration. If such snapshot already exists, then the command will fail.

Expected Response Code: 200 OK. For more information see Response Format.

Response Format: A successful call to the configurationExport method will result in an HTTP response with the configuration snapshot file in the response body.

The content type for the configuration snapshot file is “application/vnd.zend.serverconfig”. In addition, the response will include a “Content-disposition” header specifying a suggested file name for the configuration snapshot file.

Note:

This is different from most Web API calls where the content type is expected to be “application/vnd.zend.serverpi+xml; version=…” and the response body payload is expected to be in XML format.

In case of an error, a regular error response will be returned containing an <errorData> element as defined for other Web API methods.

Possible Action Specific Error Codes:

HTTP Code

 Error Code

Description

400

snapshotAlreadyExists

snapshotName was passed, and such snapshot already exists in the snapshots db.

500

exportFailed

Creating a configuration snapshot failed.

Example

Usage Example

Request (headers removed for clarity)

GET /ZendServerManager/Api/configurationExport

Response (not all headers are shown)

HTTP/1.0 200 OK

Content-type: application/vnd.zend.serverconfig

Content-disposition: attachment;

 filename=”ZendServerConfig-20101123.zcfg”

[...binary data follows...]

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.

 

 

Related Links

Related Links:

Configuration Management Methods

 

 

 

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