Zoho Analytics
ACCESS ZOHO ANALYTICS
Pricing Contact Us
Did you find what you were looking for? Yes | No
NAV
CURL C# GO JAVA PHP PYTHON NODE JS DELUGE

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 ( Zoho CRM , Zoho Creator , Zoho Projects , Zoho Books …) for seamlessly providing Reporting and Analytical features based on Zoho Analytics to their users.

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

  1. 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.

  2. It is mandatory to use HTTPS in all API requests instead of HTTP request. HTTP is not supported

  3. Choose your <ZohoAnalytics_Server_URI> and use the same in API request URI.

  4. An access token is mandatory to authorize the user. Refer this link to know how to generate an access token.

Note:

Authentication

Zoho Analytics REST API supports OAuth 2.0 protocol to authorize and authenticate API calls. Follow the steps listed here to use OAuth 2.0 protocol in Zoho Analytics APIs.


Registering New Client

Register your application with Zoho's Developer console in order to get OAuth 2.0 credentials.

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 getting <Client_ID> and <Client_Secret>, a grant code has to be generated.

SELF CLIENT METHOD

This method is used to generate code only for Self Client Type.

Save this code for further steps.

REDIRECT METHOD

Make a request to the below URI with the given params to get code value.

METHOD : POST

https://<ZohoAccounts_Server_URI>/oauth/v2/auth?


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
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 and online. The online access_type gives your application only the access_token which is valid for one hour. The offline access_type will give the application an access_token as well as a refresh_token. By default it is taken as online
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 mandatory

On this request, If prompt parameter is send along the request url, user will be shown with a "user consent page".

Upon clicking “Accept”, Zoho will redirect to the given redirect_uri with code and state as get parameters. Save the code value for further steps.


Note: This code is valid for only 120 seconds. Next Step have to be done within this time.

On clicking “Deny”, the server returns an error


Generating Refresh Token

REFRESH TOKEN

Refresh token is used to obtain new access tokens. This token has an unlimited lifetime, it can be revoked manually.

ACCESS TOKEN

A 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://<ZohoAccounts_Server_URI>/oauth/v2/token?


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).
grant_type* authorization_code (provide this literal string as value)
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
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 is 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 revoke request)


Generating Access Token

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 expired access token, the request terminates throwing Invalid OAuth.

The following POST URI with the params given below, generates a new access token.

METHOD : POST

https://<ZohoAccounts_Server_URI>/oauth/v2/token?


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)
grant_type* refresh_token (provide this literal string as value)

Calling an API using OAuth authentication

Access Token can be passed only in header and cannot be passed in the request param.


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://<ZohoAccounts_Server_URI>/oauth/v2/token/revoke?

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 share 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 APIs
Availabe Scope: ZohoAnalytics.fullaccess.all

API Specification

Zoho Analytics API uses HTTP as the underlying transport protocol. It is based on REST principles. The following are the basic points of how the REST APIs are structured:

It is important to understand the API specification clearly before referring to the actual API methods


Server URI

Below given are the available server uri 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 api-console.zoho.com
EU
(Europe)
analyticsapi.zoho.eu accounts.zoho.eu api-console.zoho.eu
IN
(India)
analyticsapi.zoho.in accounts.zoho.in api-console.zoho.in
AU
(Australia)
analyticsapi.zoho.com.au accounts.zoho.com.au api-console.zoho.com.au
CN
(China)
analyticsapi.zoho.com.cn accounts.zoho.com.cn api-console.zoho.com.cn


Request Format

Sample Request:

Copy
curl -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. The request consists of the following components:

URI

The URI points to the resource inside Zoho Analytics over which the action is to be performed.

https://<ZohoAnalytics_Server_URI>/api/<OwnerEmail>/<WorkspaceName>/<ViewName>

It consists of the following parts

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 header for authorization purpose.

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 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" ?>
<response uri="/api/EmailAddress/WorkspaceName/TableName" action="ADDROW">
    <result>
        <!-- All the columns in the row , including formula columns -->
        <row>
            <column name="Name">Gary</column>
            <column name="Date Of Birth">12-Jun-1980</column>
            <column name="Basic">10000</column>
            <column name="Country">USA</column>
        </row>
    </result>
<response>

JSON Format:

{
    "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 Export action.

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

XML Format

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

Format

<?xml version="1.0" encoding="UTF-8" ?>

<response uri="/api/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 EXPORT. These formats don’t have any generic parseable header/footer. See this link for more details about these formats.


Error handling

Sample error response : IMPORT DATA


Sample error response for import data in Table.

XML Format:

<?xml version="1.0" encoding="UTF-8"?>
<response url="/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, you may follow the below steps to identify an error condition and to handle the same:

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:

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 SQL SELECT WHERE condition like format. You could also use SQL in-built functions as part of the criteria. These built-in functions should be the functions supported by any of Oracle, MS SQL Server, MySQL, DB2, Sybase, ANSI SQL, Informix and PostgreSQL databases.

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 SQL SELECT WHERE clause.Supported
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 SQL SELECT WHERE clause.
Supported Relational Operators:
  • =
  • !=
  • <
  • >
  • <=
  • >=
  • LIKE
  • NOT LIKE
  • IN
  • NOT IN
  • BETWEEN
  • value Refers to the exact value to match.
    Eg.: "Department" = 'Finance'
    here 'Finance' is a literal value to match.

    NOTES FOR CRITERIA FORMATION:

    Refer to the SQL SELECT WHERE clause documentation of any database that we support, to know more on how to construct the filter criteria.


    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:

    Auth Token

    Auth Token is an unique token that authenticates the user to access the Zoho Account. It is equivalent to logging into Zoho service(s) from browser. Click here to know how to generate an Auth Token.

    ZOHO_ACTION

    This parameter specifies the action to be performed by the API request. The sample values are:

    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:

    In-case ZOHO_ACTION is EXPORT then following additional formats are supported.

    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:

    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 Import of data, which has a date column, whose format is not properly identified by Zoho Analytics.

    Example: ZOHO_DATE_FORMAT=dd-MMM-yyyy

    View this link for more details about how to construct a custom date format.

    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:

    Copy
    curl -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>
                <column name="Name">Gary</column>
                <column name="Date Of Birth">12-Jun-1980</column>
                <column name="Basic">10000</column>
                <column name="Country">USA</column>
            </row>
        </result>
    </response>
    

    This API allows you to add a single row into a specified table.

    request uri

    https://<ZohoAnalytics_Server_URI>/api/<OwnerEmail>/<WorkspaceName>/<TableName>

    oauthscope: 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.

    Header Name Value Description
    Authorization Zoho-oauthtoken<space><access_token> 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

    7103 , 7138 , 7507 , 7511 , 8016 , 8504 , 8506 , 8516 , 8533


    Delete Data

    Download client libraries : C# | GO | JAVA | PHP | PYTHON | NODEJS



    Sample Request:

    Copy
    curl -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" ?>
    <response uri="/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_Server_URI>/api/<OwnerEmail>/<WorkspaceName>/<TableName>

    oauthscope: 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.

    Header Name Value Description
    Authorization Zoho-oauthtoken<space><access_token> 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
    ZOHO_CRITERIA
    (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 view this link for more details about the format for ZOHO_CRITERIA.
    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

    7103 , 7138 , 8002 , 8004 , 8504 , 8506 , 8516 , 8533


    Update Data

    Download client libraries : C# | GO | JAVA | PHP | PYTHON | NODEJS



    Sample Request:

    Copy
    curl -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" ?>
    <response uri="/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_Server_URI>/api/<OwnerEmail>/<WorkspaceName>/<TableName>

    oauthscope: 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.

    Header Name Value Description
    Authorization Zoho-oauthtoken<space><access_token> 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
    ZOHO_CRITERIA
    (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 view this link.
    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

    7103 , 7138 , 7507 , 8002 , 8004 , 8016 , 8504 , 8506 , 8516 , 8533


    Import Data

    Download client libraries : C# | GO | JAVA | PHP | PYTHON | NODEJS



    Sample Request:

    Copy
    curl -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" ?>
    <response uri="/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>
                <column datatype="Plain Text">Name </column>
                <column datatype="Date">Date Of Birth</column>
                <column datatype="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_Server_URI>/api/<OwnerEmail>/<WorkspaceName>/<TableName>

    oauthscope: 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.

    Header Name Value Description
    Authorization Zoho-oauthtoken<space><access_token> 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
    ZOHO_CRITERIA
    (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.

    • In the case of importing 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)
    • Maximum allowed file size is 100 MB.


    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:
  • CSV
  • JSON
  • ZOHO_IMPORT_TYPE
    (mandatory)
    APPEND/TRUNCATEADD/UPDATEADD
  • APPEND - Appends the data into the table.
  • TRUNCATEADD - Deletes all exisiting rows in the table and adds the imported data as new entry.
  • UPDATEADD - Updates the row if the mentioned column values are matched, else a new entry will be added.
  • 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.
  • ABORT - Incase of any error, abort the whole import.
  • SKIPROW - In case of any error, skip that specific row(s) which has the problem and continue importing the rest.
  • SETCOLUMNEMPTY - In case of any error, set the value of the error column for the row to empty and continue importing.
  • ZOHO_CREATE_TABLE
    (mandatory)
    true/false. Default is false.
  • In case it is true, then the table is created if the table referred in the URL doesn’t exists in the specified Workspace.
  • In case its false, no table is created even if the table referred in the URL does not exists in the Workspace.
  • 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.
  • If set to true, then the final key attribute alone will be considered as column name.
  • If set to false, then the column name will be constructed by appending all the parent attributes separated by dot (.). This will result in column names which captures the full JSON tree hierarchy 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 <character> 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

    7103 , 7138 , 7235 , 8002 , 8004 , 8504 , 8506 , 8516 , 8533


    Export Data

    Download client libraries : C# | GO | JAVA | PHP | PYTHON | NODEJS



    Sample Request:

    Copy
    curl -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" ?>
    <response uri="/api/EmailAddress/WorkspaceName/TableName" action="EXPORT">
        <result>
            <rows>
                <row>
                    <column name="Name">Gary</column>
                    <column name="Date Of Birth">12-Jun-1980</column>
                    <column name="Basic">10000</column>
                    <column name="Country">USA</column>
                </row>
                <row>
                    <column name="Name">John</column>
                    <column name="Date Of Birth">12-Jun-1981</column>
                    <column name="Basic">10000</column>
                    <column name="Country">Canada</column>
                </row>
                <row>
                    <column name="Name">Joan</column>
                    <column name="Date Of Birth">12-Jun-1982</column>
                    <column name="Basic">10000</column>
                    <column name="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_Server_URI>/api/<OwnerEmail>/<WorkspaceName>/<ViewName>

    oauthscope: 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.

    Header Name Value Description
    Authorization Zoho-oauthtoken<space><access_token> 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
    ZOHO_CRITERIA
    (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 refer this link.
    ZOHO_SQLQUERY
    (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 - EUROPEAN
    2 - CHINESE
    3 - JAPANESE
    4 - KOREAN
    Default - ENGLISH
    PDF will be rendered using the specified language
    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 exported
    false - 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.
    {
      "data"
    : [
        {
    "Rank":"1","Country":"United States","Gold":"46"},
        {
    "Rank":"2","Country":"Great Britain","Gold":"27"},
        {
    "Rank":"3","Country":"China","Gold":"26"}
        ]

    }

    (This JSONArray alone can directly feed to the Import API).

    False - Returns JSON data in traditional way.
    {
      "response"
    : {
        "uri"
    :"\/api\/email\/WorkspaceName\/ViewName",
        "action"
    :"EXPORT",
        "result"
    : {
          "column_order"
    :["Rank","Country","Gold"],
          "rows"
    :[
            [
    "1","United States","46"],
            [
    "2","Great Britain","27"],
            [
    "3","China","26"]
          ]

        }

      }

    }

    Export Using SQL:

    Zoho Analytics has implemented the Zoho CloudSQL technology as an extension to its HTTP Web API. Using the Zoho Analytics HTTP API, users can query the workspace by providing SQL queries.

    Refer to the documentation on Zoho Analytics CloudSQL for more details on how to use SQL SELECT query to fetch data from Zoho Analytics.

    Possible Error Codes In EXPORT DATA

    7103 , 7138 , 8002 , 8004 , 8504 , 8506 , 8516 , 8533


    Error codes in Data API

    Sample error XML format:

    
    <response uri="/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 support@zohoanalytics.com. Zoho Analytics Team will get back to you with the best possible solution.

    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:

    Copy
    curl -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:

    <response uri="/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_Server_URI>/api/EmailAddress

    oauthscope: 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.

    Header Name Value Description
    Authorization Zoho-oauthtoken<space><access_token> 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

    7101 , 8504 , 8506 , 8516 , 8533


    Copy Workspace

    Download client libraries : C# | GO | JAVA | PHP | PYTHON | NODEJS



    Sample Request:

    Copy
    curl -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:

    <response uri="/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_Server_URI>/api/<SourceEmail>/<SourceWorkspaceName>

    oauthscope: 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.

    Header Name Value Description
    Authorization Zoho-oauthtoken<space><destination_account_access_token> 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. For more about workspace 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

    7101 , 7103 , 7138 , 8024 , 8504 , 8506 , 8516 , 8533 , 15007


    Delete Workspace

    Download client libraries : C# | GO | JAVA | PHP | PYTHON | NODEJS



    Sample Request:

    Copy
    curl -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:

    <response uri="/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_Server_URI>/api/<OwnerEmail>

    oauthscope: 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.

    Header Name Value Description
    Authorization Zoho-oauthtoken<space><access_token> 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

    7103 , 7138 , 7165 , 8504 , 8506 , 8516 , 8533


    Enable Domain Workspace (Only For White Label Customers)

    Download client libraries : C# | GO | JAVA | PHP | PYTHON | NODEJS



    Sample Request:

    Copy
    curl -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:

    <response uri="/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_Server_URI>/api/<OwnerEmail>

    oauthscope: 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.

    Header Name Value Description
    Authorization Zoho-oauthtoken<space><access_token> 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

    7103 , 7138 , 8023 , 8025 , 8504 , 8506 , 8516 , 8533


    Disable Domain Workspace (Only For White Label Customers)

    Download client libraries : C# | GO | JAVA | PHP | PYTHON | NODEJS



    Sample Request:

    Copy
    curl -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:

    <response uri="/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_Server_URI>/api/<OwnerEmail>

    oauthscope: 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.

    Header Name Value Description
    Authorization Zoho-oauthtoken<space><access_token> 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

    7103 , 7138 , 8023 , 8025 , 8504 , 8506 , 8516 , 8533


    Create Table

    Download client libraries : C# | GO | JAVA | PHP | PYTHON | NODEJS



    Sample Request:

    Copy
    curl -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" ?>
    <response uri="/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_Server_URI>/api/<OwnerEmail>/<WorkspaceName>

    oauthscope: 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.

    Header Name Value Description
    Authorization Zoho-oauthtoken<space><access_token> 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:

    Copy
    curl -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:

    <response uri="/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_Server_URI>/api/<OwnerEmail>/<WorkspaceName>/<TableName>

    oauthscope: 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.

    Header Name Value Description
    Authorization Zoho-oauthtoken<space><access_token> 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:
  • PLAIN
  • MULTI_LINE
  • EMAIL
  • NUMBER
  • POSITIVE_NUMBER
  • DECIMAL_NUMBER
  • CURRENCY
  • PERCENT
  • DATE
  • BOOLEAN
  • URL
  • AUTO_NUMBER
  • The datatype of the column to be added into Zoho Analytics Table.

    Possible Error Codes In ADD COLUMN

    7103 , 7128 , 7138 , 7161 , 8504 , 8506 , 8516 , 8533


    Add Lookup

    Download client libraries : C# | GO | JAVA | PHP | PYTHON | NODEJS



    Sample Request:

    Copy
    curl -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" ?>
    <response uri="/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_Server_URI>/api/<OwnerEmail>/<WorkspaceName>/<TableName>

    oauthscope: 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.

    Header Name Value Description
    Authorization Zoho-oauthtoken<space><access_token> 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

    7103 , 7107 , 7138 , 8504 , 8506 , 8516 , 8533


    Remove Lookup

    Download client libraries : C# | GO | JAVA | PHP | PYTHON | NODEJS



    Sample Request:

    Copy
    curl -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" ?>
    <response uri="/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_Server_URI>/api/<OwnerEmail>/<WorkspaceName>/<TableName>

    oauthscope: 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.

    Header Name Value Description
    Authorization Zoho-oauthtoken<space><access_token> 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

    7103 , 7107 , 7138 , 8504 , 8506 , 8516 , 8533


    Delete Column

    Download client libraries : C# | GO | JAVA | PHP | PYTHON | NODEJS



    Sample Request:

    Copy
    curl -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:

    <response uri="/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_Server_URI>/api/<OwnerEmail>/<WorkspaceName>/<TableName>

    oauthscope: 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.

    Header Name Value Description
    Authorization Zoho-oauthtoken<space><access_token> 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

    7103 , 7107 , 7138 , 7159 , 8504 , 8506 , 8516 , 8533


    Rename Column

    Download client libraries : C# | GO | JAVA | PHP | PYTHON | NODEJS



    Sample Request:

    Copy
    curl -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:

    <response uri="/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_Server_URI>/api/<OwnerEmail>/<WorkspaceName>/<TableName>

    oauthscope: 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.

    Header Name Value Description
    Authorization Zoho-oauthtoken<space><access_token> 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

    7103 , 7107 , 7138 , 7128 , 8504 , 8506 , 8516 , 8533


    Hide Column

    Download client libraries : C# | GO | JAVA | PHP | PYTHON | NODEJS



    Sample Request:

    Copy
    curl -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" ?>
    <response uri="/api/EmailAddress/WorkspaceName/TableName" action="HIDECOLUMN">
        <result>
            <column columnName="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_Server_URI>/api/<OwnerEmail>/<WorkspaceName>/<TableName>

    oauthscope: 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.

    Header Name Value Description
    Authorization Zoho-oauthtoken<space><access_token> 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

    7103 , 7107 , 7138 , 8504 , 8506 , 8516 , 8533


    Show Column

    Download client libraries : C# | GO | JAVA | PHP | PYTHON | NODEJS



    Sample Request:

    Copy
    curl -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" ?>
    <response uri="/api/EmailAddress/WorkspaceName/TableName" action="SHOWCOLUMN">
        <result>
            <column columnName="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_Server_URI>/api/<OwnerEmail>/<WorkspaceName>/<TableName>

    oauthscope: 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.

    Header Name Value Description
    Authorization Zoho-oauthtoken<space><access_token> 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

    7103 , 7107 , 7138 , 8504 , 8506 , 8516 , 8533

    Possible Error Codes In CREATE TABLE

    7103 , 7111 , 7138 , 8504 , 8506 , 8516 , 8533 , 8534


    Autogenerate Reports

    Download client libraries : C# | GO | JAVA | PHP | PYTHON | NODEJS



    Sample Request:

    Copy
    curl -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" ?>
    <response uri="/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_Server_URI>/api/<OwnerEmail>/<WorkspaceName>/<TableName>

    oauthscope: 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.

    Header Name Value Description
    Authorization Zoho-oauthtoken<space><access_token> 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

    7103 , 7107 , 7138 , 8504 , 8506 , 8516 , 8533


    Save As

    Download client libraries : C# | GO | JAVA | PHP | PYTHON | NODEJS



    Sample Request:

    Copy
    curl -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:

    <response uri="/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_Server_URI>/api/<OwnerEmail>/<WorkspaceName>

    oauthscope: 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.

    Header Name Value Description
    Authorization Zoho-oauthtoken<space><access_token> 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

    7103 , 7105 , 7111 , 7144 , 8504 , 8506 , 8516 , 8533, 15018


    Create Similar Views

    Download client libraries : C# | GO | JAVA | PHP | PYTHON | NODEJS



    Sample Request:

    Copy
    curl -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:

    <response uri="/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_Server_URI>/api/<OwnerEmail>/<WorkspaceName>/<TableName>

    oauthscope: 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.

    Header Name Value Description
    Authorization Zoho-oauthtoken<space><access_token> 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

    7103 , 7138 , 7144 , 8504 , 8506 , 8516 , 8533


    Delete View

    Download client libraries : C# | GO | JAVA | PHP | PYTHON | NODEJS



    Sample Request:

    Copy
    curl -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:

    <response uri="/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_Server_URI>/api/<OwnerEmail>/<WorkspaceName>

    oauthscope: 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.

    Header Name Value Description
    Authorization Zoho-oauthtoken<space><access_token> 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

    7103 , 7138 , 7277 , 8504 , 8506 , 8516 , 8533


    Rename View

    Download client libraries : C# | GO | JAVA | PHP | PYTHON | NODEJS



    Sample Request:

    Copy
    curl -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" ?>
    <response uri="/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_Server_URI>/api/<OwnerEmail>/<WorkspaceName>

    oauthscope: 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.

    Header Name Value Description
    Authorization Zoho-oauthtoken<space><access_token> 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

    7103 , 7105 , 7111 , 7138 , 8504 , 8506 , 8516 , 8533


    Copy Reports

    Download client libraries : C# | GO | JAVA | PHP | PYTHON | NODEJS



    Sample Request:

    Copy
    curl -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:

    <response uri="/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_Server_URI>/api/<SourceEmail>/<SourceWorkspaceName>

    oauthscope: 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.

    Header Name Value Description
    Authorization Zoho-oauthtoken<space><destination_account_access_token> 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.For more about workspace key.
    Note:
    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

    7103 , 7138 , 8504 , 8506 , 8516 , 8533 , 15000 , 15001 , 15002 , 15005 , 15007 , 15012


    Copy Formula

    Download client libraries : C# | GO | JAVA | PHP | PYTHON | NODEJS



    Sample Request:

    Copy
    curl -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:

    <response uri="/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_Server_URI>/api/<SourceEmail>/<SourceWorkspaceName>/SourceTableName

    oauthscope: 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.

    Header Name Value Description
    Authorization Zoho-oauthtoken<space><access_token> 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. For more about Workspace 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

    7103 , 7138 , 8504 , 8506 , 8516 , 8533 , 15002 , 15007 , 15009 , 15010


    Error codes in Modeling API

    Sample error XML format:

    
    <response uri="/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 support@zohoanalytics.com. Zoho Analytics Team will get back to you with the best possible solution.

    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:

    Copy
    curl -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:

    <response URI="/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:

    <response URI="/api/EmailAddress/WorkspaceName" ACTION="ZOHO_CATALOG_INFO">
        <ZCATALOG TABLE_CAT="SalesDB">
        <ZVIEW REMARKS="\N" TABLE_NAME="SalesTable" TABLE_TYPE="TABLE">
        <ZCOLUMNS>
            <ZCOLUMN COLUMN_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>
            <ZCOLUMN COLUMN_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>
        <ZVIEW REMARKS="\N" TABLE_NAME="Region" TABLE_TYPE="REPORT"></ZVIEW>
        <ZVIEW REMARKS="\N" TABLE_NAME="SalesTabular" TABLE_TYPE="REPORT">
        <ZVIEW REMARKS="\N" TABLE_NAME="SalesQuery" TABLE_TYPE="VIEW">
        <ZCOLUMNS>
            <ZCOLUMN COLUMN_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>
            <ZCOLUMN COLUMN_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>
        <ZVIEW REMARKS="\N" TABLE_NAME="SalesPivot" TABLE_TYPE="REPORT"></ZVIEW>
        <ZVIEW REMARKS="\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:

    <response URI="/api/EmailAddress" ACTION="ZOHO_DATATYPES">
        <ZDATATYPES>
            <ZDATATYPE LITERAL_PREFIX="&apos;" 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>
            <ZDATATYPE LITERAL_PREFIX="&apos;" 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:

    <response URI="/api/EmailAddress" ACTION="ZOHO_TABLETYPES">
        <ZVIEWTYPES >
            <ZVIEWTYPE TYPE="TABLE"></ZVIEWTYPE>
            <ZVIEWTYPE TYPE="VIEW"></ZVIEWTYPE>
            <ZVIEWTYPE TYPE="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.

    request uri

    https://<ZohoAnalytics_Server_URI>/api/<OwnerEmail>

    oauthscope: 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:
  • ZOHO_CATALOG_LIST: To list the Zoho Analytics Workspaces for the specified user
  • ZOHO_CATALOG_INFO: To fetch information about the tables & reports (view) present in the given reporting Workspace in Zoho Analytics.
  • ZOHO_DATATYPES: To get the list of datatypes supported by Zoho Analytics
  • ZOHO_TABLETYPES: Various view types available in Zoho Analytics
  • 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.

    Header Name Value Description
    Authorization Zoho-oauthtoken<space><access_token> 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://<ZohoAnalytics_Server_URI>/api/<OwnerEmail>

    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.

    Header Name Value Description
    Authorization Zoho-oauthtoken<space><access_token> 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://<ZohoAnalytics_Server_URI>/api/<OwnerEmail>/<WorkspaceName>

    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.

    Header Name Value Description
    Authorization Zoho-oauthtoken<space><access_token> 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://<ZohoAnalytics_Server_URI>/api/<OwnerEmail>

    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.

    Header Name Value Description
    Authorization Zoho-oauthtoken<space><access_token> 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 lis