Zoho Analytics API
Zoho Analytics API offers wide range of functions to help developers build & manage powerful reporting and analytical capabilities for their business application needs. You can add powerful business intelligence capabilities to your product/application, build add-ons to analyze data from third-party business applications (eg., Google Ad-words, Google Analytics, CRM systems etc., ) that you use and do much more. In-fact Zoho Analytics API is used by many Zoho Applications (
Easy to use programming language wrappers called “Client Libraries” are provided to conveniently use the Zoho Analytics API from within your familiar programming language like Java, C#, Python, PHP, GO and Google Applications.
Prerequisites
Users should have a valid Zoho login email address to use the API. If you do not have one, please
Sign up into Zoho Analytics and create a login.It is mandatory to use HTTPS in all API requests instead of HTTP request. HTTP is not supported
Choose your
<ZohoAnalytics_Server_URI> and use the same in API request URI.An access token is mandatory to authorize the user. Refer this
link to know how to generate an access token.
Note:
- Zoho Analytics is previously known as Zoho Reports.
- API Request URL changed from
https://reportsapi.zoho.com tohttps://analyticsapi.zoho.com .
Authentication
Zoho Analytics REST API supports
- Step 1:
Registering New Client - Step 2:
Generating Code - Step 3:
Generating Tokens - Step 4:
Refreshing Access Tokens
Registering New Client
Follow the below steps to register with Zoho's Developer console.
- Visit
DeveloperConsole and clickGET STARTED
. - Choose
Client Type
that suits your application type.- Client-based Applications: Applications that are built to run exclusively on browsers independent of web servers.
- Server-based Applications: Web-based applications that are built to run with a dedicated HTTP server.
NOTE:
Server-based applications are chosen when your application is used by multiple users and requires user intervention during authorization. - Mobile-based Applications: Applications that are built to run on smartphones and tablets.
- Non-browser Applications: Applications that run on devices without browsers such as smart TVs and printers.
- Self Client: For standalone server-side application performing a back-end job, and you do not have a domain and a redirect URL.
NOTE:
Self Client type is recommended for users using ZohoAnalytics UploadTool and ZohoAnalytics Client Libraries.
- After choosing the client type, provide the required details and click 'Create'.
On successful registration, you will be provided with a set of OAuth 2.0 credentials such as <Client_ID>
and <Client_Secret>
that will be only known to Zoho and your application. (Do not share this credentials anywhere)
Generating Code
After generating <Client_ID>
and <Client_Secret>
, a grant code has to be generated. Based on the client type the code
can be generated in two ways.
Self Client Method - For Self Client type.Redirect Method - For Server-based Applications.
SELF CLIENT METHOD
- After registration, click the
Self Client
method available on theApplications
list. - Enter a valid scope. (Refer to
Scopes for more details.) - Choose Time Duration.
NOTE:
Code value generated in this step will be expired after this period. Refresh Token (Step 3 ) have to be generated before the code expires. - Enter Scope Description.
- Click
CREATE
to generatecode


Save this code and continue to
REDIRECT METHOD
The below URL is used to generate code.
https://accounts.zoho.com/oauth/v2/auth?scope=<SCOPE>&client_id=<CLIENT_ID>&state=testing&response_type=code&redirect_uri=<REDIRECT_URI>&access_type=offline&prompt=consent
Make a request to the below URI with the given parameters.
https://
<ZohoAccounts_Server_URI> /oauth/v2/auth?Parameter Description scope * Scope (scope is nothing but a permission to access specific API) for which the token to be generated. Multiple scopes can be given which has to be separated by commas.
Example:ZohoAnalytics.data.all,ZohoAnalytics.modeling.create
Refer:available scopes client_id * <client_id>
obtained during Client Registration (Step 1).state An opaque string that is round-tripped in the protocol; ie., whatever value given to this will be passed back to you. response_type* code
(provide this literal string as the value)redirect_uri * One of the redirect URI given in above step. This param should be same redirect url mentioned while registering the Client (Step 1). access_type The allowed values are offline
andonline
.
Theonline
access_type gives your application only the access_token which is valid for one hour. Theoffline
access_type will give the application an access_token as well as a refresh_token. By default it is taken asonline
prompt Consent
(provide this literal string as the value)
Prompts for user consent each time your app tries to access user credentials.
If you don't specify this parameter, the user will be prompted only the first time your app requests access.Note: Fields with
*
are mandatoryOn invoking this request, If you already signed in with Zoho then an user consent page will be shown, If you doesn't have an login session with Zoho then you will be redirected to the Zoho login page, and you need to enter your Zoho credentials to login. After authentication the user consent page will be shown.
Upon clicking “Accept”, the application gets authorized. The grant code is sent as a parameter in the redirect_uri.
- A back-end script from your end needs to store the following details from the above URL.
- code={grant_token} - This is used to generate access and refresh tokens.
- location={domain} - This tells you the domain of the user from which you have to make API calls.
- accounts-server={accounts_URL} - This is your accounts URL which you have to use to
generate refresh and access tokens .
When the user clicks "Reject", the browser redirects to the redirect URI with the parameter
error=access_denied
, and your application is denied access to the user's data in Zoho Analytics.


Note:
This code
is valid for only 60 seconds. Next Step have to be done within this time.
Generating Tokens
REFRESH TOKENRefresh token is used to obtain new access tokens. This token has an unlimited lifetime, it can be revoked manually.
ACCESS TOKENA token that is sent to the resource server to access the protected resources of the user. Each access token will be valid only for an hour, and can be used only for the set of operations that is described in the scope.
After generating code
, a POST request to be made for the following URI with the params given below, to generate refresh_token
and access_token
.
METHOD : POST
https://
The below URL is used to generate access token and refresh token.
https://accounts.zoho.com/oauth/v2/token?code=<CODE>&client_id=<CLIENT_ID>&client_secret=<CLIENT_SECRET>&redirect_uri=<REDIRECT_URI>&grant_type=authorization_code
Parameter | Description |
---|---|
code* | <code> which is obtained in the above step (Step 2) |
client_id* | <client_id> obtained during Client Registration (Step 1) |
client_secret* | <client_secret> obtained during Client Registration (Step 1) |
redirect_uri | This param should be same redirect url mentioned while adding Client (Step 1). This param is not required when self client application type is choosen during Client Registration (Step 1). |
grant_type* | authorization_code (provide this literal string as value) |
scope | Example: ZohoAnalytics.data.all,ZohoAnalytics.modeling.create Refer: |
state | An opaque string that is round-tripped in the protocol; that is to say, value will be passed back to the user. |
Note: Fields with *
are mandatory
In response, you will get both
<access_token>
and<refresh_token>
.

1. The <access_token>
will expire after an hour.
2. The <refresh_token>
is permanent and will be used to regenerate new <access_token>
, if the current access token expired.
NOTE:
Each time a re-consent page is accepted, a new refresh token is generated. The maximum limit is 20 refresh tokens per user. If this limit is crossed, the first refresh token is automatically deleted to accommodate the latest one. This is done irrespective of whether the first refresh token is in use or not. (You can manually delete a refresh token by
Refreshing Access Tokens
Access Tokens have limited validity. It expires in one hour. Once the access_token expires, user (or) the app will have to use the refresh token to request for a new access token. On using an expired access token, the request terminates throwing Invalid Oauthtoken
.
NOTE:
Using a refresh token a client can create up to ten access tokens in a span of ten minutes. If the limit is reached, the access token creation will be blocked for the rest of the ten minutes.
The following POST URI with the params given below, generates a new access token.
METHOD : POST
https://
The below URL is used to Generating Access Token From Refresh Token.
https://accounts.zoho.com/oauth/v2/token?refresh_token=<REFRESH_TOKEN>&client_id=<CLIENT_ID>&client_secret=<CLIENT_SECRET>&redirect_uri=<REDIRECT_URI>&grant_type=refresh_token
Parameter | Description |
---|---|
refresh_token* | <refresh_token> which is obtained in the above step (Step 3) |
client_id* | <client_id> obtained during Client Registration (Step 1) |
client_secret* | <client_secret> obtained during Client Registration (Step 1) |
redirect_uri | This param should be same redirect url mentioned while registering Client (Step 1). This param is not required when self client application type is choosen during Client Registration (Step 1). |
grant_type* | refresh_token (provide this literal string as value) |
In response, you will get a new
<access_token>
.

Calling an API using OAuth authentication
Access Token can be passed only in header and cannot be passed in the request param.
- Header name =
Authorization
- Header value =
Zoho-oauthtoken<space><access_token>
- Sample:
Authorization: Zoho-oauthtoken 1000.abcde12345fgh678.ijk9
Revoking a Refresh Token
You may choose to revoke a refresh token manually, when you no longer need access for a particular scope.
Call the following POST URL with the given params to revoke a refresh token.
METHOD : POST
https://
Request Example
The below URL is used to revoke the refresh token.
https://accounts.zoho.com/oauth/v2/token/revoke?token=<REFRESH_TOKEN>
Parameter | Description |
---|---|
token | <refresh_token> which is to be revoked |
SCOPE
Zoho Analytics APIs use selected scopes, which control the type of API's that the client application (or) end user can access. Tokens are usually created with specific scopes to restrict it from acceessing other API's. For example, You can generate a scope to create a view (or) to view metadata and so on. Scopes contain three parameters — service name, scope name, and operation type.
List of scopes available in Zoho Analytics :
Scope | Description |
---|---|
data | To access data related APIs Availabe Scopes: ZohoAnalytics.data.read, ZohoAnalytics.data.delete, ZohoAnalytics.data.update, ZohoAnalytics.data.create, ZohoAnalytics.data.all |
modeling | To access modeling related APIs Availabe Scopes: ZohoAnalytics.modeling.delete, ZohoAnalytics.modeling.update, ZohoAnalytics.modeling.create, ZohoAnalytics.modeling.all |
metadata | To access metadata related APIs Availabe Scopes: ZohoAnalytics.metadata.read, ZohoAnalytics.metadata.all |
share | To access sharing related APIs Availabe Scopes: ZohoAnalytics.share.delete, ZohoAnalytics.share.read, ZohoAnalytics.share.create, ZohoAnalytics.share.all |
embed | To access embed related APIs Availabe Scopes: ZohoAnalytics.embed.read, ZohoAnalytics.embed.all |
usermanagement | To access usermanagement related APIs Availabe Scopes: ZohoAnalytics.usermanagement.read, ZohoAnalytics.usermanagement.delete, ZohoAnalytics.usermanagement.update, ZohoAnalytics.usermanagement.create, ZohoAnalytics.usermanagement.all |
fullaccess | To access all ZohoAnalytics APIs Availabe Scope: ZohoAnalytics.fullaccess.all |
API Specification
Zoho Analytics API uses HTTP as the underlying transport protocol. It is based on
- Every table/report/dashboard in a Zoho Analytics workspace can be uniquely identified using a URL.
- The operation to be performed on the table/report/dashboard can be specified using the parameters in the URL.
- The additional payload required to perform the operation should also be specified as parameters in the URL.
- Every request has a response whose format can be controlled using parameters in the request URL.
It is important to understand the API specification clearly before referring to the actual API methods.
Server URI
The following server URI are available for Zoho Analytics. Choose the server URI based on your data centre.
Data Centre | ZohoAnalytics_Server_URI | ZohoAccounts_Server_URI | DeveloperConsole |
---|---|---|---|
US (United States) | analyticsapi.zoho.com | accounts.zoho.com | |
EU (Europe) | analyticsapi.zoho.eu | accounts.zoho.eu | |
IN (India) | analyticsapi.zoho.in | accounts.zoho.in | |
AU (Australia) | analyticsapi.zoho.com.au | accounts.zoho.com.au | |
CN (China) | analyticsapi.zoho.com.cn | accounts.zoho.com.cn | |
JP (Japan) | analyticsapi.zoho.jp | accounts.zoho.jp |
Request Format
Sample Request:
Copycurl -d "ZOHO_ACTION=ADDROW&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML &ZOHO_API_VERSION=1.0&Id=999 &Name=Gary&Date Of Birth=12-Jun-1980&Salary=10000&Country=USA" -H "Authorization:Zoho-oauthtoken <access_token>" https://analyticsapi.zoho.com/api/EmailAddress/WorkspaceName/TableName
All API requests should be placed as HTTPS POST request. A 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.
URI
The URI points to the resource inside Zoho Analytics over which the action is to be performed.
https://<
It consists of the following parts
: Server URI varies for each data centres.ZohoAnalytics_Server_URI Click here to check the available Server URIs in Zoho Analytics.OwnerEmail
: This should be the Zoho Login Email Address of owner of the organization where the workspace is present. (e.g., abc@zoho.com)WorkspaceName
: This should be the name of the workspace on which the API is to be executed. (e.g., EmployeeDB)ViewName
: 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:
<URI>?ZOHO_ACTION=[IMPORT/EXPORT...]&ZOHO_OUTPUT_FORMAT=[XML/JSON/PDF/...]&ZOHO_ERROR_FORMAT=[XML/JSON]&ZOHO_API_VERSION=1.0
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.
Authorization Using OAuth 2.0
Access token have to be passed in the header for authorization purpose in the format given below.
Authorization: Zoho-oauthtoken <access_token>
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
<param>1=<value>1&<param2>=<value2>....
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 or JSON 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)
Response Format
Sample Response : For ADDROW
Sample response to a request adding a row to the table.
XML Format:
<?xml version="1.0"encoding="UTF-8" ?>
<responseuri="/api/EmailAddress/WorkspaceName/TableName"action="ADDROW">
<result>
<!-- All the columns in the row , including formula columns -->
<row>
<columnname="Name">Gary</column>
<columnname="Date Of Birth">12-Jun-1980</column>
<columnname="Basic">10000</column>
<columnname="Country">USA</column>
</row>
</result>
<response>
JSON Format:
{"response":
{"uri": "/api/EmailAddress/WorkspaceName/TableName",
"action": "ADDROW",
"result":
{"column_order":["Name","Date Of Birth","Salary","Country"],
"rows":
["Gary","12-Jun-1980",10000,"USA"]}}}
The response format of the API request is controlled by the ZOHO_OUTPUT_FORMAT query parameter passed in the request. Currently Zoho Analytics supports XML and JSON response formats. CSV and PDF response formats are supported only for
Note:
See this
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/EmailAddress/WorkspaceName/TableName" action="<specifiedaction>">
<result>
[specific XML response based on action]
</result>
</response>
JSON Format
JSON format follows the same pattern as that of XML format.
Format
{
"response":
{
"uri": "/api/EmailAddress/WorkspaceName/TableName",
"action": "<specified action>",
"result": {[action specific properties]}
}
}
Other Formats
Other formats such as CSV, PDF can be specified only when ZOHO_ACTION is
Error handling
Sample error response : IMPORT DATA
Sample error response for import data in Table.
XML Format:
<?xml version="1.0"encoding="UTF-8"?>
<responseurl="/api/EmailAddress/WorkspaceName/TableName"action="IMPORT">
<error>
<code>7138</code>
<message>
Table "TableName" is not present in the workspace "WorkspaceName"
</message>
</error>
</response>
JSON Format:
{"response":
{"url": "/api/EmailAddress/WorkspaceName/TableName",
"action": "IMPORT",
"error":
{"code":7138,
"message": "Table "TableName" is not present in the workspace "WorkspaceName""}}}
API execution could result in Error conditions. In such cases, follow the below steps to identify an error condition and handle the same:
Check the http response code. If it is 4xx or 5xx (eg., 400, 500, 401 etc.,), then it is an error.
In case of error, the error information would be sent in the response body.
The format of the error content can be specified by the parameter ZOHO_ERROR_FORMAT. The value it can be either:
XML
JSON
XML Format
<?xml version="1.0" encoding="UTF-8" ?>
<response uri="/api/EmailAddress/WorkspaceName/TableName" action="<specifiedaction>">
<error>
[error details]
</error>
</response>
JSON Format
{
"response":
{
"uri": "/api/EmailAddress/WorkspaceName/TableName",
"action": "<specified action>",
"error": {[error details]}
}
}
Applying Filter Criteria
Example
(("Department"='Finance' and"Salary" < 9000)or("Department"='Admin'
and"Salary" < 8000))
Sample
A sample delete request that deletes all the rows that match
the criteria "s2">"Department"='Finance'
is given below.
URL:
https://analyticsapi.zoho.com/api/<OwnerEmail>/<WorkspaceName>/<Name>?
ZOHO_ACTION=DELETE&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
&ZOHO_API_VERSION=1.0
Data Sent as POST parameters.
ZOHO_CRITERIA=("Department"='Finance')
ZOHO_CRITERIA is encoded for the url format. Unencoded value is provided below.
ZOHO_CRITERIA=("Department"='Finance')
Zoho Analytics API allows you to apply filter criteria while you execute the various actions. When you apply a criteria, the action will be performed only on the data that matches the filter criteria given.
You can apply criteria as part of the following API actions:
Update
Delete
Export
The filter criteria has to be passed as a parameter, named ZOHO_CRITERIA, to the action request. This should be part of the body of the POST request.
Format
The filter criteria that is passed as part of the request, should follow the same format as that of the SQL SELECT WHERE clause.
The generalized format of a simple criteria is given below:
(<columnname/SQL expression/SQL function calls> <relational operator> <value/column name/SQL expression/SQL function calls>)
On using ZOHO_CRITERIA for views which involves multiple tables having same column name, the criteria should append with tablename to avoid name clash.
<tablename>.<columnname> <relational operator> <value/column name/SQL expression/SQL function calls>
Description
The criteria follows the
Name | Description |
---|---|
column name | Refers to the name of the column in table or query table on which you are applying a criteria |
SQL Expression | You could provide any valid SQL Expression. The above expression subtract the value in the “Cost” column from value in the “Sales” column. You could use any of the Arithmetic operator supported in an Arithmetic Operators: +, -, *, / |
SQL Function call | Oracle, MS SQL Server, MySQL, DB2, Sybase, ANSI SQL, Informix and PostgreSQL databases Eg.: year(date_column) = 2008 . Note: All supported in-built function from different databases will be documented soon. |
relational operator | This could be any of the relational operators supported in an Supported Relational Operators: |
value | Refers to the exact value to match. Eg.: "Department" = 'Finance' here 'Finance' is a literal value to match. |
NOTES FOR CRITERIA FORMATION:
- You can combine any number of criteria that is defined in the above specified format using logical operators like AND and OR to form complex criteria, the same way as in
SQL SELECT WHERE clause. Also use Braces ’()’ to group the criteria for ordering. - Enclose string literals (ie values) in single quotes.
Enclose tablename and columnname in double quotes.
Eg.: "table_1"."number_column">"table_2"."number_column"
Date Format should be either
yyyy-mm-dd
oryyyy-mm-dd hh:mm:ss
Eg.: "date_column"='2007-01-31 00:00:00'
Currency symbols (or) percent symbol can’t be used in criteria
Eg.: currency_column=75.66 is valid
Eg.: percent_column=100 is valid
currency_column=75.66$ (or) percent_column=100% is not valid
Eg.: "plaintext_column"='country'
Eg.: number_column=75 is valid
Refer to the
Common Parameters in Query String of the API URL
In this section we will discuss about the mandatory and optional parameters that could be passed in the query string of every API call.
Mandatory Parameters:
ZOHO_ACTION
This parameter specifies the action to be performed by the API request. The sample values are:
ADDROW - To add a row of data into a table.IMPORT - To import data in bulk into a table in CSV/TSV/Tabular Text formatsUPDATE - To update existing rows in a table.DELETE - To delete rows in a table.EXPORT - To export table or report in different formats.DATABASEMETADATA - To fetch information about the Workspaces and the reports created within it, in your Zoho Analytics account.
Note:
Value of ZOHO_ACTION parameter should be in the same case(UPPER CASE) as given in this document.
ZOHO_OUTPUT_FORMAT
This parameter specifies the output format for the response. Following are the following supported formats:
- XML
- JSON
In-case ZOHO_ACTION is
- CSV
- HTML
- IMAGE
ZOHO_ERROR_FORMAT
Specifies the output format for the response in case an error occurs when trying to process the request. Following are the supported formats:
- XML
- JSON
ZOHO_API_VERSION
The API version of Zoho Analytics based on which the application(/service) has been written. This parameter allows the Zoho Analytics to handle applications based on the older versions. The current API version is 1.0
Optional Parameters:
These parameters have to be sent in the body of the POST request.
ZOHO_DATE_FORMAT
This parameter can be used during
Example: ZOHO_DATE_FORMAT=dd-MMM-yyyy
View this
Data API
This section lists the APIs which can be used to perform data addition, bulk import, deletion and updates into your Zoho Analytics data tables. This also provides APIs to export your tables, reports & dashboards in PDF, Excel, JSON, HTML, Image and CSV formats.
Add Row
Download client libraries :
C# |GO |JAVA |PHP |PYTHON |NODEJS Sample Request:
Copycurl -d "ZOHO_ACTION=ADDROW&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML &ZOHO_API_VERSION=1.0&Id=999 &Name=Gary&Date Of Birth=12-Jun-1980&Salary=10000&Country=USA" -H "Authorization:Zoho-oauthtoken <access_token>" https://analyticsapi.zoho.com/api/EmailAddress/WorkspaceName/TableName
Sample Response JSON Format:
{"response":
{"url": "/api/EmailAddress/WorkspaceName/TableName",
"action": "ADDROW",
"result":
{"column_order":["Name","Date Of Birth","Salary","Country"],
"rows":["Gary","12-Jun-1980",10000,"USA"]}}}
Sample Response XML Format:
<?xml version="1.0"encoding="UTF-8" ?>
<response url ="/api/EmailAddress/WorkspaceName/TableName"action="ADDROW">
<result>
<!-- All the columns in the row , including formula columns -->
<row>
<columnname="Name">Gary</column>
<columnname="Date Of Birth">12-Jun-1980</column>
<columnname="Basic">10000</column>
<columnname="Country">USA</column>
</row>
</result>
</response>
This API allows you to add a single row into a specified table.
request uri
https://<
ZohoAnalytics.data.create
COMMON PARAMETERS
Parameter | Possible Values | Description |
---|---|---|
ZOHO_ACTION | ADDROW | This parameter specifies the action to be performed by the API request.Note: Value of ZOHO_ACTION parameter should be in the same case(UPPER CASE) as given in this document. |
ZOHO_OUTPUT_FORMAT | XML/JSON | This parameter specifies the output format for the response. |
ZOHO_ERROR_FORMAT | XML/JSON | Specifies the output format for the response in case an error occurs when trying to process the request. |
ZOHO_API_VERSION | 1.0 | The API version of Zoho Analytics based on which the application(/service) has been written. This parameter allows the Zoho Analytics to handle applications based on the older versions.The current API version is 1.0 |
Authorization
To make authenticated API request, append the access token in Authorization
request header.
Value | Description | |
---|---|---|
Authorization | The Access token provides a secure and temporary access to Zoho Analytics API's. Each access token will be valid only for an hour, and can be used only for the set of operations that is described in the scope. |
ACTION SPECIFIC PARAMETERS (Data for the Row)
Parameter | Possible Values | Description |
---|---|---|
ZOHO_DATE_FORMAT (optional) | Format of the date. E.g. dd-MMM-YYYY | The format of date value. Specify this in-case any date field is being added and its format cannot be auto recognized by Zoho Analytics. |
The column values for the row should be passed as POST parameters in <columnname>
=<value>
format. (The parameters should be in application/x-www-form-urlencoded format).
<columnname>
- Refers to the name of the column in the table to which the value is added.
<value>
- Refers to the corresponding value to be added for this column.
Possible Error Codes In ADDROW
Delete Data
Download client libraries :
C# |GO |JAVA |PHP |PYTHON |NODEJS Sample Request:
Copycurl -d "ZOHO_ACTION=DELETE&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML &ZOHO_API_VERSION=1.0 &ZOHO_CRITERIA=("Department" = 'Finance')" -H "Authorization:Zoho-oauthtoken <access_token>" https://analyticsapi.zoho.com/api/EmailAddress/WorkspaceName/TableName
Sample Response JSON Format:
{"response":
{"uri": "/api/EmailAddress/WorkspaceName/TableName",
"action": "DELETE",
"criteria": "\"Department\" = \'Finance\'",
"result":
{"message": "Deleted rows",
"deletedrows":"4"}}}
Sample Response XML Format:
<?xml version="1.0"encoding="UTF-8" ?>
<responseuri="/api/EmailAddress/WorkspaceName/TableName"action="DELETE">
<criteria>"Department" = 'Finance'</criteria>
<result>
<message>Deleted rows</message>
<deletedrows>4</deletedrows>
</result>
</response>
The data present in a table can be deleted using this API.
request uri
https://<
ZohoAnalytics.data.delete
COMMON PARAMETERS
Parameter | Possible Values | Description |
---|---|---|
ZOHO_ACTION | DELETE | This parameter specifies the action to be performed by the API request.Note: Value of ZOHO_ACTION parameter should be in the same case(UPPER CASE) as given in this document. |
ZOHO_OUTPUT_FORMAT | XML/JSON | This parameter specifies the output format for the response. |
ZOHO_ERROR_FORMAT | XML/JSON | Specifies the output format for the response in case an error occurs when trying to process the request. |
ZOHO_API_VERSION | 1.0 | The API version of Zoho Analytics based on which the application(/service) has been written. This parameter allows the Zoho Analytics to handle applications based on the older versions.The current API version is 1.0. |
Authorization
To make authenticated API request, append the access token in Authorization
request header.
Value | Description | |
---|---|---|
Authorization | The Access token provides a secure and temporary access to Zoho Analytics API's. Each access token will be valid only for an hour, and can be used only for the set of operations that is described in the scope. |
ACTION SPECIFIC PARAMETERS
Parameter | Possible Values | Description |
---|---|---|
(optional) | Criteria | If that parameter is not sent, then all the rows are deleted. If criteria is sent the rows matching the criteria alone are deleted.Please |
ZOHO_VALID_JSON (optional) | true / false | Specific for JSON Response By default it will be false. True - Returns a valid JSON data (with JSON escaping) False - Returns a JSON data with JS escaping. |
ZOHO_CALLBACK_FUNCTION (optional) | Name of the json callback function | Specific for JSON Response Processes JSON response elsewhere in the JavaScript code on the page |
Possible Error Codes In DELETE DATA
Update Data
Download client libraries :
C# |GO |JAVA |PHP |PYTHON |NODEJS Sample Request:
Copycurl -d "ZOHO_ACTION=UPDATE&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML &ZOHO_API_VERSION=1.0&Name=as &ZOHO_CRITERIA=("Department" = 'Finance')" -H "Authorization:Zoho-oauthtoken <access_token>" https://analyticsapi.zoho.com/api/EmailAddress/WorkspaceName/TableName
Sample Response JSON Format:
{"response":
{"uri": "/api/EmailAddress/WorkspaceName/TableName",
"action": "UPDATE",
"criteria": "\"Department\" = 'Finance'",
"result":
{"updatedColumns":["Salary","Deduction","Perks"],
"updatedRows":"4"}}}
Sample Response XML Format:
<?xml version="1.0"encoding="UTF-8" ?>
<responseuri="/api/EmailAddress/WorkspaceName/TableName"action="UPDATE">
<criteria>"Department" = 'Finance'</criteria>
<result>
<updatedColumns>
<column>Salary</column>
<column>Deduction</column>
<column>Perks</column>
</updatedColumns>
<updatedRows>4</updatedRows>
</result>
</response>
The data present in a table can be updated using this API.
request uri
https://<
ZohoAnalytics.data.update
COMMON PARAMETERS
Parameter | Possible Values | Description |
---|---|---|
ZOHO_ACTION | UPDATE | This parameter specifies the action to be performed by the API request.Note: Value of ZOHO_ACTION parameter should be in the same case(UPPER CASE) as given in this document. |
ZOHO_OUTPUT_FORMAT | XML/JSON | This parameter specifies the output format for the response. |
ZOHO_ERROR_FORMAT | XML/JSON | Specifies the output format for the response in case an error occurs when trying to process the request. |
ZOHO_API_VERSION | 1.0 | The API version of Zoho Analytics based on which the application(/service) has been written. This parameter allows the Zoho Analytics to handle applications based on the older versions.The current API version is 1.0. |
Authorization
To make authenticated API request, append the access token in Authorization
request header.
Value | Description | |
---|---|---|
Authorization | The Access token provides a secure and temporary access to Zoho Analytics API's. Each access token will be valid only for an hour, and can be used only for the set of operations that is described in the scope. |
ACTION SPECIFIC PARAMETERS
Parameter | Possible Values | Description |
---|---|---|
(optional) | Criteria | If that parameter is not sent, then all the rows are updated. If criteria is sent the rows matching the criteria alone are updated.For more details about the format for the criteria |
ZOHO_DATE_FORMAT (optional) | Format of the date. E.g. dd-MMM-YYYY | The format of date value. Specify this in-case any date field is being updated and its format cannot be auto recognized by Zoho Analytics. |
ZOHO_VALID_JSON | true / false | By default it will be false. True - Returns a valid JSON data (with JSON escaping) False - Returns a JSON data with JS escaping. |
Specifying the data to be updated (POST params)
Pass the columns whose values you would like to update in a <columnname>
=<value>
format. (The parameters should be in application/x-www-form-urlencoded format).
<columnname>
- Refers to the name of the column in the table whose value is to be updated.
<value>
- Refers to the corresponding value to be updated in the column
For specifying empty (null) values, the parameter should be sent with empty values. In the example above, the Deduction value is taken to be empty.
Possible Error Codes In UPDATE DATA
Import Data
Download client libraries :
C# |GO |JAVA |PHP |PYTHON |NODEJS Sample Request:
Copycurl -X POST 'https://analyticsapi.zoho.com/api/UserEmail/WorkspacName/TableName? ZOHO_ACTION=IMPORT&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML& ZOHO_API_VERSION=1.0&ZOHO_IMPORT_TYPE=APPEND& ZOHO_AUTO_IDENTIFY=TRUE&ZOHO_ON_IMPORT_ERROR=ABORT&ZOHO_CREATE_TABLE=true' -H 'content-type: multipart/form-data' -H 'Authorization:Zoho-oauthtoken <access_token>' -F 'ZOHO_FILE=@/home/local/import.csv'
Sample Response JSON Format:
{" response":
{"uri": "/api/EmailAddress/WorkspaceName/TableName",
"action": "IMPORT",
"result":
{"importSummary":
{"totalColumnCount":3,
"selectedColumnCount":3,
"totalRowCount":50,
"successRowCount":48,
"warnings":0,
"importOperation": "created",
"importType": "APPEND"},
"columnDetails":
{"Name": "Plain Text",
"Date Of Birth": "Date",
"Salary": "Number"},
"importErrors": "[Line: 5 Field: 3] a1213 -WARNING: Invalid
Number value"}}}
Sample Response XML Format:
<?xml version="1.0"encoding="UTF-8" ?>
<responseuri="/api/EmailAddress/WorkspaceName/TableName"action="IMPORT">
<result>
<importSummary>
<totalColumnCount>3 </totalColumnCount>
<selectedColumnCount>3</selectedColumnCount>
<totalRowCount>50</totalRowCount>
<successRowCount>48</successRowCount>
<warnings>0</warnings>
<importOperation>created</importOperation>
<importType>APPEND</importType>
</importSummary>
<columnDetails>
<columndatatype="Plain Text">Name </column>
<columndatatype="Date">Date Of Birth</column>
<columndatatype="Number">Salary</column>
</columnDetails>
<!-- The first 100 errors are alone sent -->
<importErrors>
[Line: 5 Field: 3] a1213 -WARNING: Invalid Number value
</importErrors>
</result>
</response>
With the Zoho Analytics API, you can add/update data in bulk. The data to be added/updated should be in CSV or JSON file formats.
request uri
https://<
ZohoAnalytics.data.update
COMMON PARAMETERS
Parameter | Possible Values | Description |
---|---|---|
ZOHO_ACTION | IMPORT | This parameter specifies the action to be performed by the API request.Note: Value of ZOHO_ACTION parameter should be in the same case(UPPER CASE) as given in this document. |
ZOHO_OUTPUT_FORMAT | XML/JSON | This parameter specifies the output format for the response. |
ZOHO_ERROR_FORMAT | XML/JSON | Specifies the output format for the response in case an error occurs when trying to process the request. |
ZOHO_API_VERSION | 1.0 | The API version of Zoho Analytics based on which the application(/service) has been written. This parameter allows the Zoho Analytics to handle applications based on the older versions.The current API version is 1.0. |
Authorization
To make authenticated API request, append the access token in Authorization
request header.
Value | Description | |
---|---|---|
Authorization | The Access token provides a secure and temporary access to Zoho Analytics API's. Each access token will be valid only for an hour, and can be used only for the set of operations that is described in the scope. |
ACTION SPECIFIC PARAMETERS
Parameter | Possible Values | Description |
---|---|---|
(optional) | Criteria | If that parameter is not sent, then all the rows are updated. If criteria is sent the rows matching the criteria alone are updated. |
ZOHO_FILE or ZOHO_IMPORT_DATA (mandatory) | File or String | ZOHO_FILE - The file to be import.
ZOHO_IMPORT_DATA - The string to be import. |
ZOHO_IMPORT_FILETYPE (optional) | CSV/JSON | Default value is CSV. Format of the file to be imported. Supported formats are: |
ZOHO_IMPORT_TYPE (mandatory) | APPEND/TRUNCATEADD/UPDATEADD | |
ZOHO_AUTO_IDENTIFY (mandatory) | TRUE/FALSE | Used to specify whether to auto identify the CSV format. |
ZOHO_ON_IMPORT_ERROR (mandatory) | ABORT/SKIPROW/SETCOLUMNEMPTY | This parameter controls the action to be taken incase there is an error during import. |
ZOHO_CREATE_TABLE (mandatory) | true/false. | Default is false. |
ZOHO_SELECTED_COLUMNS (optional) | List of comma separated column names. E.g.,: Name, Department | Specify the columns to be imported into the Zoho Analytics table from the data being uploaded. Note: Incase of JSON files you need to specify the column names capturing the full JSON tree hierarchy eg., employee.Name, employee.Department |
ZOHO_MATCHING_COLUMNS (mandatory only when the ZOHO_IMPORT_TYPE is UPDATEADD) | List of comma separated column names. E.g.,: Name,Department | The values in the columns to be matched will be used for comparison to check whether data row(s) being imported matches with an existing row(s) in the table. The existing rows in the table that match will be updated with values from data imported. The remaining rows are appended to the table as new rows. |
ZOHO_SKIPTOP (optional) | <number> | Number of rows that are to be skipped from the top in the CSV file being imported. |
ZOHO_THOUSAND_SEPARATOR (optional) | 0 / 1 / 2 / 3 | Default is 0. This parameter controls the action to be taken in case there is a thousand separator in the data. 0 - COMMA 1 - DOT 2 - SPACE 3 - SINGLE QUOTE |
ZOHO_DECIMAL_SEPARATOR (optional) | 0 / 1 | Default is 0. This parameter controls the action to be taken in case there is a decimal separator in the data. 0 - DOT 1 - COMMA |
ZOHO_DATE_FORMAT (optional) | Format of the date. E.g. dd-MMM-YYYY | The format of date value. Specify this in-case any date field is being imported and its format cannot be auto recognized by Zoho Analytics. |
ZOHO_IMPORT_JSON_RETCOLNAMES (optional) | true/false. | Default value is false. This parameter is applicable only for importing JSON files. This defines how the columns names are to be constructed from the JSON file. eg. , employee.Name, employee.Department |
ZOHO_COLUMN_DATEFORMAT (optional) | JSONObject with column name as key and date format as value.E.g.,: {"columnName1":"","columnName2":""}NOTE: do encode this value and use. | Specify this in case multiple date fields are being imported having different format each. |
CSV Format Details
These parameters need to be specified if the ZOHO_AUTO_IDENTIFY is set to false.
Parameter | Possible Values | Description |
---|---|---|
ZOHO_COMMENTCHAR |
| Comment Character. If the character mentioned is found at the beginning of the row, the csv row will be skipped. |
ZOHO_DELIMITER | 0 / 1 / 2 / 3 | Delimiter which separates the values in the file. 0 - if the delimiter is COMMA 1 - if the delimiter is TAB 2 - if the delimiter is SEMICOLON 3 - if the delimiter is SPACE |
ZOHO_QUOTED | 0 / 1 / 2 | The Text Qualifier. 0 - None 1 - SINGLE QUOTE 2 - DOUBLE QUOTE |
Possible Error Codes In IMPORT DATA
Export Data
Download client libraries :
C# |GO |JAVA |PHP |PYTHON |NODEJS Sample Request:
Copycurl -d "ZOHO_ACTION=EXPORT&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML &ZOHO_API_VERSION=1.0" -H "Authorization:Zoho-oauthtoken <access_token>" https://analyticsapi.zoho.com/api/EmailAddress/WorkspaceName/ViewName
Sample Response JSON Format:
{"response":
{"uri": "/api/EmailAddress/WorkspaceName/TableName",
"action": "EXPORT",
"result":
{"column_order":["Name","Department","Date Of Birth"],
"rows":
[["John","Finance","12 May 1972"],
["Joan","Admin","15 June 1975"]]}}}
Sample Response XML Format:
<?xml version="1.0"encoding="UTF-8" ?>
<responseuri="/api/EmailAddress/WorkspaceName/TableName"action="EXPORT">
<result>
<rows>
<row>
<columnname="Name">Gary</column>
<columnname="Date Of Birth">12-Jun-1980</column>
<columnname="Basic">10000</column>
<columnname="Country">USA</column>
</row>
<row>
<columnname="Name">John</column>
<columnname="Date Of Birth">12-Jun-1981</column>
<columnname="Basic">10000</column>
<columnname="Country">Canada</column>
</row>
<row>
<columnname="Name">Joan</column>
<columnname="Date Of Birth">12-Jun-1982</column>
<columnname="Basic">10000</column>
<columnname="Country">Mexico</column>
</row>
</rows>
</result>
</response>
Using this API users can export/pull data from tables or reports (pivots, charts etc.,) in different formats.
request uri
https://<
ZohoAnalytics.data.read
COMMON PARAMETERS
Parameter | Possible Values | Description |
---|---|---|
ZOHO_ACTION | EXPORT | This parameter specifies the action to be performed by the API request.Note: Value of ZOHO_ACTION parameter should be in the same case(UPPER CASE) as given in this document. |
ZOHO_OUTPUT_FORMAT | XML/JSON/CSV/PDF/HTML/IMAGE | This parameter specifies the output format for the response. |
ZOHO_ERROR_FORMAT | XML/JSON | Specifies the output format for the response in case an error occurs when trying to process the request. |
ZOHO_API_VERSION | 1.0 | The API version of Zoho Analytics based on which the application(/service) has been written. This parameter allows the Zoho Analytics to handle applications based on the older versions.The current API version is 1.0. |
Authorization
To make authenticated API request, append the access token in Authorization
request header.
Value | Description | |
---|---|---|
Authorization | The Access token provides a secure and temporary access to Zoho Analytics API's. Each access token will be valid only for an hour, and can be used only for the set of operations that is described in the scope. |
ACTION SPECIFIC PARAMETERS
Parameter | Possible Values | Description |
---|---|---|
(optional) | Criteria | If that parameter is not sent, then all the rows are exported. If criteria is sent the rows matching the criteria alone are exported.For more details about the format for the criteria |
(optional) | SQL Query | Literal SQL Query can be used as criteria. Export using joining tables and specific columns can be done using ZOHO_SQLQUERY. Note :Shared users are not allowed to use this parameter. |
GENERATETOC (optional - only for dashboards) | true / false | true - To generate Table Of Contents.By default it will be false. |
ZOHO_DASHBOARD_LAYOUT (optional - only for dashboards) | 0 or 1 | 0 - For Each Report in New Page 1 - For Layout as in Dashboard |
Additional optional parameters.
All the parameters that all defined below are optional one.
CSV Format
Parameter | Possible Values | Description |
---|---|---|
ZOHO_DELIMITER | Value between 0 - 3 0 - COMMA 1 - TAB 2 - SEMICOLON 3 - SPACE | The delimiter character used for separating the fields in a row in the CSV. |
ZOHO_RECORD_DELIMITER | Value between 0 - 2 0 - DOS 1 - UNIX 2 - MAC | The record delimiter (newline character) to use. |
ZOHO_QUOTED | Value between 0 - 1 0 - SINGLE 1 - DOUBLE | The quote character to use for quoting the values. |
ZOHO_INCLUDE_HEADER | true / false | true - To include the column names in the first row of the CSV exported. false - To not include the column names in the CSV exported. |
ZOHO_SHOW_HIDDENCOLS | true / false | Controls where the columns that have been hidden in the table/report have to be exported. true - To include the hidden columns of the table/report in the data exported false - To not include the hidden columns of the table/report in the data exported. |
XML Format
Parameter | Possible Values | Description |
---|---|---|
ZOHO_SHOW_HIDDENCOLS | true / false | Controls where the columns that have been hidden in the table/report have to be exported. true - To include the hidden columns of the table/report in the data exported false - To not include the hidden columns of the table/report in the data exported. |
HTML Format
Parameter | Possible Values | Description |
---|---|---|
ZOHO_SHOW_HIDDENCOLS | true / false | Controls where the columns that have been hidden in the table/report have to be exported. true - To include the hidden columns of the table/report in the data exported false - To not include the hidden columns of the table/report in the data exported. |
PDF Format
Parameter | Possible Values | Description |
---|---|---|
ZOHO_PAPERSIZE | Value between 0 - 5 0 - LETTER 1 - LEGAL 2 - TABLOID 3 - A3 4 - A4 5 - AUTO | The size of the paper. |
ZOHO_SHOW_TITLE | Value between 0 - 2 0 - AT TOP 1 - AT BOTTOM 2 - NONE | Controls the title positioning. |
ZOHO_SHOW_DESC | Value between 0 - 2 0 - AT TOP 1 - AT BOTTOM 2 - NONE | Controls the description positioning. |
ZOHO_EXPORT_LANGUAGE | Value between 0 - 4 0 - ENGLISH 1 - CHINESE 2 - JAPANESE 3 - EUROPEAN 4 - KOREAN | PDF will be rendered using the specified language Default - 0 (ENGLISH) |
ZOHO_PAPERSTYLE | Portrait / Landscape | |
ZOHO_SHOW_HIDDENCOLS | true / false | Controls where the columns that have been hidden in the table/report have to be exported.true - To include the hidden columns of the table/report in the data exportedfalse - To not include the hidden columns of the table/report in the data exported. |
ZOHO_SELECTED_COLUMNS | List of comma separated column names | Controls the column names that need to be exported. If it is not given then all the columns, in the table/report, are exported. |
Margin Settings: | ||
ZOHO_TOPMARGIN ZOHO_BOTTOMMARGIN ZOHO_LEFTMARGIN ZOHO_RIGHTMARGIN | Decimal values between 0 to 1 | The margin in inches for that edge. Can be decimal between 0 to 1 (like 0.5). |
Header/Footer Settings: | ||
ZOHO_HEAD_LEFT ZOHO_HEAD_RIGHT ZOHO_HEAD_CENTER ZOHO_FOOT_LEFT ZOHO_FOOT_RIGHT ZOHO_FOOT_CENTER | Value between 0 - 5 0 - Leave it blank 1 - Include Title 2 - Current Date/Time 3 - Include Page number in the format “Page #” 4 - Include page number in the format “Page # Of #” 5 - CUSTOM - Include custom text in footer | The header or footer value that needs to be generated for each page at that particular position. |
Custom Header/Footer value | ||
ZOHO_HEAD_LEFT_TEXT ZOHO_HEAD_RIGHT_TEXT ZOHO_HEAD_CENTER_TEXT ZOHO_FOOT_LEFT_TEXT ZOHO_FOOT_RIGHT_TEXT ZOHO_FOOT_CENTER_TEXT | Custom text. | If any of the header/footer setting is 5 (.ie, CUSTOM) then the corresponding custom value/text should be passed. |
IMAGE Format
Parameter | Possible Values | Description |
---|---|---|
ZOHO_WIDTH | <number> | The width of the image . |
ZOHO_HEIGHT | <number> | The height of the image |
ZOHO_TITLE | true / false | Controls whether the title of the report is to be added to the image. true - Include the title. false - Do not include title. |
ZOHO_DESCRIPTION | true/false | Controls whether the description of the report is to be added to the image. true - Include the description. false - Do not include description. |
ZOHO_LEGEND | true / false | Controls whether the legend is to be included in the image generated. true - Include the legend in the image. false - Do not include the legend in the image. |
ZOHO_IMAGE_FORMAT | png / jpg | The format of the exported image. It could be either in PNG or JPG formats. |
JSON Format
Parameter | Possible Values | Description |
---|---|---|
ZOHO_VALID_JSON | true / false | By default it will be false. True - Returns a valid JSON data (with JSON escaping) False - Returns a JSON data with JS escaping. |
ZOHO_SHOW_HIDDENCOLS | true / false | Controls where the columns that have been hidden in the table/report have to be exported. true - To include the hidden columns of the table/report in the data exported false - To not include the hidden columns of the table/report in the data exported. |
ZOHO_CALLBACK_FUNCTION | Name of the json callback function | Processes JSON response elsewhere in the JavaScript code on the page |
KEY_VALUE_FORMAT | true / false | By default it will be false. True - Returns JSON data as ColumnName - Value pair. { (This JSONArray alone can directly feed to the Import API). False - Returns JSON data in traditional way. { |
Export Using SQL:
Zoho Analytics has implemented the Zoho CloudSQL technology as an extension to its HTTP Web API. Using the
Refer to the documentation on
Possible Error Codes In EXPORT DATA
Error codes in Data API
Sample error XML format:
<responseuri="/api/EmailAddress/WorkspaceName"action="ADDROW">
<error>
<code>7103</code>
<message>
Workspace not found! Please check whether the workspace exists
</message>
</error>
</response>
Sample error JSON format:
{"response":
{"uri": "\/api\/email\/WorkspaceName",
"action": "ADDROW",
"error":
{"code":7103,
"message": "Workspace not found! Please check whether the workspace exists"}}}
This section lists all possible error response codes that could be sent from the Zoho Analytics server on failure of Data APIs. You can use this for appropriate error handling.
Error Codes
Error-Code | Reason | Solution |
---|---|---|
7103 | The Workspace Name mentioned in the API URL does not exist. | Check the workspace name in the request URL and provide a valid workspace name. |
7138 | The view name specified in the API request URL does not exist. | Check the view name in the request URL and provide a valid view name. |
7235 | Not even a single column name provided in source file matches with the column data in table. | Check whether the column name in source data matches with column names present in analytics table.NOTE: Also check whether the parameter ZOHO_IMPORT_FILETYPE is provided with proper value. |
7507 | Value entered in the mentioned column does not follow the specified data-type. | Check the value of that column and provide value in the specified data-type. |
7511 | Mentioned Column is a mandatory column. | Should specify the value for that mandatory column. |
8002 | Specified criteria is invalid. | Provide valid criteria. |
8004 | The column mentioned in the criteria is not present in the table. | Check the column name and provide valid name. |
8016 | You need to have at-least one column for INSERT or UPDATE action. | You should provide at-least one column with value. |
8504 | The required parameter is not proper or has not been sent. | Send the parameter with valid data. |
8506 | The mentioned parameter has been sent more than the required count. | Check and remove that extra parameter mentioned in the response. |
8516 | Invalid value passed in the mentioned parameter. | Provide the valid data to the mentioned parameter. |
8533 | The user email address provided in the URL is an improper format. | Provide a valid email address. |
In case of any error other than the above said, mail the API request URL parameters and error response details to
Modeling API
This section lists all the modeling APIs. Modeling APIs can be used to add, delete & rename columns in a Zoho Analytics table. It also offers APIs to copy objects (workspaces, reports and formulas) from one workspace to another present in the same account or across different accounts.
Create Workspace
Download client libraries :
C# |GO |JAVA |PHP |PYTHON |NODEJS Sample Request:
Copycurl -d "ZOHO_ACTION=CREATEBLANKDB&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML &ZOHO_API_VERSION=1.0&ZOHO_DATABASE_NAME=Workspace_Name &ZOHO_DATABASE_DESC=Workspace_Description" -H "Authorization:Zoho-oauthtoken <access_token>" https://analyticsapi.zoho.com/api/EmailAddress
Sample Response XML Format:
<responseuri="/api/EmailAddress/WorkspaceName"action="CREATEBLANKDB">
<result>
<message>
Successfully Workspace'Workspace_Name' Created
</message>
<dbid>
99999999999999
</dbid>
</result>
</response>
Sample Response JSON Format:
{"response":
{"uri": "\/api\/email/WorkspaceName",
"action": "CREATEBLANKDB",
"result":
{"message": "Successfully Workspace'Workspace_Name' Created",
"dbid": "99999999999999"}}}
Create Workspace API allows the user to create a blank workspace on the Zoho Analytics account.
request uri
https://<
ZohoAnalytics.modeling.create
COMMON PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_ACTION | CREATEBLANKDB | This parameter specifies the action to be performed by the API request. |
ZOHO_OUTPUT_FORMAT | XML/JSON | This parameter specifies the output format for the response. |
ZOHO_ERROR_FORMAT | XML/JSON | Specifies the output format for the response in case an error occurs when trying to process the request. |
ZOHO_API_VERSION | 1.0 | The API version of Zoho Analytics based on which the application(/service) has been written. This parameter allows the Zoho Analytics to handle applications based on the older versions.The current API version is 1.0. |
Authorization
To make authenticated API request, append the access token in Authorization
request header.
Value | Description | |
---|---|---|
Authorization | The Access token provides a secure and temporary access to Zoho Analytics API's. Each access token will be valid only for an hour, and can be used only for the set of operations that is described in the scope. |
ACTION SPECIFIC PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_DATABASE_NAME (mandatory) | <workspace_name> | The Name of the Zoho Analytics Online Reporting workspace which can be taken from workspace URL. |
ZOHO_DATABASE_DESC (optional) | <workspace_description> | The Description of the workspace(can be null). |
Possible Error Codes In Create Workspace
Copy Workspace
Download client libraries :
C# |GO |JAVA |PHP |PYTHON |NODEJS Sample Request:
Copycurl -d "ZOHO_ACTION=COPYDATABASE&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML &ZOHO_API_VERSION=1.0 &ZOHO_DATABASE_NAME=New Workspace Name&ZOHO_COPY_DB_KEY= ************" -H "Authorization:Zoho-oauthtoken <access_token>" https://analyticsapi.zoho.com/api/EmailAddress/WorkspaceName
Sample Response XML Format:
<responseuri="/api/EmailAddress/WorkspaceName"action="COPYDATABASE">
<result>
<message>
Successfully Workspace Copied
</message>
<dbid>
99999999999999
</dbid>
</result>
</response>
Sample Response JSON Format:
{"response":
{"uri": "\/api\/email/WorkspaceName",
"action": "COPYDATABASE",
"result":
{"message": "Successfully Workspace Copied",
"dbid": "99999999999999"}}}
The Copy Workspace API is used to copy the workspace from one Zoho Analytics Account to another Zoho Analytics Account.
request uri
https://<
ZohoAnalytics.modeling.create
COMMON PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_ACTION | COPYDATABASE | This parameter specifies the action to be performed by the API request. |
ZOHO_OUTPUT_FORMAT | XML/JSON | This parameter specifies the output format for the response. |
ZOHO_ERROR_FORMAT | XML/JSON | Specifies the output format for the response in case an error occurs when trying to process the request. |
ZOHO_API_VERSION | 1.0 | The API version of Zoho Analytics based on which the application(/service) has been written. This parameter allows the Zoho Analytics to handle applications based on the older versions.The current API version is 1.0. |
Authorization
To make authenticated API request, append the access token in Authorization
request header.
Value | Description | |
---|---|---|
Authorization | The Access token provides a secure and temporary access to Zoho Analytics API's. Each access token will be valid only for an hour, and can be used only for the set of operations that is described in the scope. |
ACTION SPECIFIC PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_DATABASE_NAME (mandatory) | <Workspace_name> | This parameter holds the name of the destination workspace |
ZOHO_DATABASE_DESC (optional) | <Workspace_description> | This parameter holds the description of the destination workspace |
ZOHO_COPY_WITHDATA (optional) | true/false | true - The data present in all tables of source workspace will be copied into destination workspace.false - The data present in all tables of source workspace will not be copied into destination workspace |
COPY_WITH_IMPORT_SOURCE (optional) | true/false | By default it will be false.true - Import sources present in the source workspace will be copied into destination workspace.false - Import sources present in the source workspace will not be copied into destination workspace |
ZOHO_COPY_DB_KEY (mandatory) | <Workspace_key> | The secret key used for allowing the user to copy the Workspace / Reports. The source workspace Admin has to create the Copy Workspace Secret Key. Note: You need to provide the appropriate values in the above URL to generate the corresponding Copy Workspace Key for your setup. |
Possible Error Codes In COPY WORKSPACE
Delete Workspace
Download client libraries :
C# |GO |JAVA |PHP |PYTHON |NODEJS Sample Request:
Copycurl -d "ZOHO_ACTION=DELETEDATABASE&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML &ZOHO_API_VERSION=1.0 &ZOHO_DATABASE_NAME=Workspace Name" -H "Authorization:Zoho-oauthtoken <access_token>" https://analyticsapi.zoho.com/api/EmailAddress
Sample Response XML Format:
<responseuri="/api/EmailAddress"action="DELETEDATABASE">
<result>
<message>
Workspace deleted successfully
</message>
</result>
</response>
Sample Response JSON Format:
{"response":
{"uri": "\/api\/email",
"action": "DELETEDATABASE",
"result":
{"message": "Workspace deleted successfully"}}}
The delete workspace API is used to delete the workspace from your Zoho Analytics Account. This API will delete the workspace present in the user account who is invoking this API, and not the workspace from other accounts. Please note that if a workspace is deleted using this API, the same workspace cannot be restored back.
request uri
https://<
ZohoAnalytics.modeling.delete
COMMON PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_ACTION | DELETEDATABASE | This parameter specifies the action to be performed by the API request. |
ZOHO_OUTPUT_FORMAT | XML/JSON | This parameter specifies the output format for the response. |
ZOHO_ERROR_FORMAT | XML/JSON | Specifies the output format for the response in case an error occurs when trying to process the request. |
ZOHO_API_VERSION | 1.0 | The API version of Zoho Analytics based on which the application(/service) has been written. This parameter allows the Zoho Analytics to handle applications based on the older versions.The current API version is 1.0. |
Authorization
To make authenticated API request, append the access token in Authorization
request header.
Value | Description | |
---|---|---|
Authorization | The Access token provides a secure and temporary access to Zoho Analytics API's. Each access token will be valid only for an hour, and can be used only for the set of operations that is described in the scope. |
ACTION SPECIFIC PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_DATABASE_NAME (mandatory) | Workspace name | This parameter holds the name of the workspace to be deleted |
Possible Error Codes In DELETE WORKSPACE
Enable Domain Workspace (Only For White Label Customers)
Download client libraries :
C# |GO |JAVA |PHP |PYTHON |NODEJS Sample Request:
Copycurl -d "ZOHO_ACTION=ENABLEDOMAINDB&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML &ZOHO_API_VERSION=1.0 &DBNAME=Workspace Name&DOMAINNAME=Domain Name" -H "Authorization:Zoho-oauthtoken <access_token>" https://analyticsapi.zoho.com/api/EmailAddress
Sample Response XML Format:
<responseuri="/api/EmailAddress"action="ENABLEDOMAINDB">
<result>
<status>Success</status>
<message>Domain Feature has been enabled</message>
</result>
</response>
Sample Response JSON Format:
{"response":
{"uri": "\/api\/email",
"action": "ENABLEDOMAINDB",
"result":
{"status":"Success",
"message":"Domain Feature has been enabled"}}}
The Enable Workspace API is used to enable the workspace from your Zoho Analytics Account to White label account (custom domain).
request uri
https://<
ZohoAnalytics.modeling.update
COMMON PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_ACTION | ENABLEDOMAINDB | This parameter specifies the action to be performed by the API request. |
ZOHO_OUTPUT_FORMAT | XML/JSON | This parameter specifies the output format for the response. |
ZOHO_ERROR_FORMAT | XML/JSON | Specifies the output format for the response in case an error occurs when trying to process the request. |
ZOHO_API_VERSION | 1.0 | The API version of Zoho Analytics based on which the application(/service) has been written. This parameter allows the Zoho Analytics to handle applications based on the older versions.The current API version is 1.0. |
Authorization
To make authenticated API request, append the access token in Authorization
request header.
Value | Description | |
---|---|---|
Authorization | The Access token provides a secure and temporary access to Zoho Analytics API's. Each access token will be valid only for an hour, and can be used only for the set of operations that is described in the scope. |
ACTION SPECIFIC PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
DBNAME (mandatory) | Workspace name | This parameter holds the name of the workspace to be enabled. |
DOMAINNAME (mandatory) | Domain name | This parameter holds the domain address. |
Possible Error Codes In ENABLE DOMAIN WORKSPACE
Disable Domain Workspace (Only For White Label Customers)
Download client libraries :
C# |GO |JAVA |PHP |PYTHON |NODEJS Sample Request:
Copycurl -d "ZOHO_ACTION=DISABLEDOMAINDB&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML &ZOHO_API_VERSION=1.0 &DBNAME=Workspace Name&DOMAINNAME=Domain Name" -H "Authorization:Zoho-oauthtoken <access_token>" https://analyticsapi.zoho.com/api/EmailAddress
Sample Response XML Format:
<responseuri="/api/EmailAddress"action="DISABLEDOMAINDB">
<result>
<status>Success</status>
<message>Domain Feature has been disabled</message>
</result>
</response>
Sample Response JSON Format:
{"response":
{"uri": "\/api\/email",
"action": "DISABLEDOMAINDB",
"result":
{"status":"Success",
"message":"Domain Feature has been disabled"}}}
The Disable Workspace API is used to disable the workspace from your Zoho Analytics Account to White label account (custom domain).
request uri
https://<
ZohoAnalytics.modeling.update
COMMON PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_ACTION | DISABLEDOMAINDB | This parameter specifies the action to be performed by the API request. |
ZOHO_OUTPUT_FORMAT | XML/JSON | This parameter specifies the output format for the response. |
ZOHO_ERROR_FORMAT | XML/JSON | Specifies the output format for the response in case an error occurs when trying to process the request. |
ZOHO_API_VERSION | 1.0 | The API version of Zoho Analytics based on which the application(/service) has been written. This parameter allows the Zoho Analytics to handle applications based on the older versions.The current API version is 1.0. |
Authorization
To make authenticated API request, append the access token in Authorization
request header.
Value | Description | |
---|---|---|
Authorization | The Access token provides a secure and temporary access to Zoho Analytics API's. Each access token will be valid only for an hour, and can be used only for the set of operations that is described in the scope. |
ACTION SPECIFIC PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
DBNAME (mandatory) | Workspace name | This parameter holds the name of the workspace to be disabled. |
DOMAINNAME (mandatory) | Domain name | This parameter holds the domain address. |
Possible Error Codes In DISABLE DOMAIN WORKSPACE
Create Table
Download client libraries :
C# |GO |JAVA |PHP |PYTHON |NODEJS Sample Request:
Copycurl -d "ZOHO_ACTION=CREATETABLE&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML& ZOHO_API_VERSION=1.0& ZOHO_TABLE_DESIGN="Table Design in JSON"" -H "Authorization:Zoho-oauthtoken <access_token>" https://analyticsapi.zoho.com/api/EmailAddress/WorkspaceName
Sample Response XML Format:
<?xml version="1.0"encoding="UTF-8" ?>
<responseuri="/api/EmailAddress/WorkspaceName"action="CREATETABLE">
<result>
<message>Table created successfully!</message>
</result>
</response>
Sample Response JSON Format:
{"response":
{"uri":"\/api\/email\/WorkspaceName",
"action":"CREATETABLE",
"result":
{"message":"Table created successfully!"}}}
The Create table API is used to Create a table in the specified workspace.
request uri
https://<
ZohoAnalytics.modeling.create
TABLE DESIGN
{
"TABLENAME": "Table Name",
"TABLEDESCRIPTION":"Table Description",
"FOLDERNAME": "Target Folder",
"COLUMNS":
[
{
"COLUMNNAME":"Column Name 1",
"DATATYPE": "Column DataType",
"DEFAULT":"Default Value",
"MANDATORY" : "Yes/No",
"DESCRIPTION" : "Column Description"
},
{
"COLUMNNAME":"Column Name 2",
"DATATYPE": "Column DataType",
"DEFAULT":"null",
"MANDATORY" : "Yes/No",
"DESCRIPTION" : "Column Description"
}
]
}
COMMON PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_ACTION | CREATETABLE | This parameter specifies the action to be performed by the API request. |
ZOHO_OUTPUT_FORMAT | XML/JSON | This parameter specifies the output format for the response. |
ZOHO_ERROR_FORMAT | XML/JSON | Specifies the output format for the response in case an error occurs when trying to process the request. |
ZOHO_API_VERSION | 1.0 | The API version of Zoho Analytics based on which the application(/service) has been written. This parameter allows the Zoho Analytics to handle applications based on the older versions.The current API version is 1.0. |
Authorization
To make authenticated API request, append the access token in Authorization
request header.
Value | Description | |
---|---|---|
Authorization | The Access token provides a secure and temporary access to Zoho Analytics API's. Each access token will be valid only for an hour, and can be used only for the set of operations that is described in the scope. |
ACTION SPECIFIC PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_TABLE_DESIGN (mandatory) | Design content in JSON format | Table structure in JSON format (includes table name, description, folder name, column and lookup details). |
Add Column
Download client libraries :
C# |GO |JAVA |PHP |PYTHON |NODEJS Sample Request:
Copycurl -d "ZOHO_ACTION=ADDCOLUMN&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML &ZOHO_API_VERSION=1.0 &ZOHO_COLUMNNAME=Column Name&ZOHO_DATATYPE=Column Data Type" -H "Authorization:Zoho-oauthtoken <access_token>" https://analyticsapi.zoho.com/api/EmailAddress/WorkspaceName/TableName
Sample Response XML Format:
<responseuri="/api/EmailAddress/WorkspaceName/TableName"action="ADDCOLUMN">
<result>
Column created successfully
</result>
</response>
Sample Response JSON Format:
{"response":
{"uri":"\/api\/email\/WorkspaceName\/TableName",
"action":"ADDCOLUMN",
"result": {"message":"Column created successfully"}}}
The Add Column API is used to add a column into Zoho Analytics Table. The account Administrator and the Workspace Admin alone can use this API to add a column in the Zoho Analytics table.
request uri
https://<
ZohoAnalytics.modeling.create
Note:
In case of Workspace owner adding a column, they need to specify the login E-mail ID of the account Administrator only.
COMMON PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_ACTION | ADDCOLUMN | This parameter specifies the action to be performed by the API request. |
ZOHO_OUTPUT_FORMAT | XML/JSON | This parameter specifies the output format for the response. |
ZOHO_ERROR_FORMAT | XML/JSON | Specifies the output format for the response in case an error occurs when trying to process the request. |
ZOHO_API_VERSION | 1.0 | The API version of Zoho Analytics based on which the application(/service) has been written. This parameter allows the Zoho Analytics to handle applications based on the older versions.The current API version is 1.0. |
Authorization
To make authenticated API request, append the access token in Authorization
request header.
Value | Description | |
---|---|---|
Authorization | The Access token provides a secure and temporary access to Zoho Analytics API's. Each access token will be valid only for an hour, and can be used only for the set of operations that is described in the scope. |
ACTION SPECIFIC PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_COLUMNNAME (mandatory) | <columnname> | The name of the column to be added into Zoho Analytics Table. Example: ZOHO_COLUMNNAME=Region . Note: The column name should be url encoded if the column name contain space or any special characters. |
ZOHO_DATATYPE (mandatory) | Supported data types are: | The datatype of the column to be added into Zoho Analytics Table. |
Possible Error Codes In ADD COLUMN
Add Lookup
Download client libraries :
C# |GO |JAVA |PHP |PYTHON |NODEJS Sample Request:
Copycurl -d "ZOHO_ACTION=ADDLOOKUP&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML& ZOHO_API_VERSION=1.0& ZOHO_COLUMNNAME=Column Name&ZOHO_REFERREDTABLE=Ref Table Name& ZOHO_REFERREDCOLUMN="Ref Column Name&ZOHO_IFERRORONCONVERSION=ABORT" -H "Authorization:Zoho-oauthtoken <access_token>" https://analyticsapi.zoho.com/api/EmailAddress/WorkspaceName/TableName
Sample Response XML Format:
<?xml version="1.0"encoding="UTF-8" ?>
<responseuri="/api/EmailAddress/WorkspaceName/TableName"action="ADDLOOKUP">
<result>SUCCESS</result>
</response>
Sample Response JSON Format:
{"response":
{"uri":"\/api\/email\/WorkspaceName\/TableName",
"action":"ADDLOOKUP",
"result":"SUCCESS"}}
The Add Lookup API is used to Adds the lookup in the specified child table.
request uri
https://<
ZohoAnalytics.modeling.update
COMMON PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_ACTION | ADDLOOKUP | This parameter specifies the action to be performed by the API request. |
ZOHO_OUTPUT_FORMAT | XML/JSON | This parameter specifies the output format for the response. |
ZOHO_ERROR_FORMAT | XML/JSON | Specifies the output format for the response in case an error occurs when trying to process the request. |
ZOHO_API_VERSION | 1.0 | The API version of Zoho Analytics based on which the application(/service) has been written. This parameter allows the Zoho Analytics to handle applications based on the older versions.The current API version is 1.0. |
Authorization
To make authenticated API request, append the access token in Authorization
request header.
Value | Description | |
---|---|---|
Authorization | The Access token provides a secure and temporary access to Zoho Analytics API's. Each access token will be valid only for an hour, and can be used only for the set of operations that is described in the scope. |
ACTION SPECIFIC PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_COLUMNNAME (mandatory) | <columnname> | The name of the column to be added into Zoho Analytics Table. Example: ZOHO_COLUMNNAME=Region . Note: The column name should be url encoded if the column name contain space or any special characters. |
ZOHO_REFERREDTABLE (mandatory) | Table name | The name of the referred table. |
ZOHO_REFERREDCOLUMN (mandatory) | Column name | The name of the column in the referred table. |
ZOHO_IFERRORONCONVERSION (mandatory) | ABORT/EMPTY | If error on conversion. |
Possible Error Codes In ADD LOOKUP
Remove Lookup
Download client libraries :
C# |GO |JAVA |PHP |PYTHON |NODEJS Sample Request:
Copycurl -d "ZOHO_ACTION=REMOVELOOKUP&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=JSON& ZOHO_API_VERSION=1.0& ZOHO_COLUMNNAME=Column Name" -H "Authorization:Zoho-oauthtoken <access_token>" https://analyticsapi.zoho.com/api/EmailAddress/WorkspaceName/TableName
Sample Response XML Format:
<?xml version="1.0"encoding="UTF-8" ?>
<responseuri="/api/EmailAddress/WorkspaceName/TableName"action="REMOVELOOKUP">
<result>SUCCESS</result>
</response>
Sample Response JSON Format:
{"response":
{"uri":"\/api\/email\/WorkspaceName\/TableName",
"action":"REMOVELOOKUP",
"result":"SUCCESS"}}
The Remove Lookup API is used to Removes the lookup for the specified column in the given table.
request uri
https://<
ZohoAnalytics.modeling.update
COMMON PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_ACTION | REMOVELOOKUP | This parameter specifies the action to be performed by the API request. |
ZOHO_OUTPUT_FORMAT | XML/JSON | This parameter specifies the output format for the response. |
ZOHO_ERROR_FORMAT | XML/JSON | Specifies the output format for the response in case an error occurs when trying to process the request. |
ZOHO_API_VERSION | 1.0 | The API version of Zoho Analytics based on which the application(/service) has been written. This parameter allows the Zoho Analytics to handle applications based on the older versions.The current API version is 1.0. |
Authorization
To make authenticated API request, append the access token in Authorization
request header.
Value | Description | |
---|---|---|
Authorization | The Access token provides a secure and temporary access to Zoho Analytics API's. Each access token will be valid only for an hour, and can be used only for the set of operations that is described in the scope. |
ACTION SPECIFIC PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_COLUMNNAME (mandatory) | <columnname> | The name of the column to be added into Zoho Analytics Table. Example: ZOHO_COLUMNNAME=Region . Note: The column name should be url encoded if the column name contain space or any special characters. |
Possible Error Codes In REMOVE LOOKUP
Delete Column
Download client libraries :
C# |GO |JAVA |PHP |PYTHON |NODEJS Sample Request:
Copycurl -d "ZOHO_ACTION=DELETECOLUMN&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML &ZOHO_API_VERSION=1.0 &ZOHO_COLUMNNAME=Column Name" -H "Authorization:Zoho-oauthtoken <access_token>" https://analyticsapi.zoho.com/api/EmailAddress/WorkspaceName/TableName
Sample Response XML Format:
<responseuri="/api/EmailAddress/WorkspaceName/TableName"action="DELETECOLUMN">
<result>
Column deleted successfully
</result>
</response>
Sample Response JSON Format:
{"response":
{"uri":"\/api\/email\/WorkspaceName\/TableName",
"action":"DELETECOLUMN",
"result": {"message":"Column deleted successfully"}}}
The Delete Column API is used to delete a column in Zoho Analytics Table. The account Administrator and the Workspace Admin alone can use this API to delete a column in a Zoho Analytics table.
request uri
https://<
ZohoAnalytics.modeling.delete
Note:
In case of Workspace admin deleting a column, they need to specify the login E-mail ID of the account Administrator only.
COMMON PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_ACTION | DELETECOLUMN | This parameter specifies the action to be performed by the API request. |
ZOHO_OUTPUT_FORMAT | XML/JSON | This parameter specifies the output format for the response. |
ZOHO_ERROR_FORMAT | XML/JSON | Specifies the output format for the response in case an error occurs when trying to process the request. |
ZOHO_API_VERSION | 1.0 | The API version of Zoho Analytics based on which the application(/service) has been written. This parameter allows the Zoho Analytics to handle applications based on the older versions.The current API version is 1.0. |
Authorization
To make authenticated API request, append the access token in Authorization
request header.
Value | Description | |
---|---|---|
Authorization | The Access token provides a secure and temporary access to Zoho Analytics API's. Each access token will be valid only for an hour, and can be used only for the set of operations that is described in the scope. |
CTION SPECIFIC PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_COLUMNNAME (mandatory) | <columnname> | The name of the column to be deleted in Zoho Analytics Table. Example: ZOHO_COLUMNNAME=Region |
Possible Error Codes In DELETE COLUMN
Rename Column
Download client libraries :
C# |GO |JAVA |PHP |PYTHON |NODEJS Sample Request:
Copycurl -d "ZOHO_ACTION=RENAMECOLUMN&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML &ZOHO_API_VERSION=1.0 &OLDCOLUMNNAME=Old Column Name&NEWCOLUMNNAME=New Column Name" -H "Authorization:Zoho-oauthtoken <access_token>" https://analyticsapi.zoho.com/api/EmailAddress/WorkspaceName/TableName
Sample Response XML Format:
<responseuri="/api/EmailAddress/WorkspaceName/TableName"action="RENAMECOLUMN">
<result>
Column renamed successfully
</result>
</response>
Sample Response JSON Format:
{"response":
{"uri":"\/api\/email\/WorkspaceName\/TableName",
"action":"RENAMECOLUMN",
"result":
{"message":"Column renamed successfully"}}}
The Rename Column API is used to rename the column in Zoho Analytics Table. The account Administrator and the Workspace Admin alone can use this API to rename a column in the Zoho Analytics table.
request uri
https://<
ZohoAnalytics.modeling.update
Note:
In case of Workspace Admin renaming a column, they need to specify the login E-mail ID of the account Administrator only.
COMMON PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_ACTION | RENAMECOLUMN | This parameter specifies the action to be performed by the API request. |
ZOHO_OUTPUT_FORMAT | XML/JSON | This parameter specifies the output format for the response. |
ZOHO_ERROR_FORMAT | XML/JSON | Specifies the output format for the response in case an error occurs when trying to process the request. |
ZOHO_API_VERSION | 1.0 | The API version of Zoho Analytics based on which the application(/service) has been written. This parameter allows the Zoho Analytics to handle applications based on the older versions.The current API version is 1.0. |
Authorization
To make authenticated API request, append the access token in Authorization
request header.
Value | Description | |
---|---|---|
Authorization | The Access token provides a secure and temporary access to Zoho Analytics API's. Each access token will be valid only for an hour, and can be used only for the set of operations that is described in the scope. |
ACTION SPECIFIC PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
OLDCOLUMNNAME (mandatory) | <oldcolumnname> | The name of the column to be renamed in Zoho Analytics Table. Example: OLDCOLUMNNAME=Region |
NEWCOLUMNNAME (mandatory) | <newcolumnname> | The new name you wanted to give for the column.Example: NEWCOLUMNNAME=SalesRegion |
Possible Error Codes In RENAME COLUMN
Hide Column
Download client libraries :
C# |GO |JAVA |PHP |PYTHON |NODEJS Sample Request:
Copycurl -d "ZOHO_ACTION=HIDECOLUMN&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML &ZOHO_API_VERSION=1.0 &ZOHO_COLUMNNAME=Column1&ZOHO_COLUMNNAME=Column2" -H "Authorization:Zoho-oauthtoken <access_token>" https://analyticsapi.zoho.com/api/EmailAddress/WorkspaceName/TableName
Sample Response XML Format:
<?xml version="1.0"encoding="UTF-8" ?>
<responseuri="/api/EmailAddress/WorkspaceName/TableName"action="HIDECOLUMN">
<result>
<columncolumnName="Column1"status="Success"message="column hidden successfully"> </column>
</result>
</response>
Sample Response JSON Format:
{"response": {"uri": "/api/EmailAddress/WorkspaceName/TableName",
"action": "HIDECOLUMN",
"result": [{"columnName": "Column1",
"status": "Success",
"message": "column hidden successfully"}]}}
The Hide Column API is used to hide the column in Zoho Analytics Table. The account Administrator and the Workspace Admin alone can use this API to hide a column in the Zoho Analytics table.
request uri
https://<
ZohoAnalytics.modeling.update
Note:
In case of Workspace Admin hiding a column, they need to specify the login E-mail ID of the account Administrator only.
COMMON PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_ACTION | HIDECOLUMN | This parameter specifies the action to be performed by the API request. |
ZOHO_OUTPUT_FORMAT | XML/JSON | This parameter specifies the output format for the response. |
ZOHO_ERROR_FORMAT | XML/JSON | Specifies the output format for the response in case an error occurs when trying to process the request. |
ZOHO_API_VERSION | 1.0 | The API version of Zoho Analytics based on which the application(/service) has been written. This parameter allows the Zoho Analytics to handle applications based on the older versions.The current API version is 1.0. |
Authorization
To make authenticated API request, append the access token in Authorization
request header.
Value | Description | |
---|---|---|
Authorization | The Access token provides a secure and temporary access to Zoho Analytics API's. Each access token will be valid only for an hour, and can be used only for the set of operations that is described in the scope. |
ACTION SPECIFIC PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_COLUMNNAME (mandatory) | <columnname> | The name of the column to be hidden in Zoho Analytics Table. Example: ZOHO_COLUMNNAME=Region. Note:More than one param is allowed. |
Possible Error Codes In HIDE COLUMN
Show Column
Download client libraries :
C# |GO |JAVA |PHP |PYTHON |NODEJS Sample Request:
Copycurl -d "ZOHO_ACTION=SHOWCOLUMN&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML &ZOHO_API_VERSION=1.0 &ZOHO_COLUMNNAME=Column1&ZOHO_COLUMNNAME=Column2" -H "Authorization:Zoho-oauthtoken <access_token>" https://analyticsapi.zoho.com/api/EmailAddress/WorkspaceName/TableName
Sample Response XML Format:
<?xml version="1.0"encoding="UTF-8" ?>
<responseuri="/api/EmailAddress/WorkspaceName/TableName"action="SHOWCOLUMN">
<result>
<columncolumnName="Column1"status="Success"message="column shown successfully"> </column>
</result>
</response>
Sample Response JSON Format:
{"response": {"uri": "/api/EmailAddress/WorkspaceName/TableName",
"action": "SHOWCOLUMN",
"result": [{"columnName": "Column1",
"status": "Success",
"message": "column shown successfully"}]}}
The Show Column API is used to show the column in Zoho Analytics Table. The account Administrator and the Workspace Admin alone can use this API to show the column in the Zoho Analytics table.
request uri
https://<
ZohoAnalytics.modeling.update
Note:
In case of Workspace Admin showing a column, they need to specify the login E-mail ID of the account Administrator only.
COMMON PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_ACTION | SHOWCOLUMN | This parameter specifies the action to be performed by the API request. |
ZOHO_OUTPUT_FORMAT | XML/JSON | This parameter specifies the output format for the response. |
ZOHO_ERROR_FORMAT | XML/JSON | Specifies the output format for the response in case an error occurs when trying to process the request. |
ZOHO_API_VERSION | 1.0 | The API version of Zoho Analytics based on which the application(/service) has been written. This parameter allows the Zoho Analytics to handle applications based on the older versions.The current API version is 1.0. |
Authorization
To make authenticated API request, append the access token in Authorization
request header.
Value | Description | |
---|---|---|
Authorization | The Access token provides a secure and temporary access to Zoho Analytics API's. Each access token will be valid only for an hour, and can be used only for the set of operations that is described in the scope. |
ACTION SPECIFIC PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_COLUMNNAME (mandatory) | <columnname> | The name of the column to be shown in Zoho Analytics Table. Example: ZOHO_COLUMNNAME=Region. Note:More than one param is allowed. |
Possible Error Codes In SHOW COLUMN
Possible Error Codes In CREATE TABLE
Autogenerate Reports
Download client libraries :
C# |GO |JAVA |PHP |PYTHON |NODEJS Sample Request:
Copycurl -d "ZOHO_ACTION=AUTOGENREPORTS&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML &ZOHO_API_VERSION=1.0 &ZOHO_SOURCE=TABLE" -H "Authorization:Zoho-oauthtoken <access_token>" https://analyticsapi.zoho.com/api/EmailAddress/WorkspaceName/TableName
Sample Response XML Format:
<?xml version="1.0"encoding="UTF-8" ?>
<responseuri="/api/EmailAddress/WorkspaceName/TableName"action="AUTOGENREPORTS">
<result>
<status>success</status>
<message>Reports generated successfully</message>
</result>
</response>
Sample Response JSON Format:
{"response": {"uri": "/api/EmailAddress/WorkspaceName/TableName",
"action": "AUTOGENREPORTS",
"result": {"status": "success",
"message": "Reports generated successfully"}}}
The Autogenerate reports API is used to generate reports in Zoho Analytics Table. The account Administrator and the Workspace Admin alone can use this API to generate the reports.
request uri
https://<
ZohoAnalytics.modeling.create
COMMON PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_ACTION | AUTOGENREPORTS | This parameter specifies the action to be performed by the API request. |
ZOHO_OUTPUT_FORMAT | XML/JSON | This parameter specifies the output format for the response. |
ZOHO_ERROR_FORMAT | XML/JSON | Specifies the output format for the response in case an error occurs when trying to process the request. |
ZOHO_API_VERSION | 1.0 | The API version of Zoho Analytics based on which the application(/service) has been written. This parameter allows the Zoho Analytics to handle applications based on the older versions.The current API version is 1.0. |
Authorization
To make authenticated API request, append the access token in Authorization
request header.
Value | Description | |
---|---|---|
Authorization | The Access token provides a secure and temporary access to Zoho Analytics API's. Each access token will be valid only for an hour, and can be used only for the set of operations that is described in the scope. |
ACTION SPECIFIC PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_SOURCE (mandatory) | TABLE/COLUMN | TABLE - Reports generate for the particular table. COLUMN - Reports generate for the particular column. |
ZOHO_CREATEAGAIN (optional) | true/false | True - It will generate duplicate reports if reports generated before. False - It will throw error message if reports generated before. |
ZOHO_COLUMN_NAME (mandatory when SOURCE is COLUMN) | columnname | Column name which one wants to generate reports. |
Possible Error Codes In AUTOGENERATE REPORTS
Save As
Download client libraries :
C# |GO |JAVA |PHP |PYTHON |NODEJS Sample Request:
Copycurl -d "ZOHO_ACTION=SAVEAS&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML &ZOHO_API_VERSION=1.0&ZOHO_VIEWTOCOPY=Existing_View_Name &ZOHO_NEW_VIEWNAME=New_View_Name" -H "Authorization:Zoho-oauthtoken <access_token>" https://analyticsapi.zoho.com/api/EmailAddress/WorkspaceName
Sample Response XML Format:
<responseuri="/api/EmailAddress/WorkspaceName"action="SAVEAS">
<result>
<message>Table copied successfully</message>
</result>
</response>
Sample Response JSON Format:
{"response":
{"uri":"\/api\/email\/WorkspaceName",
"action":"SAVEAS",
"result":
{"message":"Table copied successfully"}}}
The Save As API is used to copy a view within the workspace which is present in the Zoho Analytics Account.
request uri
https://<
ZohoAnalytics.modeling.create
COMMON PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_ACTION | SAVEAS | This parameter specifies the action to be performed by the API request. |
ZOHO_OUTPUT_FORMAT | XML/JSON | This parameter specifies the output format for the response. |
ZOHO_ERROR_FORMAT | XML/JSON | Specifies the output format for the response in case an error occurs when trying to process the request. |
ZOHO_API_VERSION | 1.0 | The API version of Zoho Analytics based on which the application(/service) has been written. This parameter allows the Zoho Analytics to handle applications based on the older versions.The current API version is 1.0. |
Authorization
To make authenticated API request, append the access token in Authorization
request header.
Value | Description | |
---|---|---|
Authorization | The Access token provides a secure and temporary access to Zoho Analytics API's. Each access token will be valid only for an hour, and can be used only for the set of operations that is described in the scope. |
ACTION SPECIFIC PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_VIEWTOCOPY (mandatory) | <existing_view_name> | This parameter holds the name of the view which has to be copied. |
ZOHO_NEW_VIEWNAME (mandatory) | <new_view_name> | This parameter holds the name of the view which has to be created. |
ZOHO_FOLDERNAME (optional) | <folder_name> | The name of folder where the created view to be placed. |
ZOHO_DESCRIPTION (optional) | <description> | Description to the new view. |
ZOHO_COPYDATA (optional) | true/false | true - The data present in view will be copied.false - Only the structure of view wil be copied. |
ZOHO_COPYLOOKUP (optional) | true/false | true - The lookup details present in view will be copied.false - The lookup details won't get copied. |
ZOHO_HUGEDATACOPY (optional) | true/false | true - Use when a table have more than two hundred thousand rows.false - Use when a table have less than two hundred thousand rows. |
Possible Error Codes In Save As
Create Similar Views
Download client libraries :
C# |GO |JAVA |PHP |PYTHON |NODEJS Sample Request:
Copycurl -d "ZOHO_ACTION=CREATESIMILARVIEWS&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML &ZOHO_API_VERSION=1.0 &ZOHO_REFVIEW=Reference Table Name&ZOHO_FOLDERNAME=Folder Name&ISCOPYCUSTOMFORMULA=false &ISCOPYAGGFORMULA=false" -H "Authorization:Zoho-oauthtoken <access_token>" https://analyticsapi.zoho.com/api/EmailAddress/WorkspaceName/TableName
Sample Response XML Format:
<responseuri="/api/EmailAddress/WorkspaceName/TableName"action="CREATESIMILARVIEWS">
<result>
<status>success</status>
<message>Reports created successfully</message>
</result>
</response>
Sample Response JSON Format:
{"response":
{"uri": "\/api\/email\/WorkspaceName\/TableName",
"action": "CREATESIMILARVIEWS",
"result":
{"status":"Success",
"message":"Reports created successfully"}}}
The create similar views API is used to generate the reports from your Zoho Analytics table.The views are created based on the reference table views.
request uri
https://<
ZohoAnalytics.modeling.create
COMMON PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_ACTION | CREATESIMILARVIEWS | This parameter specifies the action to be performed by the API request. |
ZOHO_OUTPUT_FORMAT | XML/JSON | This parameter specifies the output format for the response. |
ZOHO_ERROR_FORMAT | XML/JSON | Specifies the output format for the response in case an error occurs when trying to process the request. |
ZOHO_API_VERSION | 1.0 | The API version of Zoho Analytics based on which the application(/service) has been written. This parameter allows the Zoho Analytics to handle applications based on the older versions.The current API version is 1.0. |
Authorization
To make authenticated API request, append the access token in Authorization
request header.
Value | Description | |
---|---|---|
Authorization | The Access token provides a secure and temporary access to Zoho Analytics API's. Each access token will be valid only for an hour, and can be used only for the set of operations that is described in the scope. |
ACTION SPECIFIC PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_REFVIEW (mandatory) | Reference view name | This parameter holds the name of the reference view name. |
ZOHO_FOLDERNAME (mandatory) | Destination folder name | This parameter holds the folder name where the views to be saved. |
ISCOPYCUSTOMFORMULA (mandatory) | True / False | True - Custom formulas are copied in the new views also. False - Custom formulas are not handled in new views. |
ISCOPYAGGFORMULA (mandatory) | True / False | True - Aggregate formulas are copied in the new views also. False - Aggregate formulas are not handled in new views. |
Possible Error Codes In CREATE SIMILAR VIEWS
Delete View
Download client libraries :
C# |GO |JAVA |PHP |PYTHON |NODEJS Sample Request:
Copycurl -d "ZOHO_ACTION=DELETEVIEW&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML& ZOHO_API_VERSION=1.0&ZOHO_VIEW=View_Name" -H "Authorization:Zoho-oauthtoken <access_token>" https://analyticsapi.zoho.com/api/EmailAddress/WorkspaceName
Sample Response XML Format:
<responseuri="/api/EmailAddress/WorkspaceName"action="DELETEVIEW">
<result>
<message>View Deleted successfully!</message>
</result>
</response>
Sample Response JSON Format:
{"response":
{"uri":"\/api\/email\/WorkspaceName",
"action":"DELETEVIEW",
"result":
{"message":"View Deleted successfully!"}}}
The Delete View API is used to Remove the view which is present in the particular workspace on Zoho Analytics Account.
request uri
https://<
ZohoAnalytics.modeling.delete
COMMON PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_ACTION | DELETEVIEW | This parameter specifies the action to be performed by the API request. |
ZOHO_OUTPUT_FORMAT | XML/JSON | This parameter specifies the output format for the response. |
ZOHO_ERROR_FORMAT | XML/JSON | Specifies the output format for the response in case an error occurs when trying to process the request. |
ZOHO_API_VERSION | 1.0 | The API version of Zoho Analytics based on which the application(/service) has been written. This parameter allows the Zoho Analytics to handle applications based on the older versions.The current API version is 1.0. |
Authorization
To make authenticated API request, append the access token in Authorization
request header.
Value | Description | |
---|---|---|
Authorization | The Access token provides a secure and temporary access to Zoho Analytics API's. Each access token will be valid only for an hour, and can be used only for the set of operations that is described in the scope. |
ACTION SPECIFIC PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_VIEW (optional) | ViewName | Name of the view to be deleted. |
ZOHO_DELETE_DEPEND_VIEWS (optional) | true/false | (In case of deleting a table which has dependent views, this parameter is mandatory and set to be 'true') true - The views(except dashboards) which created based on the particular view as parent will also get deleted. false - The dependent views don't get deleted. |
Possible Error Codes In Delete View
Rename View
Download client libraries :
C# |GO |JAVA |PHP |PYTHON |NODEJS Sample Request:
Copycurl -d "ZOHO_ACTION=RENAMEVIEW&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML& ZOHO_API_VERSION=1.0& ZOHO_VIEWNAME=Old Name&ZOHO_NEW_VIEWNAME=New Name&ZOHO_NEW_VIEWDESC=Description" -H "Authorization:Zoho-oauthtoken <access_token>" https://analyticsapi.zoho.com/api/EmailAddress/WorkspaceName
Sample Response XML Format:
<?xml version="1.0"encoding="UTF-8" ?>
<responseuri="/api/EmailAddress/WorkspaceName"action="RENAMEVIEW">
<result>
<message>View renamed successfully!</message>
</result>
</response>
Sample Response JSON Format:
{"response":
{"uri":"\/api\/email\/WorkspaceName",
"action":"RENAMEVIEW",
"result":
{"message":"View renamed successfully!"}}}
The Rename view API is used to Rename the specified view with the new name and description.
request uri
https://<
ZohoAnalytics.modeling.update
COMMON PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_ACTION | RENAMEVIEW | This parameter specifies the action to be performed by the API request. |
ZOHO_OUTPUT_FORMAT | XML/JSON | This parameter specifies the output format for the response. |
ZOHO_ERROR_FORMAT | XML/JSON | Specifies the output format for the response in case an error occurs when trying to process the request. |
ZOHO_API_VERSION | 1.0 | The API version of Zoho Analytics based on which the application(/service) has been written. This parameter allows the Zoho Analytics to handle applications based on the older versions.The current API version is 1.0. |
Authorization
To make authenticated API request, append the access token in Authorization
request header.
Value | Description | |
---|---|---|
Authorization | The Access token provides a secure and temporary access to Zoho Analytics API's. Each access token will be valid only for an hour, and can be used only for the set of operations that is described in the scope. |
ACTION SPECIFIC PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_VIEWNAME (mandatory) | View name | Current name of the view |
ZOHO_NEW_VIEWNAME (mandatory) | New view name | New name for the view |
ZOHO_NEW_VIEWDESC (optional) | View description | New description for the view |
Possible Error Codes In RENAME VIEW
Copy Reports
Download client libraries :
C# |GO |JAVA |PHP |PYTHON |NODEJS Sample Request:
Copycurl -d "ZOHO_ACTION=COPYREPORTS&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML& ZOHO_API_VERSION=1.0& ZOHO_VIEWTOCOPY=View1,View2&ZOHO_DATABASE_NAME=Destination Workspace name& ZOHO_COPY_DB_KEY=************" -H "Authorization:Zoho-oauthtoken <access_token>" https://analyticsapi.zoho.com/api/<SourceEmail>/<SourceWorkspaceName>
Sample Response XML Format:
<responseuri="/api/EmailAddress/WorkspaceName"
action="COPYREPORTS">
<result>
<message>
Successfully View(s) Copied
</message>
</result>
</response>
Sample Response JSON Format:
{"response":
{"uri":"\/api\/email\/WorkspaceName",
"action":"COPYREPORTS",
"result":
{"message": "Successfully View(s) Copied"}}}
The source workspace administrator should generate and provide the Copy Workspace Key, the secret key used to authorize the destination workspace administrator. Copying the reports using this API will copy the report along with the relationships involved and the formula columns associated with the source report. It is necessary that the parent tables of the view in the source workspace should exists with the same name in the destination workspace.
request uri
https://<
ZohoAnalytics.modeling.create
COMMON PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_ACTION | COPYREPORTS | This parameter specifies the action to be performed by the API request. |
ZOHO_OUTPUT_FORMAT | XML/JSON | This parameter specifies the output format for the response. |
ZOHO_ERROR_FORMAT | XML/JSON | Specifies the output format for the response in case an error occurs when trying to process the request. |
ZOHO_API_VERSION | 1.0 | The API version of Zoho Analytics based on which the application(/service) has been written. This parameter allows the Zoho Analytics to handle applications based on the older versions.The current API version is 1.0. |
Authorization
To make authenticated API request, append the access token in Authorization
request header.
Value | Description | |
---|---|---|
Authorization | The Access token provides a secure and temporary access to Zoho Analytics API's. Each access token will be valid only for an hour, and can be used only for the set of operations that is described in the scope. |
ACTION SPECIFIC PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_VIEWTOCOPY (mandatory) | view names | This parameter holds the list of view names. In case of more than one views, the view names should be separated by comma ( , ). Example: ZOHO_VIEWTOCOPY=View1,View2,View3,… |
ZOHO_DATABASE_NAME (mandatory) | Workspace name | This parameter holds the name of the workspace (destination workspace) where the reports (specified in ZOHO_VIEWSTOCOPY parameter) has to be copied |
ZOHO_COPY_DB_KEY (mandatory) | Workspace key | The secret key used for allowing the user to copy the Workspace / Reports. The source Workspace Admin has to create the Copy Workspace Secret Key. You need to provide the appropriate values in the above URL to generate the corresponding Copy Workspace Key for your setup |
ZOHO_COPY_WITHDATA (optional) | true/false | Default value is false .true - The data present in source view will be copied to the created view.false - The data present in source table will not be copied to the created view. |
Possible Error Codes In COPY REPORTS
Copy Formula
Download client libraries :
C# |GO |JAVA |PHP |PYTHON |NODEJS Sample Request:
Copycurl -d "ZOHO_ACTION=COPYFORMULA&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML& ZOHO_API_VERSION=1.0& ZOHO_FORMULATOCOPY=Formula1&ZOHO_DATABASE_NAME=Destination Workspace Name& ZOHO_COPY_DB_KEY=*************" -H "Authorization:Zoho-oauthtoken <access_token>" https://analyticsapi.zoho.com/api/EmailAddress/WorkspaceName/TableName
Sample Response XML Format:
<responseuri="/api/EmailAddress/WorkspaceName/TableName"action="COPYFORMULA">
<result>
<message>
Successfully formula(s) Copied
</message>
</result>
</response>
Sample Response JSON Format:
{"response":
{"uri":"\/api\/email\/Workspace name\/TableName",
"action":"COPYFORMULA",
"result":
{"message": "Successfully Formula(s) Copied"}}}
The Copy Formula API is used to copy one or more formula columns from one table to another within the same Workspace or across Workspaces and even across one user account to another. The source workspace administrator should generate and provide the Copy Workspace Key, the secret key used to authorize the destination workspace administrator. It is necessary that the table and column name in the destination Workspace should be the same as that of the table and column names in the source Workspace on which the formula is dependent. Both Custom Formula and Aggregate Formula can be copied using this API.
request uri
https://<
ZohoAnalytics.modeling.create
COMMON PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_ACTION | COPYFORMULA | This parameter specifies the action to be performed by the API request. |
ZOHO_OUTPUT_FORMAT | XML/JSON | This parameter specifies the output format for the response. |
ZOHO_ERROR_FORMAT | XML/JSON | Specifies the output format for the response in case an error occurs when trying to process the request. |
ZOHO_API_VERSION | 1.0 | The API version of Zoho Analytics based on which the application(/service) has been written. This parameter allows the Zoho Analytics to handle applications based on the older versions.The current API version is 1.0. |
Authorization
To make authenticated API request, append the access token in Authorization
request header.
Value | Description | |
---|---|---|
Authorization | The Access token provides a secure and temporary access to Zoho Analytics API's. Each access token will be valid only for an hour, and can be used only for the set of operations that is described in the scope. |
ACTION SPECIFIC PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_FORMULATOCOPY | Formula name | This parameter holds the FORMULA NAME to be copied from the source Workspace into another table in the destination Workspace. In case more than one formulas are to be copied, the formula names should be separated by comma ( , ). Example: ZOHO_FORMULATOCOPY=MyFormula1,MyFormula2,MyFormulaN |
ZOHO_DATABASE_NAME | Workspace name | This parameter holds the name of the Workspace (destination Workspace) where the destination table is present. The specified formula are copied to the table which has same name (SourceEmployeeDetails) as specified in the API URL |
ZOHO_COPY_DB_KEY | Workspace key | The secret key used for allowing the user to copy the Workspace / Reports. The source Workspace admin has to create the Copy Workspace Secret Key. Note: You need to provide the appropriate values in the above URL to generate the corresponding Copy Workspace Key for your setup |
Possible Error Codes In COPY FORMULA
Error codes in Modeling API
Sample error XML format:
<responseuri="/api/EmailAddress/WorkspaceName"action="COPYDATABASE">
<error>
<code>7103</code>
<message>
Workspace not found! Please check whether the Workspace exists
</message>
</error>
</response>
Sample error JSON format:
{"response":
{"uri": "\/api\/email\/WorkspaceName",
"action": "COPYDATABASE",
"error":
{"code":7103,
"message": "Workspace not found! Please check whether
the Workspace exists"}}}
This section lists all possible error response codes that could be sent from the Zoho Analytics server on failure of Modeling APIs. You can use this for appropriate error handling.
Error Codes
Error-Code | Reason | Solution |
---|---|---|
7101 | Workspace with the same name exists already. | Provide an alternate name. |
7103 | The Workspace Name mentioned in the API URL does not exist. | Check the Workspace name in the request URL and provide a valid Workspace name. |
7105 | View name specified in the Workspace does not exist. | Provide a valid view name. |
7107 | The column is not present in the specified Zoho Analytics Table. | Provide the correct name of the column to be deleted in the ZOHO_COLUMNNAME parameter. |
7111 | A Table with the name already exists in this Workspace. | Provide an alternate name. |
7128 | The column with the same name is already exists in the Zoho Analytics Table. | Provide the different name for the ZOHO_COLUMNNAME parameter. |
7138 | The view name specified in the API request URL does not exist. | Check the view name in the request URL and provide a valid view name. |
7144 | Mentioned Folder is not present in this Workspace. | Check if the mentioned folder is available. |
7159 | The column to be deleted is used in Reports, Formula Columns, Query Tables, etc. | The column with dependent views cannot be deleted. Please delete the dependent views and formula columns associated with this column before calling this delete column API. |
7161 | The Zoho Analytics Table specified in this API is a system table (created for Service Integration). | Adding columns into System Table is not allowed. You could only add columns in a non-system table using this API. |
7165 | The Workspace specified is a system Workspace (dedicated Workspace created for other Zoho Service integrations) which cannot be deleted. | The system Workspace cannot be deleted. |
7277 | The specified view holds dependent views. | Set ZOHO_DELETE_DEPEND_VIEWS as true. |
8023 | You do not have required permission to perform this operation. | Kindly contact our support team. |
8024 | Copy Workspace operation not allowed. | Check the Workspace key provided in the url. |
8025 | Invalid Custom Domain. | Provide a valid domain name. |
8504 | The required parameter is not proper or has not been sent. | Send the parameter with valid data. |
8506 | The mentioned parameter has been sent more than the required count. | Check and remove that extra parameter mentioned in the response. |
8516 | Invalid value passed in the mentioned parameter. | Provide the valid data to the mentioned parameter. |
8533 | The user email address provided in the URL is an improper format. | Provide a valid email address. |
8534 | Invalid JSON Format. | Provide a valid JSON data. |
15000 | A table which is needed to copy the specified report is missing in the destination Workspace. | Check the destination Workspace and create the missing tables. |
15001 | A column which is needed to copy the specified report is missing in the destination Workspace. | Check the destination Workspace and create the column before copying the report. |
15002 | A formula column which is needed to copy the specified report is missing in the destination Workspace. | Check the destination Workspace and create the formula column before copying the report. |
15005 | The report name specified already exists in the destination Workspace. | Check whether the report with the same name exists in the destination Workspace. Try renaming the source report or the report in destination Workspace and invoke the API again. |
15007 | Insufficient privileges to copy the report. | Check whether the Copy Workspace Key is valid. |
15009 | The formula column name specified already exists in the destination Workspace. | Check whether the formula column is already copied, otherwise, try renaming the formula column in the source table or in the destination Workspace and invoke the API again. |
15010 | The Formula Column name specified in the API request is not present in the Source Table. | Check the formula column name(s) specified in the ZOHO_FORMULATOCOPY parameter is correct. |
15012 | The reports specified in the API request is not present in the Source Workspace. | Check the reports specified in the ZOHO_VIEWTOCOPY parameter are correct and are available. |
15018 | The table to be copied have more than two hundred thousand rows. | Set ZOHO_HUGEDATACOPY as true. |
In case of any error other than the above said, mail the API request URL parameters and error response details to
Metadata API
This section lists all the metadata APIs. Metadata API’s can be used to fetch information about the reporting Workspaces,tables, reports and dashboards created in Zoho Analytics.
Workspace Metadata
Download client libraries :
C# |GO |JAVA |PHP |PYTHON |NODEJS Sample Request:
Copycurl -d "ZOHO_ACTION=DATABASEMETADATA&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT= XML&ZOHO_API_VERSION=1.0 &ZOHO_METADATA=ZOHO_CATALOG_LIST" -H "Authorization:Zoho-oauthtoken <access_token>" https://analyticsapi.zoho.com/api/EmailAddress
Sample Response XML Format:
<responseURI="/api/EmailAddress"ACTION="ZOHO_CATALOG_LIST">
<ZCATALOGS>
<ZCATALOG IS_DEFAULT="1"TABLE_CAT="SalesDB"></ZCATALOG>
<ZCATALOG IS_DEFAULT="0"TABLE_CAT="Super Store Sales"></ZCATALOG>
<ZCATALOG IS_DEFAULT="0"TABLE_CAT="Project Manager"></ZCATALOG>
</ZCATALOGS>
</response>
Sample Response JSON Format:
{"response":
{"uri": "\/api\/email",
"action": "ZOHO_CATALOG_LIST",
"result":
[{"isDefault": true,
"tableCat": "SalesDB"},
{"isDefault": false,
"tableCat": "Super Store Sales"},
{"isDefault": false,
"tableCat": "Project Manager"}]}}
Sample Responses for Catalog Information
XML Format:
<responseURI="/api/EmailAddress/WorkspaceName"ACTION="ZOHO_CATALOG_INFO">
<ZCATALOGTABLE_CAT="SalesDB">
<ZVIEWREMARKS="\N"TABLE_NAME="SalesTable"TABLE_TYPE="TABLE">
<ZCOLUMNS>
<ZCOLUMNCOLUMN_NAME="REGION"PKCOLUMN_NAME="\N"NULLABLE="true"COLUMN_SIZE="100"PKTABLE_NAME="\N"DATA_TYPE="12"REMARKS="\N"TYPE_NAME="Plain Text"DECIMAL_DIGITS="-1"ORDINAL_POSITION="1"></ZCOLUMN>
<ZCOLUMNCOLUMN_NAME="Order Date"PKCOLUMN_NAME="\N"NULLABLE="true"COLUMN_SIZE="19"PKTABLE_NAME="\N"DATA_TYPE="93"REMARKS="\N"TYPE_NAME="Date"DECIMAL_DIGITS="-1"ORDINAL_POSITION="6"></ZCOLUMN>
</ZCOLUMNS>
</ZVIEW>
<ZVIEWREMARKS="\N"TABLE_NAME="Region"TABLE_TYPE="REPORT"></ZVIEW>
<ZVIEWREMARKS="\N"TABLE_NAME="SalesTabular"TABLE_TYPE="REPORT">
<ZVIEWREMARKS="\N"TABLE_NAME="SalesQuery"TABLE_TYPE="VIEW">
<ZCOLUMNS>
<ZCOLUMNCOLUMN_NAME="Market Type"PKCOLUMN_NAME="\N"NULLABLE="false"COLUMN_SIZE="100"PKTABLE_NAME="\N"DATA_TYPE="12"REMARKS="\N"TYPE_NAME="Plain Text"DECIMAL_DIGITS="-1"ORDINAL_POSITION="1"></ZCOLUMN>
<ZCOLUMNCOLUMN_NAME="Order Date"PKCOLUMN_NAME="\N"NULLABLE="false"COLUMN_SIZE="19"PKTABLE_NAME="\N"DATA_TYPE="93"REMARKS="\N"TYPE_NAME="Date"DECIMAL_DIGITS="-1"ORDINAL_POSITION="2"></ZCOLUMN>
</ZCOLUMNS>
</ZVIEW>
<ZVIEWREMARKS="\N"TABLE_NAME="SalesPivot"TABLE_TYPE="REPORT"></ZVIEW>
<ZVIEWREMARKS="\N"TABLE_NAME="SalesSummary"TABLE_TYPE="REPORT"></ZVIEW>
</response>
JSON Format:
{"response":
{"uri": "\/api\/email\/WorkspaceName",
"action": "ZOHO_CATALOG_INFO",
"result":
{"views":
[{"remarks": null,
"tableName": "SalesTable",
"tableType": "TABLE",
"columns":
[{"columnName": "REGION",
"pkcolumnName": null,
"nullable": true,
"columnSize": 100,
"pktableName": null,
"dataType": "12",
"remarks": null,
"typeName": "Plain Text",
"decimalDigits": -1,
"ordinalPosition": 1
},
{"columnName": "Order Date",
"pkcolumnName": null,
"nullable": true,
"columnSize": 19,
"pktableName": null,
"dataType": "93",
"remarks": null,
"typeName": "Date",
"decimalDigits": -1,
"ordinalPosition": 6
}]},
{"remarks": "Region wise chart for the year 2009",
"tableName": "Region",
"tableType": "REPORT",
"columns":
[]},
{"remarks": null,
"tableName": "SalesTabular",
"tableType": "REPORT",
"columns":
[]},
{"remarks": null,
"tableName": "SalesQuery",
"tableType": "VIEW",
"columns":
[{"columnName": "Market Type",
"pkcolumnName": null,
"nullable": false,
"columnSize": 100,
"pktableName": null,
"dataType": "12",
"remarks": null,
"typeName": "Plain Text",
"decimalDigits": -1,
"ordinalPosition": 1
},
{"columnName": "Order Date",
"pkcolumnName": null,
"nullable": false,
"columnSize": 19,
"pktableName": null,
"dataType": "93",
"remarks": null,
"typeName": "Date",
"decimalDigits": -1,
"ordinalPosition": 2
}]},
{"remarks": null,
"tableName": "SalesPivot",
"tableType": "REPORT",
"columns":
[]},
{"remarks": null,
"tableName": "SalesSummary",
"tableType": "REPORT",
"columns":
[]}],
"tableCat": "SalesDB"}}}
Sample Responses for Datatype Information
XML Format:
<responseURI="/api/EmailAddress"ACTION="ZOHO_DATATYPES">
<ZDATATYPES>
<ZDATATYPELITERAL_PREFIX="'"MAXSIZE="19"MAXIMUM_SCALE="\N"NULLABLE="1"TYPE_NAME="Positive Number"DATA_TYPE="-5"MINIMUM_SCALE="\N"SQL_DATA_TYPE="-5"FIXED_PREC_SCALE="false"LOCAL_TYPE_NAME="\N"AUTO_INCREMENT="false"SQL_DATETIME_SUB="0"PRECISION="-1"UNSIGNED_ATTRIBUTE="true"ID="5">
</ZDATATYPE>
<ZDATATYPELITERAL_PREFIX="'"MAXSIZE="1"MAXIMUM_SCALE="\N"NULLABLE="1"TYPE_NAME="Yes/No Decision"DATA_TYPE="-7"MINIMUM_SCALE="\N"SQL_DATA_TYPE="-7"FIXED_PREC_SCALE="false"LOCAL_TYPE_NAME="\N"AUTO_INCREMENT="false"SQL_DATETIME_SUB="0"PRECISION="-1"UNSIGNED_ATTRIBUTE="false"ID="10">
</ZDATATYPE>
</ZDATATYPES>
</response>
JSON Format
{"response":
{"uri": "\/api\/email",
"action": "ZOHO_DATATYPES",
"result":
[{"literalPrefix": "\'",
"maxsize": 19,
"maximumScale": null,
"nullable": true,
"dataType": -5,
"minimumScale": null,
"sqlDataType": -5,
"fixedPrecScale": false,
"localTypeName": null,
"autoIncrement": false,
"searchable": false,
"literalSuffix": "\'",
"caseSensitive": true,
"numPrecRadix": "10",
"typeName": "Positive Number",
"createParams": "500",
"sqlDatetimeSub": "0",
"precision": -1,
"unsignedAttribute": true,
"id": "5"},
{"literalPrefix": "\'",
"maxsize": 1,
"maximumScale": null,
"nullable": true,
"dataType": -7,
"minimumScale": null,
"sqlDataType": -7,
"fixedPrecScale": false,
"localTypeName": null,
"autoIncrement": false,
"searchable": false,
"literalSuffix": "\'",
"caseSensitive": true,
"numPrecRadix": "10",
"typeName": "Yes\/No Decision",
"createParams": "500",
"sqlDatetimeSub": "0",
"precision": -1,
"unsignedAttribute": false,
"id": "10"}]}}
Sample Responses for Table Types
XML Format:
<responseURI="/api/EmailAddress"ACTION="ZOHO_TABLETYPES">
<ZVIEWTYPES >
<ZVIEWTYPETYPE="TABLE"></ZVIEWTYPE>
<ZVIEWTYPETYPE="VIEW"></ZVIEWTYPE>
<ZVIEWTYPETYPE="REPORT"></ZVIEWTYPE>
</ZVIEWTYPES>
</response>
JSON Format
{"response":
{"uri": "\/api\/email",
"action": "ZOHO_TABLETYPES",
"result":
["TABLE",
"VIEW",
"REPORT"]}}
Using the Workspace Metadata API, you can get the following meta information.
- List of Reporting Workspaces in your account
- List of Views and View Information in your Reporting Workspace
- Different views available in Zoho Analytics
- Datatypes available in Zoho Analytics
request uri
https://<
ZohoAnalytics.metadata.read
COMMON PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_ACTION | DATABASEMETADATA | This parameter specifies the action to be performed by the API request. |
ZOHO_METADATA | The supported values are: | specifies the information to be fetched. |
ZOHO_OUTPUT_FORMAT | XML/JSON | This parameter specifies the output format for the response. |
ZOHO_ERROR_FORMAT | XML/JSON | Specifies the output format for the response in case an error occurs when trying to process the request. |
ZOHO_API_VERSION | 1.0 | The API version of Zoho Analytics based on which the application(/service) has been written. This parameter allows the Zoho Analytics to handle applications based on the older versions.The current API version is 1.0. |
Authorization
To make authenticated API request, append the access token in Authorization
request header.
Value | Description | |
---|---|---|
Authorization | The Access token provides a secure and temporary access to Zoho Analytics API's. Each access token will be valid only for an hour, and can be used only for the set of operations that is described in the scope. |
1.Getting Workspace (Catalog) List
To list the Zoho Analytics Workspaces for the specified user
request uri
https://<
COMMON PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_ACTION | DATABASEMETADATA | This parameter specifies the action to be performed by the API request. |
ZOHO_METADATA | ZOHO_CATALOG_LIST | To list the Zoho Analytics workspaces for the specified user |
ZOHO_OUTPUT_FORMAT | XML/JSON | This parameter specifies the output format for the response. |
ZOHO_ERROR_FORMAT | XML/JSON | Specifies the output format for the response in case an error occurs when trying to process the request. |
ZOHO_API_VERSION | 1.0 | The API version of Zoho Analytics based on which the application(/service) has been written. This parameter allows the Zoho Analytics to handle applications based on the older versions.The current API version is 1.0. |
Authorization
To make authenticated API request, append the access token in Authorization
request header.
Value | Description | |
---|---|---|
Authorization | The Access token provides a secure and temporary access to Zoho Analytics API's. Each access token will be valid only for an hour, and can be used only for the set of operations that is described in the scope. |
2.Getting Tables and Reports in a workspace (Catalog Information)
To fetch information about the tables & reports (view) present in the given reporting workspace in Zoho Analytics.
request uri
https://<
COMMON PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_ACTION | DATABASEMETADATA | This parameter specifies the action to be performed by the API request. |
ZOHO_METADATA | ZOHO_CATALOG_INFO | To fetch information about the tables & reports (view) present in the given reporting workspace in Zoho Analytics. |
ZOHO_OUTPUT_FORMAT | XML/JSON | This parameter specifies the output format for the response. |
ZOHO_ERROR_FORMAT | XML/JSON | Specifies the output format for the response in case an error occurs when trying to process the request. |
ZOHO_API_VERSION | 1.0 | The API version of Zoho Analytics based on which the application(/service) has been written. This parameter allows the Zoho Analytics to handle applications based on the older versions.The current API version is 1.0. |
Authorization
To make authenticated API request, append the access token in Authorization
request header.
Value | Description | |
---|---|---|
Authorization | The Access token provides a secure and temporary access to Zoho Analytics API's. Each access token will be valid only for an hour, and can be used only for the set of operations that is described in the scope. |
3.Getting Datatype Information
The following table lists the common DATA TYPE numbers and its corresponding TYPE NAMES.
Data Type Number | Type Name |
---|---|
12 | Plain Text / Multi Line Text / Email / URL |
-7 | Yes / No Decision |
8 | Percent / Currency / Decimal Number |
-5 | Number / Auto Number / Positive Number |
93 | Date |
request uri
https://<
COMMON PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_ACTION | DATABASEMETADATA | This parameter specifies the action to be performed by the API request. |
ZOHO_METADATA | ZOHO_DATATYPES | To get the list of datatypes supported by Zoho Analytics |
ZOHO_OUTPUT_FORMAT | XML/JSON | This parameter specifies the output format for the response. |
ZOHO_ERROR_FORMAT | XML/JSON | Specifies the output format for the response in case an error occurs when trying to process the request. |
ZOHO_API_VERSION | 1.0 | The API version of Zoho Analytics based on which the application(/service) has been written. This parameter allows the Zoho Analytics to handle applications based on the older versions.The current API version is 1.0. |
Authorization
To make authenticated API request, append the access token in Authorization
request header.
Value | Description | |
---|---|---|
Authorization | The Access token provides a secure and temporary access to Zoho Analytics API's. Each access token will be valid only for an hour, and can be used only for the set of operations that is described in the scope. |
4.Getting Table Types
The following table lists the common TABLETYPES.
Actual View | TABLETYPE Value |
---|---|
Tables | TABLE |
Query Tables | VIEW |
Charts / Pivots / Tabular Views / Summary Views / Dashboards | REPORT |
request uri
https://<
COMMON PARAMETERS
Parameter Name | Possible Values | Description |
---|---|---|
ZOHO_ACTION | DATABASEMETADATA | This parameter specifies the action to be performed by the API request. |
ZOHO_METADATA | ZOHO_TABLETYPES | Various view types available in Zoho Analytics |
ZOHO_OUTPUT_FORMAT | XML/JSON | This parameter specifies the output format for the response. |
ZOHO_ERROR_FORMAT | XML/JSON | Specifies the output format for the response in case an error occurs when trying to process the request. |
ZOHO_API_VERSION | 1.0 | The API version of Zoho Analytics based on which the application(/service) has been written. This parameter allows the Zoho Analytics to handle applications based on the older versions.The current API version is 1.0. |
Authorization
To make authenticated API request, append the access token in Authorization
request header.
Value | Description | |
---|---|---|
Authorization | The Access token provides a secure and temporary access to Zoho Analytics API's. Each access token will be valid only for an hour, and can be used only for the set of operations that is described in the scope. |
Response Attributes
In this section, we have described the detailed explanation of the attribute / property we used in DATABASEMETADATA APIs.
Attribute/Property | Description |
---|---|
IS_DEFAULT/isDefault | Indicates whether a Zoho Analytics workspace is set as the default. Can be used to set default workspace for third party tools that loads Zoho Analytics Workspaces using JDBC Driver. |
TABLE_CAT/tableCat | Zoho Analytics workspace name (ex: SalesDB) |
COLUMN_NAME/columnName | Name of the column in table type views (ex: Region) |
LITERAL_PREFIX | Prefix character used when literal values found (ex: '45’) |
NULLABLE | Will be true if the column can contain null value, false otherwise. |
MAXSIZE | Maximum size of the column (ex: 20) |
TYPE_NAME | Zoho Analytics name for the data type (ex: Positive Number) |
Note:
\N in XML response refer to the NULL value
Getting Metadata Using JDBC Driver
In case you are using a Java application then Zoho Analytics offers a JDBC Driver and which can be used to fetch all the Zoho Analytics metadata information. Refer to the page
Possible Error Codes In WORKSPACE METADATA
My Workspace List
Download client libraries :
C# |GO |JAVA |PHP |PYTHON |NODEJS Sample Request: