Reports Help

Response Format

The response format of the API request is controlled by the ZOHO_OUTPUT_FORMAT query parameter passed in the request. Currently Zoho DB & Reports supports XML and JSON respone formats. CSV and PDF response formats are supported only for Export action

Note :

  • See this link for response formats in case of errors on API execution.

XML Format

The response will have the <response> tag as the root node. It might either contain a <result> or <error> node as it's child, but not both. The <result> node will be present under normal circumstances, whereas <error> node will be present in case of error conditions.

Format

<?xml version="1.0" encoding="UTF-8" ?>
<response uri="/api/<loginname>/<databasename>/<tablename>" action="<specifiedaction>">
<result>
[specific XML response based on action]
</result>
</response>

Sample

XML response to a request adding a row to the EmployeeDetails table in the EmployeeDB database.

<?xml version="1.0" encoding="UTF-8" ?>
<response uri="/api/demouser/EmployeeDB/EmployeeDetails" action="ADDROW">
<result>

<!-- All the columns in the row , including formula columns -->

<row>
<column name="Name">Gary</column>
<column name="Date Of Birth">12-Jun-1980</column>
<column name="Basic">10000</column>
<column name="Country">USA</column>
</row>
</result>
<response>

JSON Format

JSON format follows the same pattern as that of XML format

Format

{
"response":
{
"uri": "/api/<loginname>/<databasename>/<tablename>",
"action": "<specified action>",
"result": {[action specific properties]}
}
}

Sample

JSON response to a request adding a row to the EmployeeDetails table in the EmployeeDB database.

{
"response":
{
"uri": "/api/demouser/EmployeeDB/EmployeeDetails",
"action": "ADDROW",
"result":
{
"column_order":["Name","Date Of Birth","Salary","Country"],
"rows":[
//All the columns in the row , including formula columns

["Gary","12-Jun-1980",10000,"USA"]
}
}
}

Other Formats

Other formats such as CSV, PDF can be specified only when ZOHO_ACTION is EXPORT. These formats don't have any generic parseable header/footer. See this link for more details about these formats.

Top