30.07.2012 Views

Reference Guide

Reference Guide

Reference Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The configurationExport Method<br />

Export the current server/cluster configuration into a file.<br />

Required Permissions: read<br />

HTTP method: GET<br />

Supported by Editions: All<br />

Request Parameters: This method has no request parameters<br />

Expected Response Code: 200 OK<br />

Web API <strong>Reference</strong> <strong>Guide</strong><br />

Response Format: A successful call to the configurationExport method results in an HTTP response with<br />

the configuration snapshot file in the response body.<br />

The content type for the configuration snapshot file is “application/vnd.zend.serverconfig”. In addition, the<br />

response includes a Content-disposition header, specifying a suggested file name for the configuration<br />

snapshot file.<br />

Note:<br />

This is different from most Web API calls where the content type is expected to be<br />

“application/vnd.zend.serverpi+xml; version=…” and the response body payload is expected to be in XML<br />

format.<br />

In case of an error, a regular error response will be returned containing an element as<br />

defined for other Web API methods.<br />

Possible Action Specific Error Codes:<br />

HTTP<br />

Code<br />

Error Code Description<br />

500 exportFailed Creating a configuration snapshot failed.<br />

Example:<br />

Request (headers removed for clarity):<br />

GET /ZendServerManager/Api/configurationExport<br />

Response (not all headers are shown):<br />

HTTP/1.0 200 OK<br />

Content-type: application/vnd.zend.serverconfig<br />

Content-disposition: attachment;<br />

filename=”ZendServerConfig-20101123.zcfg”<br />

[...binary data follows...]<br />

373

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!