Zamples, Inc. logo
 Home   Search   Solutions   My Zamples   FAQ   News   Contact 
Zamples ID:
Password:
   
0 anonymous users;
19 users logged in.

Common Aspects of REST Calls

All Zamples REST invocations share common parameters, a User-Agent header and status codes as described below.

Common Request Parameters

All Zamples REST calls must include the Zamples user id and password of the user that the REST call is made on behalf of.  You may use GET parameters and/or POST parameters or a combination thereof.  If using GET parameters, be sure to URL-encoded them.

Parameter name Meaning
clientUser User handle of the person that the REST call is made on behalf of
clientPassword Password of the person that the REST call is made on behalf of

Zamples User-Agent Header

All REST calls must include a Zamples User-Agent header.  If the request is made from a browser, the browser's User-Agent header is sufficient.  Otherwise, your application must supply a unique header that identifies the vendor/developer of the application, and the version of the application.

Returned Strings in XML

Many Zamples REST calls return an XML document, which have two types of character data: parsed and unparsed. XML attributes are parsed character data, and XML entities are unparsed character data. Some characters need to be escaped in order to present them in the document. The escape mapping varies for each type of character data.

Writing parsed data to XML Attributes

Original character Output Character in XML
double quote (") "
apostrophe (') '
less than (<) &lt;
greater than (>) &gt;
ampersand (&) &amp;
slash (\) No escape required

Writing unparsed data to XML Elements

Original Character Output Character in XML
double quote (") \"
apostrophe (') &apos;
ampersand (&) &amp;
less than (<) &lt;
greater than (>) &gt;
slash (\) \\

Common Possible Zamples REST Error Status Codes

The standard HTTP status codes have been modified for Zamples.

401 Unauthorized Zamples access
(invalid user id and password combination)
The operation needs a valid user id and password
417 Missing Zamples HTTP User-Agent The REST interface may reject queries that do not contain an HTTP User-Agent header
418 Unauthorized operation The requested operation was aborted because the specified user does not have sufficient privilege


Zamples Client HTTP User-Agent Strings Zamples Client REST Interface Specification Controlling the Range of Lines Displayed for a Posting