30.07.2012 Views

Reference Guide

Reference Guide

Reference Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Request Format<br />

About<br />

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

The request format defines the required format for each request sent to Zend Server. The request format<br />

for all Zend Server Web API requests are formatted as described in this page, regardless of the specific<br />

method used.<br />

Request Method, URL, and Headers<br />

Web API HTTP requests use HTTP GET for read-only API calls, and HTTP POST for all state changing<br />

API calls.<br />

The request URL is different for each action, and is in one of the following formats:<br />

Zend Server - Where is the action to perform (e.g. “disableServer”):<br />

http://example.com:10081/ZendServer/Api/<br />

Zend Server Cluster Manager - Where is the action to perform (e.g. “disableServer”):<br />

http://example.com:10081/ZendServerManager/Api/<br />

All HTTP requests must include the following HTTP headers:<br />

Date - Contains the current date and time in the GMT time zone, in the format specified by the<br />

HTTP RFC for date fields (e.g. “Wed, 07 Jul 2010 17:10:55 GMT”). This value is used to verify<br />

the authenticity of the request, and is expected to be in sync with the server time (within 30<br />

seconds).<br />

User-agent - The user agent string is logged by the server and used for message authenticity<br />

verification. It cannot be empty.<br />

Host - The HTTP host header is expected to be present and is used for message authenticity<br />

verification.<br />

X-Zend-Signature - The API key name and calculated request signature which is used to<br />

authenticate and validate the request. See Authentication and Message Verification for additional<br />

information on calculating the signature.<br />

In addition, you should send the Accept HTTP request header to designate your supported API<br />

version(s). If the Accept header is missing, the server will fall back to the default API version. This is<br />

described in detail in API Versioning Negotiation.<br />

For POST requests, including any parameters or payload, clients must set the Content-type header to<br />

either "application/x-www-form-urlencoded" or "multipart/form-data", depending on the payload. You must<br />

329

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

Saved successfully!

Ooh no, something went wrong!