is mandatory to use HTTPS in all API requests
instead of HTTP request. HTTP is not supported
2. Always use https://reportsapi.zoho.com as
the API request URL.
All API requests should be placed as HTTPS POST request. The request consists of the following components:
- URI (Universal Resource Identifier. Also commonly known as URL)
- Common Mandatory Parameters sent as Query String in the URL
- Parameters sent via the body of the POST request.
The URI points to the resource inside Zoho Reports over which the action is to be performed.
https://reportsapi.zoho.com/api/<zohologinemailaddress>/<databasename>/<tablename or reportname>
It consists of the following parts
- The base URL "https://reportsapi.zoho.com/api"
- <zohologinemailaddress>: This should be the Zoho Login Email Address of the owner of the database (e.g., email@example.com)
- <databasename>: This should be the name of the database on which the API is to be executed. (e.g., EmployeeDB)
- <tablename or reportname>: The name of the view (table or report or query table or dashboard name) over which the action is to be executed. (e.g., EmployeeDetails)
Parameters to be passed in Query String
The following snippet shows the common parameters that should be passed as Query string with the URI defined above:
&ZOHO_ERROR_FORMAT=[XML/JSON]&authtoken=<your auth token>
The control parameters such as "ZOHO_ACTION" is mandatory and have to be sent as part of the query string in the URL. Refer to Common Parameters document to know more about the possible parameters that could be passed in the Query String.
Parameters to be passed via the body of POST Request
Apart from the parameters passed in the Query string, additional information needed for specific actions (such as values of row in a Add Row operation etc.,) needs to be passed as POST parameters
The parameters should be encoded in application/x-www-form-urlencoded format (This is the default format used by any simple html form).
Note: In the case of importing csv files multipart/form-data format should be used. (This is the default format used by html forms that contain file type fields used for uploading files)
The below URL adds a row in EmployeeDetails table in EmployeeDB database in a CSV format.
Data Sent as POST parameter.
&Name=Gary&Date Of Birth=12-Jun-1980&Country=USA&Salary=10000