Home  »  Zoho Reports API

Zoho Reports API

Tags:  

Zoho Reports API

Zoho Reports offers a powerful REST style API (Application Programming Interface) that can be used by Independent Software Vendors, Developers and System Integrators to build powerful reporting and analytical capabilities into their applications. Its a HTTP based Web API, that responds to requests in XML or JSON format making it programming-language-neutral, thus enabling application development/integration in any programming language (Java, Python, .Net, C, C++, PHP, etc) you know.

With Zoho Reports API developers can easily push or pull data into or from Zoho Reports (data integration) for powerful reporting and analysis. You can add powerful business intelligence capabilities to your product/application, build add-ons to analyze data from third-party business applications (eg., Google Adwords, Google Analytics, CRM systems etc., ) that you use and do much more. Infact Zoho Reports API is used by many Zoho Applications (Zoho CRMZoho Creator, Zoho Sheet, Zoho Projects....) for seamlessly providing Reporting and Analytical features based on Zoho Reports to their users.

Zoho Reports API allows you to:

  • Add data into a table in Zoho Reports database
  • Modify data in the Zoho Reports database
  • Bulk Add/Update data into a table via CSV file.
  • Bulk Update with criteria support.
  • Bulk Delete with criteria support.
  • Export data and Reports in various formats such as CSV, JSON, PDF,HTML,IMAGE
  • Fetch data from the database using SQL Select query.

This API documentation is organized with the following sections:

Prerequisites

This section lists the prerequisites that need to be satisfied before you use API.

API Specification

Provides the complete API language specification including the request and the response formats of various supported operations

Supported Actions/Operations

Provides the complete list of actions that are supported by Zoho Reports API

Client Libraries

Client libraries are programming language wrappers over the raw Zoho Reports HTTP Web APIs. This enables developers to easily use Zoho Reports API in the corresponding programming language. Currently we support the following language libraries:

 Zoho CloudSQL Support

Zoho CloudSQL is a middleware technology that allows customers to interact with their business data stored in Zoho through familiar SQL language.  Users can access the data in the Zoho cloud using SQL on both other cloud applications as well as through traditional on-premises software.

Zoho Reports is the first service to support CloudSQL as an API extension. Refer to the following links for more details:

Pricing

Pricing model for using Zoho Reports API will be announced in the near future. For any clarification or information in this regard, please mail us to support@zohoreports.com


itsjpavank@yahoo.com+(Guest) 1842 - days ago 
Hello,


Don't you have API support for .Net languages ?


I am planning to use your services for a .Net based application and would like to know, if you have any API/Webservice that can be consumed from an .NET based application.


Thanks,

Pavan
Shibu Alexis Francis 1838 - days ago 
Hi Pavan,

We do support API for .net languages. Currently we do not have the client library. But we will be adding it very soon. Mean while please send us your email id to support "at" zohoreports "dot" com. we will send you the .net example to use our API.

Thanks & Regards,
Shibu Alexis
Zoho Reports.
jkurgan10 (Guest) 1824 - days ago 
does the JSON format support callbacks? I tried

$.getJSON("http://reports.zoho.com/api/<ID>/<DB>?ZOHO_ACTION=EXPORT&ZOHO_OUTPUT_FORMAT=JSON&ZOHO_ERROR_FORMAT=XML&ZOHO_API_KEY=<key>ticket= <ticket>ZOHO_API_VERSION=1.0&ZOHO_SQLQUERY=select%20*%20from%20Table&callback=?

and I keep getting script errors. when i paste the URL into a browser, i'm able to see the data come back just fine.
Saminathan Arumugam 1823 - days ago 
Hi,

You can use the parameter ZOHO_CALLBACK_FUNCTION in the API url to callback javascript function.

Below is an example:

http://reports.zoho.com/api/<username>/<DB>?ZOHO_ACTION=EXPORT&ZOHO_OUTPUT_FORMAT=JSON&ZOHO_ERROR_FORMAT=XML&ZOHO_API_KEY=<key>ticket= <ticket>ZOHO_API_VERSION=1.0&ZOHO_SQLQUERY=select%20*%20from%20Table&ZOHO_CALLBACK_FUNCTION=<js_function_name>

Sorry that the parameter 'ZOHO_CALLBACK_FUNCTION' is yet to be documented. We will provide with the documents for the same very soon.

Thanks,
Saminathan,
Zoho Reports
Guest 1802 - days ago 
good
san ran 1657 - days ago 
hi ,

Can you provider .net supporting API's

Thanks ,
Ramakrishna
Manohar Nixon 1656 - days ago 
Hi Ramakrishna,

As of now, we don't have the API client library for .Net.
But, we do have a sample VB .Net program which will be useful for you to get started with API using .Net.

Below is the sample VB .Net code to add rows into Zoho Reports online database using API.


''''''''' SAMPLE CODE - START ''''''''''''

Imports System.Web
Imports System.Net
Imports System.IO
Imports System.Text

Public Class Form1
Private Sub zoho()

' *** COMMENT: GETTING THE ZOHO TICKET ID FOR AUTHENTICATION
Dim getANewTicket As String = getZohoTicketId()
Dim address As Uri

' *** COMMENT: EXIT IF THE TICKET IS NOT VALID
If getANewTicket.Length < 1 Then
'No valid ticket
Exit Sub
End If

' *** COMMENT: CONSTRUCTING API URL TO ADD ROWS INTO ZOHO REPORTS ONLINE DATABASE
address = New Uri("http://reports.zoho.com/api/_testuser_/_database_/_table_?ZOHO_ACTION=ADDROW&ZOHO_OU
TPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML&ZOHO_API_KEY=___abc___&ticket=" & getANewTicket & "&ZOHO_API_VERSION=1.0"
)

Try
' *** COMMENT: ADDING ROWS

' *** COMMENT: ADDING ROW #1
Dim web1 As New System.Net.WebClient()
web1.Headers.Add("Content-Type", "application/x-www-form-urlencoded")
Dim data As Byte() = System.Text.Encoding.ASCII.GetBytes("col1=val1")
Dim response1 As Byte() = web1.UploadData(address, "POST", data)
MsgBox(System.Text.Encoding.ASCII.GetString(response1))

' *** COMMENT: ADDING ROW #2
Dim web2 As New System.Net.WebClient()
web2.Headers.Add("Content-Type", "application/x-www-form-urlencoded")
data = System.Text.Encoding.ASCII.GetBytes("col2=val2")
Dim response2 As Byte() = web2.UploadData(address, "POST", data)
MsgBox(System.Text.Encoding.ASCII.GetString(response2))

' *** COMMENT: SHOW ERROR MESSAGE IN CASE OF EXCEPTION
Catch ex As Exception
msgbox(ex.message)
End Try
End Sub

' *** COMMENT: FUNCTION TO GET ZOHO TICKET ID
Private Function getZohoTicketId() As String
'Get a ticket number with the prescribed username and password
Dim request As HttpWebRequest
Dim response As HttpWebResponse = Nothing
Dim reader As StreamReader
Dim ticketResponse As String = "" 'Hold reponse

Try
' *** COMMENT: CREATE THE WEB REQUEST TO GET TICKET ID
request = DirectCast(WebRequest.Create("https://accounts.zoho.com/login?servicename=ZohoReports&FROM_AGENT=true&LOGIN_ID=_testuser_&PASSWORD=_a_password_"), HttpWebRequest)

' *** COMMENT: GET THE RESPONSE
response = DirectCast(request.GetResponse(), HttpWebResponse)

' *** COMMENT: GET THE RESPONSE STREAM INTO READER
reader = New StreamReader(response.GetResponseStream())


Do While reader.Peek <> -1
Dim row As String = reader.ReadLine

' *** COMMENT: PARSING AND GET THE TICKET
Dim startPosition As Integer
startPosition = row.IndexOf("TICKET")
If startPosition <> -1 Then
ticketResponse = row.Substring(7)
End If
Loop
Finally
If Not response Is Nothing Then response.Close()
End Try
Return ticketResponse
End Function

' *** COMMENT: START ADDING ROWS USING API
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
zoho()
End Sub
End Class

''''''''' SAMPLE CODE - END ''''''''''''

Please get back to support "at" zohoreports "dot" com for further clarifications.


Best Regards,
Manohar Nixon S
Zoho Reports
saurabh.jadhav 1615 - days ago 
Hello,
Don't you have API avaliable for Objective C Language ? I am planning to make an Iphone Application Which uses Zoho DB . if not API, any other idea to access Zoho DB in Iphone is welcome .Hoping for reply from you. Thanks
Manohar Nixon 1614 - days ago 
Please find below the Objective C code which will get the ticket and uses the same in the Export API URL to fetch the data from Zoho Reports online reporting database.

/////////////////// CODE START /////////////////

// Constructing URL to get ticket
NSString *ticketurl=@"https://accounts.zoho.com/login?servicename=ZohoReports&FROM_AGENT=true&LOGIN_ID=__your_zoho_username__&PASSWORD=__your_zoho_password__";
NSError *ticketError=NULL;
NSHTTPURLResponse *ticketResponse= nil;
NSMutableURLRequest *ticketRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:ticketurl]];
// Sending request to get TICKET
NSData *ticketResponseData = [NSURLConnection sendSynchronousRequest:ticketRequest returningResponse:&ticketResponse
error:&ticketError];

// The whole response got from the URL to get ticket
NSString *ticket = [[NSString alloc] initWithData:ticketResponseData encoding:NSUTF8StringEncoding];

// Extracting TICKET ID from the response
NSString *substring = @"TICKET";
NSRange range = [ticket rangeOfString:substring];
int start_location = range.location+7;
int end_location = range.location+7+32;

NSString *ticketString = [ticket substringWithRange:NSMakeRange(start_location, 32)];

NSLog(@"Ticket id got :: %@",ticketString);

// Constructing API URL
NSString *url1=@"http://reports.zoho.com/api/__username__/__dbname__/__tablename__?ZOHO_API_VERSION=1.0&ZOHO_API_KEY=__apikey__&ticket=";
NSString *url2=@"&ZOHO_ACTION=EXPORT&ZOHO_OUTPUT_FORMAT=xml&ZOHO_ERROR_FORMAT=xml";

// Appending TICKETID to the API URL
NSString *url = [NSString stringWithFormat:@"%@%@%@", url1, ticketString, url2];
NSLog(@"API URL : %@",url);

// Initializing Response Object
NSHTTPURLResponse *response= nil;
// Constructing Request Object with URL
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:url]
];

// Setting HTTP Method as POST for the request object
[request setHTTPMethod:@"POST"];

NSError *error=NULL;
int errorCode;

// Invoking the URL and receiving response data
NSData *responseData = [NSURLConnection sendSynchronousRequest:request returningResponse:&response
error:&error];

// Logging Response Code - (200 for Http Status - OK)
NSLog(@"Response Code: %d",[response statusCode]);
// Converting Response as String
NSString *responseStrq = [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding];
// Logging Response String
NSLog(@"Response string: %@",responseStrq);
// Logging Error if any
NSLog(@"Error: %@",error);


/////////////////// CODE END /////////////////

Best Regards,
Manohar Nixon S
Zoho Reports
Ashish (Guest) 1611 - days ago 
We would like to integarte Report using API and java library, can you guide me how this will work and how this happens.
Manohar Nixon 1611 - days ago 
Hi Ashish,

We do have a java wrapper to use Zoho Reports APIs in java language.
You can find the guidelines and samples in the below link:

http://zohoreportsapi.wiki.zoho.com/Java-Client-Library.html

Kindly get back to support [at] zohoreports [dot] com if you find any difficulty in using Java Client Libraries.

Best Regards,
Manohar Nixon S
Zoho Reports
killuwaxkilluwa 1290 - days ago 
hello,I want to know do you have the zoho reports api for create a new database or a new table with java ?
Manohar Nixon 1271 - days ago 
Hi killuwaxkilluwa,

You can create a new table using our Zoho Reports Import API. When calling Import API with parameter ZOHO_CREATE_TABLE=true, a new table will be created (if the provided table does not exists) and the data will be imported.

The Zoho Reports Import API Documentation is available in the below link:
http://zohoreportsapi.wiki.zoho.com/Importing-CSV-File.html

The Import Data sample java code using our Zoho Reports Java Client Library is below:
http://zohoreportsapi.wiki.zoho.com/ImportData-java.html

Creating a new database using Zoho Reports API is not available right now. We will be providing API for creating the database in future. We will update in this page once it is available.

Kindly get back to support [at] zohoreports [dot] com if have any further clarifications in this regard.

Thank you!

Best Regards,
Manohar Nixon S
Zoho Reports
jensunil 1188 - days ago 
Hi,


For asp.net(c#) application without having library how i can generate reports . If you have any sample for c# application please provide it


Thanks

Sunil
Harshil (Guest) 974 - days ago 
Hi....I am Harshil Joshi working as a SAP BI Developer and working on SAP Business Objects. My question is that does ZOHO provide all the features which SAP BO provides?? and ZOHO works on which Database server? and having many more technical doubts.......
dhernand.amstar 838 - days ago 
hi,

I saw the code in C to validate if a ticket is defeated. I do not drive C and I is much more complicated. Will have an example of how validated by php?
jadwani 698 - days ago 
Hi,

Do you have any API to support PHP. I want to use Zoho Report to create My Dashboard?

Lokesh
dawei81618 655 - days ago 
yeah ,really good
Hi

May i know how to implement Zoho in Cakephp . Will it support for Cakephp ,

Lokesh.S
Prabhakaran S 621 - days ago 
Hi,

Thank you for your interest in Zoho Reports.

Currently we do not have any library in CakePHP. Kindly check the below sample PHP code for ADDROW API:

<?php
global $boundary;

//Constructing Boundary
$boundary = "gc0p4Jq0M2Yt08jU534c0p";
$data = "";

//Proxy Details
$proxy_user = "proxy user name";
$proxy_pass = "proxy password";

$proxy_name = "proxy name";
$proxy_port = proxy port number;
$errno = 1;
$errstr = "error occurred";
$proxy_fp = @fsockopen($proxy_name, $proxy_port, $errno, $errstr, 200);
if(!$proxy_fp)
{
$proxy_fp = @fsockopen($proxy_name, $proxy_port, $errno, $errstr, 200);
if(!$proxy_fp)
{
$errmsg = "Proxy authentication failed.";
if($errno != 0)
{
$errmsg .= " {$errstr}";
}
echo $errmsg;
exit;
}
}

$url = "https://reports.zoho.com/api/<zoho_username>/<zohoreports_dbname>/<tablename>?ZOHO_ACTION=ADDROW&ZOHO_API_KEY=<api_key>&ticket=<ticket>&ZOHO_API_VERSION=1.0&ZOHO_OUTPUT_FORMAT=json&ZOHO_ERROR_FORMAT=json&Column1=Val1&Column2=Val2";

//Constructing the Header
$header = "POST $url HTTP/1.0\\r\\n";
$header .= "Host: $proxy_name\\r\\n";
$header .= "Proxy-Authorization: Basic ". base64_encode($proxy_user . ":" . $proxy_pass). "\\r\\n";
$header .= "Content-Length: " . strlen($data) . "\\r\\n";
$header .= "Content-Type: multipart/form-data, boundary=gc0p4Jq0M2Yt08jU534c0p\\r\\n";
$header .= "Connection: Close\\r\\n\\r\\n";

fwrite($proxy_fp, $header.$data);
$resstr = "";
while (!feof($proxy_fp))
{
$resstr .= fgets($proxy_fp, 4096);
}
fclose($proxy_fp);
$srstr = "Connection: close";
$pos = strpos($resstr, $srstr);
if($pos !== false)
{
$resstr = substr($resstr, $pos + strlen($srstr));
}
echo "Response : ---------------".$resstr;
?>

Please replace the required information in the above code corresponding to your account.

You can read more about Zoho Reports API from the below link:

http://zohoreportsapi.wiki.zoho.com/Supported-Actions.html

We believe the sample code will help you. Kindly get back to support@zohoreports.com for further clarification in this regard.

Regards,
Prabhakaran.
Rajen (Guest) 359 - days ago 
We used Inside Sales as our CRM tool. Is it possible to push leads from Inside Sales to Zoho reports in real time?
vignesh.ns 355 - days ago 
Hi,

Thank you for contacting us.
Currently, direct integration is not available between Zoho Reports and Inside Sales. However, if Inside Sales supports exporting data through API, then you can export the data and import the same into Zoho Reports using our Import API. You can also automate the import in scheduled interval.
Please do get back to us at support@zohoreports.com for further clarifications.

Regards
Vignesh
Zoho Reports.
Pradeep Kumar 291 - days ago 
Hi,

Hope you are doing great!

Can we use API to insert records in Zoho Database for a free account?

Thanks,
Pradeep
Sailas Sundaram 283 - days ago 
Hi Pradeep,

Yes, you user can use the API to insert records into a table in Zoho Reports from a Free plan. However, we do have plans to introduce user plan based restriction on API usage. Once this is implemented, free plan users can use all available API with a limitation in the volume of usage.

We will keep you posted when this restriction is implemented.

Having said that, we recommend you to import data together using the IMPORT API instead of adding rows using ADDROW API. This allows you to import bulk data in a single API call.

Believe this helps. Please feel free to let us know if you need any further clarification. We'd be glad to assist you.

Thanks & Regards
Sailas S| Zoho Reports
casemng 273 - days ago 
Hi
I am planning to make an Windows Application Which uses Zoho DB ,
I need sample code to use zoho db in vb.net
can i use SQL to dail with zoho db and how?
janani.t 263 - days ago 
Hello,

Sorry for the delayed response. We missed your thread.

To know more on VB.NET sample code, please refer to our previous reply in the link below.

https://zohoreportsapi.wiki.zoho.com/Zoho-Reports-API.html#169804000000086001

Believe this helps. For further assistance please write to us at support@zohoreports.com.

Sincerely,
Janani | Zoho Cares
casemng (Guest) 261 - days ago 
thx
red strom 208 - days ago 
Hello,

How to fetch record from the ZOHO database with the use of CURL in PHP?

Thanks,
Redstrom
janani.t 207 - days ago 
Hello Redstrom,

Good Day!

You could easily fetch record from the ZOHO database using Export API offered by Zoho Reports. The API can be triggered from CURL , please refer to the following snippet to know how you could achieve this.


<?php
$ch = curl_init();

$target_url = "https://reportsapi.zoho.com/api/user_email_address/database_name/table_name?ZOHO_ACTION=EXPORT&ZOHO_OUTPUT_FORMAT=CSV&ZOHO_ERROR_FORMAT=XML&
AUTHTOKEN=g38sl4j4856guvncrywox8251sssds&ZOHO_API_VERSION=1.0";

$post = array("ZOHO_CRITERIA"=>"(columnName1='text_data_type' and columnName2=2100)");

curl_setopt($ch, CURLOPT_URL,$target_url);
curl_setopt($ch, CURLOPT_POST,1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);

$result = curl_exec($ch);

$fh = fopen("filepath","w");
fwrite($fh,$result);
fclose($fh);

curl_close($ch);
?>

For further enquiries on the above said, please feel free to write to us at support@zohocorp.com.


Sincerely,
Janani | Zoho Cares
Barrett Griffith (Guest) 152 - days ago 
How about a ruby implementation?
janani.t 152 - days ago 
Hello Barrett Griffith,

Currently, we do not have Ruby specific client library. However, we will note this in our ToDo list and will take this based on priority. Will post this thread when we take up this feature.


Sincerely,
Janani | Zoho Cares
Manohar Nixon 108 - days ago 
Hi,

We are happy to announce that we have now added C# Client Library for using Zoho Reports APIs from your C# .Net application. You can find the dll download link (for both 32-bit & 64-bit) and complete documentation in the below link.

https://zohoreportsapi.wiki.zoho.com/CSharp-Client-Library.html

Feel free to post your feedbacks and suggestions in the above page.

Best Regards,
Manohar Nixon S
Zoho Reports Team
Kanhaiya (Guest) 94 - days ago 
Can I use Zoho API's to use REST API's as data source in Crystal reports?
janani.t 90 - days ago 
Hello Kanhaiya,

Zoho Reports allows you to use the REST API in any application to import or export the data. We will be able to guide you better if you could send your exact requirement to our support at support@zohoreports.com.

Sincerely,
Janani | Zoho Cares
reddyvenky5 30 - days ago 
How to use Zoho Dash boards in My Netsuite Dashboard by using Rest Apis
Anand Narayanan 25 - days ago 
Hello,

You can embed a Zoho Reports Chart or Dashboard into any web context.

For details, please refer to the following link:
https://reports.wiki.zoho.com/Embedding-in-Web-Pages-Reports.html

Please note that this feature is only available on paid plans of the product.

In case you need to have a dynamically changing embed URL managed using API calls, please get in touch with support@zohoreports.com along with the details of your requirements. We will get back to you with the best possible option.
Post a comment

Your Name or E-mail ID (mandatory)

Note: Your comment will be published after approval of the owner.





 RSS of this page