Site 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, Phython, .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 Creator, Zoho Sheet...) 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) 1138 - 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 1135 - 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) 1121 - 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 1120 - 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 1098 - days ago 
good
vasu045 953 - days ago 
hi ,

Can you provider .net supporting API's

Thanks ,
Ramakrishna
manoharnixon 953 - 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 912 - 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
manoharnixon 910 - 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) 907 - 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.
manoharnixon 907 - 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 586 - 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 ?
manoharnixon 568 - 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 484 - 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) 271 - 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 135 - 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?
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