User Tools

Site Tools


en:public:developer:template_system:tags:api:rest_response_format

REST Response Format

REST is the simplest response format to use - it's a simple XML block.

To return the response in REST format, send a parameter “output_format” in the request with a value of “rest”. When using the REST request method, the response defaults to REST.

A method call returns this:

  <?xml version="1.0" encoding="utf-8" ?>
  <rsp stat="ok">
    [xml-payload-here]
  </rsp>
 

If an error occurs, the following is returned:

  <?xml version="1.0" encoding="utf-8" ?>
  <rsp stat="fail">
    <err code="[error-code]" msg="[error-message]" />
  </rsp>
en/public/developer/template_system/tags/api/rest_response_format.txt · Last modified: 2013/03/08 15:21 by admin