Zoho Creator - REST APIs

Tags:  

Zoho Creator REST APIs


Zoho Creator provides REST style Web APIs which allows client applications to add, delete, update, view records and perform a a  host of useful operations on their applications. 

The REST specification is often used to describe any simple interface that transmits domain specific data over HTTP without an additional messaging layer such as SOAP. An important concept in REST is the existence of resources (sources of specific information), each of which can be referred to using a global identifier (a URI). In order to manipulate these resources, components of the network (clients and servers) communicate via a standardized interface (e.g. HTTP) and exchange representations of these resources (the actual documents conveying the information).

The calling conventions employed over here for these APIs are GET and POST depending on the kind of operation (Read/Write) that is being performed. In return the user gets a formatted XML/CSV/JSON response from the called method.

To get started with the creator REST APIs, please refer our API Reference.

API URL

For accessing the Zoho Creator API, the
  • API Key
  • Ticket ID
For more on how to request for an API Key and generate Ticket ID, please click here. Once the requisite API Key and Ticket ID is acquired, users should use the following format mentioned below to access the API methods:


http://creator.zoho.com/api/<response format>/<application name>/<operation>/apikey=[API Key]&ticket=[Ticket]

REST Request Format

The request format will vary depending on the type of operation (Read or Write) being performed by the APIs. The most important HTTP methods are GET and POST. GET calling convention is analogous to read operation whereas POST method is used where data is to be written or modified. The following basic operations are performed using the Zoho Creator APIs:

1. Read Operations:

For read like operations, HTTP GET calling convention is used.For example, a request in the following format will fetch the list of applications available in your Zoho Creator account.

http://creator.zoho.com/api/xml/applications/apikey=<api_key>&limit=10

2. Write Operations:

For write operations like adding, deleting or updating form data, both HTTP GET and HTTP POST calling convention is used. REST API's with GET method provides a flexible way for sending HTTP requests.  Add,Delete and Update operations modifies the state of the database. Hence such operations should not be done in GET method, for production purpose. However the GET method is very easy for testing.

REST Response Format

The type of response being generated will depend on the 'format' specified in the request URL.Currently, the following response formats are supported:
  • XML
  • CSV
  • JSON

Response Structure

The response will have the <response> tag as the root node. It contains a <result> node as it's child. The <result> node will have the <form name>, <operation type>, and <values>in the format given below. The <status> node will display "Success" if the operation is successful. In case of error, the <status> node will display the value "Failure" with a description of the error message.




<?xml version="1.0" encoding="UTF-8" ?>
<response>
<result>
<form name="Specify form name">
<add>
    <values>
           <field name="Specify field name">
               <value>"Specify field value" </value>
           </field>
    </values>
    <status>Success/Failure</status>
</add>
</form>
</result>
</response>



Error Codes and Messages

The list of HTTP error codes displayed by the Zoho Creator api and their description is given here.





 




 RSS of this page

Written by:   Written by:   Version:   Last Edited By:   Modified