NAV Navbar
CURL C# GO JAVA PHP PYTHON
  • Zoho Analytics On-Premise API
  • Important Notations
  • Prerequisites
  • API Specification
  • Data API
  • Modeling API
  • Metadata API
  • Sharing and Collaboration API
  • Embed API
  • User Management API
  • Client Libraries
  • Zoho Analytics On-Premise API

    Zoho Analytics On-Premise 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 Adwords, Google Analytics, CRM systems etc., ) that you use and do much more.

    Easy to use programming language wrappers called "Client Libraries" are provided to conveniently use the Zoho Analytics On-Premise API from within your familiar programming language like Java, C#, Python, PHP, GO, and CURL.

    Important Notations

    We have used a few notations in this document. Here are their meanings

    <hostname> is the host name of the Zoho Analytics server.

    <webclientport> is the port that Zoho Analytics runs on. By default, this is 8443.

    Here is how you can get your web client port

    <zohoanalyticsemailaddress> is the email address associated with your Zoho Analytics user login.

    Prerequisites

    The following are the prerequisites to use Zoho Analytics On-Premise API

    1. Generating an AuthToken

    2. Creating a Reporting Workspace

    Note: It is mandatory to use HTTPS in all API requests instead of Request URI. HTTP is not supported

    Auth Token

    Browser Mode : URL

    
    https://<hostname>:<webclientport>/iam/apiauthtoken/create?SCOPE=ZROP/reportsapi
    
    
    
    https://<hostname>:<webclientport>/iam/apiauthtoken/create?SCOPE=ZROP/reportsapi
    
    
    
    https://<hostname>:<webclientport>/iam/apiauthtoken/create?SCOPE=ZROP/reportsapi
    
    
    
    https://<hostname>:<webclientport>/iam/apiauthtoken/create?SCOPE=ZROP/reportsapi
    
    
    
    https://<hostname>:<webclientport>/iam/apiauthtoken/create?SCOPE=ZROP/reportsapi
    
    
    
    https://<hostname>:<webclientport>/iam/apiauthtoken/create?SCOPE=ZROP/reportsapi
    
    

    API Mode : URL

    
    https://<hostname>:<webclientport>/iam/apiauthtoken/nb/create?SCOPE=ZROP/reportsapi&EMAIL_ID=emailid&PASSWORD=password
    
    
    
    https://<hostname>:<webclientport>/iam/apiauthtoken/nb/create?SCOPE=ZROP/reportsapi&EMAIL_ID=emailid&PASSWORD=password
    
    
    
    https://<hostname>:<webclientport>/iam/apiauthtoken/nb/create?SCOPE=ZROP/reportsapi&EMAIL_ID=emailid&PASSWORD=password
    
    
    
    https://<hostname>:<webclientport>/iam/apiauthtoken/nb/create?SCOPE=ZROP/reportsapi&EMAIL_ID=emailid&PASSWORD=password
    
    
    
    https://<hostname>:<webclientport>/iam/apiauthtoken/nb/create?SCOPE=ZROP/reportsapi&EMAIL_ID=emailid&PASSWORD=password
    
    
    
    https://<hostname>:<webclientport>/iam/apiauthtoken/nb/create?SCOPE=ZROP/reportsapi&EMAIL_ID=emailid&PASSWORD=password
    
    

    Sample Response:

    
    The following is a sample response for a Auth Token request.
    
    #
    
    #Wed Jun 29 03:07:33 PST 2013
    
    AUTHTOKEN=bad18eba1ff45jk7858b8ae88a77fa30
    
    RESULT=TRUE
    
    
    
    The following is a sample response for a Auth Token request.
    
    #
    
    #Wed Jun 29 03:07:33 PST 2013
    
    AUTHTOKEN=bad18eba1ff45jk7858b8ae88a77fa30
    
    RESULT=TRUE
    
    
    
    The following is a sample response for a Auth Token request.
    
    #
    
    #Wed Jun 29 03:07:33 PST 2013
    
    AUTHTOKEN=bad18eba1ff45jk7858b8ae88a77fa30
    
    RESULT=TRUE
    
    
    
    The following is a sample response for a Auth Token request.
    
    #
    
    #Wed Jun 29 03:07:33 PST 2013
    
    AUTHTOKEN=bad18eba1ff45jk7858b8ae88a77fa30
    
    RESULT=TRUE
    
    
    
    The following is a sample response for a Auth Token request.
    
    #
    
    #Wed Jun 29 03:07:33 PST 2013
    
    AUTHTOKEN=bad18eba1ff45jk7858b8ae88a77fa30
    
    RESULT=TRUE
    
    
    
    The following is a sample response for a Auth Token request.
    
    #
    
    #Wed Jun 29 03:07:33 PST 2013
    
    AUTHTOKEN=bad18eba1ff45jk7858b8ae88a77fa30
    
    RESULT=TRUE
    
    

    Response Details:

    * #-COMMENT  Auth Token generated date.
    * AUTHTOKEN  The permanent Auth Token (Alpha numeric value) generated for 
                 Zoho Analytics On-Premise API access.
    * RESULT     Value is TRUE if the Auth Token is generated successfully.
    
    * #-COMMENT  Auth Token generated date.
    * AUTHTOKEN  The permanent Auth Token (Alpha numeric value) generated for 
                 Zoho Analytics API access.
    * RESULT     Value is TRUE if the Auth Token is generated successfully.
    
    * #-COMMENT  Auth Token generated date.
    * AUTHTOKEN  The permanent Auth Token (Alpha numeric value) generated for 
                 Zoho Analytics API access.
    * RESULT     Value is TRUE if the Auth Token is generated successfully.
    
    * #-COMMENT  Auth Token generated date.
    * AUTHTOKEN  The permanent Auth Token (Alpha numeric value) generated for 
                 Zoho Analytics API access.
    * RESULT     Value is TRUE if the Auth Token is generated successfully.
    
    * #-COMMENT  Auth Token generated date.
    * AUTHTOKEN  The permanent Auth Token (Alpha numeric value) generated for 
                 Zoho Analytics On-Premise API access.
    * RESULT     Value is TRUE if the Auth Token is generated successfully.
    
    * #-COMMENT  Auth Token generated date.
    * AUTHTOKEN  The permanent Auth Token (Alpha numeric value) generated for 
                 Zoho Analytics API access.
    * RESULT     Value is TRUE if the Auth Token is generated successfully.
    

    Authentication Token, also referred as Auth Token, is a unique token that authenticates the user to access his/her Zoho Analytics Account. This is a permanent user specific token, that needs to be passed along with every Zoho Analytics On-Premise API request.

    Generating Auth Token

    Users can generate a Auth Token using one of the following modes. You can generate it just once and use it for all your API calls.

    Browser Mode

    To generate Auth Token from your browser, follow the steps given below.

    https://<hostname>:<web client port>/iam/apiauthtoken/create?SCOPE=ZROP/reportsapi

    API Mode

    To generate Auth Token using API mode, send an HTTPS POST request to Zoho Analytics Accounts (webclientport/iam) using the URL format given in the sample.

    https://<hostname>:<web client port>/iam/apiauthtoken/nb/create?SCOPE=ZROP/reportsapi&EMAIL_ID=emailid&PASSWORD=password

    Mandatory "POST" Parameters to be passed along with this URL are:

    Parameter Description
    EMAIL_ID Specify the email address associated with your Zoho Analytics user login.
    PASSWORD Specify your Zoho Analytics Password

    Managing Auth Tokens

    You can access and manage all the active secret Auth Tokens of Zoho Analytics from the Zoho Analytics Auth Token page.

    To access the active Auth Tokens:

    Important Note

    Reporting Workspace

    To use the Zoho Analytics On-Premise API, users should have already created a reporting workspace with required tables and reports in Zoho Analytics service using the browser based Web interface provided. You cannot use the API, if you do not have any reporting workspaces in your Zoho Analytics account. To know how to create a workspace, click here.

    API Specification

    Zoho Analytics On-Premise API uses HTTPS 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

    Request Format

    Sample Request:

    
    The below URL adds a row in EmployeeDetails table in EmployeeDB workspace in a CSV format.
    
    https://<hostname>:<webclientport>/api/abc@zylker.com/EmployeeDB/EmployeeDetails?ZOHO_ACTION=ADDROW&
    ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML&authtoken=g38sl4j4856guvncrywox8251sssds
    &ZOHO_API_VERSION=1.0
    
    
    
    The below URL adds a row in EmployeeDetails table in EmployeeDB workspace in a CSV format.
    
    https://<hostname>:<webclientport>/api/abc@zylker.com/EmployeeDB/EmployeeDetails?ZOHO_ACTION=ADDROW&
    ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML&authtoken=g38sl4j4856guvncrywox8251sssds
    &ZOHO_API_VERSION=1.0
    
    
    
    The below URL adds a row in EmployeeDetails table in EmployeeDB workspace in a CSV format.
    
    https://<hostname>:<webclientport>/api/abc@zylker.com/EmployeeDB/EmployeeDetails?ZOHO_ACTION=ADDROW&
    ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML&authtoken=g38sl4j4856guvncrywox8251sssds
    &ZOHO_API_VERSION=1.0
    
    
    
    The below URL adds a row in EmployeeDetails table in EmployeeDB workspace in a CSV format.
    
    https://<hostname>:<webclientport>/api/abc@zylker.com/EmployeeDB/EmployeeDetails?ZOHO_ACTION=ADDROW&
    ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML&authtoken=g38sl4j4856guvncrywox8251sssds
    &ZOHO_API_VERSION=1.0
    
    
    
    The below URL adds a row in EmployeeDetails table in EmployeeDB workspace in a CSV format.
    
    https://<hostname>:<webclient port>/api/abc@zylker.com/EmployeeDB/EmployeeDetails?ZOHO_ACTION=ADDROW&
    ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML&authtoken=g38sl4j4856guvncrywox8251sssds
    &ZOHO_API_VERSION=1.0
    
    
    
    The below URL adds a row in EmployeeDetails table in EmployeeDB workspace in a CSV format.
    
    https://<hostname>:<webclient port>/api/abc@zylker.com/EmployeeDB/EmployeeDetails?ZOHO_ACTION=ADDROW&
    ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML&authtoken=g38sl4j4856guvncrywox8251sssds
    &ZOHO_API_VERSION=1.0
    
    

    Sample POST parameter

    Parameters for EmployeeDetails table in EmployeeDB workspace. 
    
    &Name=Gary&Date Of Birth=12-Jun-1980&Country=USA&Salary=10000
    
    Parameters for EmployeeDetails table in EmployeeDB workspace. 
    
    &Name=Gary&Date Of Birth=12-Jun-1980&Country=USA&Salary=10000
    
    Parameters for EmployeeDetails table in EmployeeDB workspace. 
    
    &Name=Gary&Date Of Birth=12-Jun-1980&Country=USA&Salary=10000
    
    Parameters for EmployeeDetails table in EmployeeDB workspace. 
    
    &Name=Gary&Date Of Birth=12-Jun-1980&Country=USA&Salary=10000
    
    Parameters for EmployeeDetails table in EmployeeDB workspace. 
    
    &Name=Gary&Date Of Birth=12-Jun-1980&Country=USA&Salary=10000
    
    Parameters for EmployeeDetails table in EmployeeDB workspace. 
    
    &Name=Gary&Date Of Birth=12-Jun-1980&Country=USA&Salary=10000
    

    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://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<workspacename>/<tablename or reportname>

    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]&authtoken=<your auth token>&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.

    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 EmployeeDetails table in the 
    EmployeeDB workspace.
    
    
    
    Sample response to a request adding a row to the EmployeeDetails table in the 
    EmployeeDB workspace.
    
    
    
    Sample response to a request adding a row to the EmployeeDetails table in the 
    EmployeeDB workspace.
    
    
    
    Sample response to a request adding a row to the EmployeeDetails table in the 
    EmployeeDB workspace.
    
    
    
    Sample response to a request adding a row to the EmployeeDetails table in the 
    EmployeeDB workspace.
    
    
    
    Sample response to a request adding a row to the EmployeeDetails table in the 
    EmployeeDB workspace.
    
    

    XML Format:

    <?xml version="1.0" encoding="UTF-8" ?>
    <response uri="/api/abc@zylker.com/EmployeeDB/EmployeeDetails" action="ADDROW">
        <result>
            <!-- All the columns in the row , including formula columns -->
            <row>
                <column name="Name">Gary</column>
                <column name="Date Of Birth">12-Jun-1980</column>
                <column name="Basic">10000</column>
                <column name="Country">USA</column>
            </row>
        </result>
    <response>
    
    
    <?xml version="1.0" encoding="UTF-8" ?>
    <response uri="/api/abc@zylker.com/EmployeeDB/EmployeeDetails" action="ADDROW">
        <result>
            <!-- All the columns in the row , including formula columns -->
            <row>
                <column name="Name">Gary</column>
                <column name="Date Of Birth">12-Jun-1980</column>
                <column name="Basic">10000</column>
                <column name="Country">USA</column>
            </row>
        </result>
    <response>
    
    
    <?xml version="1.0" encoding="UTF-8" ?>
    <response uri="/api/abc@zylker.com/EmployeeDB/EmployeeDetails" action="ADDROW">
        <result>
            <!-- All the columns in the row , including formula columns -->
            <row>
                <column name="Name">Gary</column>
                <column name="Date Of Birth">12-Jun-1980</column>
                <column name="Basic">10000</column>
                <column name="Country">USA</column>
            </row>
        </result>
    <response>
    
    
    <?xml version="1.0" encoding="UTF-8" ?>
    <response uri="/api/abc@zylker.com/EmployeeDB/EmployeeDetails" action="ADDROW">
        <result>
            <!-- All the columns in the row , including formula columns -->
            <row>
                <column name="Name">Gary</column>
                <column name="Date Of Birth">12-Jun-1980</column>
                <column name="Basic">10000</column>
                <column name="Country">USA</column>
            </row>
        </result>
    <response>
    
    
    <?xml version="1.0" encoding="UTF-8" ?>
    <response uri="/api/abc@zylker.com/EmployeeDB/EmployeeDetails" action="ADDROW">
        <result>
            <!-- All the columns in the row , including formula columns -->
            <row>
                <column name="Name">Gary</column>
                <column name="Date Of Birth">12-Jun-1980</column>
                <column name="Basic">10000</column>
                <column name="Country">USA</column>
            </row>
        </result>
    <response>
    
    
    <?xml version="1.0" encoding="UTF-8" ?>
    <response uri="/api/abc@zylker.com/EmployeeDB/EmployeeDetails" action="ADDROW">
        <result>
            <!-- All the columns in the row , including formula columns -->
            <row>
                <column name="Name">Gary</column>
                <column name="Date Of Birth">12-Jun-1980</column>
                <column name="Basic">10000</column>
                <column name="Country">USA</column>
            </row>
        </result>
    <response>
    
    

    JSON Format:

    {
        "response":
        {
            "uri": "/api/abc@zylker.com/EmployeeDB/EmployeeDetails",
            "action": "ADDROW",
            "result":
            {
                "column_order":["Name","Date Of Birth","Salary","Country"],
                "rows":
                ["Gary","12-Jun-1980",10000,"USA"]
            }
        }
    } 
    
    {
        "response":
        {
            "uri": "/api/abc@zylker.com/EmployeeDB/EmployeeDetails",
            "action": "ADDROW",
            "result":
            {
                "column_order":["Name","Date Of Birth","Salary","Country"],
                "rows":
                ["Gary","12-Jun-1980",10000,"USA"]
            }
        }
    } 
    
    {
        "response":
        {
            "uri": "/api/abc@zylker.com/EmployeeDB/EmployeeDetails",
            "action": "ADDROW",
            "result":
            {
                "column_order":["Name","Date Of Birth","Salary","Country"],
                "rows":
                ["Gary","12-Jun-1980",10000,"USA"]
            }
        }
    } 
    
    {
        "response":
        {
            "uri": "/api/abc@zylker.com/EmployeeDB/EmployeeDetails",
            "action": "ADDROW",
            "result":
            {
                "column_order":["Name","Date Of Birth","Salary","Country"],
                "rows":
                ["Gary","12-Jun-1980",10000,"USA"]
            }
        }
    } 
    
    {
        "response":
        {
            "uri": "/api/abc@zylker.com/EmployeeDB/EmployeeDetails",
            "action": "ADDROW",
            "result":
            {
                "column_order":["Name","Date Of Birth","Salary","Country"],
                "rows":
                ["Gary","12-Jun-1980",10000,"USA"]
            }
        }
    } 
    
    {
        "response":
        {
            "uri": "/api/abc@zylker.com/EmployeeDB/EmployeeDetails",
            "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 respone formats. CSV and PDF response formats are supported only for Export action.

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

    XML Format

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

    Format

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

    <response uri="/api/<zohoanalyticsemailaddress>/<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/<zohoanalyticsemailaddress>/<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 EmployeeDetails in the workspace EmployeeDB
    
    
    
    Sample error response for import data in Table EmployeeDetails in the workspace EmployeeDB
    
    
    
    Sample error response for import data in Table EmployeeDetails in the workspace EmployeeDB
    
    
    
    Sample error response for import data in Table EmployeeDetails in the workspace EmployeeDB
    
    
    
    Sample error response for import data in Table EmployeeDetails in the workspace EmployeeDB
    
    
    
    Sample error response for import data in Table EmployeeDetails in the workspace EmployeeDB
    
    

    XML Format:

    <?xml version="1.0" encoding="UTF-8"?>
    <response url="/api/demouser/EmployeeDB/EmployeeDetails" action="IMPORT">
        <error>
            <code>7138</code>
            <message>Table EmployeeDetails is not present in the workspace EmployeeDB</message>
        </error>
    </response>
    
    
    <?xml version="1.0" encoding="UTF-8"?>
    <response url="/api/demouser/EmployeeDB/EmployeeDetails" action="IMPORT">
        <error>
            <code>7138</code>
            <message>Table EmployeeDetails is not present in the workspace EmployeeDB</message>
        </error>
    </response>
    
    
    <?xml version="1.0" encoding="UTF-8"?>
    <response url="/api/demouser/EmployeeDB/EmployeeDetails" action="IMPORT">
        <error>
            <code>7138</code>
            <message>Table EmployeeDetails is not present in the workspace EmployeeDB</message>
        </error>
    </response>
    
    
    <?xml version="1.0" encoding="UTF-8"?>
    <response url="/api/demouser/EmployeeDB/EmployeeDetails" action="IMPORT">
        <error>
            <code>7138</code>
            <message>Table EmployeeDetails is not present in the workspace EmployeeDB</message>
        </error>
    </response>
    
    
    <?xml version="1.0" encoding="UTF-8"?>
    <response url="/api/demouser/EmployeeDB/EmployeeDetails" action="IMPORT">
        <error>
            <code>7138</code>
            <message>Table EmployeeDetails is not present in the workspace EmployeeDB</message>
        </error>
    </response>
    
    
    <?xml version="1.0" encoding="UTF-8"?>
    <response url="/api/demouser/EmployeeDB/EmployeeDetails" action="IMPORT">
        <error>
            <code>7138</code>
            <message>Table EmployeeDetails is not present in the workspace EmployeeDB</message>
        </error>
    </response>
    
    

    JSON Format:

    {
        "response":
        {
            "url": "/api/demouser/EmployeeDB/EmployeeDetails",
            "action": "IMPORT",
            "error":
            {
                "code":7138,
                "message": "Table EmployeeDetails is not present in the workspace EmployeeDB"
            }
        }
    }
    
    {
        "response":
        {
            "url": "/api/demouser/EmployeeDB/EmployeeDetails",
            "action": "IMPORT",
            "error":
            {
                "code":7138,
                "message": "Table EmployeeDetails is not present in the workspace EmployeeDB"
            }
        }
    }
    
    {
        "response":
        {
            "url": "/api/demouser/EmployeeDB/EmployeeDetails",
            "action": "IMPORT",
            "error":
            {
                "code":7138,
                "message": "Table EmployeeDetails is not present in the workspace EmployeeDB"
            }
        }
    }
    
    {
        "response":
        {
            "url": "/api/demouser/EmployeeDB/EmployeeDetails",
            "action": "IMPORT",
            "error":
            {
                "code":7138,
                "message": "Table EmployeeDetails is not present in the workspace EmployeeDB"
            }
        }
    }
    
    {
        "response":
        {
            "url": "/api/demouser/EmployeeDB/EmployeeDetails",
            "action": "IMPORT",
            "error":
            {
                "code":7138,
                "message": "Table EmployeeDetails is not present in the workspace EmployeeDB"
            }
        }
    }
    
    {
        "response":
        {
            "url": "/api/demouser/EmployeeDB/EmployeeDetails",
            "action": "IMPORT",
            "error":
            {
                "code":7138,
                "message": "Table EmployeeDetails is not present in the workspace EmployeeDB"
            }
        }
    }
    

    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/<zohoanalyticsemailaddress>/<workspacename>/<tablename>" action="<specifiedaction>">

    <error>

    [error details]

    </error>

    </response>

    JSON Format

    {

    "response":

    {

    "uri": "/api/<zohoanalyticsemailaddress>/<workspacename>/<tablename>",

    "action": "<specified action>",

    "error": {[error details]}

    }

    }

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

    Incase 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 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

    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

    Sample Request:

    using ZReports;
    
    namespace Test
    {
        AUTHTOKEN = "************";
        EMAIL = "user@zylker.com";
        DBNAME = "EmployeeDB";
        TBNAME = "EmployeeTB";
    
        class Program
        {
            public IReportClient getClient()
            {
                IReportClient RepClient = new ReportClient(AUTHTOKEN);
                return RepClient;
            }
    
            public void addRow(IReportClient RepClient)
            {
                string tableURI = RepClient.GetURI(EMAIL, DBNAME, TBNAME);
                Dictionary<string, string> ColumnValues = new Dictionary<string, string>();
                ColumnValues.Add("Region", "South");
                Dictionary<string, string> addRowRes = RepClient.AddRow(tableURI, ColumnValues,
                                                           config);
            }
    
            static void Main(string[] args)
            {
                Program obj = new Program();
                IReportClient rc = obj.getClient();
                obj.addRow(rc);
            }
        }
    }
    
    package main
    
    import (
            "fmt"
            "zoho/pkg/reportclient"
    
    )
    
    var(
            email = "user@zylker.com"
            dbname = "Employee"
            tbname = "sample"
            authtoken = "************"
    )
    
    func addrow() {
            url := reportclient.GetUri(email, dbname, tbname)
            columnvalues := map[string]string{}
            columnvalues["Id"] = "999"
            columnvalues["Name"] = "zzz"
            resultmap , err := reportclient.AddRow(url, columnvalues)
            if(err != nil){
                    fmt.Println(err.ErrorMessage)
                    fmt.Println(err.ErrorCode)
                    fmt.Println(err.Action)
                    fmt.Println(err.HttpStatusCode)
            }else{
                    fmt.Println(resultmap)
            }
    }
    
    func main() {
            reportclient.SetAuthToken(authtoken)
            addrow()
    }
    
    import com.adventnet.zoho.client.report.*;
    
    public class Sample 
    {
        String email = "user@zylker.com";
        String dbname = "EmployeeDB";
        String tbname = "EmployeeTB";
        String authtoken = "************";
        Map config = new HashMap();
        Map colval = new HashMap();
    
        private ReportClient rc = new ReportClient(authtoken);
        rc.setIamServerURL("https://<hostname>:<webclientport>/iam");
        rc.setReportServerURL("https://<hostname>:<webclientport>");
    
        public void addrow() throws Exception
        {
            String uri = rc.getURI(email,dbname,tbname);
            colval.put("Id", 101);
            colval.put("Name", "sam");
            Map result = rc.addRow(uri,colval,config);
            System.out.println(result);
        }
    
        public static void main(String[] args) throws Exception 
        {
            Sample obj = new Sample();
            obj.addrow();
        }
    }
    
    <?php
        require 'ReportClient.php';
    
        $EMAIL_ID = "abc@zylker.com";
        $DB_NAME = "EmployeeDB";
        $TABLE_NAME = "EmployeeTB";
        $AUTHTOKEN = "************";
    
        $report_client_request = new ReportClient($AUTHTOKEN); 
    
        $uri = $report_client_request->getURI($EMAIL_ID, $DB_NAME, $TABLE_NAME);
        $column_values = array("Employee Name" => "Shankar", "Employee ID" => "2015", 
                                   "Experience" => "5");
        $response_array = $report_client_request->addRow($uri, $column_values);
    ?>
    
    from __future__ import with_statement
    from ReportClient import ReportClient
    import sys
    
    class Sample:
    
        LOGINEMAILID="abc@zylker.com"
        AUTHTOKEN="f7d016b46be276cd4a1232a592f40101"
        DATABASENAME="Employee"
        TABLENAME="Employee"
        rc = None
        rc = ReportClient(self.AUTHTOKEN)
    
        def AddRow(self,rc):
            uri = rc.getURI(self.LOGINEMAILID,self.DATABASENAME,self.TABLENAME)
            rowData = {"Date":"01 Jan, 2009 00:00:00","Region":"East","Product Category":
                        "Samples","Product":"SampleProduct","Customer Name":"Sample",
                        "Sales":2000,"Cost":2000}
            result = rc.addRow(uri,rowData,None)
            print result
    
    obj = Sample()
    obj.AddRow(obj.rc)
    
    curl -d "ZOHO_ACTION=ADDROW&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
            &ZOHO_API_VERSION=1.0&authtoken=f7d016b46be276cdasda32a592f40101&Id=999
            &Name=Gary&Date Of Birth=12-Jun-1980&Salary=10000&Country=USA" 
            https://<hostname>:<webclientport>/api/abc@zylker.com/EmployeeDB/EmployeeDetails
    
    
    
    

    Sample Response JSON Format:

    {
        "response":
        {
            "url": "/api/abc@zylker.com/EmployeeDB/EmployeeDetails",
            "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/abc@zylker.com/EmployeeDB/EmployeeDetails"action="ADDROW">
        <result>
        <!-- All the columns in the row , including formula columns -->
            <row>
                <column name="Name">Gary</column>
                <column name="Date Of Birth">12-Jun-1980</column>
                <column name="Basic">10000</column>
                <column name="Country">USA</column>
            </row>
        </result>
    <response>
    

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

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<Workspacename>/<Tablename>

    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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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

    Action Specific Parameters(Data for the Row)

    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.

    Delete Data

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

    Sample Request:

    using ZReports;
    
    namespace Test
    {
        AUTHTOKEN = "************";
        EMAIL = "user@zylker.com";
        DBNAME = "EmployeeDB";
        TBNAME = "EmployeeTB";
    
        class Program
        {
            public IReportClient getClient()
            {
                IReportClient RepClient = new ReportClient(AUTHTOKEN);
                return RepClient;
            }
    
            public void deleteRow(IReportClient RepClient)
            {
                string tableURI = RepClient.GetURI(EMAIL, DBNAME, TBNAME);
                string criteria = "\"Region\"='South'";
                RepClient.DeleteData(tableURI, criteria, null);
            }
    
            static void Main(string[] args)
            {
                Program obj = new Program();
                IReportClient rc = obj.getClient();
                obj.deleteRow(rc);
            }
        }
    }
    
    package main
    
    import (
            "fmt"
            "zoho/pkg/reportclient"
    
    )
    
    var(
            email = "user@zylker.com"
            dbname = "Employee"
            tbname = "sample"
            authtoken = "************"
    )
    
    func deletedata() {
            url := reportclient.GetUri(email, dbname, tbname)
            params := map[string]string{}
            params["ZOHO_CRITERIA"] = "Id=2"
            err := reportclient.DeleteData(url, params)
            if(err != nil){
                    fmt.Println(err.ErrorMessage)
                    fmt.Println(err.ErrorCode)
                    fmt.Println(err.Action)
                    fmt.Println(err.HttpStatusCode)
            }else{
                    fmt.Println("Success")
            }
    }
    
    func main() {
            reportclient.SetAuthToken(authtoken)
            deletedata()
    }
    
    import com.adventnet.zoho.client.report.*;
    
    public class Sample 
    {
        String email = "user@zylker.com";
        String dbname = "EmployeeDB";
        String tbname = "EmployeeTB";
        String authtoken = "************";
        Map config = new HashMap();
    
        private ReportClient rc = new ReportClient(authtoken);
        rc.setIamServerURL("https://<hostname>:<webclientport>/iam");
        rc.setReportServerURL("https://<hostname>:<webclientport>");
    
        public void deletedata() throws Exception
        {
            String uri = rc.getURI(email,dbname,tbname);
            rc.deleteData(uri,"id=100",config);
        }
    
        public static void main(String[] args) throws Exception 
        {
            Sample obj = new Sample();
            obj.deletedata();
        }
    }
    
    <?php
        require 'ReportClient.php';
    
        $EMAIL_ID = "abc@zylker.com";
        $DB_NAME = "EmployeeDB";
        $TABLE_NAME = "EmployeeTB";
        $AUTHTOKEN = "************";
    
        $report_client_request = new ReportClient($AUTHTOKEN); 
    
        $uri = $report_client_request->getURI($EMAIL_ID, $DB_NAME, $TABLE_NAME);
        $criteria = "Experience = 3";
        $report_client_request->deleteData($uri ,$criteria);
    ?>
    
    from __future__ import with_statement
    from ReportClient import ReportClient
    import sys
    
    class Sample:
    
        LOGINEMAILID="abc@zylker.com"
        AUTHTOKEN="************"
        DATABASENAME="Employee"
        TABLENAME="Employee"
        rc = None
        rc = ReportClient(self.AUTHTOKEN)
    
        def DeleteData(self,rc):
            uri = rc.getURI(self.LOGINEMAILID,self.DATABASENAME,self.TABLENAME)
            rc.deleteData(uri,"\"Employee Name\"='Sample'",None);
    
    obj = Sample()
    obj.DeleteData(obj.rc)
    
    curl -d "ZOHO_ACTION=DELETE&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
             &ZOHO_API_VERSION=1.0&authtoken=f7d016b46be2acsd4cfa32a592f40101
             &ZOHO_CRITERIA=("Department" = 'Finance')" 
             https://<hostname>:<webclientport>/api/abc@zylker.com/EmployeeDB/EmployeeDetails
    
    
    
    

    Sample Response JSON Format:

    {
        "response":
        {
            "uri": "/api/abc@zylker.com/EmployeeDB/EmployeeDetails",
            "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/abc@zylker.com/EmployeeDB/EmployeeDetails" action="DELETE">
        <criteria>&quot;Department&quot; = &apos;Finance&apos;</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://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<Workspacename>/<Tablename>

    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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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.

    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.

    Update Data

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

    Sample Request:

    using ZReports;
    
    namespace Test
    {
        AUTHTOKEN = "************";
        EMAIL = "user@zylker.com";
        DBNAME = "EmployeeDB";
        TBNAME = "EmployeeTB";
    
        class Program
        {
            public IReportClient getClient()
            {
                IReportClient RepClient = new ReportClient(AUTHTOKEN);
                return RepClient;
            }
    
            public void updateRow(IReportClient RepClient)
            {
                string tableURI = RepClient.GetURI(EMAIL, DBNAME, TBNAME);
                Dictionary<string, string> ColumnValues = new Dictionary<string, string>();
                ColumnValues.Add("Region", "North");
                string criteria = "\"Region\"='South'";
                RepClient.UpdateData(tableURI, ColumnValues, criteria, null);
            }
    
            static void Main(string[] args)
            {
                Program obj = new Program();
                IReportClient rc = obj.getClient();
                obj.updateRow(rc);
            }
        }
    }
    
    package main
    
    import (
            "fmt"
            "zoho/pkg/reportclient"
    
    )
    
    var(
            email = "user@zylker.com"
            dbname = "Employee"
            tbname = "sample"
            authtoken = "************"
    )
    
    func updatedata() {
            url := reportclient.GetUri(email, dbname, tbname)
            params := map[string]string{}
            params["Salary"] = "100"
            params["ZOHO_CRITERIA"] = "id=1"
            resultmap , err := reportclient.UpdateData(url, params)
            if(err != nil){
                    fmt.Println(err.ErrorMessage)
                    fmt.Println(err.ErrorCode)
                    fmt.Println(err.Action)
                    fmt.Println(err.HttpStatusCode)
            }else{
                    fmt.Println(resultmap)
            }
    }
    
    func main() {
            reportclient.SetAuthToken(authtoken)
            updatedata()
    }
    
    import com.adventnet.zoho.client.report.*;
    
    public class Sample 
    {
        String email = "user@zylker.com";
        String dbname = "EmployeeDB";
        String tbname = "EmployeeTB";
        String authtoken = "************";
        Map config = new HashMap();
        Map colval = new HashMap();
    
        private ReportClient rc = new ReportClient(authtoken);
        rc.setIamServerURL("https://<hostname>:<webclientport>/iam");
        rc.setReportServerURL("https://<hostname>:<webclientport>");
    
        public void updatedata() throws Exception
        {
            String uri = rc.getURI(email,dbname,tbname);
            colval.put("Salary", 1000);
            rc.updateData(uri,colval,"Id=101",config);
        }
    
        public static void main(String[] args) throws Exception 
        {
            Sample obj = new Sample();
            obj.updatedata();
        }
    }
    
    <?php
        require 'ReportClient.php';
    
        $EMAIL_ID = "abc@zylker.com";
        $DB_NAME = "EmployeeDB";
        $TABLE_NAME = "EmployeeTB";
        $AUTHTOKEN = "************";
    
        $report_client_request = new ReportClient($AUTHTOKEN); 
    
        $uri = $report_client_request->getURI($EMAIL_ID, $DB_NAME, $TABLE_NAME);
        $column_values = array("Salary" => "10000");
        $criteria = "Experience = 2";
        $report_client_request->updateData($uri ,$columnvalues, $criteria);
    ?>
    
    from __future__ import with_statement
    from ReportClient import ReportClient
    import sys
    
    class Sample:
    
        LOGINEMAILID="abc@zylker.com"
        AUTHTOKEN="************"
        DATABASENAME="Employee"
        TABLENAME="Employee"
        rc = None
        rc = ReportClient(self.AUTHTOKEN)
    
        def updateData(self,rc):
            uri = rc.getURI(self.LOGINEMAILID,self.DATABASENAME,self.TABLENAME)
            updateInfo = {"Region":"West","Product":"SampleProduct_2"}
            rc.updateData(uri,updateInfo,"\"Customer Name\"='Sample'",None);
    
    obj = Sample()
    obj.updateData(obj.rc)
    
    curl -d "ZOHO_ACTION=UPDATE&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
             &ZOHO_API_VERSION=1.0&authtoken=f7d016b46bedswcd4cfa32a592f40101&Name=as
             &ZOHO_CRITERIA=("Department" = 'Finance')" 
             https://<hostname>:<webclientport>/api/abc@zylker.com/EmployeeDB/EmployeeDetails
    
    
    
    

    Sample Response JSON Format:

    {
        "response":
        {
            "uri": "/api/abc@zylker.com/EmployeeDB/EmployeeDetails",
            "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/abc@zylker.com/EmployeeDB/EmployeeDetails" action="UPDATE">
        <criteria>&quot;Department&quot; = &apos;Finance&apos;</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://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<Workspacename>/<Tablename>

    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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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.

    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.

    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.

    Import Data

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

    Sample Request:

    using ZReports;
    
    namespace Test
    {
        AUTHTOKEN = "************";
        EMAIL = "user@zylker.com";
        DBNAME = "EmployeeDB";
        TBNAME = "EmployeeTB";
    
        class Program
        {
            public IReportClient getClient()
            {
                IReportClient RepClient = new ReportClient(AUTHTOKEN);
                return RepClient;
            }
    
            public void importData(IReportClient RepClient)
            {
                string tableURI = RepClient.GetURI(EMAIL, DBNAME, TBNAME);
                Dictionary<string, string> ImportConfig = new Dictionary<string, string>();
                ImportConfig.Add("ZOHO_ON_IMPORT_ERROR", "ABORT");
                Dictionary<string, string> ImportRes = RepClient.ImportData(tableURI, 
                    ZohoReportsConstants.APPEND,"C:\\workspace\\mydata.csv",ImportConfig);
            }
    
            static void Main(string[] args)
            {
                Program obj = new Program();
                IReportClient rc = obj.getClient();
                obj.importData(rc);
            }
        }
    }
    
    package main
    
    import (
            "fmt"
            "zoho/pkg/reportclient"
    
    )
    
    var(
            email = "user@zylker.com"
            dbname = "Employee"
            tbname = "sample"
            authtoken = "************"
    )
    
    func importdata() {
            url := reportclient.GetUri(email, dbname, tbname)
            params := map[string]string{}
            file := "/home/sample.csv"
            importtype := "APPEND"
            autoidentity := "true"
            onerror := "ABORT"
            resp , err := reportclient.ImportData(url, file, importtype, autoidentity, onerror, params)
            if(err != nil){
                    fmt.Println(err.ErrorMessage)
                    fmt.Println(err.ErrorCode)
                    fmt.Println(err.Action)
                    fmt.Println(err.HttpStatusCode)
            }else{
                    fmt.Println(resp.ImportErrors)
                    fmt.Println(resp.ColumnDetails)
                    fmt.Println(resp.ImportType)
                    fmt.Println(resp.Warnings)
                    fmt.Println(resp.SelectedColumnCount)
                    fmt.Println(resp.SuccessRowCount)
                    fmt.Println(resp.ImportOperation)
                    fmt.Println(resp.TotalColumnCount)
                    fmt.Println(resp.TotalRowCount)
            }
    }
    
    func main() {
            reportclient.SetAuthToken(authtoken)
            importdata()
    }
    
    import com.adventnet.zoho.client.report.*;
    
    public class Sample 
    {
        String email = "user@zylker.com";
        String dbname = "EmployeeDB";
        String tbname = "EmployeeTB";
        String authtoken = "************";
        Map config = new HashMap();
        File csvFile = new File("samples/StoreSales.csv");
    
        private ReportClient rc = new ReportClient(authtoken);
        rc.setIamServerURL("https://<hostname>:<webclientport>/iam");
        rc.setReportServerURL("https://<hostname>:<webclientport>");
    
        public void importdata() throws Exception
        {
            String uri = rc.getURI(email,dbname,tbname);
            config.put("ZOHO_AUTO_IDENTIFY","true");
            config.put("ZOHO_ON_IMPORT_ERROR","ABORT");
            config.put("ZOHO_CREATE_TABLE","false");
            Object result = rc.importData(uri,"APPEND",csvFile,config,false);
        }
    
        public static void main(String[] args) throws Exception 
        {
            Sample obj = new Sample();
            obj.importdata();
        }
    }
    
    <?php
        require 'ReportClient.php';
    
        $EMAIL_ID = "abc@zylker.com";
        $DB_NAME = "EmployeeDB";
        $TABLE_NAME = "EmployeeTB";
        $AUTHTOKEN = "************";
    
        $report_client_request = new ReportClient($AUTHTOKEN); 
    
        $uri = $report_client_request->getURI($EMAIL_ID, $DB_NAME, $TABLE_NAME);
        $import_type = "APPEND";
        $file = $_FILES['file'];
        $auto_identify = "TRUE";
        $on_error = "ABORT";
        $response_obj = $report_client->importData($table_uri, $import_type, $file, 
                            $auto_identify, $on_error);
    ?>
    
    from __future__ import with_statement
    from ReportClient import ReportClient
    import sys
    
    class Sample:
    
        LOGINEMAILID="abc@zylker.com"
        AUTHTOKEN="************"
        DATABASENAME="Employee"
        TABLENAME="Employee"
        rc = None
        rc = ReportClient(self.AUTHTOKEN)
    
        def importData(self,rc):
            uri = rc.getURI(self.LOGINEMAILID,self.DATABASENAME,self.TABLENAME)
            try:
                with open('StoreSales.csv', 'r') as f:
                importContent = f.read()
            except Exception,e:
                print "Error Check if file StoreSales.csv exists in the current directory"
                print "(" + str(e) + ")"
                return
            impResult = rc.importData(uri,"APPEND",importContent,None)
            print "Added Rows :" +str(impResult.successRowCount) + " and Columns :" + 
                    str(impResult.selectedColCount)
    
    obj = Sample()
    obj.importData(obj.rc)
    
    curl -XPOST -H "Content-type: multipart/form-data" 
         -d 'ZOHO_ACTION=IMPORT&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
         &ZOHO_API_VERSION=1.0&authtoken=f7d016b46be276c3w24a32a592f40101
         &ZOHO_IMPORT_TYPE=APPEND&ZOHO_AUTO_IDENTIFY=TRUE&ZOHO_ON_IMPORT_ERROR=ABORT
         &ZOHO_FILE=sample.csv' 
         https://<hostname>:<webclientport>/api/abc@zylker.com/sample/Employee
    
    
    

    Sample Response JSON Format:

    {
        " response":
        {
            "uri": "/api/abc@zylker.com/EmployeeDB/EmployeeDetails",
            "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/abc@zylker.com/EmployeeDB/EmployeeDetails" 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 On-Premise 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://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<Workspacename>/<Tablename>

    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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    ZOHO_API_VERSION 1.0 The API version of Zoho Analytics based on which the application(/service) has been written. This parameter allows Zoho Analytics to handle applications based on the older versions.The current API version is 1.0.
    ZOHO_FILE or ZOHO_IMPORT_DATA File or string ZOHO_FILE - The file to be imported.
    ZOHO_IMPORT_DATA - The strng to be imported.

    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
    (mandatory)
    File The file to 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 errored column for the row to empty and continue importing.
  • ZOHO_CREATE_TABLE
    (optional)
    true/false. Default is false.
  • In case it is true, then the table is created if the table referred in the URL doesn't exist in the specified workspace.
  • In case its false, no table is created even if the table refered in the URL does not exist 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 heirrachy 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 comparision 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 incase 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
  • 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

    Export Data

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

    Sample Request:

    using ZReports;
    
    namespace Test
    {
        AUTHTOKEN = "************";
        EMAIL = "user@zylker.com";
        DBNAME = "EmployeeDB";
        TBNAME = "EmployeeTB";
    
        class Program
        {
            public IReportClient getClient()
            {
                IReportClient RepClient = new ReportClient(AUTHTOKEN);
                return RepClient;
            }
    
            public object export(IReportClient RepClient)
            {
                string tableURI = RepClient.GetURI(EMAIL, DBNAME, TBNAME);
                Dictionary<string, object> resObj = RepClient.ExportDataAsDictionary(tableURI, 
                                                 "\"Region\"='West'", null);
                Object[] columns = (Object[])resObj["column_order"];
                Object[] rows = (Object[])resObj["rows"];
            }
    
            static void Main(string[] args)
            {
                Program obj = new Program();
                IReportClient rc = obj.getClient();
                obj.export(rc);
            }
        }
    }
    
    package main
    
    import (
            "fmt"
            "zoho/pkg/reportclient"
    
    )
    
    var(
            email = "user@zylker.com"
            dbname = "Employee"
            tbname = "sample"
            authtoken = "************"
    )
    
    func exportdata() {
            url := reportclient.GetUri(email, dbname, tbname)
            outputformat := "pdf"
            filename := "sample"
            params := map[string]string{}
            err := reportclient.ExportData(url, filename, outputformat, params)
            if(err != nil){
                    fmt.Println(err.ErrorMessage)
                    fmt.Println(err.ErrorCode)
                    fmt.Println(err.Action)
                    fmt.Println(err.HttpStatusCode)
            }else{
                    fmt.Println("Success")
            }
    }
    
    func main() {
            reportclient.SetAuthToken(authtoken)
            exportdata()
    }
    
    import com.adventnet.zoho.client.report.*;
    
    public class Sample 
    {
        String email = "user@zylker.com";
        String dbname = "EmployeeDB";
        String tbname = "EmployeeTB";
        String authtoken = "************";
        File csvFile = new File("samples/StoreSales.csv");
    
        private ReportClient rc = new ReportClient(authtoken);
        rc.setIamServerURL("https://<hostname>:<webclientport>/iam");
        rc.setReportServerURL("https://<hostname>:<webclientport>");
    
        public void exportdata() throws Exception
        {
            String uri = rc.getURI(email,dbname,tbname);
            rc.exportData(uri,"CSV",csvFile,null,null);
        }
    
        public static void main(String[] args) throws Exception 
        {
            Sample obj = new Sample();
            obj.exportdata();
        }
    }
    
    <?php
        require 'ReportClient.php';
    
        $EMAIL_ID = "abc@zylker.com";
        $DB_NAME = "EmployeeDB";
        $TABLE_NAME = "EmployeeTB";
        $AUTHTOKEN = "************";
    
        $report_client_request = new ReportClient($AUTHTOKEN); 
    
        $uri = $report_client_request->getURI($EMAIL_ID, $DB_NAME, $TABLE_NAME);
        $output_format = "CSV";
        $criteria = "Salary = 5000";
        $report_client_response = $report_client_request->exportData($uri, $output_format);
        $file = "dummy/".$TABLE_NAME.".".$output_format;
        file_put_contents($file, $report_client_response, FILE_APPEND);
    ?>
    
    from __future__ import with_statement
    from ReportClient import ReportClient
    import sys
    
    class Sample:
    
        LOGINEMAILID="abc@zylker.com"
        AUTHTOKEN="************"
        DATABASENAME="Employee"
        TABLENAME="Employee"
        rc = None
        rc = ReportClient(self.AUTHTOKEN)
    
        def exportdata(self,rc):
            uri = rc.getURI(self.LOGINEMAILID,self.DATABASENAME,self.TABLENAME)
            fileobj = open("/home/sample.csv","rw+")
            rc.exportData(uri,"CSV",fileobj)
            fileobj.close()
    
    obj = Sample()
    obj.exportdata(obj.rc)
    
    curl -d "ZOHO_ACTION=EXPORT&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
             &ZOHO_API_VERSION=1.0&authtoken=f7d016b46be276cd4cfaq2a592f40101" 
             https://<hostname>:<webclientport>/api/abc@zylker.com/EmployeeDB/EmployeeDetails
    
    
    

    Sample Response JSON Format:

    { 
        "response":
        {
            "uri": "/api/abc@zylker.com/EmployeeDB/EmployeeDetails",
            "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/abc@zylker.com/EmployeeDB/EmployeeDetails" 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://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<Workspacename>/<Tablename>

    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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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.

    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 1 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_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_SHOWLEGEND 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_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

    Example: JSON callback. 1. Define the callback function.

    <script>
    function sampleFunction(resp)
    {
        var response = resp.response;
        var result = response.result;
        var rows = result.rows;
        for(i=0;i<rows.length;i++)
        {
            var row = rows[i];
            console.log(row);
            ...
        }
        ...
    }
    </script>
    
    

    2.Invoke the api request with output format as JSON and ZOHO_CALLBACK_FUNCTION=sampleFunction.

    <script src="
    https://<hostname>:<webclientport>/api/<loginemailaddress>/<DB>/<Table>
    ?ZOHO_ACTION=EXPORT&ZOHO_OUTPUT_FORMAT=JSON&ZOHO_ERROR_FORMAT=XML&authtoken=<your auth token>&
    ZOHO_API_VERSION=1.0&ZOHO_CALLBACK_FUNCTION=sampleFunction">
    </script>
    

    When the page is loaded, the response will be returned as,

    sampleFunction
    ({ 
        "response":
        {
            "uri": "/api/abc@zylker.com/EmployeeDB/EmployeeDetails",
            "action": "EXPORT",
            "result":
            {
                column_order:["Name","Department","Date Of Birth"],
                rows:[
                ["John","Finance","12 May 1972"],
                ["Joan","Admin","15 June 1975"]
                ]
            }
        }
    });
    

    JSON Callbacks - JSONP:

    Zoho Analytics On-Premise API supports Callback function for handling API responses asynchronously. This is supported in Export API calls, when the output format is chosen as JSON.

    The Export API method call, with JSON output format, supports an additional parameter called ZOHO_CALLBACK_FUNCTION to enable callback. Using the Callback function, developers can invoke the Export API request inside the <script> tag and process the JSON response using the CALLBACK function elsewhere in the JavaScript code on the page.

    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 "Department"= 'Finance' 
    is given below.
    
    
    																						  

    URL:

    
    https://<hostname>:<webclientport>/api/abc@zylker.com/EmployeeDB/EmployeeDetails?ZOHO_ACTION=DELETE
    &ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
    &authtoken=g38sl4j4856guvncrywox8251sssds&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 On-Premise 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:

    (<column name/SQL expression/SQL function calls> <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 workspaces.

    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 subracts 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 workspaces
    Eg.: year(date_column) = 2008.
    Note: All supported in-built function from different workspaces 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 workspace that we support, to know more on how to construct the filter criteria.

    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



    Sample Request:

    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&authtoken=************" 
        https://<hostname>:<webclientport>/api/abc@zylker.com
    

    Sample Response XML Format:

    <response uri="/api/abc@zylker.com/Employee" action="CREATEBLANKDB">
        <result>
            <message>
            Successfully Workspace 'Sample' Created
            </message>
            <dbid>
            10802
            </dbid>
        </result>
    </response>
    
    

    Sample Response JSON Format:

    {
        "response": 
        {
            "uri": "\/api\/abc@zylker.com/Employee",
            "action": "CREATEBLANKDB",
            "result": 
            {
                "message": "Successfully Workspace 'Sample1' Created",
                "dbid": "10803"
            } 
        }
    }
    
    

    Create Workspace API allows the user to create a blank workspace on the Zoho Analytics account.

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>

    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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user to access the Zoho Account.
    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.

    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

    Sample Request:

    using ZReports;
    
    namespace Test
    {
        AUTHTOKEN = "************";
        EMAIL = "user@zylker.com";
        DBNAME = "EmployeeDB";
    
        class Program
        {
            public IReportClient getClient()
            {
                IReportClient RepClient = new ReportClient(AUTHTOKEN);
                return RepClient;
            }
    
            public void copyDatabase(IReportClient RepClient)
            {
                string dbURI = RepClient.GetURI(EMAIL, DBNAME);
                string newDBName = "newdbname"; 
                string newDBDesc = "dbdesc";
                bool withData = true;
                string copyDBKey = "asd8272e9sadaczx0cqqd321as"
                long dbid = RepClient.CopyDatabase(dbURI, newDBName, newDBDesc, 
                            withData, copyDBKey, null);
            }
    
            static void Main(string[] args)
            {
                Program obj = new Program();
                IReportClient rc = obj.getClient();
                obj.copyDatabase(rc);
            }
        }
    }
    
    package main
    
    import (
            "fmt"
            "zoho/pkg/reportclient"
    
    )
    
    var(
            email = "user@zylker.com"
            dbname = "Employee"
            authtoken = "************"
            dbkey = "d6e443b4dc3cas421fcc54ff81cd3ad3"
    )
    
    func copydatabase() {
            url := reportclient.GetDbUri(email, dbname)
            newdbname := "Sample"
            params := map[string]string{}
            newid , err := reportclient.CopyDatabase(url, newdbname, dbkey, params)
            if(err != nil){
                    fmt.Println(err.ErrorMessage)
                    fmt.Println(err.ErrorCode)
                    fmt.Println(err.Action)
                    fmt.Println(err.HttpStatusCode)
            }else{
                    fmt.Println(newid)
            }
    }
    
    func main() {
            reportclient.SetAuthToken(authtoken)
            copydatabase()
    }
    
    import com.adventnet.zoho.client.report.*;
    
    public class Sample 
    {
        String email = "user@zylker.com";
        String dbname = "EmployeeDB";
        String authtoken = "************";
        Map config = new HashMap();
    
        private ReportClient rc = new ReportClient(authtoken);
        rc.setIamServerURL("https://<hostname>:<webclientport>/iam");
        rc.setReportServerURL("https://<hostname>:<webclientport>");
    
        public void copydatabase() throws Exception
        {
            String uri = rc.getURI(email,dbname);
            config.put("ZOHO_DATABASE_NAME", "workspace");
            config.put("ZOHO_COPY_DB_KEY", "d6e443b4dc3c85d51fcc54ff81cd3ad3");
            long result = rc.copyDatabase(uri,config);
            System.out.println(result);
        }
    
        public static void main(String[] args) throws Exception 
        {
            Sample obj = new Sample();
            obj.copydatabase();
        }
    }
    
    <?php
        require 'ReportClient.php';
    
        $EMAIL_ID = "abc@zylker.com";
        $DB_NAME = "EmployeeDB";
        $AUTHTOKEN = "************";
    
        $report_client_request = new ReportClient($AUTHTOKEN); 
    
        $uri = $report_client_request->getDbURI($EMAIL_ID, $DB_NAME);
        $db_key = "d6e443b4dc3c85d5q34casdff81cd3ad3 ";
        $db_name = "EmployeeDB";
        $new_database_id = $report_client_request->copyDatabase($uri, $db_key, $db_name);
    ?>
    
    from __future__ import with_statement
    from ReportClient import ReportClient
    import sys
    
    class Sample:
    
        LOGINEMAILID="abc@zylker.com"
        AUTHTOKEN="************"
        DATABASENAME="Employee"
        rc = None
        rc = ReportClient(self.AUTHTOKEN)
    
        def CopyDatabase(self,rc):
            uri = rc.getDBURI(self.LOGINEMAILID,self.DATABASENAME)
            config = {"ZOHO_DATABASE_NAME":"new sales",
                          "ZOHO_COPY_DB_KEY":"d6e443b4dc3c85d51f5d3d3f81cd3ad3"}
            result = rc.copyDatabase(self,uri,config)
    
    obj = Sample()
    obj.CopyDatabase(obj.rc)
    
    curl -d "ZOHO_ACTION=COPYDATABASE&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
             &ZOHO_API_VERSION=1.0&authtoken=f7d016b46be2ewcd4cfa32a592f40101
             &ZOHO_DATABASE_NAME=New database&ZOHO_COPY_DB_KEY=d6e443b4dc3c85d51fefrd3f81cd3ad3" 
             https://<hostname>:<webclientport>/api/abc@zylker.com/Employee
    
    
    

    Sample Response XML Format:

    <response uri="/api/abc@zylker.com/Employee" action="COPYDATABASE">
        <result>
            <message>
            Successfully Workspace Copied
            </message>
            <dbid>
            100000000000889
            </dbid>
        </result>
    </response>
    
    

    Sample Response JSON Format:

    {
        "response": 
        {
            "uri": "\/api\/abc@zylker.com/Employee",
            "action": "COPYDATABASE",
            "result": 
            {
                "message": "Successfully Workspace Copied",
                "dbid": "10000000000889"
            } 
        }
    }
    
    

    The Copy Workspace API is used to copy the workspace from one Zoho Analytics Account to another Zoho Analytics Account.

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<Workspacename>

    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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    ZOHO_API_VERSION 1.0 The API version of Zoho Analytics based on which the application(/service) has been written. This parameter allows Zoho Analytics to handle applications based on the older versions.The current API version is 1.0.

    Action Specific Parameters

    Parameter Name Possible Values Description
    ZOHO_DATABASE_NAME
    (mandatory)
    <workspacename> This parameter holds the name of the destination workspace
    ZOHO_DATABASE_DESC
    (optional)
    <workspace description> This parameter holds the description of the description 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)
    <workspacekey> The secret key used for allowing the user to copy the workspace / reports.
    The source workspace owner has to invoke the below URL to get the Copy Workspace Secret Key.
    https://<hostname>:<webclientport>/api/abcd@zylker.com/SourceEmployeeDB?ZOHO_ACTION=GETCOPYDBKEY&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML&authtoken=<source_db_owner_authtoken>&ZOHO_API_VERSION=1.0.
    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, 8506, 8516, 8533, 15007

    Delete Workspace

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

    Sample Request:

    using ZReports;
    
    namespace Test
    {
        AUTHTOKEN = "************";
        EMAIL = "user@zylker.com";
    
        class Program
        {
            public IReportClient getClient()
            {
                IReportClient RepClient = new ReportClient(AUTHTOKEN);
                return RepClient;
            }
    
            public void deleteDatabase(IReportClient RepClient)
            {
                string userURI = RepClient.GetURI(EMAIL);
                string databaseName = "workspaceName";
                RepClient.DeleteDatabase(userURI, databaseName, null);
            }
    
            static void Main(string[] args)
            {
                Program obj = new Program();
                IReportClient rc = obj.getClient();
                obj.deleteDatabase(rc);
            }
        }
    }
    
    package main
    
    import (
            "fmt"
            "zoho/pkg/reportclient"
    
    )
    
    var(
            email = "user@zylker.com"
            authtoken = "************"
    )
    
    func deletedatabase() {
            url := reportclient.GetUserUri(email)
            dbname := "sample"
            err := reportclient.DeleteDatabase(url, dbname)
            if(err != nil){
                    fmt.Println(err.ErrorMessage)
                    fmt.Println(err.ErrorCode)
                    fmt.Println(err.Action)
                    fmt.Println(err.HttpStatusCode)
            }else{
                    fmt.Println("Success")
            }
    }
    
    func main() {
            reportclient.SetAuthToken(authtoken)
            deletedatabase()
    }
    
    import com.adventnet.zoho.client.report.*;
    
    public class Sample 
    {
        String email = "user@zylker.com";
        String authtoken = "************";
        Map config = new HashMap();
    
        private ReportClient rc = new ReportClient(authtoken);
        rc.setIamServerURL("https://<hostname>:<webclientport>/iam");
        rc.setReportServerURL("https://<hostname>:<webclientport>");
    
        public void deletedatabase() throws Exception
        {
            String uri = rc.getURI(email);
            rc.deleteDatabase(uri,"workspace",config);
        }
    
        public static void main(String[] args) throws Exception 
        {
            Sample obj = new Sample();
            obj.deletedatabase();
        }
    }
    
    <?php
        require 'ReportClient.php';
    
        $EMAIL_ID = "abc@zylker.com";
        $AUTHTOKEN = "************";
    
        $report_client_request = new ReportClient($AUTHTOKEN); 
    
        $uri = $report_client_request->getUserURI($EMAIL_ID);
        $db_name = "EmployeeDB";
        $report_client_request->deleteDatabase($uri, $db_name);
    ?>
    
    from __future__ import with_statement
    from ReportClient import ReportClient
    import sys
    
    class Sample:
    
        LOGINEMAILID="abc@zylker.com"
        AUTHTOKEN="************"
        rc = None
        rc = ReportClient(self.AUTHTOKEN)
    
        def DeleteDatabase(self,rc):
            uri = rc.getUserURI(self.LOGINEMAILID)
            databaseName = "workspaceName"
            rc.deleteDatabase(self,uri,databaseName)
    
    obj = Sample()
    obj.DeleteDatabase(obj.rc)
    
    curl -d "ZOHO_ACTION=DELETEDATABASE&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
             &ZOHO_API_VERSION=1.0&authtoken=f7d016b46be276cd4cfaswa592f40101
             &ZOHO_DATABASE_NAME=NEW" 
             https://<hostname>:<webclientport>/api/abc@zylker.com
    
    

    Sample Response XML Format:

    <response uri="/api/abc@zylker.com" action="DELETEDATABASE">
        <result>
            <message>
            Workspace deleted successfully
            </message>
        </result>
    </response>
    
    
    

    Sample Response JSON Format:

    {
        "response": 
        {
            "uri": "\/api\/abc@zylker.com",
            "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://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>

    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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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.

    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

    Create Table

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

    Sample Request:

    using ZReports;
    
    namespace Test
    {
        AUTHTOKEN = "************";
        EMAIL = "user@zylker.com";
        DBNAME = "EmployeeDB";
    
        class Program
        {
            public IReportClient getClient()
            {
                IReportClient RepClient = new ReportClient(AUTHTOKEN);
                return RepClient;
            }
    
            public void createtable(IReportClient rc)
            {
                string uri = rc.GetURI(EMAIL, DBNAME);
                string tabledesign = "{\"TABLENAME\":\"SysteTable\",\"TABLEDESCRIPTION\":\
                    "Testing Purpose\",\"SYSTEMTABLE\": true,\"FOLDERNAME\": \"NewFolder\",\
                    "COLUMNS\":[{\"COLUMNNAME\":\"SrNo\",\"DATATYPE\": \"NUMBER\",\"DEFAULT\":\
                    "null\",\"MANDATORY\" :  \"Yes\",\"DESCRIPTION\" : \"Testing\"}]}";
                rc.CreateTable(uri, tabledesign, null);
            }
    
            static void Main(string[] args)
            {
                Program obj = new Program();
                IReportClient rc = obj.getClient();
                obj.createtable(rc);
            }
        }
    }
    
    package main
    
    import (
            "fmt"
            "zoho/pkg/reportclient"
    
    )
    
    var(
            email = "user@zylker.com"
            dbname = "Employee"
            authtoken = "************"
    )
    
    func createtable() {
            url := reportclient.GetDbUri(email, dbname)
            tableconfig := "{\"TABLENAME\": \"SystemTable\",\"TABLEDESCRIPTION\": \"Testing Purpose\",
                             \"SYSTEMTABLE\": true,\"FOLDERNAME\": \"NewFolder\",\"COLUMNS\":
                             [{\"COLUMNNAME\": \"Product Category\",\"DATATYPE\": \"PLAIN\",
                             \"DEFAULT\": \"Test\",\"MANDATORY\" :  \"Yes\",\"DESCRIPTION\" : 
                             \"Testing2\"}]}"
            err := reportclient.CreateTable(url, tableconfig)
            if(err != nil){
                    fmt.Println(err.ErrorMessage)
                    fmt.Println(err.ErrorCode)
                    fmt.Println(err.Action)
                    fmt.Println(err.HttpStatusCode)
            }else{
                    fmt.Println("Success")
            }
    }
    
    func main() {
            reportclient.SetAuthToken(authtoken)
            createtable()
    }
    
    import com.adventnet.zoho.client.report.*;
    
    public class Sample 
    {
        String email = "user@zylker.com";
        String dbname = "EmployeeDB";
        String tbname = "EmployeeTB";
        String authtoken = "************";
        Map config = new HashMap();
    
        private ReportClient rc = new ReportClient(authtoken);
        rc.setIamServerURL("https://<hostname>:<webclientport>/iam");
        rc.setReportServerURL("https://<hostname>:<webclientport>");
    
        public void createtable() throws Exception
        {
            String uri = rc.getURI(email,dbname,tbname);
            String tableDesign = "{\"TABLENAME\":\"SysteTable\",\"TABLEDESCRIPTION\"
                    :\"Testing Purpose\",\"SYSTEMTABLE\": true,\"FOLDERNAME\": \"NewFolder\",
                    \"COLUMNS\":[{\"COLUMNNAME\":\"SrNo\",\"DATATYPE\": \"NUMBER\",\"DEFAULT\":
                    \"null\",\"MANDATORY\" :  \"Yes\",\"DESCRIPTION\" : \"Testing\"}]}"
            rc.createTable(uri,tableDesign,config);
        }
    
        public static void main(String[] args) throws Exception 
        {
            Sample obj = new Sample();
            obj.createtable();
        }
    }
    
    <?php
        require 'ReportClient.php';
    
        $EMAIL_ID = "abc@zylker.com";
        $DB_NAME = "EmployeeDB";
        $AUTHTOKEN = "************";
    
        $report_client_request = new ReportClient($AUTHTOKEN); 
    
        $uri = $report_client_request->getDbURI($EMAIL_ID, $DB_NAME);
        $table_design = '{
                "TABLENAME": "SystemTable",
                "TABLEDESCRIPTION": "Testing Purpose",
                "SYSTEMTABLE": true,
                "FOLDERNAME": "NewFolder",
                "COLUMNS": 
                [
                    {
                    "COLUMNNAME": "SrNo",
                    "DATATYPE": "NUMBER", 
                    "DEFAULT": "null",
                    "MANDATORY" :  "Yes",
                    "DESCRIPTION" : "Testing"
                    },
                    {
                    "COLUMNNAME": "Product",
                    "DATATYPE": "null",
                    "DEFAULT": "null",
                        "MANDATORY" :  "Yes",
                    "DESCRIPTION" : "Testing2"
                    },
                    {
                    "COLUMNNAME": "Product Category",
                    "DATATYPE": "PLAIN",
                    "DEFAULT": "Test",
                    "MANDATORY" :  "Yes",
                    "DESCRIPTION" : "Testing2"
                    } 
                ]
                 }';
        $report_client_request->createTable($uri, $table_design);
    ?>
    
    from __future__ import with_statement
    from ReportClient import ReportClient
    import sys
    
    class Sample:
    
        LOGINEMAILID="abc@zylker.com"
        AUTHTOKEN="************"
        DATABASENAME="Employee"
        rc = None
        rc = ReportClient(self.AUTHTOKEN)
    
        def createtable(self,rc):
            uri = rc.getDBURI(Config.LOGINEMAILID,Config.DATABASENAME)
            tableDesign ='{\"TABLENAME\":\"SysteTable\",\"TABLEDESCRIPTION\"
                    :\"Testing Purpose\",\"SYSTEMTABLE\": true,\"FOLDERNAME\": \"NewFolder\",
                    \"COLUMNS\":[{\"COLUMNNAME\":\"SrNo\",\"DATATYPE\": \"NUMBER\",\"DEFAULT\":
                    \"null\",\"MANDATORY\" :  \"Yes\",\"DESCRIPTION\" : \"Testing\"}]}'
            rc.createTable(uri,tableDesign)
    
    obj = Sample()
    obj.createtable(obj.rc)
    
    curl -d "ZOHO_ACTION=CREATETABLE&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML&
             ZOHO_API_VERSION=1.0&authtoken=************&
             ZOHO_TABLE_DESIGN="table design in JSON"" 
             https://<hostname>:<webclientport>/api/abc@zylker.com/Employee
    
    
    

    Sample Response XML Format:

    <?xml version="1.0" encoding="UTF-8" ?>
    <response uri="/api/abc@zylker.com/Employee" action="CREATETABLE">
        <result>
            <message>Table created successfully!</message>
        </result>
    </response>
    
    
    

    Sample Response JSON Format:

    { 
        "response": 
        { 
            "uri":"\/api\/abc@zylker.com\/Employee", 
            "action":"CREATETABLE", 
            "result":
            {
                "message":"Table created successfully!"
            } 
        } 
    }
    
    

    The Create table API is used to create a table in the specified workspace.

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<Workspacename>

    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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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.

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

    POSSIBLE ERROR CODES IN CREATE TABLE

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

    Add Column

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

    Sample Request:

    using ZReports;
    
    namespace Test
    {
        AUTHTOKEN = "************";
        EMAIL = "user@zylker.com";
        DBNAME = "EmployeeDB";
        TBNAME = "EmployeeTB";
    
        class Program
        {
            public IReportClient getClient()
            {
                IReportClient RepClient = new ReportClient(AUTHTOKEN);
                return RepClient;
            }
    
            public void addColumn(IReportClient RepClient)
            {
                string tableURI = RepClient.GetURI(EMAIL, DBNAME, TBNAME);
                string ColumnName = "columnname";
                string DataType = "PLAIN";
                bool HideColumn = false;
                bool SkipSystemTableCheck = true;
                RepClient.AddColumn(tableURI, ColumnName, DataType, HideColumn, 
                                           SkipSystemTableCheck, null);
            }
    
            static void Main(string[] args)
            {
                Program obj = new Program();
                IReportClient rc = obj.getClient();
                obj.addColumn(rc);
            }
        }
    }
    
    package main
    
    import (
            "fmt"
            "zoho/pkg/reportclient"
    
    )
    
    var(
            email = "user@zylker.com"
            dbname = "Employee"
            tbname = "sample"
            authtoken = "************"
    )
    
    func addcolumn() {
            url := reportclient.GetUri(email, dbname, tbname)
            columnname := "Address"
            datatype := "PLAIN"
            err := reportclient.AddColumn(url, columnname, datatype)
            if(err != nil){
                    fmt.Println(err.ErrorMessage)
                    fmt.Println(err.ErrorCode)
                    fmt.Println(err.Action)
                    fmt.Println(err.HttpStatusCode)
            }else{
                    fmt.Println("Success")
            }
    }
    
    func main() {
            reportclient.SetAuthToken(authtoken)
            addcolumn()
    }
    
    import com.adventnet.zoho.client.report.*;
    
    public class Sample 
    {
        String email = "user@zylker.com";
        String dbname = "EmployeeDB";
        String tbname = "EmployeeTB";
        String authtoken = "************";
        Map config = new HashMap();
    
        private ReportClient rc = new ReportClient(authtoken);
        rc.setIamServerURL("https://<hostname>:<webclientport>/iam");
        rc.setReportServerURL("https://<hostname>:<webclientport>");
    
        public void addcolumn() throws Exception
        {
            String uri = rc.getURI(email,dbname,tbname);
            rc.addColumn(uri,"DOB","PLAIN",config);
        }
    
        public static void main(String[] args) throws Exception 
        {
            Sample obj = new Sample();
            obj.addcolumn();
        }
    }
    
    <?php
        require 'ReportClient.php';
    
        $EMAIL_ID = "abc@zylker.com";
        $DB_NAME = "EmployeeDB";
        $TABLE_NAME = "EmployeeTB";
        $AUTHTOKEN = "************";
    
        $report_client_request = new ReportClient($AUTHTOKEN); 
    
        $uri = $report_client_request->getURI($EMAIL_ID, $DB_NAME, $TABLE_NAME);
        $column_name = "Employee Name";
        $data_type = "PLAIN";
        $report_client_request->addColumn($uri, $column_name, $data_type);
    ?>
    
    from __future__ import with_statement
    from ReportClient import ReportClient
    import sys
    
    class Sample:
    
        LOGINEMAILID="abc@zylker.com"
        AUTHTOKEN="************"
        DATABASENAME="Employee"
        TABLENAME="Employee"
        rc = None
        rc = ReportClient(self.AUTHTOKEN)
    
        def AddColumn(self,rc):
            uri = rc.getURI(self.LOGINEMAILID,self.DATABASENAME,self.TABLENAME)
            columnName = "columnName"
            dataType = "PLAIN"
            rc.addColumn(self,uri,columnName,dataType)
    
    obj = Sample()
    obj.AddColumn(obj.rc)
    
    curl -d "ZOHO_ACTION=ADDCOLUMN&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
             &ZOHO_API_VERSION=1.0&authtoken=f7d016b46be276cd4cfa32a5dws40101
             &ZOHO_COLUMNNAME=Region&ZOHO_DATATYPE=PLAIN" 
             https://<hostname>:<webclientport>/api/abc@zylker.com/SalesDB/Sales
    
    
    

    Sample Response XML Format:

    <response uri="/api/abc@zylker.com/SalesDB/Sales" action="ADDCOLUMN">
        <result>
            Column created successfully
        </result>
    </response>
    
    

    Sample Response JSON Format:

    {
        "response":
        {
            "uri":"\/api\/abc@zylker.com\/SalesDB\/Sales",
            "action":"ADDCOLUMN",
            "result": {"message":"Column created successfully"}
            }
    }
    
    

    The Add Column API is used to add a column into Zoho Analytics Table. The Server Administrator and the Workspace Owner alone can use this API to add a column in the Zoho Analytics table.

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<Workspacename>/<Tablename>

    Note: In case of workspace owner adding a column, they need to specify the login E-mail ID of the Server 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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.

    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 VIEW

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

    Delete Column

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

    Sample Request:

    using ZReports;
    
    namespace Test
    {
        AUTHTOKEN = "************";
        EMAIL = "user@zylker.com";
        DBNAME = "EmployeeDB";
        TBNAME = "EmployeeTB";
    
        class Program
        {
            public IReportClient getClient()
            {
                IReportClient RepClient = new ReportClient(AUTHTOKEN);
                return RepClient;
            }
    
            public void deleteColumn(IReportClient RepClient)
            {
                string tableURI = RepClient.GetURI(EMAIL, DBNAME, TBNAME);
                string ColumnName = "columnname";
                bool DeleteDependentView = false;
                bool SkipSystemTableCheck = true;
                RepClient.DeleteColumn(tableURI, ColumnName, DeleteDependentView, 
                     SkipSystemTableCheck, null);
            }
    
            static void Main(string[] args)
            {
                Program obj = new Program();
                IReportClient rc = obj.getClient();
                obj.deleteColumn(rc);
            }
        }
    }
    
    package main
    
    import (
            "fmt"
            "zoho/pkg/reportclient"
    
    )
    
    var(
            email = "user@zylker.com"
            dbname = "Employee"
            tbname = "sample"
            authtoken = "************"
    )
    
    func deletecolumn() {
            url := reportclient.GetUri(email, dbname, tbname)
            columnname := "Address"
            err := reportclient.DeleteColumn(url, columnname)
            if(err != nil){
                    fmt.Println(err.ErrorMessage)
                    fmt.Println(err.ErrorCode)
                    fmt.Println(err.Action)
                    fmt.Println(err.HttpStatusCode)
            }else{
                    fmt.Println("Success")
            }
    }
    
    func main() {
            reportclient.SetAuthToken(authtoken)
            deletecolumn()
    }
    
    import com.adventnet.zoho.client.report.*;
    
    public class Sample 
    {
        String email = "user@zylker.com";
        String dbname = "EmployeeDB";
        String tbname = "EmployeeTB";
        String authtoken = "************";
        Map config = new HashMap();
    
        private ReportClient rc = new ReportClient(authtoken);
        rc.setIamServerURL("https://<hostname>:<webclientport>/iam");
        rc.setReportServerURL("https://<hostname>:<webclientport>");
    
        public void deletecolumn() throws Exception
        {
            String uri = rc.getURI(email,dbname,tbname);
            rc.deleteColumn(uri,"vin",config);
        }
    
        public static void main(String[] args) throws Exception 
        {
            Sample obj = new Sample();
            obj.deletecolumn();
        }
    }
    
    <?php
        require 'ReportClient.php';
    
        $EMAIL_ID = "abc@zylker.com";
        $DB_NAME = "EmployeeDB";
        $TABLE_NAME = "EmployeeTB";
        $AUTHTOKEN = "************";
    
        $report_client_request = new ReportClient($AUTHTOKEN); 
    
        $uri = $report_client_request->getURI($EMAIL_ID, $DB_NAME, $TABLE_NAME);
        $column_name = "Employee Name";
        $report_client_request->deleteColumn($uri, $column_name);
    ?>
    
    from __future__ import with_statement
    from ReportClient import ReportClient
    import sys
    
    class Sample:
    
        LOGINEMAILID="abc@zylker.com"
        AUTHTOKEN="************"
        DATABASENAME="Employee"
        TABLENAME="Employee"
        rc = None
        rc = ReportClient(self.AUTHTOKEN)
    
        def DeleteColumn(self,rc):
            uri = rc.getURI(self.LOGINEMAILID,self.DATABASENAME,self.TABLENAME)
            columnName = "columnName"
            rc.deleteColumn(self,uri,columnName)
    
    obj = Sample()
    obj.DeleteColumn(obj.rc)
    
    curl -d "ZOHO_ACTION=DELETECOLUMN&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
             &ZOHO_API_VERSION=1.0&authtoken=f7d016b46be276aswcfa32a592f40101
             &ZOHO_COLUMNNAME=Experiance" 
             https://<hostname>:<webclientport>/api/abc@zylker.com/SalesDB/Sales
    
    

    Sample Response XML Format:

    <response uri="/api/abc@zylker.com/SalesDB/Sales" action="DELETECOLUMN">
        <result>
            Column deleted successfully
        </result>
    </response>
    
    

    Sample Response JSON Format:

    {
        "response":
        {
            "uri":"\/api\/abc@zylker.com\/SalesDB\/Sales",
            "action":"DELETECOLUMN",
            "result": {"message":"Column deleted successfully"}
        }
    }
    
    
    

    The Delete Column API is used to delete a column in Zoho Analytics Table. The Server Administrator and the Workspace Owner alone can use this API to delete a column in a Zoho Analytics table.

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<Workspacename>/<Tablename>

    Note: In case of workspace owner deleting a column, they need to specify the login E-mail ID of the Server 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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.

    Action 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

    Sample Request:

    using ZReports;
    
    namespace Test
    {
        AUTHTOKEN = "************";
        EMAIL = "user@zylker.com";
        DBNAME = "EmployeeDB";
        TBNAME = "EmployeeTB";
    
        class Program
        {
            public IReportClient getClient()
            {
                IReportClient RepClient = new ReportClient(AUTHTOKEN);
                return RepClient;
            }
    
            public void renameColumn(IReportClient RepClient)
            {
                string tableURI = RepClient.GetURI(EMAIL, DBNAME, TBNAME);
                string OldColumnName = "oldcolumn"; 
                string NewColumnName = "newcolumn";
                bool SkipSystemTableCheck = true;
                RepClient.RenameColumn(tableURI, OldColumnName, NewColumnName, 
                                     SkipSystemTableCheck, null);
            }
    
            static void Main(string[] args)
            {
                Program obj = new Program();
                IReportClient rc = obj.getClient();
                obj.renameColumn(rc);
            }
        }
    }
    
    package main
    
    import (
            "fmt"
            "zoho/pkg/reportclient"
    
    )
    
    var(
            email = "user@zylker.com"
            dbname = "Employee"
            tbname = "sample"
            authtoken = "************"
    )
    
    func renamecolumn() {
            url := reportclient.GetUri(email, dbname, tbname)
            oldcolumnname := "Id"
            newcolumnname := "EmpId"
            err := reportclient.RenameColumn(url, oldcolumnname, newcolumnname)
            if(err != nil){
                    fmt.Println(err.ErrorMessage)
                    fmt.Println(err.ErrorCode)
                    fmt.Println(err.Action)
                    fmt.Println(err.HttpStatusCode)
            }else{
                    fmt.Println("Success")
            }
    }
    
    func main() {
            reportclient.SetAuthToken(authtoken)
            renamecolumn()
    }
    
    import com.adventnet.zoho.client.report.*;
    
    public class Sample 
    {
        String email = "user@zylker.com";
        String dbname = "EmployeeDB";
        String tbname = "EmployeeTB";
        String authtoken = "************";
        Map config = new HashMap();
    
        private ReportClient rc = new ReportClient(authtoken);
        rc.setIamServerURL("https://<hostname>:<webclientport>/iam");
        rc.setReportServerURL("https://<hostname>:<webclientport>");
    
        public void renamecolumn() throws Exception
        {
            String uri = rc.getURI(email,dbname,tbname);
            rc.renameColumn(uri,"old","new",config);
        }
    
        public static void main(String[] args) throws Exception 
        {
            Sample obj = new Sample();
            obj.renamecolumn();
        }
    }
    
    <?php
        require 'ReportClient.php';
    
        $EMAIL_ID = "abc@zylker.com";
        $DB_NAME = "EmployeeDB";
        $TABLE_NAME = "EmployeeTB";
        $AUTHTOKEN = "************";
    
        $report_client_request = new ReportClient($AUTHTOKEN); 
    
        $uri = $report_client_request->getURI($EMAIL_ID, $DB_NAME, $TABLE_NAME);
        $old_column_name = "Employee ID";
        $new_column_name = "Emp ID";
        $report_client_request->renameColumn($uri, $old_column_name, $new_column_name);
    ?>
    
    from __future__ import with_statement
    from ReportClient import ReportClient
    import sys
    
    class Sample:
    
        LOGINEMAILID="abc@zylker.com"
        AUTHTOKEN="************"
        DATABASENAME="Employee"
        TABLENAME="Employee"
        rc = None
        rc = ReportClient(self.AUTHTOKEN)
    
        def RenameColumn(self,rc):
            uri = rc.getURI(self.LOGINEMAILID,self.DATABASENAME,self.TABLENAME)
            oldColumnName = "oldname"
            newColumnName = "newname"
            rc.renameColumn(self,uri,oldColumnName,newColumnName)
    
    obj = Sample()
    obj.RenameColumn(obj.rc)
    
    curl -d "ZOHO_ACTION=RENAMECOLUMN&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
             &ZOHO_API_VERSION=1.0&authtoken=************
             &OLDCOLUMNNAME=Region&NEWCOLUMNNAME=NewRegion" 
             https://<hostname>:<webclientport>/api/abc@zylker.com/SalesDB/Sales
    
    
    

    Sample Response XML Format:

    <response uri="/api/abc@zylker.com/SalesDB/Sales" action="RENAMECOLUMN">
        <result>
            Column renamed successfully
        </result>
    </response>
    
    

    Sample Response JSON Format:

    {
        "response":
        {
            "uri":"\/api\/abc@zylker.com\/SalesDB\/Sales",
            "action":"RENAMECOLUMN",
            "result": 
            {
                "message":"Column renamed successfully"
            }
        }
    }
    
    

    The Rename Column API is used to rename the column in Zoho Analytics Table. The Server Administrator and the Workspace Owner alone can use this API to rename a column in the Zoho Analytics table.

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<Workspacename>/<Tablename>

    Note: In case of workspace owner renaming a column, they need to specify the login E-mail ID of the Server 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    ZOHO_API_VERSION 1.0 The API version of Zoho Analytics based on which the application(/service) has been written. This parameter allows Zoho Analytics to handle applications based on the older versions.The current API version is 1.0.

    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

    Sample Request:

    using ZReports;
    
    namespace Test
    {
        AUTHTOKEN = "************";
        EMAIL = "user@zylker.com";
        DBNAME = "EmployeeDB";
        TBNAME = "EmployeeTB";
    
        class Program
        {
            public IReportClient getClient()
            {
                IReportClient RepClient = new ReportClient(AUTHTOKEN);
                return RepClient;
            }
    
            public void hidecolumn(IReportClient rc)
            {
                try
                {
                    string uri = rc.GetURI(EMAIL, DBNAME, TBNAME);
                    string[] columnNames = new string[3];
                    columnNames[0] = "cost";
                    columnNames[1] = "sales";
                    columnNames[2] = "cost1";
                    var result = rc.HideColumn(uri,columnNames,null);
                }
                catch (Exception e)
                {
                    Console.WriteLine(e);
                }
            }
    
            static void Main(string[] args)
            {
                Program obj = new Program();
                IReportClient rc = obj.getClient();
                obj.hidecolumn(rc);
            }
        }
    }
    
    package main
    
    import (
            "fmt"
            "zoho/pkg/reportclient"
    
    )
    
    var(
            email = "user@zylker.com"
            dbname = "Employee"
            tbname = "sample"
            authtoken = "************"
    )
    
    func hidecolumn(){
            url := reportclient.GetUri(email, dbname, tbname)
            columnnames := []string{"Cost" , "Cost1" , "Sales"}
            params := map[string]string{}
            result , err := reportclient.HideColumn(url, columnnames, params)
            if(err != nil){
            fmt.Println(err.ErrorMessage)
            fmt.Println(err.ErrorCode)
            fmt.Println(err.Action)
            fmt.Println(err.HttpStatusCode)
            }else{
            fmt.Println(result)
            }
    }
    
    func main() {
            reportclient.SetAuthToken(authtoken)
            hidecolumn()
    }
    
    import com.adventnet.zoho.client.report.*;
    
    public class Sample 
    {
        String email = "user@zylker.com";
        String dbname = "EmployeeDB";
        String tbname = "EmployeeTB";
        String authtoken = "************";
    
        private ReportClient rc = new ReportClient(authtoken);
        rc.setIamServerURL("https://<hostname>:<webclientport>/iam");
        rc.setReportServerURL("https://<hostname>:<webclientport>");
    
        public void hidecolumn() throws Exception
        {
            String uri = rc.getURI(email,dbname,tbname);
            List columnNames = new ArrayList(); 
            columnNames.add("Cost");
            columnNames.add("Cost1");
            Map result = rc.hideColumn(uri, columnNames, null);
        }
    
        public static void main(String[] args) throws Exception 
        {
            Sample obj = new Sample();
            obj.hidecolumn();
        }
    }
    
    <?php
        require 'ReportClient.php';
    
        $EMAIL_ID = "abc@zylker.com";
        $DB_NAME = "EmployeeDB";
        $TABLE_NAME = "EmployeeTB";
        $AUTHTOKEN = "************";
    
        $report_client_request = new ReportClient($AUTHTOKEN); 
    
        $uri = $request->getURI($EMAIL_ID, $DB_NAME, $TABLE_NAME);
        $columnNames = array("Cost","Cost1");
        $response = $request->hideColumn($uri ,$columnNames);
    ?>
    
    from __future__ import with_statement
    from ReportClient import ReportClient
    import sys
    
    class Sample:
    
        LOGINEMAILID="abc@zylker.com"
        AUTHTOKEN="************"
        DATABASENAME="Employee"
        TABLENAME="Employee"
        rc = None
        rc = ReportClient(self.AUTHTOKEN)
    
        def hidecolumn(self,rc):
        uri = rc.getURI(self.LOGINEMAILID,self.DATABASENAME,self.TABLENAME)
        params = []
        params.append("Cost")
        params.append("Cost1")
        params.append("Sales")
        result = rc.hideColumn(uri,params)
        print result
    
    obj = Sample()
    obj.hidecolumn(obj.rc)
    
    curl -d "ZOHO_ACTION=HIDECOLUMN&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
             &ZOHO_API_VERSION=1.0&authtoken=************
             &ZOHO_COLUMNNAME=Region
             https://<hostname>:<webclientport>/api/abc@zylker.com/SalesDB/Sales
    
    
    

    Sample Response XML Format:

    <?xml version="1.0" encoding="UTF-8" ?>
    <response uri="/api/user@zylker.com/Auto-Copy/Auto" action="HIDECOLUMN">
        <result>
            <column columnName="cost" status="Success" message="column hidden successfully"> </column>
        </result>
    </response>
    
    

    Sample Response JSON Format:

    {
      "response": {
        "uri": "/api/user@zylker.com/Auto-Copy/Auto",
        "action": "HIDECOLUMN",
        "result": [
          {
            "columnName": "cost",
            "status": "Success",
            "message": "column hidden successfully"
          }
        ]
      }
    }
    
    

    The Hide Column API is used to hide the column in Zoho Analytics Table. The Server Administrator and the Workspace Owner alone can use this API to hide a column in the Zoho Analytics table.

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<Workspacename>/<Tablename>

    Note: In case of workspace owner hiding a column, they need to specify the login E-mail ID of the Server 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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.

    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

    Sample Request:

    using ZReports;
    
    namespace Test
    {
        AUTHTOKEN = "************";
        EMAIL = "user@zylker.com";
        DBNAME = "EmployeeDB";
        TBNAME = "EmployeeTB";
    
        class Program
        {
            public IReportClient getClient()
            {
                IReportClient RepClient = new ReportClient(AUTHTOKEN);
                return RepClient;
            }
    
            public void showcolumn(IReportClient rc)
            {
                try
                {
                    string uri = rc.GetURI(EMAIL, DBNAME, TBNAME);
                    string[] columnNames = new string[3];
                    columnNames[0] = "cost";
                    columnNames[1] = "sales";
                    columnNames[2] = "cost1";
                    var result = rc.ShowColumn(uri,columnNames,null);
                }
                catch (Exception e)
                {
                    Console.WriteLine(e);
                }
            }
    
            static void Main(string[] args)
            {
                Program obj = new Program();
                IReportClient rc = obj.getClient();
                obj.showcolumn(rc);
            }
        }
    }
    
    package main
    
    import (
            "fmt"
            "zoho/pkg/reportclient"
    
    )
    
    var(
            email = "user@zylker.com"
            dbname = "Employee"
            tbname = "sample"
            authtoken = "************"
    )
    
    func showcolumn(){
            url := reportclient.GetUri(email, dbname, tbname)
            columnnames := []string{"Cost" , "Cost1" , "Sales"}
            params := map[string]string{}
            result , err := reportclient.ShowColumn(url, columnnames, params)
            if(err != nil){
            fmt.Println(err.ErrorMessage)
            fmt.Println(err.ErrorCode)
            fmt.Println(err.Action)
            fmt.Println(err.HttpStatusCode)
            }else{
            fmt.Println(result)
            }
    }
    
    func main() {
            reportclient.SetAuthToken(authtoken)
            showcolumn()
    }
    
    import com.adventnet.zoho.client.report.*;
    
    public class Sample 
    {
        String email = "user@zylker.com";
        String dbname = "EmployeeDB";
        String tbname = "EmployeeTB";
        String authtoken = "************";
    
        private ReportClient rc = new ReportClient(authtoken);
        rc.setIamServerURL("https://<hostname>:<webclientport>/iam");
        rc.setReportServerURL("https://<hostname>:<webclientport>");
    
        public void showcolumn() throws Exception
        {
            String uri = rc.getURI(email,dbname,tbname);
            List columnNames = new ArrayList(); 
            columnNames.add("Cost");
            columnNames.add("Cost1");
            Map result = rc.showColumn(uri, columnNames, null);
        }
    
        public static void main(String[] args) throws Exception 
        {
            Sample obj = new Sample();
            obj.showcolumn();
        }
    }
    
    <?php
        require 'ReportClient.php';
    
        $EMAIL_ID = "abc@zylker.com";
        $DB_NAME = "EmployeeDB";
        $TABLE_NAME = "EmployeeTB";
        $AUTHTOKEN = "************";
    
        $report_client_request = new ReportClient($AUTHTOKEN); 
    
        $uri = $request->getURI($EMAIL_ID, $DB_NAME, $TABLE_NAME);
        $columnNames = array("Cost","Cost1");
        $response = $request->showColumn($uri ,$columnNames);
    ?>
    
    from __future__ import with_statement
    from ReportClient import ReportClient
    import sys
    
    class Sample:
    
        LOGINEMAILID="abc@zylker.com"
        AUTHTOKEN="************"
        DATABASENAME="Employee"
        TABLENAME="Employee"
        rc = None
        rc = ReportClient(self.AUTHTOKEN)
    
        def showcolumn(self,rc):
        uri = rc.getURI(self.LOGINEMAILID,self.DATABASENAME,self.TABLENAME)
        params = []
        params.append("Cost")
        params.append("Cost1")
        params.append("Sales")
        result = rc.showColumn(uri,params)
        print result
    
    obj = Sample()
    obj.showcolumn(obj.rc)
    
    curl -d "ZOHO_ACTION=SHOWCOLUMN&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
             &ZOHO_API_VERSION=1.0&authtoken=************
             &ZOHO_COLUMNNAME=Region
             https://<hostname>:<webclientport>/api/abc@zylker.com/SalesDB/Sales
    
    
    

    Sample Response XML Format:

    <?xml version="1.0" encoding="UTF-8" ?>
    <response uri="/api/user@zylker.com/Auto-Copy/Auto" action="SHOWCOLUMN">
        <result>
            <column columnName="cost" status="Success" message="column shown successfully"> </column>
        </result>
    </response>
    
    

    Sample Response JSON Format:

    {
      "response": {
        "uri": "/api/user@zylker.com/Auto-Copy/Auto",
        "action": "SHOWCOLUMN",
        "result": [
          {
            "columnName": "cost",
            "status": "Success",
            "message": "column shown successfully"
          }
        ]
      }
    }
    
    

    The Show Column API is used to show the column in Zoho Analytics Table. The Server Administrator and the Workspace Owner alone can use this API to show the column in the Zoho Analytics table.

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<Workspacename>/<Tablename>

    Note: In case of workspace owner showing a column, they need to specify the login E-mail ID of the Server 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    ZOHO_API_VERSION 1.0 The API version of Zoho Analytics based on which the application(/service) has been written. This parameter allows Zoho Analytics to handle applications based on the older versions.The current API version is 1.0.

    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

    Autogenerate reports

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

    Sample Request:

    using ZReports;
    
    namespace Test
    {
        AUTHTOKEN = "************";
        EMAIL = "user@zylker.com";
        DBNAME = "EmployeeDB";
        TBNAME = "EmployeeTB";
    
        class Program
        {
            public IReportClient getClient()
            {
                IReportClient RepClient = new ReportClient(AUTHTOKEN);
                return RepClient;
            }
    
            public void autogenreports(IReportClient rc)
            {
                try
                {
                    string uri = rc.GetURI(EMAIL,DBNAME,TBNAME);
                    Dictionary<string,string> param = new Dictionary<string,string>();
                    param.Add("ZOHO_CREATEAGAIN", "true");
            string source = "TABLE";
                    var result = rc.AutoGenReports(uri, source, param);
                }
                catch (Exception e)
                {
                    Console.WriteLine(e);
                }
            }
    
            static void Main(string[] args)
            {
                Program obj = new Program();
                IReportClient rc = obj.getClient();
                obj.autogenreports(rc);
            }
        }
    }
    
    package main
    
    import (
            "fmt"
            "zoho/pkg/reportclient"
    
    )
    
    var(
            email = "user@zylker.com"
            dbname = "Employee"
            tbname = "sample"
            authtoken = "************"
    )
    
    func autogenreports(){
            url := reportclient.GetUri(email, dbname, tbname)
            source := "TABLE"
            params := map[string]string{}
            params["ZOHO_COLUMN_NAME"] = "Region"
            result , err := reportclient.AutoGenReports(url, source, params)
            if(err != nil){
            fmt.Println(err.ErrorMessage)
            fmt.Println(err.ErrorCode)
            fmt.Println(err.Action)
            fmt.Println(err.HttpStatusCode)
            }else{
            fmt.Println(result)
            }
    }
    
    func main() {
            reportclient.SetAuthToken(authtoken)
            autogenreports()
    }
    
    import com.adventnet.zoho.client.report.*;
    
    public class Sample 
    {
        String email = "user@zylker.com";
        String dbname = "EmployeeDB";
        String tbname = "EmployeeTB";
        String authtoken = "************";
    
        private ReportClient rc = new ReportClient(authtoken);
        rc.setIamServerURL("https://<hostname>:<webclientport>/iam");
        rc.setReportServerURL("https://<hostname>:<webclientport>");
    
        public void autoGenReports() throws Exception
        {
            String uri = rc.getURI(email,dbname,tbname);
            String source = "TABLE";
            Map result = rc.autoGenReports(uri, source, null);
        }
    
        public static void main(String[] args) throws Exception 
        {
            Sample obj = new Sample();
            obj.autoGenReports();
        }
    }
    
    <?php
        require 'ReportClient.php';
    
        $EMAIL_ID = "abc@zylker.com";
        $DB_NAME = "EmployeeDB";
        $TABLE_NAME = "EmployeeTB";
        $AUTHTOKEN = "************";
    
        $report_client_request = new ReportClient($AUTHTOKEN); 
    
        $uri = $request->getURI($EMAIL_ID, $DB_NAME, $TABLE_NAME);
        $source = "TABLE";
        $response = $request->autoGenReports($uri, $source);
    ?>
    
    from __future__ import with_statement
    from ReportClient import ReportClient
    import sys
    
    class Sample:
    
        LOGINEMAILID="abc@zylker.com"
        AUTHTOKEN="************"
        DATABASENAME="Employee"
        TABLENAME="Employee"
        rc = None
        rc = ReportClient(self.AUTHTOKEN)
    
        def autogenreport(self,rc):
        uri = rc.getURI(self.LOGINEMAILID,self.DATABASENAME,self.TABLENAME)
        source = "TABLE"
        result = rc.autoGenReports(uri,source)
        print result
    
    obj = Sample()
    obj.autogenreport(obj.rc)
    
    curl -d "ZOHO_ACTION=AUTOGENREPORTS&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
             &ZOHO_API_VERSION=1.0&authtoken=************
             &ZOHO_SOURCE=TABLE
             https://<hostname>:<webclientport>/api/abc@zylker.com/SalesDB/Sales
    
    
    

    Sample Response XML Format:

    <?xml version="1.0" encoding="UTF-8" ?>
    <response uri="/api/user@zylker.com/Auto-Copy/Auto" action="AUTOGENREPORTS">
        <result>
            <status>success</status>
            <message>Reports generated successfully</message>
        </result>
    </response>
    
    

    Sample Response JSON Format:

    {
      "response": {
        "uri": "/api/user@zylker.com/Auto-Copy/Auto",
        "action": "AUTOGENREPORTS",
        "result": {
          "status": "success",
          "message": "Reports generated successfully"
        }
      }
    }
    
    

    The Autogen reports API is used to generate reports in Zoho Analytics Table. The Server Administrator and the Workspace Owner alone can use this API to generate the reports.

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<Workspacename>/<Tablename>

    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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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.

    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)
    '' 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



    Sample Request:

    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&authtoken=************" 
       https://<hostname>:<webclientport>/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\/EmailAddress\/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://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<workspacename>

    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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user to access the Zoho Account.
    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.

    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

    Sample Request:

    using ZReports;
    
    namespace Test
    {
        AUTHTOKEN = "************";
        EMAIL = "user@zylker.com";
    
        class Program
        {
            public IReportClient getClient()
            {
                IReportClient RepClient = new ReportClient(AUTHTOKEN);
                return RepClient;
            }
    
            public void createsimilarviews(IReportClient rc)
            {
                try
                {
                    string uri = rc.GetURI(EMAIL, "Auto-Copy", "Auto");
                    string refview = "Base view";
                    string foldername = "New folder";
                    string copycusformula = "false";
                    string copyaggformula = "false";
                    var result = rc.CreateSimilarViews(uri, refview, foldername, copycusformula, copyaggformula, null);
                    foreach (KeyValuePair<string, string> kvp in result)
                    {
                        Console.WriteLine(kvp.Key + " = " + kvp.Value);
                    }
                }
                catch (Exception e)
                {
                    Console.WriteLine(e);
                }
            }
    
            static void Main(string[] args)
            {
                Program obj = new Program();
                IReportClient rc = obj.getClient();
                obj.createsimilarviews(rc);
            }
        }
    }
    
    package main
    
    import (
            "fmt"
            "zoho/pkg/reportclient"
    
    )
    
    var(
            email = "user@zylker.com"
            authtoken = "************"
    )
    
    func CreateSimilarViews(){
            url := reportclient.GetUri(email, "Workspace", "Auto")
            refview := "Base table"
            foldername := "New folder"
            customformula := "false"
            aggformula := "false"
            params := map[string]string{}
            result , err := reportclient.CreateSimilarViews(url, refview, foldername, customformula, aggformula, params)
            if(err != nil){
            fmt.Println(err.ErrorMessage)
            fmt.Println(err.ErrorCode)
            fmt.Println(err.Action)
            fmt.Println(err.HttpStatusCode)
            }else{
            fmt.Println(result)
            }
    }
    
    func main() {
            reportclient.SetAuthToken(authtoken)
            CreateSimilarViews()
    }
    
    import com.adventnet.zoho.client.report.*;
    
    public class Sample 
    {
        String email = "user@zylker.com";
        String databaseName = "DB1";
        String tableName = "New table";
        String authtoken = "************";
        Map config = new HashMap();
    
        private ReportClient rc = new ReportClient(authtoken);
        rc.setIamServerURL("https://<hostname>:<webclientport>/iam");
        rc.setReportServerURL("https://<hostname>:<webclientport>");
    
        public void createSimilarViews() throws Exception
        {
            String uri = rc.getURI(emailId,databaseName,tableName);
            String refView = "base view";
            String folderName = "Folder 2";
            boolean customFormula = false;
            boolean aggFormula = false;
            Map result = rc.createSimilarViews(uri, refView, folderName, customFormula, aggFormula, null);
        }
    
        public static void main(String[] args) throws Exception 
        {
            Sample obj = new Sample();
            obj.createSimilarViews();
        }
    }
    
    <?php
    
        require 'ReportClient.php';
    
        $EMAIL_ID = "abc@zylker.com";
        $AUTHTOKEN = "05740fccfasdwe3425db0e8b2a09f6f8";
        $DB_NAME = "Workspace";
        $TABLE_NAME = "Tablename";
    
        $request = new ReportClient($AUTHTOKEN);
        $uri = $request->getURI($EMAIL_ID, $DB_NAME, $TABLE_NAME);
            $ref_view = "Table1";
            $folder_name = "Dummy";
            $copy_customformula = false;
            $copy_aggformula = false;
            $response = $request->createSimilarViews($uri, $ref_view, $folder_name, $copy_customformula, $copy_aggformula);
    ?>
    
    from __future__ import with_statement
    from ReportClient import ReportClient
    import sys
    
    class Sample:
    
        LOGINEMAILID="abc@zylker.com"
        DATABASENAME="Dbname"
        TABLENAME="table name"
        AUTHTOKEN="************"
        rc = None
        rc = ReportClient(self.AUTHTOKEN)
    
        def createSimilarViews(self,rc):
        uri = rc.getURI(self.LOGINEMAILID,self.DATABASENAME,self.TABLENAME)
        refView = "Base table"
        folderName = "New folder"
        customFormula = "false"
        aggFormula = "false"
        result = rc.createSimilarViews(uri,refView,folderName,customFormula,aggFormula)
    
    obj = Sample()
    obj.createSimilarViews(obj.rc)
    
    curl -d "ZOHO_ACTION=CREATESIMILARVIEWS&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
             &ZOHO_API_VERSION=1.0&authtoken=f7d016b46be276cd4cfaswa592f40101
             &ZOHO_REFVIEW=old_table&ZOHO_FOLDERNAME=old_report&&ISCOPYCUSTOMFORMULA=false
             &ISCOPYAGGFORMULA=false" 
             https://<hostname>:<webclientport>/api/abc@zylker.com/Workspace/Table
    
    

    Sample Response XML Format:

    <response uri="/api/abc@zylker.com/Workspace/Table" action="CREATESIMILARVIEWS">
        <result>
            <status>success</status>
            <message>Reports created successfully</message>
        </result>
    </response>
    
    
    

    Sample Response JSON Format:

    {
        "response": 
        {
            "uri": "\/api\/abc@zylker.com\/Workspace\/Table",
            "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://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<WorkspaceName>/<TableName>

    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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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.

    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



    Sample Request:

    curl -d "ZOHO_ACTION=DELETEVIEW&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML&
        ZOHO_API_VERSION=1.0&ZOHO_VIEW=View_Name&authtoken=************" 
        https://<hostname>:<webclientport>/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\/EmailAddress\/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://<hostname>:<webclientport>/api/OwnerEmailAddress/WorkspaceName

    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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user to access the Zoho Account.
    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.

    ACTION SPECIFIC PARAMETERS

    Parameter Name Possible Values Description
    ZOHO_VIEW
    (mandatory)
    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

    Sample Request:

    using ZReports;
    
    namespace Test
    {
        AUTHTOKEN = "************";
        EMAIL = "user@zylker.com";
        DBNAME = "EmployeeDB";
    
        class Program
        {
            public IReportClient getClient()
            {
                IReportClient RepClient = new ReportClient(AUTHTOKEN);
                return RepClient;
            }
    
            public void renameview(IReportClient rc)
            {
                string uri = rc.GetURI(EMAIL, DBNAME);
                string viewname = "oldname";
                string newviewname = "Newname";
                string viewdesc = "Description";
                rc.RenameView(uri, viewname, newviewname, viewdesc, null);
            }
    
            static void Main(string[] args)
            {
                Program obj = new Program();
                IReportClient rc = obj.getClient();
                obj.renameview(rc);
            }
        }
    }
    
    package main
    
    import (
            "fmt"
            "zoho/pkg/reportclient"
    
    )
    
    var(
            email = "user@zylker.com"
            dbname = "Employee"
            authtoken = "************"
    )
    
    func renameview() {
            url := reportclient.GetDbUri(email, dbname)
            viewname := "Datalist"
            newname := "Newlist"
            newdesc := "description"
            err := reportclient.RenameView(url, viewname, newname, newdesc)
            if(err != nil){
                    fmt.Println(err.ErrorMessage)
                    fmt.Println(err.ErrorCode)
                    fmt.Println(err.Action)
                    fmt.Println(err.HttpStatusCode)
            }else{
                    fmt.Println("Success")
            }
    }
    
    func main() {
            reportclient.SetAuthToken(authtoken)
            renameview()
    }
    
    import com.adventnet.zoho.client.report.*;
    
    public class Sample 
    {
        String email = "user@zylker.com";
        String dbname = "EmployeeDB";
        String authtoken = "************";
        Map config = new HashMap();
    
        private ReportClient rc = new ReportClient(authtoken);
        rc.setIamServerURL("https://<hostname>:<webclientport>/iam");
        rc.setReportServerURL("https://<hostname>:<webclientport>");
    
        public void renameview() throws Exception
        {
            String uri = rc.getURI(email,dbname);
            rc.renameView(uri,"Salary","Newsalary","Description",config);
        }
    
        public static void main(String[] args) throws Exception 
        {
            Sample obj = new Sample();
            obj.renameview();
        }
    }
    
    <?php
        require 'ReportClient.php';
    
        $EMAIL_ID = "abc@zylker.com";
        $DB_NAME = "EmployeeDB";
        $AUTHTOKEN = "************";
    
        $report_client_request = new ReportClient($AUTHTOKEN); 
    
        $uri = $report_client_request->getDbURI($EMAIL_ID, $DB_NAME);
        $view_name = "oldname";
        $new_view_name = "new name";
        $new_view_desc = "description";
        $$report_client_request->renameView($uri, $view_name, $new_view_name, $new_view_desc);
    ?>
    
    from __future__ import with_statement
    from ReportClient import ReportClient
    import sys
    
    class Sample:
    
        LOGINEMAILID="abc@zylker.com"
        AUTHTOKEN="************"
        DATABASENAME="Employee"
        TABLENAME="Employee"
        rc = None
        rc = ReportClient(self.AUTHTOKEN)
    
        def renameview(self,rc):
            uri = rc.getDBURI(Config.LOGINEMAILID,Config.DATABASENAME)
            rc.renameView(uri,"Old","New","description")
    
    obj = Sample()
    obj.renameview(obj.rc)
    
    curl -d "ZOHO_ACTION=RENAMEVIEW&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML&
             ZOHO_API_VERSION=1.0&authtoken=************&
             ZOHO_VIEWNAME="New"&ZOHO_NEW_VIEWNAME="new"&ZOHO_NEW_VIEWDESC="desc"" 
              https://<hostname>:<webclientport>/api/abc@zylker.com/Employee
    
    
    

    Sample Response XML Format:

    <?xml version="1.0" encoding="UTF-8" ?>
    <response uri="/api/abc@zylker.com/Employee" action="RENAMEVIEW">
        <result>
            <message>View renamed successfully!</message>
        </result>
    </response>
    
    
    

    Sample Response JSON Format:

    {
        "response":
        {
            "uri":"\/api\/abc@zylker.com\/Employee",
            "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://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<Workspacename>

    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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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.

    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
    (mandatory)
    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

    Sample Request:

    using ZReports;
    
    namespace Test
    {
        AUTHTOKEN = "************";
        EMAIL = "user@zylker.com";
        DBNAME = "EmployeeDB";
        TBNAME = "EmployeeTB";
    
        class Program
        {
            public IReportClient getClient()
            {
                IReportClient RepClient = new ReportClient(AUTHTOKEN);
                return RepClient;
            }
    
            public void copyreports(IReportClient rc)
            {
                string uri = rc.GetURI(EMAIL, DBNAME);
                string views = "Employee";
                string dbname = "sample";
                string dbkey = "d6e443b4dc3cad251fcc54ff81cd3ad3";
                rc.CopyReports(uri, views, dbname, dbkey, null);
            }
    
            static void Main(string[] args)
            {
                Program obj = new Program();
                IReportClient rc = obj.getClient();
                obj.copyreports(rc);
            }
        }
    }
    
    package main
    
    import (
            "fmt"
            "zoho/pkg/reportclient"
    
    )
    
    var(
            email = "user@zylker.com"
            dbname = "Employee"
            tbname = "sample"
            authtoken = "************"
            dbkey = "d6e443b4dc3cas421fcc54ff81cd3ad3"
    )
    
    func copyreports() {
            url := reportclient.GetDbUri(email, dbname)
            viewnames := "List"
            destdbname := "sample"
            err := reportclient.CopyReports(url, viewnames, destdbname, dbkey)
            if(err != nil){
                    fmt.Println(err.ErrorMessage)
                    fmt.Println(err.ErrorCode)
                    fmt.Println(err.Action)
                    fmt.Println(err.HttpStatusCode)
            }else{
                    fmt.Println("Success")
            }
    }
    
    func main() {
            reportclient.SetAuthToken(authtoken)
            copyreports()
    }
    
    import com.adventnet.zoho.client.report.*;
    
    public class Sample 
    {
        String email = "user@zylker.com";
        String dbname = "EmployeeDB";
        String authtoken = "************";
        String dbkey = "d6e443b4dc3c85d51fcc54ff81cd3ad3";
        String destdb = "sample";
        String views = "new";
        Map config = new HashMap();
    
        private ReportClient rc = new ReportClient(authtoken);
        rc.setIamServerURL("https://<hostname>:<webclientport>/iam");
        rc.setReportServerURL("https://<hostname>:<webclientport>");
    
        public void copyreports() throws Exception
        {
            String uri = rc.getURI(email,dbname);
            rc.copyReport(uri,views,destdb,dbkey,config);
        }
    
        public static void main(String[] args) throws Exception 
        {
            Sample obj = new Sample();
            obj.copyreports();
        }
    }
    
    <?php
        require 'ReportClient.php';
    
        $EMAIL_ID = "abc@zylker.com";
        $DB_NAME = "EmployeeDB";
        $AUTHTOKEN = "************";
    
        $report_client_request = new ReportClient($AUTHTOKEN); 
    
        $uri = $report_client_request->getDbURI($EMAIL_ID, $DB_NAME);
        $views = "Employee";
        $dbname = "New db";
        $dbkey = "d6e443b4dc3c85d5q34casdff81cd3ad3";
        $report_client_request->copyReports($uri, $views, $dbname, $dbkey);
    ?>
    
    from __future__ import with_statement
    from ReportClient import ReportClient
    import sys
    
    class Sample:
    
        LOGINEMAILID="abc@zylker.com"
        AUTHTOKEN="************"
        DATABASENAME="Employee"
        rc = None
        rc = ReportClient(self.AUTHTOKEN)
    
        def copyreports(self,rc):
            uri = rc.getDBURI(self.LOGINEMAILID,self.DATABASENAME)
            rc.copyReports(uri,"Employee","sample","d6e443b4dc3c85d51fcc54ff81cd3ad3")
    
    obj = Sample()
    obj.copyreports(obj.rc)
    
    curl -d "ZOHO_ACTION=COPYREPORTS&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML&
             ZOHO_API_VERSION=1.0&authtoken=f7d016qw2be276cd4cfa32a592f40101&
             ZOHO_VIEWTOCOPY=EmployeeDetails&ZOHO_DATABASE_NAME=sample&
             ZOHO_COPY_DB_KEY=d6e443b4e34c85d51fcc54ff81cd3ad3" 
             https://<hostname>:<webclientport>/api/abc@zylker.com/Employee
    
    

    Sample Response XML Format:

    <response uri="/api/source_account@zylker.com/SourceEmployeeDB" action="COPYREPORTS">
        <result>
            <message>
            Successfully View(s) Copied
            </message>
        </result>
    </response>
    
    

    Sample Response JSON Format:

    {
        "response":
        {
            "uri":"\/api\/source_account@zylker.com\/SourceEmployeeDB",
            "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://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<Workspacename>

    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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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.

    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 owner has to invoke the below URL to get the Copy Workspace Secret Key.
    https://<hostname>:<webclientport>/api/abcd@zylker.com/SourceEmployeeDB?ZOHO_ACTION=GETCOPYDBKEY&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML&authtoken=<source_db_owner_authtoken>&ZOHO_API_VERSION=1.0.
    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 REPORTS

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

    Copy Formula

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

    Sample Request:

    using ZReports;
    
    namespace Test
    {
        AUTHTOKEN = "************";
        EMAIL = "user@zylker.com";
        DBNAME = "EmployeeDB";
        TBNAME = "EmployeeTB";
    
        class Program
        {
            public IReportClient getClient()
            {
                IReportClient RepClient = new ReportClient(AUTHTOKEN);
                return RepClient;
            }
    
            public void copyformula(IReportClient rc)
            {
                string uri = rc.GetURI(EMAIL, DBNAME, TBNAME);
                string formula = "total";
                string dbname = "sample";
                string dbkey = "d6e443b4dc3c85dsswcc54ff81cd3ad3";
                rc.CopyFormula(uri, formula, dbname, dbkey, null);
            }
    
            static void Main(string[] args)
            {
                Program obj = new Program();
                IReportClient rc = obj.getClient();
                obj.copyformula(rc);
            }
        }
    }
    
    package main
    
    import (
            "fmt"
            "zoho/pkg/reportclient"
    
    )
    
    var(
            email = "user@zylker.com"
            dbname = "Employee"
            tbname = "sample"
            authtoken = "************"
            dbkey = "d6e443b4dc3cas421fcc54ff81cd3ad3"
    )
    
    func copyformula() {
            url := reportclient.GetUri(email, dbname, tbname)
            formulaname := "total"
            destdbname := "sample"
            err := reportclient.CopyFormula(url, formulaname, destdbname, dbkey)
            if(err != nil){
                    fmt.Println(err.ErrorMessage)
                    fmt.Println(err.ErrorCode)
                    fmt.Println(err.Action)
                    fmt.Println(err.HttpStatusCode)
            }else{
                    fmt.Println("Success")
            }
    }
    
    func main() {
            reportclient.SetAuthToken(authtoken)
            copyformula()
    }
    
    import com.adventnet.zoho.client.report.*;
    
    public class Sample 
    {
        String email = "user@zylker.com";
        String dbname = "EmployeeDB";
        String tbname = "EmployeeTB";
        String authtoken = "************";
        String dbkey = "d6e443b4dc3c85d51fcc54ff81cd3ad3";
        String destdb = "sample";
        String formula = "total";
        Map config = new HashMap();
    
        private ReportClient rc = new ReportClient(authtoken);
        rc.setIamServerURL("https://<hostname>:<webclientport>/iam");
        rc.setReportServerURL("https://<hostname>:<webclientport>");
    
        public void copyformula() throws Exception
        {
            String uri = rc.getURI(email,dbname,tbname);
            rc.copyFormula(uri,formula,destdb,dbkey,config);
        }
    
        public static void main(String[] args) throws Exception 
        {
            Sample obj = new Sample();
            obj.copyformula();
        }
    }
    
    <?php
        require 'ReportClient.php';
    
        $EMAIL_ID = "abc@zylker.com";
        $DB_NAME = "EmployeeDB";
        $TABLE_NAME = "EmployeeTB";
        $AUTHTOKEN = "************";
    
        $report_client_request = new ReportClient($AUTHTOKEN); 
    
        $uri = $report_client_request->getURI($EMAIL_ID, $DB_NAME, $TABLE_NAME);
        $formula = "Total";
        $dbname = "New db";
        $dbkey = "d6e443b4dc3c85d5q34casdff81cd3ad3";
        $report_client_request->copyFormula($uri, $formula, $dbname, $dbkey);
    ?>
    
    from __future__ import with_statement
    from ReportClient import ReportClient
    import sys
    
    class Sample:
    
        LOGINEMAILID="abc@zylker.com"
        AUTHTOKEN="************"
        DATABASENAME="Employee"
        TABLENAME="Employee"
        rc = None
        rc = ReportClient(self.AUTHTOKEN)
    
        def copyformula(self,rc):
            uri = rc.getURI(self.LOGINEMAILID,self.DATABASENAME,self.TABLENAME)
            rc.copyFormula(uri,"total","sample","d6e443b4dc3c85d51fcc54ff81cd3ad3")
    
    obj = Sample()
    obj.copyformula(obj.rc)
    
    curl -d "ZOHO_ACTION=COPYFORMULA&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML&
             ZOHO_API_VERSION=1.0&authtoken=f7d0162wqbe276cd4cfa32a592f40101&
             ZOHO_FORMULATOCOPY=MyFormula1&ZOHO_DATABASE_NAME=SourceEmployeeDetails&
             ZOHO_COPY_DB_KEY=d6e443b4dc3ceew51fcc54ff81cd3ad3" 
             https://<hostname>:<webclientport>/api/abc@zylker.com/Employee/Employee
    
    

    Sample Response XML Format:

    <response uri="/api/source_account@zylker.com/SourceEmployeeDB/SourceEmployeeDetails" 
                     action="COPYFORMULA">
        <result>
            <message>
            Successfully formula(s) Copied
            </message>
        </result>
    </response>
    
    

    Sample Response JSON Format:

    {
        "response":
             {
                "uri":"\/api\/source_account@zylker.com\/SourceEmployeeDB\/SourceEmployeeDetails",
                "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://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<Workspacename>/<Tablename>

    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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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.

    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 owner has to invoke the below URL to get the Copy Workspace Secret Key.
    https://<hostname>:<webclientport>/api/abcd@zylker.com/SourceEmployeeDB?ZOHO_ACTION=GETCOPYDBKEY&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML&authtoken=<source_db_owner_authtoken>&ZOHO_API_VERSION=1.0.
    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

    Add Lookup

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

    Sample Request:

    using ZReports;
    
    namespace Test
    {
        AUTHTOKEN = "************";
        EMAIL = "user@zylker.com";
        DBNAME = "EmployeeDB";
        TBNAME = "EmployeeTB";
    
        class Program
        {
            public IReportClient getClient()
            {
                IReportClient RepClient = new ReportClient(AUTHTOKEN);
                return RepClient;
            }
    
            public void addlookup(IReportClient rc)
            {
                string uri = rc.GetURI(EMAIL, DBNAME, TBNAME);
                string columnname = "Id";
                string reftable = "sales";
                string refcolumn = "Srno";
                string onerror = "ABORT";
                rc.AddLookup(uri, columnname, reftable, refcolumn, onerror, null);
            }
    
            static void Main(string[] args)
            {
                Program obj = new Program();
                IReportClient rc = obj.getClient();
                obj.addlookup(rc);
            }
        }
    }
    
    package main
    
    import (
            "fmt"
            "zoho/pkg/reportclient"
    
    )
    
    var(
            email = "user@zylker.com"
            dbname = "Employee"
            tbname = "sample"
            authtoken = "************"
    )
    
    func addlookup() {
            url := reportclient.GetUri(email, dbname, tbname)
            columnname := "total"
            refertable := "New"
            refercolumn := "Count"
            onerror := "ABORT"
            err := reportclient.AddLookup(url, columnname, refertable, refercolumn, onerror)
            if(err != nil){
                    fmt.Println(err.ErrorMessage)
                    fmt.Println(err.ErrorCode)
                    fmt.Println(err.Action)
                    fmt.Println(err.HttpStatusCode)
            }else{
                    fmt.Println("Success")
            }
    }
    
    func main() {
            reportclient.SetAuthToken(authtoken)
            addlookup()
    }
    
    import com.adventnet.zoho.client.report.*;
    
    public class Sample 
    {
        String email = "user@zylker.com";
        String dbname = "EmployeeDB";
        String tbname = "EmployeeTB";
        String authtoken = "************";
        Map config = new HashMap();
    
        private ReportClient rc = new ReportClient(authtoken);
        rc.setIamServerURL("https://<hostname>:<webclientport>/iam");
        rc.setReportServerURL("https://<hostname>:<webclientport>");
    
        public void addlookup() throws Exception
        {
            String uri = rc.getURI(email,dbname,tbname);
            rc.addLookup(uri,"Id","New Db","Srno","ABORT",config);
        }
    
        public static void main(String[] args) throws Exception 
        {
            Sample obj = new Sample();
            obj.addlookup();
        }
    }
    
    <?php
        require 'ReportClient.php';
    
        $EMAIL_ID = "abc@zylker.com";
        $DB_NAME = "EmployeeDB";
        $TABLE_NAME = "EmployeeTB";
        $AUTHTOKEN = "************";
    
        $report_client_request = new ReportClient($AUTHTOKEN); 
    
        $uri = $report_client_request->getURI($EMAIL_ID, $DB_NAME, $TABLE_NAME);
        $column_name = "Id";
        $referred_table = "Sales";
        $referred_column = "Srno";
        $on_error = "ABORT";
        $report_client_request->addLookup($uri, $column_name, $referred_table, 
                       $referred_column, $on_error);
    ?>
    
    from __future__ import with_statement
    from ReportClient import ReportClient
    import sys
    
    class Sample:
    
        LOGINEMAILID="abc@zylker.com"
        AUTHTOKEN="************"
        DATABASENAME="Employee"
        TABLENAME="Employee"
        rc = None
        rc = ReportClient(self.AUTHTOKEN)
    
        def addlookup(self,rc):
            uri = rc.getURI(self.LOGINEMAILID,self.DATABASENAME,self.TABLENAME)
            result = rc.addLookup(uri,"id","NewDb","srno","ABORT")
    
    obj = Sample()
    obj.addlookup(obj.rc)
    
    curl -d "ZOHO_ACTION=ADDLOOKUP&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML&
             ZOHO_API_VERSION=1.0&authtoken=************&
             ZOHO_COLUMNNAME="old"&ZOHO_REFERREDTABLE="new"&
             ZOHO_REFERREDCOLUMN="old"&ZOHO_IFERRORONCONVERSION="ABORT"" 
             https://<hostname>:<webclientport>/api/abc@zylker.com/Employee/Employee
    
    

    Sample Response XML Format:

    <?xml version="1.0" encoding="UTF-8" ?>
    <response uri="/api/abc@zylker.com/Employee/Employee" action="ADDLOOKUP">
        <result>SUCCESS</result>
    </response>
    
    

    Sample Response JSON Format:

    {
        "response":
        {
            "uri":"\/api\/abc@zylker.com\/Employee\/Employee",
            "action":"ADDLOOKUP",
            "result":"SUCCESS"
        }
    }
    
    

    The Add Lookup API is used to Adds the lookup in the specified child table.

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<Workspacename>/<Tablename>

    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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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.

    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

    Sample Request:

    using ZReports;
    
    namespace Test
    {
        AUTHTOKEN = "************";
        EMAIL = "user@zylker.com";
        DBNAME = "EmployeeDB";
        TBNAME = "EmployeeTB";
    
        class Program
        {
            public IReportClient getClient()
            {
                IReportClient RepClient = new ReportClient(AUTHTOKEN);
                return RepClient;
            }
    
            public void removelookup(IReportClient rc)
            {
                string uri = rc.GetURI(EMAIL, DBNAME, TBNAME);
                string columnname = "Salary";
                rc.RemoveLookup(uri, columnname, null);
            }
    
            static void Main(string[] args)
            {
                Program obj = new Program();
                IReportClient rc = obj.getClient();
                obj.removelookup(rc);
            }
        }
    }
    
    package main
    
    import (
            "fmt"
            "zoho/pkg/reportclient"
    
    )
    
    var(
            email = "user@zylker.com"
            dbname = "Employee"
            tbname = "sample"
            authtoken = "************"
    )
    
    func removelookup() {
            url := reportclient.GetUri(email, dbname, tbname)
            columnname := "total"
            err := reportclient.RemoveLookup(url, columnname)
            if(err != nil){
                    fmt.Println(err.ErrorMessage)
                    fmt.Println(err.ErrorCode)
                    fmt.Println(err.Action)
                    fmt.Println(err.HttpStatusCode)
            }else{
                    fmt.Println("Success")
            }
    }
    
    func main() {
            reportclient.SetAuthToken(authtoken)
            removelookup()
    }
    
    import com.adventnet.zoho.client.report.*;
    
    public class Sample 
    {
        String email = "user@zylker.com";
        String dbname = "EmployeeDB";
        String tbname = "EmployeeTB";
        String authtoken = "************";
        Map config = new HashMap();
    
        private ReportClient rc = new ReportClient(authtoken);
        rc.setIamServerURL("https://<hostname>:<webclientport>/iam");
        rc.setReportServerURL("https://<hostname>:<webclientport>");
    
        public void removelookup() throws Exception
        {
            String uri = rc.getURI(email,dbname,tbname);
            rc.removeLookup(uri,"EmpName",config);
        }
    
        public static void main(String[] args) throws Exception 
        {
            Sample obj = new Sample();
            obj.removelookup();
        }
    }
    
    <?php
        require 'ReportClient.php';
    
        $EMAIL_ID = "abc@zylker.com";
        $DB_NAME = "EmployeeDB";
        $TABLE_NAME = "EmployeeTB";
        $AUTHTOKEN = "************";
    
        $report_client_request = new ReportClient($AUTHTOKEN); 
    
        $uri = $report_client_request->getURI($EMAIL_ID, $DB_NAME, $TABLE_NAME);
        $column_name = "Id";
        $report_client_request->removeLookup($uri, $column_name);
    ?>
    
    from __future__ import with_statement
    from ReportClient import ReportClient
    import sys
    
    class Sample:
    
        LOGINEMAILID="abc@zylker.com"
        AUTHTOKEN="************"
        DATABASENAME="Employee"
        TABLENAME="Employee"
        rc = None
        rc = ReportClient(self.AUTHTOKEN)
    
        def removelookup(self,rc):
            uri = rc.getURI(self.LOGINEMAILID,self.DATABASENAME,self.TABLENAME)
            result = rc.removeLookup(uri,"Id")
    
    obj = Sample()
    obj.removelookup(obj.rc)
    
    curl -d "ZOHO_ACTION=REMOVELOOKUP&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=JSON&
             ZOHO_API_VERSION=1.0&authtoken=************&
             ZOHO_COLUMNNAME="new"" 
             https://<hostname>:<webclientport>/api/abc@zylker.com/Employee/Employee
    
    

    Sample Response XML Format:

    <?xml version="1.0" encoding="UTF-8" ?>
    <response uri="/api/abc@zylker.com/Employee/Employee" action="REMOVELOOKUP">
        <result>SUCCESS</result>
    </response>
    
    
    

    Sample Response JSON Format:

    {
        "response":
        {
            "uri":"\/api\/abc@zylker.com\/Employee\/Employee",
            "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://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<Workspacename>/<Tablename>

    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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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.

    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, 7138, 7165, 8504, 8506, 8516, 8533

    Error Codes in Modeling API

    This section explains about the error response sent from the Zoho Analytics server on failure of Metadata APIs. You can use this for appropriate error handling.

    Error Handling

    Sample error XML Format:

    
    <response uri="/api/abc@zylker.com/Employee" action="DATABASEMETADATA">
        <error> 
            <code>7103</code>
            <message>
            Workspace not found! Please check whether the workspace exists
            </message>
        </error>
    </response>
    
    

    Sample error JSON Format:

    {
        "response": 
        {
            "uri": "\/api\/abc@zylker.com\/Employee",
            "action": "DATABASEMETADATA",
            "error": 
            {
            "code":7103,
            "message": "Workspace not found! Please check whether the workspace exists"
            } 
        }
    }
    

    Error Codes

    Error Code Reason Solution
    7101 Workspace with the same name exists already. Provide an alternate name.
    7103 The workspace specified does not exists Check the name of the workspace to be deleted.
    7105 View name specified in the workspace does not exist. Provide a valid view name.
    7107 The column does not exists 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 is already exists in the specified Zoho Analytics Table Provide a 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 name.
    7144 Mentioned Folder is not present in the 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) Deleting columns in System Table is not allowed. You could only delete a column in a user created/defined table using this API.
    7165 The workspace specified is a system workspace which cannot be deleted The system workspace cannot be deleted.
    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.
    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 valid JSON data.
    15000 A table / view which is needed to copy the specified report is missing in the destination workspace Check the destination workspace and create the missing table/view
    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 Workspace 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.

    In case of any error other than the above said, mail the API request URL parameters and error response details to onprem-support@zohoanalytics.com . Zoho Analytics 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 workspaces, tables, reports and dashboards created in Zoho Analytics.

    Workspace Metadata

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



    Sample Request:

    using ZReports;
    
    namespace Test
    {
        AUTHTOKEN = "************";
        EMAIL = "Email Address";
        DBNAME = "Workspace Name";
    
        class Program
        {
            public IReportClient getClient()
            {
                IReportClient RepClient = new ReportClient(AUTHTOKEN);
                return RepClient;
            }
    
            public void getDatabaseMetaData(IReportClient RepClient)
            {
                string dbURI = RepClient.GetURI(EMAIL, DBNAME);
                string metaData = "ZOHO_CATALOG_INFO";
                string format = "XML"
                string result = RepClient.GetDatabaseMetaData(dbURI, metaData, format, null);
            }
    
            static void Main(string[] args)
            {
                Program obj = new Program();
                IReportClient rc = obj.getClient();
                obj.getDatabaseMetaData(rc);
            }
        }
    }
    
    package main
    
    import (
            "fmt"
            "zoho/pkg/reportclient"
    
    )
    
    var(
            email = "Email Address"
            authtoken = "************"
    )
    
    func databasemetadata() {
            url := reportclient.GetUserUri(email)
            metadata := "DATABASEMETADATA"
            data , err := reportclient.GetDatabaseMetadata(url, metadata)
            if(err != nil){
                    fmt.Println(err.ErrorMessage)
                    fmt.Println(err.ErrorCode)
                    fmt.Println(err.Action)
                    fmt.Println(err.HttpStatusCode)
            }else{
                    fmt.Println(data)
            }
    }
    
    func main() {
            reportclient.SetAuthToken(authtoken)
            databasemetadata()
    }
    
    import java.util.HashMap;
    import java.util.Map;
    
    import org.w3c.dom.Document;
    
    import com.adventnet.zoho.client.report.*;
    
    public class Sample
    {
    
            String authtoken = "************";
            String email = "Email Address";
            Map<String, String> config = new HashMap<String, String>();
    
            private ReportClient rc = new ReportClient(authtoken);
    
            public void metadata() throws Exception
            {
                    String uri = rc.getURI(email);
                    Document result = rc.getDatabaseMetaData(uri,"DATABASEMETADATA",config);
            }
    
            public static void main(String[] args)
            throws Exception
            {
                    Sample obj = new Sample();
                    obj.metadata();
            }
    }
    
    <?php
        require 'ReportClient.php';
    
        $EMAIL_ID = "Email Address";
        $AUTHTOKEN = "************";
    
        $report_client_request = new ReportClient($AUTHTOKEN);
    
        $uri = $report_client_request->getUserURI($EMAIL_ID);
        $metadata = "DATABASEMETADATA";
        $report_client_response = $report_client_request->getDatabaseMetadata($uri, $metadata);
    ?>
    
    from __future__ import with_statement
    from ReportClient import ReportClient
    import sys
    
    class Sample:
    
        LOGINEMAILID="Email Address"
        AUTHTOKEN="************"
        rc = None
        rc = ReportClient(self.AUTHTOKEN)
    
        def getdatabasemetadata(self,rc):
            uri = rc.getUserURI(self.LOGINEMAILID)
            result = rc.getDatabaseMetadata(uri,"DATABASEMETADATA")
            print result
    
    obj = Sample()
    obj.getdatabasemetadata(obj.rc)
    
    curl -d "ZOHO_ACTION=DATABASEMETADATA&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=
             XML&ZOHO_API_VERSION=1.0&authtoken=************
             &ZOHO_METADATA=DATABASEMETADATA"
             https://<hostname>:<webclientport>/api/EmailAddress
    
    

    Sample Response XML Format:

    <response URI="/api/EmailAddress" ACTION="DATABASEMETADATA">
        <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\/EmailAddress",
            "action": "DATABASEMETADATA",
            "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\/EmailAddress\/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\/EmailAddress",
            "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\/EmailAddress",
            "action": "ZOHO_TABLETYPES",
            "result":
            [
                "TABLE",
                "VIEW",
                "REPORT"
            ]
        }
    }
    

    Using the Workspace Metadata API, you can get the following meta information.

    request uri

    https://<hostname>:<webclientport>/api/EmailAddress

    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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user to access the Zoho Account.
    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.

    1.Getting Workspace (Catalog) List

    To list the Zoho Analytics Workspaces for the specified user

    request uri

    https://<hostname>:<webclientport>/api/EmailAddress/

    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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user to access the Zoho Account.
    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.

    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://<hostname>:<webclientport>/api/EmailAddress/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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user to access the Zoho Account.
    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.

    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://<hostname>:<webclientport>/api/OwnerEmailAddress

    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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user to access the Zoho Account.
    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.

    4.Getting Table Types

    The following table lists the common TABLETYPES.

    Actual View TABLETYPE Value
    Tables TABLE
    Query Tables VIEW
    Charts / Pivots / Tabular Views / Summary Views / Dashboards REPORT

    request uri

    https://<hostname>:<webclientport>/api/OwnerEmailAddress

    COMMON PARAMETERS

    Parameter Name Possible Values Description
    ZOHO_ACTION DATABASEMETADATA This parameter specifies the action to be performed by the API request.
    ZOHO_METADATA ZOHO_TABLETYPES Various view types available in Zoho Analytics
    ZOHO_OUTPUT_FORMAT XML/JSON This parameter specifies the output format for the response.
    ZOHO_ERROR_FORMAT XML/JSON Specifies the output format for the response in case an error occurs when trying to process the request.
    authtoken user authtoken Auth Token is an unique token that authenticates the user to access the Zoho Account.
    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.

    Response Attributes

    In this section, we have described the detailed explanation of the attribute / property we used in DATABASEMETADATA APIs.

    Attribute/Property Description
    IS_DEFAULT/isDefault Indicates whether a Zoho Analytics workspace is set as the default. Can be used to set default workspace for third party tools that loads Zoho Analytics Workspaces using JDBC Driver.
    TABLE_CAT/tableCat Zoho Analytics workspace name (ex: SalesDB)
    COLUMN_NAME/columnName Name of the column in table type views (ex: Region)
    LITERAL_PREFIX Prefix character used when literal values found (ex: '45’)
    NULLABLE Will be true if the column can contain null value, false otherwise.
    MAXSIZE Maximum size of the column (ex: 20)
    TYPE_NAME Zoho Analytics name for the data type (ex: Positive Number)

    Note:\N in XML response refer to the NULL value

    Possible Error Codes In WORKSPACE METADATA

    7102 , 7103 , 8504 , 8506 , 8516 , 8533


    My Workspace List

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



    Sample Request:

    curl -d "ZOHO_ACTION=MYWORKSPACELIST&ZOHO_OUTPUT_FORMAT=JSON&ZOHO_ERROR_FORMAT=JSON
             &ZOHO_API_VERSION=1.0&authtoken=************"
             https://analyticsapi.zoho.com/api/EmailAddress
    

    Sample Response JSON Format:

    {
      "response": {
        "uri": "/api/EmailAddress",
        "action": "MYWORKSPACELIST",
        "result": [{
            "workspaceId": "888888888888888",
            "workspaceName": "v1",
            "workspaceDesc": "test",
            "orgId": "121212121",
            "createdTime": "1573041408109",
            "createdBy": "email",
            "isDefault": false
          },
          {
            "workspaceId": "999999999999999",
            "workspaceName": "v2",
            "workspaceDesc": "test",
            "orgId": "121212121",
            "createdTime": "1570770871266",
            "createdBy": "email",
            "isDefault": false
          }
        ]
      }
    }
    

    This API returns the list of all owned workspaces present in the Zoho Analytics account identified by the URI.

    Request URI

    https://<hostname>:<webclientport>/api/OwnerEmail

    COMMON PARAMETERS

    Parameter Name Possible Values Description
    ZOHO_ACTION MYWORKSPACELIST This parameter specifies the action to be performed by the API request.
    ZOHO_OUTPUT_FORMAT 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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

    ACTION SPECIFIC PARAMETERS

    Parameter Possible Values Description
    ZOHO_VALID_JSON
    (optional)
    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.

    Possible Error Codes In MY WORKSPACE LIST

    8504 , 8506 , 8516 , 8533


    Shared Workspace List

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



    Sample Request:

    curl -d "ZOHO_ACTION=SHAREDWORKSPACELIST&ZOHO_OUTPUT_FORMAT=JSON&ZOHO_ERROR_FORMAT=JSON
             &ZOHO_API_VERSION=1.0&authtoken=************"
             https://analyticsapi.zoho.com/api/EmailAddress
    

    Sample Response JSON Format:

    {
      "response": {
        "uri": "/api/EmailAddress",
        "action": "SHAREDWORKSPACELIST",
        "result": [{
            "workspaceId": "888888888888888",
            "workspaceName": "v1",
            "workspaceDesc": "test",
            "orgId": "121212121",
            "createdTime": "1573041408109",
            "createdBy": "email",
            "isDefault": false
          },
          {
            "workspaceId": "999999999999999",
            "workspaceName": "v2",
            "workspaceDesc": "test",
            "orgId": "121212121",
            "createdTime": "1570770871266",
            "createdBy": "email",
            "isDefault": false
          }
        ]
      }
    }
    

    This API returns the list of all shared workspaces present in the Zoho Analytics account identified by the URI.

    Request URI

    https://<hostname>:<webclientport>/api/OwnerEmail

    COMMON PARAMETERS

    Parameter Name Possible Values Description
    ZOHO_ACTION SHAREDWORKSPACELIST This parameter specifies the action to be performed by the API request.
    ZOHO_OUTPUT_FORMAT 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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

    ACTION SPECIFIC PARAMETERS

    Parameter Possible Values Description
    ZOHO_VALID_JSON
    (optional)
    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.

    Possible Error Codes In SHARED WORKSPACE LIST

    8504 , 8506 , 8516 , 8533


    Folder List

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



    Sample Request:

    curl -d "ZOHO_ACTION=FOLDERLIST&ZOHO_OUTPUT_FORMAT=JSON&ZOHO_ERROR_FORMAT=JSON
             &ZOHO_API_VERSION=1.0&authtoken=************"
             https://analyticsapi.zoho.com/api/EmailAddress
    

    Sample Response JSON Format:

    {
    
        "response":
    
        {
    
            "uri": "\/api\/email\/test",
    
            "action": "FOLDERLIST",
    
            "result": [{
                "folderId": "99999999999999",
                "folderName": "Tables & Reports",
                "folderDesc": "Sample Folder",
                "folderIndex": 1,
                "isDefault": true,
                "parentFolderId": "-1"
            }, {
                "folderId": "88888888888888",
                "folderName": "Test Folder",
                "folderDesc": "",
                "folderIndex": 2,
                "isDefault": false,
                "parentFolderId": "-1"
            }]
        }
    }
    

    This API returns the list of all accessible folders present in the workspace identified by the URI.

    Request URI

    https://<hostname>:<webclientport>/api/OwnerEmail/WorkspaceName

    COMMON PARAMETERS

    Parameter Name Possible Values Description
    ZOHO_ACTION FOLDERLIST This parameter specifies the action to be performed by the API request.
    ZOHO_OUTPUT_FORMAT 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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

    ACTION SPECIFIC PARAMETERS

    Parameter Possible Values Description
    ZOHO_VALID_JSON
    (optional)
    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.

    Possible Error Codes In FOLDER LIST

    7103 ,8504 , 8506 , 8516 , 8533


    View List

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



    Sample Request:

    curl -d "ZOHO_ACTION=VIEWLIST&ZOHO_OUTPUT_FORMAT=JSON&ZOHO_ERROR_FORMAT=JSON
             &ZOHO_API_VERSION=1.0&authtoken=************" 
             https://analyticsapi.zoho.com/api/EmailAddress
    

    Sample Response JSON Format:

    {
    
        "response":
    
        {
    
            "uri": "\/api\/email\/test",
    
            "action": "VIEWLIST",
    
            "result": [{
                "viewId": "99999999999999",
                "viewName": "xyz",
                "viewDesc": "",
                "viewType": "Table",
                "parentViewId": "null",
                "folderId": "7777777777777",
                "createdTime": "1567063663794",
                "createdBy": "email",
                "lastModifiedTime": "1569509324895",
                "lastModifiedBy": "email",
                "isFavourite": false
            }, {
                "viewId": "8888888888888",
                "viewName": "charts",
                "viewDesc": "",
                "viewType": "AnalysisView",
                "parentViewId": "99999999999999",
                "folderId": "7777777777777",
                "createdTime": "1560838602827",
                "createdBy": "email",
                "lastModifiedTime": "1567780128258",
                "lastModifiedBy": "email",
                "isFavourite": false
            }]
        }
    }
    

    This API returns the list of all accessible views present in the workspace identified by the URI.

    Request URI

    https://<hostname>:<webclientport>/api/OwnerEmail/WorkspaceName

    COMMON PARAMETERS

    Parameter Name Possible Values Description
    ZOHO_ACTION VIEWLIST This parameter specifies the action to be performed by the API request.
    ZOHO_OUTPUT_FORMAT 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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

    ACTION SPECIFIC PARAMETERS

    Parameter Possible Values Description
    ZOHO_VALID_JSON
    (optional)
    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.

    Possible Error Codes In VIEW LIST

    7103 ,8504 , 8506 , 8516 , 8533


    View Metadata

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



    Sample Request:

    curl -d "ZOHO_ACTION=VIEWMETADATA&ZOHO_OUTPUT_FORMAT=JSON
             &authtoken=f7d016b46be2acsd4cfa32a592f40101&ZOHO_API_VERSION=1.0&ZOHO_ERROR_FORMAT=JSON"
         https://<hostname>:<webclientport>/api/abc@zylker.com/Workspacename/Viewname
    

    Sample Response For Table View Type:

    {
        "response": {
            "uri": "/api/EmailAddress/WorkspaceName/ViewName",
            "action": "VIEWMETADATA",
            "result": {
                "viewInfo": {
                    "viewId": "22222222222222",
                    "viewName": "Table Name",
                    "viewDesc": "View Desc",
                    "viewType": "Table",
                    "workspaceId": "9999999999999",
                    "columnList": [
                        {
                            "columnId": "555555555555555",
                            "columnName": "Date",
                            "dataTypeId": 93,
                            "dataTypeName": "Date",
                            "columnIndex": 1,
                            "columnDesc": "",
                            "columnMaxSize": 19,
                            "isNullable": true,
                            "defaultValue": "",
                            "pkTableName": "",
                            "pkColumnName": "",
                            "formulaDisplayName": "",
                            "dateFormat": "dd MMMM, yyyy"
                        },
                        {
                            "columnId": "666666666666666",
                            "columnName": "Region",
                            "dataTypeId": 12,
                            "dataTypeName": "Plain Text",
                            "columnIndex": 2,
                            "columnDesc": "",
                            "columnMaxSize": 100,
                            "isNullable": true,
                            "defaultValue": "",
                            "pkTableName": "",
                            "pkColumnName": "",
                            "formulaDisplayName": ""
                        }
                    ]
                }
            }
        }
    }
    

    Sample Response For All Other View Types:

    {
        "response": {
            "uri": "/api/EmailAddress/WorkspaceName/ViewName",
            "action": "VIEWMETADATA",
            "result": {
                "viewInfo": {
                    "viewId": "11111111111111",
                    "viewName": "View Name",
                    "viewDesc": "View Desc",
                    "viewType": "Dashboard",
                    "workspaceId": "9999999999999",
                    "involvedViews": [
                        {
                            "viewId": "22222222222222",
                            "viewName": "View1",
                            "viewType": "Chart View"
                        },
                        {
                            "viewId": "33333333333333",
                            "viewName": "View2",
                            "viewType": "Query Table"
                        }
                    ]
                }
            }
        }
    }
    

    This API returns metadata of the given view identified by the URI.

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<Workspacename>/<Tablename>

    COMMON PARAMETERS

    Parameter Name Possible Values Description
    ZOHO_ACTION VIEWMETADATA This parameter specifies the action to be performed by the API request.
    ZOHO_OUTPUT_FORMAT JSON This parameter specifies the output format for the response.
    ZOHO_ERROR_FORMAT JSON Specifies the output format for the response in case an error occurs when trying to process the request.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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.

    Possible Error Codes In View Metadata

    7103 , 7104 , 7138 , 8504 , 8506 , 8516 , 8533

    Get Workspace Name

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

    Sample Request:

    using ZReports;
    
    namespace Test
    {
        AUTHTOKEN = "************";
        EMAIL = "user@zylker.com";
        DBID = 1148746000003334001;
    
        class Program
        {
            public IReportClient getClient()
            {
                IReportClient RepClient = new ReportClient(AUTHTOKEN);
                return RepClient;
            }
    
            public void getdbname(IReportClient rc)
            {
                string uri = rc.GetURI(EMAIL);
                string result = rc.GetDatabaseName(uri, DBID, null);
                Console.WriteLine(result);
            }
    
            static void Main(string[] args)
            {
                Program obj = new Program();
                IReportClient rc = obj.getClient();
                obj.getdbname(rc);
            }
        }
    }
    
    package main
    
    import (
            "fmt"
            "zoho/pkg/reportclient"
    
    )
    
    var(
            email = "user@zylker.com
    .com"
            authtoken = "************"
            dbid = "1148746000000004001"
    )
    
    func getdatabasename() {
            url := reportclient.GetUserUri(email)
            databasename , err := reportclient.GetDatabaseName(url, dbid)
            if(err != nil){
                    fmt.Println(err.ErrorMessage)
                    fmt.Println(err.ErrorCode)
                    fmt.Println(err.Action)
                    fmt.Println(err.HttpStatusCode)
            }else{
                    fmt.Println(databasename)
            }
    }
    
    func main() {
            reportclient.SetAuthToken(authtoken)
            getdatabasename()
    }
    
    import com.adventnet.zoho.client.report.*;
    
    public class Sample 
    {
        String email = "user@zylker.com";
        String authtoken = "************";
        long dbid = 1148746002350004001L;
        Map config = new HashMap();
    
        private ReportClient rc = new ReportClient(authtoken);
        rc.setIamServerURL("https://<hostname>:<webclientport>/iam");
        rc.setReportServerURL("https://<hostname>:<webclientport>");
    
        public void getdbname() throws Exception
        {
            String uri = rc.getURI(email);
            String result =  rc.getDatabaseName(uri,dbid);
            System.out.println(result);
        }
    
        public static void main(String[] args) throws Exception 
        {
            Sample obj = new Sample();
            obj.getdbname();
        }
    }
    
    <?php
        require 'ReportClient.php';
    
        $EMAIL_ID = "abc@zylker.com";
        $AUTHTOKEN = "************";
    
        $report_client_request = new ReportClient($AUTHTOKEN); 
    
        $uri = $report_client_request->getUserURI($EMAIL_ID);
        $db_id = 1148216975034504001;
        $database_name = $report_client_request->getDatabaseName($uri, $db_id);
    ?>
    
    from __future__ import with_statement
    from ReportClient import ReportClient
    import sys
    
    class Sample:
    
        LOGINEMAILID="abc@zylker.com
    .com"
        AUTHTOKEN="************"
        DBID="1148746001230004001"
        rc = None
        rc = ReportClient(self.AUTHTOKEN)
    
        def getdatabasename(self,rc):
            uri = rc.getUserURI(self.LOGINEMAILID)
            result = rc.getDatabaseName(uri,self.DBID)
            print result
    
    obj = Sample()
    obj.getdatabasename(obj.rc)
    
    curl -d "ZOHO_ACTION=GETDATABASENAME&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
             &ZOHO_API_VERSION=1.0&authtoken=************&
             DBID=1148746213000004001" 
             https://<hostname>:<webclientport>/api/abc@zylker.com
    
    

    Sample Response XML Format:

    <response uri="/api/abc@zylker.com" action="GETDATABASENAME">
        <dbname>Employee</dbname>
    </response>
    
    

    Sample Response JSON Format:

    {
        "response": 
        {
            "uri": "\/api\/abc@zylker.com",
            "action": "GETDATABASENAME",
            "result": 
            {
                "dbname": "Employee"
            } 
        }
    }
    

    This API returns the name of a workspace in Zoho Analytics given its Workspace ID as input. Workspace IDs are unique identifiers that is associated with each workspace created in Zoho Analytics. The administrator and all users to whom this workspace was shared can use this API.

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>

    Common Parameters

    Parameter Name Possible Values Description
    ZOHO_ACTION GETDATABASENAME 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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.

    Action Specific Parameters

    Parameter Name Possible Values Description
    DBID
    (mandatory)
    A Long number like 9999999999999 The DBID of the Zoho Analytics Reporting Workspace which can be taken from workspace URL

    POSSIBLE ERROR CODES IN GET WORKSPACE NAME

    7103, 7104, 8504, 8506, 8516, 8533

    Get Workspace Id

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



    Sample Request:

    curl -d "ZOHO_ACTION=GETDATABASEID&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
             &ZOHO_API_VERSION=1.0&authtoken=************
             &ZOHO_DATABASE_NAME=Workspace_Name"
             https://<hostname>:<webclientport>/api/EmailAddress
    
    

    Sample Response XML Format:

    <response uri="/api/EmailAddress" action="GETDATABASEID">
    <result>
    <dbid>99999999999999</dbid>
    </result>
    </response>
    

    Sample Response JSON Format:

    {
        "response":
        {
            "uri":"\/api\/EmailAddress",
            "action":"GETDATABASEID",
            "result":
            {
                "dbid":"99999999999999"
            }
        }
    }
    
    

    This API returns the ID of a workspace in Zoho Analytics given its Workspace Name as input.

    request uri

    https://<hostname>:<webclientport>/api/OwnerEmailAddress

    COMMON PARAMETERS

    Parameter Name Possible Values Description
    ZOHO_ACTION GETDATABASEID 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user to access the Zoho Account.
    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

    ACTION SPECIFIC PARAMETERS

    Parameter Name Possible Values Description
    ZOHO_DATABASE_NAME
    (mandatory)
    <workspacename> The Name of the Zoho Analytics Online Reporting workspace which can be taken from workspace URL.

    Possible Error Codes In GET WORKSPACE NAME

    7103 , 8504 , 8506 , 8516 , 8533

    Is Workspace Exist

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

    Sample Request:

    using ZReports;
    
    namespace Test
    {
        AUTHTOKEN = "************";
        EMAIL = "user@zylker.com";
    
        class Program
        {
            public IReportClient getClient()
            {
                IReportClient RepClient = new ReportClient(AUTHTOKEN);
                return RepClient;
            }
    
            public void isdbexist(IReportClient rc)
            {
                try
                {
                    string uri = rc.GetURI(EMAIL);
                    bool result = rc.IsDbExist(uri, "Employee", null);
                    Console.WriteLine(result);
                }
                catch (Exception e)
                {
                    Console.WriteLine(e);
                }
            }
    
            static void Main(string[] args)
            {
                Program obj = new Program();
                IReportClient rc = obj.getClient();
                obj.isdbexist(rc);
            }
        }
    }
    
    package main
    
    import (
            "fmt"
            "zoho/pkg/reportclient"
    
    )
    
    var(
            email = "user@zylker.com
    .com"
            authtoken = "************"
    )
    
    func isdbexist(){
            url := reportclient.GetUserUri(email)
            databasename := "Employee"
            params := map[string]string{}
            result , err := reportclient.IsDbExist(url, databasename, params)
            if(err != nil){
            fmt.Println(err.ErrorMessage)
            fmt.Println(err.ErrorCode)
            fmt.Println(err.Action)
            fmt.Println(err.HttpStatusCode)
            }else{
            fmt.Println(result)
            }
    }
    
    func main() {
            reportclient.SetAuthToken(authtoken)
            isdbexist()
    }
    
    import com.adventnet.zoho.client.report.*;
    
    public class Sample 
    {
        String email = "user@zylker.com";
        String authtoken = "************";
    
        private ReportClient rc = new ReportClient(authtoken);
        rc.setIamServerURL("https://<hostname>:<webclientport>/iam");
        rc.setReportServerURL("https://<hostname>:<webclientport>");
    
        public void isdbexist() throws Exception
        {
            String uri = rc.getURI(email);
            boolean result = rc.isDbExist(uri, "Dummy", null);
        }
    
        public static void main(String[] args) throws Exception 
        {
            Sample obj = new Sample();
            obj.isdbexist();
        }
    }
    
    <?php
        require 'ReportClient.php';
    
        $EMAIL_ID = "abc@zylker.com";
        $AUTHTOKEN = "************";
    
        $report_client_request = new ReportClient($AUTHTOKEN); 
    
        $uri = $request->getUserURI($EMAIL_ID);
        $dbname = "<db-name>";
        $result = $request->isDbExist($uri, $dbname);
    ?>
    
    from __future__ import with_statement
    from ReportClient import ReportClient
    import sys
    
    class Sample:
    
        LOGINEMAILID="abc@zylker.com
    .com"
        AUTHTOKEN="************"
        rc = None
        rc = ReportClient(self.AUTHTOKEN)
    
        def isdbexist(self,rc):
        uri = rc.getUserURI(self.LOGINEMAILID)
        dbname = "Dummy"
        result = rc.isDbExist(uri,dbname)
        print result
    
    obj = Sample()
    obj.isdbexist(obj.rc)
    
    curl -d "ZOHO_ACTION=ISDBEXIST&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
             &ZOHO_API_VERSION=1.0&authtoken=************&ZOHO_DB_NAME=dummy
             https://<hostname>:<webclientport>/api/abc@zylker.com
    
    

    Sample Response XML Format:

    <?xml version="1.0" encoding="UTF-8" ?>
    <response uri="/api/user@zylker.com
    .com" action="ISDBEXIST">
        <result>
            <isdbexist>true</isdbexist>
        </result>
    </response>
    
    

    Sample Response JSON Format:

    {
      "response": {
        "uri": "/api/user@zylker.com
    .com",
        "action": "ISDBEXIST",
        "result": {
          "isdbexist": "true"
        }
      }
    }
    
    

    The Isdbexist API is used to check wheather the workspace is exist or not in Zoho Analytics Account. The Server Administrator and the Workspace Owner alone can use this API to get check workspace in the Zoho Analytics account.

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>

    Common Parameters

    Parameter Name Possible Values Description
    ZOHO_ACTION ISDBEXIST 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    ZOHO_API_VERSION 1.0 The API version of Zoho Analytics based on which the application(/service) has been written. This parameter allows Zoho Analytics to handle applications based on the older versions.The current API version is 1.0.

    Action Specific Parameters

    Parameter Name Possible Values Description
    ZOHO_DB_NAME
    (mandatory)
    <workspacename> This parameter holds the name of the workspace

    POSSIBLE ERROR CODES IN IS WORKSPACE EXIST

    8504, 8506, 8516, 8533

    Get Workspace Key

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

    Sample Request:

    using ZReports;
    
    namespace Test
    {
        AUTHTOKEN = "************";
        EMAIL = "user@zylker.com";
        DBNAME = "EmployeeDB";
    
        class Program
        {
            public IReportClient getClient()
            {
                IReportClient RepClient = new ReportClient(AUTHTOKEN);
                return RepClient;
            }
    
            public void copyDatabaseKey(IReportClient RepClient)
            {
                string dbURI = RepClient.GetURI(EMAIL, DBNAME);
                string key = RepClient.GetCopyDBKey(dbURI, null);
            }
    
            static void Main(string[] args)
            {
                Program obj = new Program();
                IReportClient rc = obj.getClient();
                obj.copyDatabaseKey(rc);
            }
        }
    }
    
    package main
    
    import (
            "fmt"
            "zoho/pkg/reportclient"
    
    )
    
    var(
            email = "user@zylker.com
    .com"
            dbname = "Employee"
            authtoken = "************"
            dbkey = "d6e443b4dc3cas421fcc54ff81cd3ad3"
    )
    
    func getcopydbkey() {
        url := reportclient.GetDbUri(email, dbname)
        dbkey , err := reportclient.GetCopyDbKey(url)
        if(err != nil){
            fmt.Println(err.ErrorMessage)
            fmt.Println(err.ErrorCode)
            fmt.Println(err.Action)
            fmt.Println(err.HttpStatusCode)
        }else{
            fmt.Println(dbkey)
        }
    }
    
    func main() {
            reportclient.SetAuthToken(authtoken)
            getcopydbkey()
    }
    
    import com.adventnet.zoho.client.report.*;
    
    public class Sample 
    {
        String email = "user@zylker.com";
        String dbname = "EmployeeDB";
        String authtoken = "************";
        Map config = new HashMap();
    
        private ReportClient rc = new ReportClient(authtoken);
        rc.setIamServerURL("https://<hostname>:<webclientport>/iam");
        rc.setReportServerURL("https://<hostname>:<webclientport>");
    
        public void copydatabasekey() throws Exception
        {
            String uri = rc.getURI(email,dbname);
            String key = rc.getCopyDBKey(uri, null);
        }
    
        public static void main(String[] args) throws Exception 
        {
            Sample obj = new Sample();
            obj.copydatabasekey();
        }
    }
    
    <?php
        require 'ReportClient.php';
    
        $EMAIL_ID = "abc@zylker.com";
        $DB_NAME = "EmployeeDB";
        $AUTHTOKEN = "************";
    
        $report_client_request = new ReportClient($AUTHTOKEN); 
    
        $uri = $request->getDbURI($EMAIL_ID, $DB_NAME);
        $database_key = $request->getCopyDbKey($uri);
    ?>
    
    from __future__ import with_statement
    from ReportClient import ReportClient
    import sys
    
    class Sample:
    
        LOGINEMAILID="abc@zylker.com
    .com"
        AUTHTOKEN="************"
        DATABASENAME="Employee"
        rc = None
        rc = ReportClient(self.AUTHTOKEN)
    
        def CopyDatabaseKey(self,rc):
            uri = rc.getDBURI(self.LOGINEMAILID,self.DATABASENAME)
            result = rc.getCopyDBKey(self,uri)
    
    obj = Sample()
    obj.CopyDatabaseKey(obj.rc)
    
    curl -d "ZOHO_ACTION=GETCOPYDBKEY&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
             &ZOHO_API_VERSION=1.0&authtoken=f7d016b46be2ewcd4cfa32a592f40101
             https://<hostname>:<webclientport>/api/abc@zylker.com/Employee
    
    
    

    Sample Response XML Format:

    <?xml version="1.0" encoding="UTF-8" ?>
    <response uri="/api/user@zylker.com
    .com/Auto-Copy" action="GETCOPYDBKEY">
        <result>
            <copydbkey>42005e8f0a6804c8adfdffeda24d4f92</copydbkey>
        </result>
    </response>
    
    

    Sample Response JSON Format:

    {
      "response": {
        "uri": "/api/user@zylker.com
    .com/Auto-Copy",
        "action": "GETCOPYDBKEY",
        "result": {
          "copydbkey": "42005e8f0a6804aadawf3fada24d4f92"
        }
      }
    }
    
    

    The Copy Workspace Key API is used to copy the workspace key.

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<Workspacename>

    Common Parameters

    Parameter Name Possible Values Description
    ZOHO_ACTION GETCOPYDBKEY 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    ZOHO_API_VERSION 1.0 The API version of Zoho Analytics based on which the application(/service) has been written. This parameter allows Zoho Analytics to handle applications based on the older versions.The current API version is 1.0.

    POSSIBLE ERROR CODES IN GET WORKSPACE KEY

    7102, 7103, 8504, 8506, 8516, 8533

    Get View Name

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

    Sample Request:

    using ZReports;
    
    namespace Test
    {
        AUTHTOKEN = "************";
        EMAIL = "user@zylker.com";
        OBJID = 1148746037400004006;
    
        class Program
        {
            public IReportClient getClient()
            {
                IReportClient RepClient = new ReportClient(AUTHTOKEN);
                return RepClient;
            }
    
            public void getviewname(IReportClient rc)
            {
                string uri = rc.GetURI(EMAIL);
                string result = rc.GetViewName(uri, OBJID, null);
                Console.WriteLine(result);
            }
    
            static void Main(string[] args)
            {
                Program obj = new Program();
                IReportClient rc = obj.getClient();
                obj.getviewname(rc);
            }
        }
    }
    
    package main
    
    import (
            "fmt"
            "zoho/pkg/reportclient"
    
    )
    
    var(
            email = "user@zylker.com
    .com"
            authtoken = "************"
            objid = "1148746000000004006"
    )
    
    func getviewname() {
            url := reportclient.GetUserUri(email)
            viewname , err := reportclient.GetViewname(url, objid)
            if(err != nil){
                    fmt.Println(err.ErrorMessage)
                    fmt.Println(err.ErrorCode)
                    fmt.Println(err.Action)
                    fmt.Println(err.HttpStatusCode)
            }else{
                    fmt.Println(viewname)
            }
    }
    
    func main() {
            reportclient.SetAuthToken(authtoken)
            getviewname()
    }
    
    import com.adventnet.zoho.client.report.*;
    
    public class Sample 
    {
        String email = "user@zylker.com";
        String dbname = "EmployeeDB";
        String authtoken = "************";
        long objid = 1148746000033204006L;
        Map config = new HashMap();
    
        private ReportClient rc = new ReportClient(authtoken);
        rc.setIamServerURL("https://<hostname>:<webclientport>/iam");
        rc.setReportServerURL("https://<hostname>:<webclientport>");
    
        public void getviewname() throws Exception
        {
            String uri = rc.getURI(email,dbname);
            String result =  rc.getViewName(uri,objid,config);
            System.out.println(result);
        }
    
        public static void main(String[] args) throws Exception 
        {
            Sample obj = new Sample();
            obj.getviewname();
        }
    }
    
    <?php
        require 'ReportClient.php';
    
        $EMAIL_ID = "abc@zylker.com";
        $AUTHTOKEN = "************";
    
        $report_client_request = new ReportClient($AUTHTOKEN);
    
        $uri = $report_client_request->getUserURI($EMAIL_ID);
        $objid = 1148746000000001206;
        $view_name = $report_client_request->getViewName($uri, $objid);
    ?>
    
    from __future__ import with_statement
    from ReportClient import ReportClient
    import sys
    
    class Sample:
    
        LOGINEMAILID="abc@zylker.com
    .com"
        AUTHTOKEN="************"
        ODBID="1148746001230004001"
        rc = None
        rc = ReportClient(self.AUTHTOKEN)
    
        def getviewname(self,rc):
            uri = rc.getUserURI(self.LOGINEMAILID)
            result = rc.getViewName(uri,self.OBJID)
            print result
    
    obj = Sample()
    obj.getviewname(obj.rc)
    
    curl -d "ZOHO_ACTION=GETVIEWNAME&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
             &ZOHO_API_VERSION=1.0&authtoken=f7d016b46be276as3cfa32a592f40101
             &OBJID=1148746000000001206" 
             https://<hostname>:<webclientport>/api/abc@zylker.com
    
    

    Sample Response XML Format:

    <response uri="/api/abc@zylker.com" action="GETVIEWNAME">
        <viewname>Employee Details</viewname>
    </response>
    
    

    Sample Response JSON Format:

    {
        "response": 
        {
            "uri": "\/api\/abc@zylker.com",
            "action": "GETVIEWNAME",
            "result": 
            {
                "viewname": "Employee Details"
            } 
        }
    }
    

    This API returns the name of a view in Zoho Analytics given its View ID as input. View ID's are unique identifiers that is associated with each view (tables, reports and dashboards) that is created in Zoho Analytics.

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>

    Common Parameters

    Parameter Name Possible Values Description
    ZOHO_ACTION GETVIEWNAME 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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.

    Action Specific Parameters:

    Parameter Name Possible Values Description
    OBJID
    (mandatory)
    A Long number like 9999999999999 The ID of the view which can be taken from the corresponding view URL.

    POSSIBLE ERROR CODES IN GET VIEW NAME

    7104, 7106, 8504, 8506, 8516, 8533

    Is View Exist

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



    Sample Request:

    curl -d "ZOHO_ACTION=ISVIEWEXIST&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML&
        ZOHO_API_VERSION=1.0&ZOHO_VIEW_NAME=View Name&authtoken=************" 
        https://<hostname>:<webclientport>/api/EmailAddress/WorkspaceName
    

    Sample Response XML Format:

    <response uri="/api/EmailAddress/WorkspaceName" action="ISVIEWEXIST">
    <result>
    <isviewexist>true</isviewexist>
    </result>
    </response>
    

    Sample Response JSON Format:

    {
        "response": {
            "uri": "\/api\/EmailAddress\/WorkspaceName",
            "action": "ISVIEWEXIST",
            "result": {
                "isviewexist": "true"
            }
        }
    }
    

    The Is View Exist API is used to check whether the View is exists or not in the paticular workspace of Zoho Analytics Account.

    request uri

    https://<hostname>:<webclientport>/api/OwnerEmailAddress/WorkspaceName

    COMMON PARAMETERS

    Parameter Name Possible Values Description
    ZOHO_ACTION ISVIEWEXIST 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user to access the Zoho Account.
    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.

    ACTION SPECIFIC PARAMETERS

    Parameter Name Possible Values Description
    ZOHO_VIEW_NAME
    (mandatory)
    <viewname> This parameter holds the name of the View.

    Possible Error Codes In Is View Exist

    7103 , 8504 , 8506 , 8516 , 8533

    Is Column Exist

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



    Sample Request:

    curl -d "ZOHO_ACTION=ISCOLUMNEXIST&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML&
        ZOHO_API_VERSION=1.0&ZOHO_COLUMN_NAME=Column_Name&authtoken=************" 
        https://<hostname>:<webclientport>/api/EmailAddress/WorkspaceName/TableName
    

    Sample Response XML Format:

    <response uri="/api/EmailAddress/WorkspaceName/TableName" action="ISCOLUMNEXIST">
    <result>
    <iscolumnexist>true</iscolumnexist>
    </result>
    </response>
    

    Sample Response JSON Format:

    {
        "response": {
            "uri": "\/api\/EmailAddress\/WorkspaceName\/TableName",
            "action": "ISCOLUMNEXIST",
            "result": {
                "iscolumnexist": "true"
            }
        }
    }
    

    The Is Column Exist API is used to check whether the Column exists or not in the paticular table of workspace on Zoho Analytics Account.

    request uri

    https://<hostname>:<webclientport>/api/OwnerEmailAddress/WorkspaceName/TableName

    COMMON PARAMETERS

    Parameter Name Possible Values Description
    ZOHO_ACTION ISCOLUMNEXIST 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user to access the Zoho Account.
    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.

    ACTION SPECIFIC PARAMETERS

    Parameter Name Possible Values Description
    ZOHO_COLUMN_NAME
    (mandatory)
    <columnname> This parameter holds the name of the Column.

    Possible Error Codes In Is Column Exist

    7103 , 7104 , 7138 , 8504 , 8506 , 8516 , 8533

    Get Info

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

    Sample Request:

    using ZReports;
    
    namespace Test
    {
        AUTHTOKEN = "************";
        EMAIL = "user@zylker.com";
        DBNAME = "EmployeeDB";
        TBNAME = "EmployeeTB";
    
        class Program
        {
            public IReportClient getClient()
            {
                IReportClient RepClient = new ReportClient(AUTHTOKEN);
                return RepClient;
            }
    
            public void getinfo(IReportClient rc)
            {
                string uri = rc.GetURI(EMAIL, DBNAME, TBNAME);
                var result = rc.GetInfo(uri, null);
                foreach (KeyValuePair<string, long> kvp in result)
                {
                    Console.WriteLine(kvp.Key + " " + kvp.Value);
                }
            }
    
            static void Main(string[] args)
            {
                Program obj = new Program();
                IReportClient rc = obj.getClient();
                obj.getinfo(rc);
            }
        }
    }
    
    package main
    
    import (
            "fmt"
            "zoho/pkg/reportclient"
    
    )
    
    var(
            email = "user@zylker.com
    .com"
            dbname = "Employee"
            tbname = "sample"
            authtoken = "************"
    )
    
    func getinfo() {
            url := reportclient.GetUri(email, dbname, tbname)
            info , err := reportclient.GetInfo(url)
            if(err != nil){
                    fmt.Println(err.ErrorMessage)
                    fmt.Println(err.ErrorCode)
                    fmt.Println(err.Action)
                    fmt.Println(err.HttpStatusCode)
            }else{
                    fmt.Println(info)
            }
    }
    
    func main() {
            reportclient.SetAuthToken(authtoken)
            getinfo()
    }
    
    import com.adventnet.zoho.client.report.*;
    
    public class Sample 
    {
        String email = "user@zylker.com";
        String dbname = "EmployeeDB";
        String tbname = "EmployeeTB";
        String authtoken = "************";
        Map config = new HashMap();
    
        private ReportClient rc = new ReportClient(authtoken);
        rc.setIamServerURL("https://<hostname>:<webclientport>/iam");
        rc.setReportServerURL("https://<hostname>:<webclientport>");
    
        public void getinfo() throws Exception
        {
            String uri = rc.getURI(email,dbname,tbname);
            Map result =  rc.getInfo(uri,config);
            System.out.println(result);
        }
    
        public static void main(String[] args) throws Exception 
        {
            Sample obj = new Sample();
            obj.getinfo();
        }
    }
    
    <?php
        require 'ReportClient.php';
    
        $EMAIL_ID = "abc@zylker.com";
        $DB_NAME = "EmployeeDB";
        $TABLE_NAME = "EmployeeTB";
    
        $report_client_request = new ReportClient($AUTHTOKEN);
    
        $uri = $report_client_request->getURI($EMAIL_ID, $DB_NAME, $TABLE_NAME);
        $report_info = $report_client_request->getInfo($uri);
    ?>
    
    from __future__ import with_statement
    from ReportClient import ReportClient
    import sys
    
    class Sample:
    
        LOGINEMAILID="abc@zylker.com
    .com"
        AUTHTOKEN="************"
        DATABASENAME="Employee"
        TABLENAME="Employee"
        rc = None
        rc = ReportClient(self.AUTHTOKEN)
    
        def getinfo(self,rc):
            uri = rc.getURI(self.LOGINEMAILID,self.DATABASENAME,self.TABLENAME)
            result = rc.getInfo(uri)
            print result
    
    obj = Sample()
    obj.getinfo(obj.rc)
    
    curl -d "ZOHO_ACTION=GETINFO&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
             &ZOHO_API_VERSION=1.0&authtoken=************" 
             https://<hostname>:<webclientport>/api/abc@zylker.com/Employee/EmployeeDetails
    
    

    Sample Response XML Format:

    <response uri="/api/abc@zylker.com/Employee/EmployeeDetails" action="GETINFO">
        <objid>99999999999999</objid>
        <dbid>88888888888888</dbid>
    </response>
    
    

    Sample Response JSON Format:

    {
        "response": 
        {
            "uri": "\/api\/abc@zylker.com\/Employee\/EmployeeDetails",
            "action": "GETINFO",
            "result": 
            {
                "objid": "99999999999999",
                "dbid": "88888888888888"
            } 
        }
    }
    

    This API returns the Workspace ID (DBID) and View ID (OBJID) of the corresponding Workspace and View Name provided as input for the API.

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<Workspacename>/<Tablename>

    Common Parameters

    Parameter Name Possible Values Description
    ZOHO_ACTION GETINFO 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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.

    POSSIBLE ERROR CODES IN GET INFO

    7102, 7103, 7104, 8504, 8506, 8516, 8533

    Get View Info

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



    Sample Request:

    curl -d "ZOHO_ACTION=GETVIEWINFO&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
        &ZOHO_API_VERSION=1.0&authtoken=************
        &ZOHO_VIEW_ID=9999999999999999" 
        https://<hostname>:<webclientport>/api/EmailAddress/WorkspaceName
    

    Sample Response XML Format:

    <response uri="/api/EmailAddress/WorkspaceName" action="GETVIEWINFO">
    <result>
    <dbid>888888888888888</dbid>
    <viewname>Employee Details</viewname>
    <viewdesc>Description</viewdesc>
    <viewtype>0</viewtype>
    </result>
    </response>
    
    

    Sample Response JSON Format:

    {
        "response":
        {
            "uri":"\/api\/EmailAddress\/WorkspaceName",
            "action":"GETVIEWINFO",
            "result":
            {
                "dbId":"888888888888888",
                "viewName":"Employee Details",
                "viewDesc":"Description",
                "viewType":"0"
            }
        }
    }
    

    This API returns the basic information of a view in Zoho Analytics given its View ID as input. View ID’s are unique identifiers that is associated with each view (tables, reports and dashboards) that is created in Zoho Analytics.

    request uri

    https://<hostname>:<webclientport>/api/OwnerEmailAddress/WorkspaceName

    COMMON PARAMETERS

    Parameter Name Possible Values Description
    ZOHO_ACTION GETVIEWINFO 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user to access the Zoho Account.
    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

    ACTION SPECIFIC PARAMETERS

    Parameter Name Possible Values Description
    ZOHO_VIEW_ID
    (mandatory)
    A Long number like 9999999999999 The ID of the view which can be taken from the corresponding view URL.

    Possible Error Codes In Get View Info

    7103 , 7104 , 7106 , 8504 , 8506 , 8516 , 8533

    Recent Items

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



    Sample Request:

    curl -d "ZOHO_ACTION=RECENTITEMS&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
        &ZOHO_API_VERSION=1.0&authtoken=************" 
        https://<hostname>:<webclientport>/api/EmailAddress
    
    

    Sample Response XML Format:

    <response uri="/api/EmailAddress" action="RECENTITEMS">
    <result>
    <recentviews>
    <view id="9999999999999999999" type="0" name="Sales data" dbid="7777777777777777777" dbname="Sales" modtime="1551706430418"> </view>
    <view id="8888888888888888888" type="2" name="Sales Info" dbid="7777777777777777777" dbname="Sales" modtime="1551700629399"> </view>
    </recentviews>
    </result>
    </response>
    

    Sample Response JSON Format:

    {
        "response": {
            "uri": "\/api\/EmailAddress",
            "action": "RECENTITEMS",
            "result": {
                "recentviews": [{
                    "id": "9999999999999999999",
                    "type": 0,
                    "name": "Sales data",
                    "dbId": "7777777777777777777",
                    "dbName": "Sales",
                    "modTime": 1551706430418
                }, {
                    "id": "8888888888888888888",
                    "type": 2,
                    "name": "Sales Info",
                    "dbId": "7777777777777777777",
                    "dbName": "Sales",
                    "modTime": 1551700629399
                }]
            }
        }
    }
    

    Recent Items API is used to get the details on recently accessed views on the Zoho Analytics account.

    request uri

    https://<hostname>:<webclientport>/api/EmailAddress

    COMMON PARAMETERS

    Parameter Name Possible Values Description
    ZOHO_ACTION RECENTITEMS 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user to access the Zoho Account.
    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.

    Possible Error Codes In Recent Items

    8504 , 8506 , 8516 , 8533

    Get Dashboards

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



    Sample Request:

    curl -d "ZOHO_ACTION=GETDASHBOARDS&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
        &ZOHO_API_VERSION=1.0&authtoken=************" 
        https://<hostname>:<webclientport>/api/EmailAddress
    
    

    Sample Response XML Format:

    <response uri="/api/EmailAddress" action="GETDASHBOARDS">
    <result>
    <dashboards>
    <dashboard id="7777777777777777777" name="Employee Dashboards" desc="Description" dbid="6666666666666666666" dbname="Employee" ownerzuid="111111111" createdTime="1533642808216" modifiedTime="1541249119000"> </dashboard>
    <dashboard id="8888888888888888888" name="Sales Analysis Dashboards" desc="A complete analysis on Sales" dbid="9999999999999999999" dbname="Sales" ownerzuid="111111111" createdTime="1548914487999" modifiedTime="1548914487999"> </dashboard>
    </dashboards>
    </result>
    </response>
    

    Sample Response JSON Format:

    {
        "response": {
            "uri": "\/api\/EmailAddress",
            "action": "GETDASHBOARDS",
            "result": {
                "dashboards": [{
                    "id": "7777777777777777777",
                    "name": "Employee Dashboards",
                    "desc": "Description",
                    "dbId": "6666666666666666666",
                    "dbName": "Employee",
                    "ownerZuid": 111111111,
                    "createdTime": 1533642808216,
                    "modifiedTime": 1541249119000
                }, {
                    "id": "8888888888888888888",
                    "name": "Sales Analysis Dashboards",
                    "desc": "A complete analysis on Sales",
                    "dbId": "9999999999999999999",
                    "dbName": "Sales",
                    "ownerZuid": 111111111,
                    "createdTime": 1548914487999,
                    "modifiedTime": 1548914487999
                }]
            }
        }
    }
    

    Get Dashboards API is used to fetch all the owned/shared dashboards present in the Zoho Analytics account.

    request uri

    https://<hostname>:<webclientport>/api/EmailAddress

    COMMON PARAMETERS

    Parameter Name Possible Values Description
    ZOHO_ACTION GETDASHBOARDS 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user to access the Zoho Account.
    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.

    ACTION SPECIFIC PARAMETERS

    Parameter Name Possible Values Description
    LIST_TYPE
    (optional)
    OWNED/SHARED/ALL By default it will be ALL.
  • OWNED - Gets the list of dashboards created by you on your Zoho Analytics account.
  • SHARED - Gets the list of dashboards shared to your Zoho Analytics account.
  • ALL - Gets the list of both owned and shared dashboards present in your Zoho Analytics account.
  • JSON Format

    Parameter Possible Values Description
    ZOHO_VALID_JSON
    (optional)
    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.

    Possible Error Codes In Get Dashboards

    8504 , 8506 , 8516 , 8533

    Error Codes in Metadata API

    This section explains about the error response sent from the Zoho Analytics server on failure of Metadata APIs. You can use this for appropriate error handling.

    Error Handling

    Sample error XML Format:

    
    <response uri="/api/abc@zylker.com/Employee" action="DATABASEMETADATA">
        <error> 
            <code>7103</code>
            <message>
            Workspace not found! Please check whether the workspace exists
            </message>
        </error>
    </response>
    
    

    Sample error JSON Format:

    {
        "response": 
        {
            "uri": "\/api\/abc@zylker.com\/Employee",
            "action": "DATABASEMETADATA",
            "error": 
            {
            "code":7103,
            "message": "Workspace not found! Please check whether the workspace exists"
            } 
        }
    }
    

    Error Codes

    Error Code Reason Solution
    7102 The workspace name specified in the API request URL is empty. Check the API Request URL and provide the Workspace Name.
    7103 The workspace name specified in the API request URL does not exist. Check the workspace name in the request URL and provide a valid workspace name.
    7104 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.
    7106 View i not present in the workspace. Provide a valid OBJID.
    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 onprem-support@zohoanalytics.com . Zoho Analytics will get back to you with the best possible solution.

    Sharing and Collaboration API

    This section provides APIs for sharing & collaboration. You can share views (reports & dashboards) created in Zoho Analytics with fine grained permission control to users through APIs. You can also manage sharing as well as remove sharing through APIs.

    Share View(s)

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

    Sample Request:

    using ZReports;
    
    namespace Test
    {
        AUTHTOKEN = "************";
        EMAIL = "user@zylker.com";
        DBNAME = "EmployeeDB";
    
        class Program
        {
            public IReportClient getClient()
            {
                IReportClient RepClient = new ReportClient(AUTHTOKEN);
                return RepClient;
            }
    
            public void shareview(IReportClient rc)
            {
                string uri = rc.GetURI(EMAIL, DBNAME);
                string emails = "user1@zylker.com";
                string views = "Employee";
                Dictionary<string, string> dic = new Dictionary<string, string>();
                dic.Add("ZOHO_READ", "true");
                rc.ShareView(uri, emails, views, dic);
            }
    
            static void Main(string[] args)
            {
                Program obj = new Program();
                IReportClient rc = obj.getClient();
                obj.shareview(rc);
            }
        }
    }
    
    package main
    
    import (
            "fmt"
            "zoho/pkg/reportclient"
    
    )
    
    var(
            email = "user@zylker.com
    .com"
            dbname = "Employee"
            authtoken = "************"
    )
    
    func shareview() {
            url := reportclient.GetDbUri(email, dbname)
            emailids := "user1@zylker.com"
            views := "view1"
            params := map[string]string{}
            params["ZOHO_READ"] = "true"
            err := reportclient.ShareView(url, emailids, views, params)
            if(err != nil){
                    fmt.Println(err.ErrorMessage)
                    fmt.Println(err.ErrorCode)
                    fmt.Println(err.Action)
                    fmt.Println(err.HttpStatusCode)
            }else{
                    fmt.Println("Success")
            }
    }
    
    func main() {
            reportclient.SetAuthToken(authtoken)
            shareview()
    }
    
    import com.adventnet.zoho.client.report.*;
    
    public class Sample 
    {
        String email = "user@zylker.com";
        String dbname = "EmployeeDB";
        String authtoken = "************";
        String emails = "abc@zylker.com";
        String views = "new";
        Map config = new HashMap();
    
        private ReportClient rc = new ReportClient(authtoken);
        rc.setIamServerURL("https://<hostname>:<webclientport>/iam");
        rc.setReportServerURL("https://<hostname>:<webclientport>");
    
        public void shareview() throws Exception
        {
            String uri = rc.getURI(email,dbname);
            config.put("ZOHO_READ", true);
            rc.shareView(uri,views,emails,config);
        }
    
        public static void main(String[] args) throws Exception 
        {
            Sample obj = new Sample();
            obj.shareview();
        }
    }
    
    <?php
        require 'ReportClient.php';
    
        $EMAIL_ID = "abc@zylker.com";
        $DB_NAME = "EmployeeDB";
        $AUTHTOKEN = "************";
    
        $report_client_request = new ReportClient($AUTHTOKEN); 
    
        $uri = $report_client_request->getDbURI($EMAIL_ID, $DB_NAME);
        $emails = "user@zylker.com";
        $views = "viewname";
        $criteria = NULL;
        $premissions = array('ZOHO_READ' => "true");
        $report_client_request->shareView($uri, $emails, $views, $criteria, $permissions);
    ?>
    
    from __future__ import with_statement
    from ReportClient import ReportClient
    import sys
    
    class Sample:
    
        LOGINEMAILID="abc@zylker.com"
        AUTHTOKEN="************"
        DATABASENAME="Employee"
        rc = None
        rc = ReportClient(self.AUTHTOKEN)
    
        def shareview(self,rc):
            uri = rc.getDBURI(self.LOGINEMAILID,self.DATABASENAME)
            permissions = {"ZOHO_READ":"true"}
            rc.shareView(uri,"user@zylker.com","Employee",None,permissions)
    
    obj = Sample()
    obj.shareview(obj.rc)
    
    curl -d "ZOHO_ACTION=SHARE&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML&
             ZOHO_API_VERSION=1.0&authtoken=f7d016bd23e276cd4cfa32a592f40101&
             ZOHO_VIEWS=new&ZOHO_EMAILS=abc@zylker.com&ZOHO_READ=true" 
             https://<hostname>:<webclientport>/api/abc@zylker.com/Employee
    
    

    Sample Response XML Format:

    <?xml version="1.0" encoding="UTF-8" ?>
    <response uri="/api/abc@zylker.com/EmployeeDB" action="SHARE">
        <result>success</result>
    </response>
    
    

    Sample Response JSON Format:

    {
        "response":
        {
            "uri": "/api/abc@zylker.com/EmployeeDB",
            "action": "SHARE",
            "result": "success"
        }
    }
    

    With the Zoho Analytics Share API, you can share the views (tables/reports/dashboards) created in Zoho Analytics with users. The Share API also allows you to the revoke sharing permission granted. It is recommended that you go through the documentation - Sharing and Collaboration, before using the API for better understanding.

    Note: Sharing permissions can be updated by calling 'Share' again (over riding the existing share permissions).

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<Workspacename>

    Common Parameters

    Parameter Possible Values Description
    ZOHO_ACTION SHARE 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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

    Action Specific Parameters

    Parameter Possible Values Description Remarks
    ZOHO_VIEWS Table1,View1,View2,My View List of views which are to be shared. Multiple views can be shared by providing them separated by comma.
    Note: ZOHO_VIEWS is encoded in URL encoding format. Value without encoding is given below:
    ZOHO_VIEWS=Table1,View1,View2,My View
    Mandatory Parameter
    ZOHO_EMAILS user1@finepick.com, user2@finepick.com User email addresses as comma separated values to whom the views need to be shared.
    Note: ZOHO_EMAILS is encoded in URL encoding format. Value without encoding is given below:
    ZOHO_EMAILS=user1@finepick.com,user2@finepick.com
    Mandatory Parameter

    POST parameters for fine-grained permissions (At least one parameter is required from the below)

    Parameter Allowed Values Default value Description
    ZOHO_READ true or false false Read Access to the view
    ZOHO_EXPORT true or false false Export permission for a view
    ZOHO_VUD true or false false Permission to view underlying data in a Chart / Pivot / Summary view
    ZOHO_DRILLDOWN true or false false Permission to drill down in a Chart
    ZOHO_ADDROW true or false false Permission to add a row in the table
    ZOHO_UPDATEROW true or false false Permission to update a row in the table
    ZOHO_DELETEROW true or false false Permission to delete a row in the table
    ZOHO_DELETEALLROWS true or false false Permission to delete all rows in the table
    ZOHO_IMPORT_APPEND true or false false Permission to import data into the table using APPEND option
    ZOHO_IMPORT_ADDORUPDATE true or false false Permission to import data into the table using ADD or UPDATE option i.e new rows will be appended and existing rows will be updated based on the matching columns provided in IMPORT action
    ZOHO_IMPORT_DELETEALLADD true or false false Permission to import data into the table using the option: deleting all the existing records and adding the new records
    ZOHO_SHARE true or false false Permission to share the table / view to others

    Other Parameters

    Parameter Allowed Values Default Value Description Remarks
    ZOHO_CRITERIA Filter Criteria should be specified in the format as given in the example below. It is similar to a WHERE clause in SQL languages. Read More ZOHO_CRITERIA:
    This parameter allows you to apply a filter criteria while sharing a view to users. The specified criteria will be applied on the reports shared, there by filtering the data viewed, when the report is accessed by the shared user.
    Refer the below link to use ZOHO_CRITERIA:
    Criteria
    ZOHO_INHERIT_PARENT_CRITERIA true or false false This is valid only for reports(not tables). If true, then its parent tables' criteria is also taken into account while sharing
    ZOHO_INVITE_MAIL true or false false Whether to send an invitation mail on sharing
    ZOHO_MAIL_SUBJECT Required only if ZOHO_INVITE_MAIL is true
    ZOHO_MAIL_MESSAGE
    ZOHO_INVITE_MAIL_CCME true or false false Whether to CC the invitation mail to you on sharing This parameter is valid only if ZOHO_INVITE_MAIL is true

    POSSIBLE ERROR CODES IN SHARE VIEW

    7103, 8026, 8027, 8504, 8506, 8509, 8516, 8533

    Remove Sharing

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

    Sample Request:

    using ZReports;
    
    namespace Test
    {
        AUTHTOKEN = "************";
        EMAIL = "user@zylker.com";
        DBNAME = "EmployeeDB";
    
        class Program
        {
            public IReportClient getClient()
            {
                IReportClient RepClient = new ReportClient(AUTHTOKEN);
                return RepClient;
            }
    
            public void removeshare(IReportClient rc)
            {
                string uri = rc.GetURI(EMAIL, DBNAME);
                string emails = "user1@zylker.com";
                Dictionary<string, string> dic = new Dictionary<string, string>();
                dic.Add("ZOHO_VIEWS", "Employee"); 
                rc.RemoveShare(uri, emails,dic);
            }
    
            static void Main(string[] args)
            {
                Program obj = new Program();
                IReportClient rc = obj.getClient();
                obj.removeshare(rc);
            }
        }
    }
    
    package main
    
    import (
            "fmt"
            "zoho/pkg/reportclient"
    
    )
    
    var(
            email = "user@zylker.com
    .com"
            dbname = "Employee"
            authtoken = "************"
    )
    
    func removeshare() {
            url := reportclient.GetDbUri(email, dbname)
            emailids := "user1@zylker.com"
            params := map[string]string{}
            params["ZOHO_ALLVIEWS"] = "true"
            err := reportclient.RemoveShare(url, emailids, params)
            if(err != nil){
                    fmt.Println(err.ErrorMessage)
                    fmt.Println(err.ErrorCode)
                    fmt.Println(err.Action)
                    fmt.Println(err.HttpStatusCode)
            }else{
                    fmt.Println("Success")
            }
    }
    
    func main() {
            reportclient.SetAuthToken(authtoken)
            removeshare()
    }
    
    import com.adventnet.zoho.client.report.*;
    
    public class Sample 
    {
        String email = "user@zylker.com";
        String dbname = "EmployeeDB";
        String authtoken = "************";
        String emails = "abc@zylker.com";
        Map config = new HashMap();
    
        private ReportClient rc = new ReportClient(authtoken);
        rc.setIamServerURL("https://<hostname>:<webclientport>/iam");
        rc.setReportServerURL("https://<hostname>:<webclientport>");
    
        public void removeshare() throws Exception
        {
            String uri = rc.getURI(email,dbname);
            config.put("ZOHO_ALLVIEWS", true);
            rc.removeShare(uri,emails,config);
        }
    
        public static void main(String[] args) throws Exception 
        {
            Sample obj = new Sample();
            obj.removeshare();
        }
    }
    
    <?php
        require 'ReportClient.php';
    
        $EMAIL_ID = "abc@zylker.com";
        $DB_NAME = "EmployeeDB";
        $AUTHTOKEN = "************";
    
        $report_client_request = new ReportClient($AUTHTOKEN);
    
        $uri = $report_client_request->getDbURI($EMAIL_ID, $DB_NAME);
        $emails = "user@zylker.com";
        $permissions = array('ZOHO_ALLVIEWS' => "true");
        $report_client_request->removeShare($uri, $emails, $permissions);
    ?>
    
    from __future__ import with_statement
    from ReportClient import ReportClient
    import sys
    
    class Sample:
    
        LOGINEMAILID="abc@zylker.com"
        AUTHTOKEN="************"
        DATABASENAME="Employee"
        rc = None
        rc = ReportClient(self.AUTHTOKEN)
    
        def removeshare(self,rc):
            uri = rc.getDBURI(self.LOGINEMAILID,self.DATABASENAME)
            params = {"ZOHO_ALLVIEWS":"true"}
            rc.removeShare(uri,"user@zylker.com",params)
    
    obj = Sample()
    obj.removeshare(obj.rc)
    
    curl -d "ZOHO_ACTION=REMOVESHARE&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML&
             ZOHO_API_VERSION=1.0&authtoken=f7d016b46be2sw2d4cfa32a592f40101&
             ZOHO_EMAILS=abc@zylker.com&ZOHO_ALLVIEWS=true" 
             https://<hostname>:<webclientport>/api/abc@zylker.com/Employee
    
    

    Sample Response XML Format:

    <?xml version="1.0" encoding="UTF-8" ?>
    <response uri="/api/abc@zylker.com/EmployeeDB" action="REMOVESHARE">
        <result>success</result>
    </response>
    
    

    Sample Response JSON Format:

    {
        "response":
        {
            "uri": "/api/abc@zylker.com/EmployeeDB",
            "action": "REMOVESHARE",
            "result": "success"
        }
    }
    

    With the Zoho Analytics Workspace Owner API, you can add / remove the workspace owners. It is recommended that you go through the documentation on Multiple Workspace Owners, before using the API for better understanding.

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<Workspacename>

    Common Parameters

    Parameter Possible Values Description
    ZOHO_ACTION REMOVESHARE 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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

    Action Specific Parameters

    Parameter Possible Values Default Value Description Remarks
    ZOHO_VIEWS Table1,View1,View2,My View Views whose sharing need to be removed. Multiple views can be passed using comma separator.
    Note: ZOHO_VIEWS is encoded in URL encoding format. Value without encoding is given below:
    ZOHO_VIEWS=Table1,View1,View2,My View
    Any one of the parameter (ZOHO_VIEWS or ZOHO_ALLVIEWS) is a mandatory Parameter.
    ZOHO_ALLVIEWS true or false false If true passed to this parameter it will remove the sharing for all the views which are shared to the corresponding users
    (users identified by the email addresses passed in the parameter ZOHO_EMAILS)
    Any one of the parameter (ZOHO_VIEWS or ZOHO_ALLVIEWS) is a mandatory Parameter.
    ZOHO_EMAILS user1@finepick.com, user2@finepick.com User email addresses as comma separated values to whom the sharing need to be removed for the specified views
    Note: ZOHO_EMAILS is encoded in URL encoding format. Value without encoding is given below:
    ZOHO_EMAILS=user1@finepick.com,user2@finepick.com
    Mandatory Parameter

    POSSIBLE ERROR CODES IN REMOVE SHARE

    7003, 7103, 8027, 8504, 8506, 8509, 8516, 8533

    Add Workspace Owner

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

    Sample Request:

    using ZReports;
    
    namespace Test
    {
        AUTHTOKEN = "************";
        EMAIL = "user@zylker.com";
        DBNAME = "EmployeeDB";
    
        class Program
        {
            public IReportClient getClient()
            {
                IReportClient RepClient = new ReportClient(AUTHTOKEN);
                return RepClient;
            }
    
            public void adddbowner(IReportClient rc)
            {
                string uri = rc.GetURI(EMAIL, DBNAME);
                string emails = "user@zylker.com";
                rc.AddDbOwner(uri, emails, null);
            }
    
            static void Main(string[] args)
            {
                Program obj = new Program();
                IReportClient rc = obj.getClient();
                obj.adddbowner(rc);
            }
        }
    }
    
    package main
    
    import (
            "fmt"
            "zoho/pkg/reportclient"
    
    )
    
    var(
            email = "user@zylker.com"
            dbname = "Employee"
            authtoken = "************"
    )
    
    func adddbowner() {
            url := reportclient.GetDbUri(email, dbname)
            emailids := "user1@zylker.com"
            params := map[string]string{}
            err := reportclient.AddDbOwner(url, emailids, params)
            if(err != nil){
                    fmt.Println(err.ErrorMessage)
                    fmt.Println(err.ErrorCode)
                    fmt.Println(err.Action)
                    fmt.Println(err.HttpStatusCode)
            }else{
                    fmt.Println("Success")
            }
    }
    
    func main() {
            reportclient.SetAuthToken(authtoken)
            adddbowner()
    }
    
    import com.adventnet.zoho.client.report.*;
    
    public class Sample 
    {
        String email = "user@zylker.com";
        String dbname = "EmployeeDB";
        String authtoken = "************";
        String emails = "abc@zylker.com";
        Map config = new HashMap();
    
        private ReportClient rc = new ReportClient(authtoken);
        rc.setIamServerURL("https://<hostname>:<webclientport>/iam");
        rc.setReportServerURL("https://<hostname>:<webclientport>");
    
        public void adddbowner() throws Exception
        {
            String uri = rc.getURI(email,dbname);
            rc.addDbOwner(uri,emails,config);
        }
    
        public static void main(String[] args) throws Exception 
        {
            Sample obj = new Sample();
            obj.adddbowner();
        }
    }
    
    <?php
        require 'ReportClient.php';
    
        $EMAIL_ID = "abc@zylker.com";
        $DB_NAME = "EmployeeDB";
        $AUTHTOKEN = "************";
    
        $report_client_request = new ReportClient($AUTHTOKEN); 
    
        $uri = $report_client_request->getDbURI($EMAIL_ID, $DB_NAME);
        $emails = "user@zylker.com";
        $report_client_request->addDbOwner($uri, $emails);
    ?>
    
    from __future__ import with_statement
    from ReportClient import ReportClient
    import sys
    
    class Sample:
    
        LOGINEMAILID="abc@zylker.com"
        AUTHTOKEN="************"
        DATABASENAME="Employee"
        rc = None
        rc = ReportClient(self.AUTHTOKEN)
    
        def adddbowner(self,rc):
            uri = rc.getDBURI(self.LOGINEMAILID,self.DATABASENAME)
            rc.addDbOwner(uri,"user@zylker.com")
    
    obj = Sample()
    obj.adddbowner(obj.rc)
    
    curl -d "ZOHO_ACTION=ADDDBOWNER&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
             &ZOHO_API_VERSION=1.0&authtoken=************
             &ZOHO_EMAILS=user@zylker.com" 
             https://<hostname>:<webclientport>/api/abc@zylker.com/EmployeeDB
    
    

    Sample Response XML Format:

    <?xml version="1.0" encoding="UTF-8" ?>
    <response uri="/api/abc@zylker.com/EmployeeDB" action="ADDDBOWNER">
        <result>success</result>
    </response>
    
    

    Sample Response JSON Format:

    {
        "response":
        {
            "uri": "/api/abc@zylker.com/EmployeeDB",
            "action": "ADDDBOWNER",
            "result": "success"
        }
    }
    

    This api used to add workspace owner for the particular workspace.

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<Workspacename>

    Common Parameters

    Parameter Possible Values Description
    ZOHO_ACTION ADDDBOWNER 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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

    Action Specific Parameters

    Parameter Possible Values Default Value Description Remarks
    ZOHO_EMAILS user1@finepick.com, user2@finepick.com User email addresses as comma separated values to whom the sharing need to be removed for the specified views
    Note: ZOHO_EMAILS is encoded in URL encoding format. Value without encoding is given below:
    ZOHO_EMAILS=user1@finepick.com,user2@finepick.com
    Mandatory Parameter

    Other Parameters

    Parameter Allowed Values Default Value Description Remarks
    ZOHO_INVITE_MAIL true or false false Whether to send an invitation mail on sharing
    ZOHO_MAIL_SUBJECT Required only if ZOHO_INVITE_MAIL is true
    ZOHO_MAIL_MESSAGE

    POSSIBLE ERROR CODES IN ADD WORKSPACE OWNER

    7103, 8504, 8506, 8509, 8516, 8533

    Remove Workspace Owner

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

    Sample Request:

    using ZReports;
    
    namespace Test
    {
        AUTHTOKEN = "************";
        EMAIL = "user@zylker.com";
        DBNAME = "EmployeeDB";
    
        class Program
        {
            public IReportClient getClient()
            {
                IReportClient RepClient = new ReportClient(AUTHTOKEN);
                return RepClient;
            }
    
            public void removedbowner(IReportClient rc)
            {
                string uri = rc.GetURI(EMAIL, DBNAME);
                string emails = "user@zylker.com";
                rc.RemoveDbOwner(uri, emails, null);
            }
    
            static void Main(string[] args)
            {
                Program obj = new Program();
                IReportClient rc = obj.getClient();
                obj.removedbowner(rc);
            }
        }
    }
    
    package main
    
    import (
            "fmt"
            "zoho/pkg/reportclient"
    
    )
    
    var(
            email = "user@zylker.com"
            dbname = "Employee"
            authtoken = "************"
    )
    
    func removedbowner() {
            url := reportclient.GetDbUri(email, dbname)
            emailids := "user1@zylker.com"
            params := map[string]string{}
            err := reportclient.RemoveDbOwner(url, emailids, params)
            if(err != nil){
                    fmt.Println(err.ErrorMessage)
                    fmt.Println(err.ErrorCode)
                    fmt.Println(err.Action)
                    fmt.Println(err.HttpStatusCode)
            }else{
                    fmt.Println("Success")
            }
    }
    
    func main() {
            reportclient.SetAuthToken(authtoken)
            removedbowner()
    }
    
    import com.adventnet.zoho.client.report.*;
    
    public class Sample 
    {
        String email = "user@zylker.com";
        String dbname = "EmployeeDB";
        String authtoken = "************";
        String emails = "abc@zylker.com";
        Map config = new HashMap();
    
        private ReportClient rc = new ReportClient(authtoken);
        rc.setIamServerURL("https://<hostname>:<webclientport>/iam");
        rc.setReportServerURL("https://<hostname>:<webclientport>");
    
        public void removedbowner() throws Exception
        {
            String uri = rc.getURI(email,dbname);
            rc.removeDbOwner(uri,emails,config);
        }
    
        public static void main(String[] args) throws Exception 
        {
            Sample obj = new Sample();
            obj.removedbowner();
        }
    }
    
    <?php
        require 'ReportClient.php';
    
        $EMAIL_ID = "abc@zylker.com";
        $DB_NAME = "EmployeeDB";
        $AUTHTOKEN = "************";
    
        $report_client_request = new ReportClient($AUTHTOKEN); 
    
        $uri = $report_client_request->getDbURI($EMAIL_ID, $DB_NAME);
        $emails = "user@zylker.com";
        $report_client_request->removeDbOwner($uri, $emails);
    ?>
    
    from __future__ import with_statement
    from ReportClient import ReportClient
    import sys
    
    class Sample:
    
        LOGINEMAILID="abc@zylker.com"
        AUTHTOKEN="************"
        DATABASENAME="Employee"
        rc = None
        rc = ReportClient(self.AUTHTOKEN)
    
        def removedbowner(self,rc):
            uri = rc.getDBURI(self.LOGINEMAILID,self.DATABASENAME)
            rc.removeDbOwner(uri,"user@zylker.com")
    
    obj = Sample()
    obj.removedbowner(obj.rc)
    
    curl -d "ZOHO_ACTION=REMOVEDBOWNER&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
             &ZOHO_API_VERSION=1.0&authtoken=f7d016b46beas2cd4cfa32a592f40101
             &ZOHO_EMAILS=user@zylker.com" 
             https://<hostname>:<webclientport>/api/abc@zylker.com/EmployeeDB
    
    

    Sample Response XML Format:

    <?xml version="1.0" encoding="UTF-8" ?>
    <response uri="/api/abc@zylker.com/EmployeeDB" action="REMOVEDBOWNER">
        <result>success</result>
    </response>
    
    

    Sample Response JSON Format:

    {
        "response":
        {
            "uri": "/api/abc@zylker.com/EmployeeDB",
            "action": "REMOVEDBOWNER",
            "result": "success"
        }
    }
    

    This api used to remove workspace owner from the particular workspace.

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<Workspacename>

    Common Parameters

    Parameter Possible Values Description
    ZOHO_ACTION REMOVEDBOWNER 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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

    Action Specific Parameters

    Parameter Possible Values Default Value Description Remarks
    ZOHO_EMAILS user1@finepick.com, user2@finepick.com User email addresses as comma separated values to whom the sharing need to be removed for the specified views
    Note: ZOHO_EMAILS is encoded in URL encoding format. Value without encoding is given below:
    ZOHO_EMAILS=user1@finepick.com,user2@finepick.com
    Mandatory Parameter

    Other Parameters

    Parameter Allowed Values Default Value Description Remarks
    ZOHO_INVITE_MAIL true or false false Whether to send an invitation mail on sharing
    ZOHO_MAIL_SUBJECT Required only if ZOHO_INVITE_MAIL is true
    ZOHO_MAIL_MESSAGE

    POSSIBLE ERROR CODES IN REMOVE WORKSPACE OWNER

    7103, 8504, 8506, 8509, 8516, 8533

    Get Share Info

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

    Sample Request:

    using ZReports;
    
    namespace Test
    {
        AUTHTOKEN = "************";
        EMAIL = "user@zylker.com";
        DBNAME = "EmployeeDB";
    
        class Program
        {
            public IReportClient getClient()
            {
                IReportClient RepClient = new ReportClient(AUTHTOKEN);
                return RepClient;
            }
    
            public void getshareinfo(IReportClient rc)
            {
                string uri = rc.GetURI(EMAIL, DBNAME);
                var result = rc.GetShareInfo(uri, null);
                var list = result.GetGroupMembers();   
            }
    
            static void Main(string[] args)
            {
                Program obj = new Program();
                IReportClient rc = obj.getClient();
                obj.getshareinfo(rc);
            }
        }
    }
    
    package main
    
    import (
            "fmt"
            "zoho/pkg/reportclient"
    
    )
    
    var(
            email = "user@zylker.com"
            dbname = "Employee"
            tbname = "sample"
            authtoken = "************"
    )
    
    func getshareinfo() {
            url := reportclient.GetDbUri(email, dbname)
            shareinfo , err := reportclient.GetShareInfo(url)
            if(err != nil){
                    fmt.Println(err.ErrorMessage)
                    fmt.Println(err.ErrorCode)
                    fmt.Println(err.Action)
                    fmt.Println(err.HttpStatusCode)
            }else{
                    fmt.Println(shareinfo.GroupMembers)
                    fmt.Println(shareinfo.UserInfo)
            }
    }
    
    func main() {
            reportclient.SetAuthToken(authtoken)
            getshareinfo()
    }
    
    import com.adventnet.zoho.client.report.*;
    
    public class Sample 
    {
        String email = "user@zylker.com";
        String dbname = "EmployeeDB";
        String authtoken = "************";
        Map config = new HashMap();
    
        private ReportClient rc = new ReportClient(authtoken);
        rc.setIamServerURL("https://<hostname>:<webclientport>/iam");
        rc.setReportServerURL("https://<hostname>:<webclientport>");
    
        public void shareinfo() throws Exception
        {
            String uri = rc.getURI(email,dbname);
            Object shareinfoobj = rc.getShareInfo(uri,config);
        }
    
        public static void main(String[] args) throws Exception 
        {
            Sample obj = new Sample();
            obj.shareinfo();
        }
    }
    
    <?php
        require 'ReportClient.php';
    
        $EMAIL_ID = "abc@zylker.com";
        $DB_NAME = "EmployeeDB";
        $AUTHTOKEN = "************";
    
        $report_client_request = new ReportClient($AUTHTOKEN); 
    
        $uri = $report_client_request->getDbURI($EMAIL_ID, $DB_NAME);
        $report_client_response = $report_client_request->getShareInfo($uri);
    ?>
    
    from __future__ import with_statement
    from ReportClient import ReportClient
    import sys
    
    class Sample:
    
        LOGINEMAILID="abc@zylker.com"
        AUTHTOKEN="************"
        DATABASENAME="Employee"
        rc = None
        rc = ReportClient(self.AUTHTOKEN)
    
        def getshareinfo(self,rc):
            uri = rc.getDBURI(self.LOGINEMAILID,self.DATABASENAME)
            result = rc.getShareInfo(uri)
            print result.sharedUsers
    
    obj = Sample()
    obj.getshareinfo(obj.rc)
    
    curl -d "ZOHO_ACTION=GETSHAREINFO&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
             &ZOHO_API_VERSION=1.0&authtoken=************" 
             https://<hostname>:<webclientport>/api/abc@zylker.com/SalesDB
    
    

    Sample Response XML Format:

    <?xml version="1.0" encoding="UTF-8" ?>
    <response uri="/api/abc@zylker.com/SalesDB" action="GETSHAREINFO">
      <result>
          <usershareinfo>
            <shareinfo>
                <emailuser1@mydomain.com/email>
                    <permissions>
                        <perminfo viewname="Table1" sharedby="user@mydomain.com">
                            <permission>
                                <readtrue/read>
                                <exporttrue/export>
                                <vudfalse/vud>
                                <addrowfalse/addrow>
                                <updaterowfalse/updaterow>
                                <deleterowfalse/deleterow>
                                <deleteallrowsfalse/deleteallrows>
                                <appendimportfalse/appendimport>
                                <updateimportfalse/updateimport>
                                <truncateimportfalse/truncateimport>
                                <deleteupdateaddimportfalse/deleteupdateaddimport>
                                <sharefalse/share>
                            </permission>
                        </perminfo>
                    </permissions>
            </shareinfo>
            <shareinfo>
                <emailuser4@mydomain.com/email>
                    <permissions>
                        <perminfo viewname="Table1" sharedby="user@mydomain.com">
                            <permission>
                                <readtrue/read>
                                <exporttrue/export>
                                <vudfalse/vud>
                                <addrowfalse/addrow>
                                <updaterowfalse/updaterow>
                                <deleterowfalse/deleterow>
                                <deleteallrowsfalse/deleteallrows>
                                <appendimportfalse/appendimport>
                                <updateimportfalse/updateimport>
                                <truncateimportfalse/truncateimport>
                                <deleteupdateaddimportfalse/deleteupdateaddimport>
                                <sharefalse/share>
                            </permission>
                        </perminfo>
                    </permissions>
            </shareinfo>
            <shareinfo>
                <emailuser215@mydomain.com/email>
                    <permissions>
                        <perminfo viewname="finepick1" sharedby="user@mydomain.com">
                            <permission>
                                <readtrue/read>
                                <exportfalse/export>
                                <vudfalse/vud>
                                <addrowfalse/addrow>
                                <updaterowfalse/updaterow>
                                <deleterowfalse/deleterow>
                                <deleteallrowsfalse/deleteallrows>
                                <appendimportfalse/appendimport>
                                <updateimportfalse/updateimport>
                                <truncateimportfalse/truncateimport>
                                <deleteupdateaddimportfalse/deleteupdateaddimport>
                                <sharefalse/share>
                            </permission>
                        </perminfo>
                    </permissions>
            </shareinfo>
            <shareinfo>
                <emailuserlf12@mydomain.com/email>
                    <permissions>
                        <perminfo viewname="Parent" sharedby="user@mydomain.com">
                            <permission>
                                <readtrue/read>
                                <exportfalse/export>
                                <vudfalse/vud>
                                <addrowfalse/addrow>
                                <updaterowfalse/updaterow>
                                <deleterowfalse/deleterow>
                                <deleteallrowsfalse/deleteallrows>
                                <appendimportfalse/appendimport>
                                <updateimportfalse/updateimport>
                                <truncateimportfalse/truncateimport>
                                <deleteupdateaddimportfalse/deleteupdateaddimport>
                                <sharefalse/share>
                            </permission>
                        </perminfo>
                    </permissions>
            </shareinfo>
            <shareinfo>
                <emailuser33@mydomain.com/email>
                    <permissions>
                        <perminfo viewname="Parent" sharedby="user@mydomain.com">
                            <permission>
                                <readtrue/read>
                                <exportfalse/export>
                                <vudfalse/vud>
                                <addrowfalse/addrow>
                                <updaterowfalse/updaterow>
                                <deleterowfalse/deleterow>
                                <deleteallrowsfalse/deleteallrows>
                                <appendimportfalse/appendimport>
                                <updateimportfalse/updateimport>
                                <truncateimportfalse/truncateimport>
                                <deleteupdateaddimportfalse/deleteupdateaddimport>
                                <sharefalse/share>
                            </permission>
                        </perminfo>
                        <perminfo viewname="sss" sharedby="user@mydomain.com">
                            <permission>
                                <readtrue/read>
                                <exportfalse/export>
                                <vudfalse/vud>
                                <addrowfalse/addrow>
                                <updaterowfalse/updaterow>
                                <deleterowfalse/deleterow>
                                <deleteallrowsfalse/deleteallrows>
                                <appendimportfalse/appendimport>
                                <updateimportfalse/updateimport>
                                <truncateimportfalse/truncateimport>
                                <deleteupdateaddimportfalse/deleteupdateaddimport>
                                <sharefalse/share>
                            </permission>
                        </perminfo>
                        <perminfo viewname="Table1" sharedby="user@mydomain.com">
                            <permission>
                                <readtrue/read>
                                <exportfalse/export>
                                <vudfalse/vud>
                                <addrowfalse/addrow>
                                <updaterowfalse/updaterow>
                                <deleterowfalse/deleterow>
                                <deleteallrowsfalse/deleteallrows>
                                <appendimportfalse/appendimport>
                                <updateimportfalse/updateimport>
                                <truncateimportfalse/truncateimport>
                                <deleteupdateaddimportfalse/deleteupdateaddimport>
                                <sharefalse/share>
                            </permission>
                        </perminfo>
                    </permissions>
            </shareinfo>
            <shareinfo>
                <emailuser1@mydomain.com/email>
                    <permissions>
                        <perminfo viewname="finepick1" sharedby="user@mydomain.com">
                            <permission>
                                <readtrue/read>
                                <exportfalse/export>
                                <vudfalse/vud>
                                <addrowfalse/addrow>
                                <updaterowfalse/updaterow>
                                <deleterowfalse/deleterow>
                                <deleteallrowsfalse/deleteallrows>
                                <appendimportfalse/appendimport>
                                <updateimportfalse/updateimport>
                                <truncateimportfalse/truncateimport>
                                <deleteupdateaddimportfalse/deleteupdateaddimport>
                                <sharefalse/share>
                            </permission>
                        </perminfo>
                    </permissions>
            </shareinfo>
            <shareinfo>
                <emailuser115@mydomain.com/email>
                    <permissions>
                        <perminfo viewname="Table1" sharedby="user@mydomain.com">
                            <permission>
                                <readtrue/read>
                                <exporttrue/export>
                                <vudfalse/vud>
                                <addrowfalse/addrow>
                                <updaterowfalse/updaterow>
                                <deleterowfalse/deleterow>
                                <deleteallrowsfalse/deleteallrows>
                                <appendimportfalse/appendimport>
                                <updateimportfalse/updateimport>
                                <truncateimportfalse/truncateimport>
                                <deleteupdateaddimportfalse/deleteupdateaddimport>
                                <sharefalse/share>
                            </permission>
                        </perminfo>
                    </permissions>
            </shareinfo>
            <shareinfo>
                <emailuser11@mydomain.com/email>
                    <permissions>
                        <perminfo viewname="grp_pv1" sharedby="user@mydomain.com">
                            <permission>
                                <readtrue/read>
                                <exporttrue/export>
                                <vudfalse/vud>
                                <addrowfalse/addrow>
                                <updaterowfalse/updaterow>
                                <deleterowfalse/deleterow>
                                <deleteallrowsfalse/deleteallrows>
                                <appendimportfalse/appendimport>
                                <updateimportfalse/updateimport>
                                <truncateimportfalse/truncateimport>
                                <deleteupdateaddimportfalse/deleteupdateaddimport>
                                <sharefalse/share>
                            </permission>
                        </perminfo>
                    </permissions>
            </shareinfo>
            <shareinfo>
                <emailuser214@mydomain.com/email>
                    <permissions>
                        <perminfo viewname="finepick1" sharedby="user@mydomain.com">
                            <permission>
                                <readtrue/read>
                                <exportfalse/export>
                                <vudfalse/vud>
                                <addrowfalse/addrow>
                                <updaterowfalse/updaterow>
                                <deleterowfalse/deleterow>
                                <deleteallrowsfalse/deleteallrows>
                                <appendimportfalse/appendimport>
                                <updateimportfalse/updateimport>
                                <truncateimportfalse/truncateimport>
                                <deleteupdateaddimportfalse/deleteupdateaddimport>
                                <sharefalse/share>
                            </permission>
                        </perminfo>
                    </permissions>
            </shareinfo>
            <shareinfo>
                <emailuser104@mydomain.com/email>
                    <permissions>
                        <perminfo viewname="Table1" sharedby="user@mydomain.com">
                            <permission>
                                <readtrue/read>
                                <exporttrue/export>
                                <vudfalse/vud>
                                <addrowfalse/addrow>
                                <updaterowfalse/updaterow>
                                <deleterowfalse/deleterow>
                                <deleteallrowsfalse/deleteallrows>
                                <appendimportfalse/appendimport>
                                <updateimportfalse/updateimport>
                                <truncateimportfalse/truncateimport>
                                <deleteupdateaddimportfalse/deleteupdateaddimport>
                                <sharefalse/share>
                            </permission>
                        </perminfo>
                    </permissions>
            </shareinfo>
            <shareinfo>
                <emailuser10@mydomain.com/email>
                    <permissions>
                        <perminfo viewname="Table2" sharedby="user@mydomain.com">
                            <permission>
                                <readtrue/read>
                                <exportfalse/export>
                                <vudfalse/vud>
                                <addrowfalse/addrow>
                                <updaterowfalse/updaterow>
                                <deleterowfalse/deleterow>
                                <deleteallrowsfalse/deleteallrows>
                                <appendimportfalse/appendimport>
                                <updateimportfalse/updateimport>
                                <truncateimportfalse/truncateimport>
                                <deleteupdateaddimportfalse/deleteupdateaddimport>
                                <sharefalse/share>
                            </permission>
                        </perminfo>
                    </permissions>
            </shareinfo>
            <shareinfo>
                <emailuser101@mydomain.com/email>
                    <permissions>
                        <perminfo viewname="Table1" sharedby="user@mydomain.com">
                            <permission>
                                <readtrue/read>
                                <exportfalse/export>
                                <vudfalse/vud>
                                <addrowfalse/addrow>
                                <updaterowfalse/updaterow>
                                <deleterowfalse/deleterow>
                                <deleteallrowsfalse/deleteallrows>
                                <appendimportfalse/appendimport>
                                <updateimportfalse/updateimport>
                                <truncateimportfalse/truncateimport>
                                <deleteupdateaddimportfalse/deleteupdateaddimport>
                                <sharefalse/share>
                            </permission>
                        </perminfo>
                    </permissions>
            </shareinfo>
        </usershareinfo>
        <publicshareinfo>
        </publicshareinfo>
        <privatelinkshareinfo>
        </privatelinkshareinfo>
        <groupshareinfo>
            <groupmembers>
                <memberuser10@mydomain.com/member>
                <memberuser1@mydomain.com/member>
            </groupmembers>
        </groupshareinfo>
        <dbownershareinfo>
            <dbowners>
                <memberuser13@mydomain.com/member>
                <memberuser1@mydomain.com/member>
            </dbowners>
        </dbownershareinfo>
      </result>
    </response>
    
    
    

    Sample Response JSON Format:

    { 
       "response":{
          "uri":"\/api\/abc@zylker.com\/SalesDB",
          "action":"GETSHAREINFO",
          "result":{
             "usershareinfo":[  
                {  
                   "shareinfo":{  
                      "email":"user1@mydomain.com",
                      "permissions":[  
                         {  
                            "perminfo":{  
                               "viewname":"Table1",
                               "sharedby":"user@mydomain.com",
                               "permission":{  
                                  "read":"true",
                                  "export":"true",
                                  "vud":"false",
                                  "addrow":"true",
                                  "updaterow":"false",
                                  "deleterow":"false",
                                  "deleteallrows":"false",
                                  "appendimport":"false",
                                  "updateimport":"false",
                                  "truncateimport":"false",
                                  "deleteupdateaddimport":"false",
                                  "share":"false"
                               }
                            }
                         }
                      ]
                   }
                },
                {  
                   "shareinfo":{  
                      "email":"user4@mydomain.com",
                      "permissions":[  
                         {  
                            "perminfo":{  
                               "viewname":"Table1",
                               "sharedby":"user@mydomain.com",
                               "permission":{  
                                  "read":"true",
                                  "export":"true",
                                  "vud":"false",
                                  "addrow":"true",
                                  "updaterow":"false",
                                  "deleterow":"false",
                                  "deleteallrows":"false",
                                  "appendimport":"false",
                                  "updateimport":"false",
                                  "truncateimport":"false",
                                  "deleteupdateaddimport":"false",
                                  "share":"false"
                               }
                            }
                         }
                      ]
                   }
                },
                {  
                   "shareinfo":{  
                      "email":"user215@mydomain.com",
                      "permissions":[  
                         {  
                            "perminfo":{  
                               "viewname":"finepick1",
                               "sharedby":"user@mydomain.com",
                               "permission":{  
                                  "read":"true",
                                  "export":"false",
                                  "vud":"false",
                                  "addrow":"true",
                                  "updaterow":"false",
                                  "deleterow":"false",
                                  "deleteallrows":"false",
                                  "appendimport":"false",
                                  "updateimport":"false",
                                  "truncateimport":"false",
                                  "deleteupdateaddimport":"false",
                                  "share":"false"
                               }
                            }
                         }
                      ]
                   }
                },
                {  
                   "shareinfo":{  
                      "email":"userlf12@mydomain.com",
                      "permissions":[  
                         {  
                            "perminfo":{  
                               "viewname":"Parent",
                               "sharedby":"user@mydomain.com",
                               "permission":{  
                                  "read":"true",
                                  "export":"false",
                                  "vud":"false",
                                  "addrow":"true",
                                  "updaterow":"false",
                                  "deleterow":"false",
                                  "deleteallrows":"false",
                                  "appendimport":"false",
                                  "updateimport":"false",
                                  "truncateimport":"false",
                                  "deleteupdateaddimport":"false",
                                  "share":"false"
                               }
                            }
                         }
                      ]
                   }
                },
                {  
                   "shareinfo":{  
                      "email":"user33@mydomain.com",
                      "permissions":[  
                         {  
                            "perminfo":{  
                               "viewname":"Parent",
                               "sharedby":"user@mydomain.com",
                               "permission":{  
                                  "read":"true",
                                  "export":"false",
                                  "vud":"false",
                                  "addrow":"true",
                                  "updaterow":"false",
                                  "deleterow":"false",
                                  "deleteallrows":"false",
                                  "appendimport":"false",
                                  "updateimport":"false",
                                  "truncateimport":"false",
                                  "deleteupdateaddimport":"false",
                                  "share":"false"
                               }
                            }
                         },
                         {  
                            "perminfo":{  
                               "viewname":"sss",
                               "sharedby":"user@mydomain.com",
                               "permission":{  
                                  "read":"true",
                                  "export":"false",
                                  "vud":"false",
                                  "addrow":"true",
                                  "updaterow":"false",
                                  "deleterow":"false",
                                  "deleteallrows":"false",
                                  "appendimport":"false",
                                  "updateimport":"false",
                                  "truncateimport":"false",
                                  "deleteupdateaddimport":"false",
                                  "share":"false"
                               }
                            }
                         },
                         {  
                            "perminfo":{  
                               "viewname":"Table1",
                               "sharedby":"user@mydomain.com",
                               "permission":{  
                                  "read":"true",
                                  "export":"false",
                                  "vud":"false",
                                  "addrow":"true",
                                  "updaterow":"false",
                                  "deleterow":"false",
                                  "deleteallrows":"false",
                                  "appendimport":"false",
                                  "updateimport":"false",
                                  "truncateimport":"false",
                                  "deleteupdateaddimport":"false",
                                  "share":"false"
                               }
                            }
                         }
                      ]
                   }
                },
                {  
                   "shareinfo":{  
                      "email":"user1@mydomain.com",
                      "permissions":[  
                         {  
                            "perminfo":{  
                               "viewname":"finepick1",
                               "sharedby":"user@mydomain.com",
                               "permission":{  
                                  "read":"true",
                                  "export":"false",
                                  "vud":"false",
                                  "addrow":"true",
                                  "updaterow":"false",
                                  "deleterow":"false",
                                  "deleteallrows":"false",
                                  "appendimport":"false",
                                  "updateimport":"false",
                                  "truncateimport":"false",
                                  "deleteupdateaddimport":"false",
                                  "share":"false"
                               }
                            }
                         }
                      ]
                   }
                },
                {  
                   "shareinfo":{  
                      "email":"user115@mydomain.com",
                      "permissions":[  
                         {  
                            "perminfo":{  
                               "viewname":"Table1",
                               "sharedby":"user@mydomain.com",
                               "permission":{  
                                  "read":"true",
                                  "export":"true",
                                  "vud":"false",
                                  "addrow":"true",
                                  "updaterow":"false",
                                  "deleterow":"false",
                                  "deleteallrows":"false",
                                  "appendimport":"false",
                                  "updateimport":"false",
                                  "truncateimport":"false",
                                  "deleteupdateaddimport":"false",
                                  "share":"false"
                               }
                            }
                         }
                      ]
                   }
                },
                {  
                   "shareinfo":{  
                      "email":"user11@mydomain.com",
                      "permissions":[  
                         {  
                            "perminfo":{  
                               "viewname":"grp_pv1",
                               "sharedby":"user@mydomain.com",
                               "permission":{  
                                  "read":"true",
                                  "export":"true",
                                  "vud":"false",
                                  "addrow":"true",
                                  "updaterow":"false",
                                  "deleterow":"false",
                                  "deleteallrows":"false",
                                  "appendimport":"false",
                                  "updateimport":"false",
                                  "truncateimport":"false",
                                  "deleteupdateaddimport":"false",
                                  "share":"false"
                               }
                            }
                         }
                      ]
                   }
                },
                {  
                   "shareinfo":{  
                      "email":"user214@mydomain.com",
                      "permissions":[  
                         {  
                            "perminfo":{  
                               "viewname":"finepick1",
                               "sharedby":"user@mydomain.com",
                               "permission":{  
                                  "read":"true",
                                  "export":"false",
                                  "vud":"false",
                                  "addrow":"true",
                                  "updaterow":"false",
                                  "deleterow":"false",
                                  "deleteallrows":"false",
                                  "appendimport":"false",
                                  "updateimport":"false",
                                  "truncateimport":"false",
                                  "deleteupdateaddimport":"false",
                                  "share":"false"
                               }
                            }
                         }
                      ]
                   }
                },
                {  
                   "shareinfo":{  
                      "email":"user104@mydomain.com",
                      "permissions":[  
                         {  
                            "perminfo":{  
                               "viewname":"Table1",
                               "sharedby":"user@mydomain.com",
                               "permission":{  
                                  "read":"true",
                                  "export":"true",
                                  "vud":"false",
                                  "addrow":"true",
                                  "updaterow":"false",
                                  "deleterow":"false",
                                  "deleteallrows":"false",
                                  "appendimport":"false",
                                  "updateimport":"false",
                                  "truncateimport":"false",
                                  "deleteupdateaddimport":"false",
                                  "share":"false"
                               }
                            }
                         }
                      ]
                   }
                },
                {  
                   "shareinfo":{  
                      "email":"user10@mydomain.com",
                      "permissions":[  
                         {  
                            "perminfo":{  
                               "viewname":"Table2",
                               "sharedby":"user@mydomain.com",
                               "permission":{  
                                  "read":"true",
                                  "export":"false",
                                  "vud":"false",
                                  "addrow":"true",
                                  "updaterow":"false",
                                  "deleterow":"false",
                                  "deleteallrows":"false",
                                  "appendimport":"false",
                                  "updateimport":"false",
                                  "truncateimport":"false",
                                  "deleteupdateaddimport":"false",
                                  "share":"false"
                               }
                            }
                         }
                      ]
                   }
                },
                {  
                   "shareinfo":{  
                      "email":"user101@mydomain.com",
                      "permissions":[  
                         {  
                            "perminfo":{  
                               "viewname":"Table1",
                               "sharedby":"user@mydomain.com",
                               "permission":{  
                                  "read":"true",
                                  "export":"false",
                                  "vud":"false",
                                  "addrow":"true",
                                  "updaterow":"false",
                                  "deleterow":"false",
                                  "deleteallrows":"false",
                                  "appendimport":"false",
                                  "updateimport":"false",
                                  "truncateimport":"false",
                                  "deleteupdateaddimport":"false",
                                  "share":"false"
                               }
                            }
                         }
                      ]
                   }
                }
             ],
             "publicshareinfo":{  
    
             },
             "privatelinkshareinfo":{  
    
             },
             "groupshareinfo":{  
                "groupmembers":[  
                   "user10@mydomain.com",
                   "user1@mydomain.com"
                ]
             },
             "dbownershareinfo":{  
                "dbowners":[  
                   "user13@mydomain.com",
                   "user1@mydomain.com"
                ]
             }
          }
       }
    }
    

    The Get Share Info API is used to fetch all the Sharing information of a Workspace. Only the Administrator of the workspace (one who created the workspace) can use this API.

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<Workspacename>

    Common Parameters

    Parameter Possible Values Description
    ZOHO_ACTION GETSHAREINFO 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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

    POSSIBLE ERROR CODES IN GET SHARE INFO

    7103, 7301, 8504, 8506, 8516, 8533

    Create Group

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



    Sample Request:

    curl -d 'ZOHO_ACTION=CREATEGROUP&ZOHO_OUTPUT_FORMAT=JSON&ZOHO_ERROR_FORMAT=JSON
            &authtoken=f7d016b46be2acsd4cfa32a592f40101&ZOHO_API_VERSION=1.0'
    
         --data-urlencode 'CONFIG={
            "groupName":"",
            "groupDesc":"",
            "emailIds":["",""],
            "inviteMail":"",
            "mailSubject":"",
            "mailMessage":""
            }'
    
         -X POST
         https://<hostname>:<webclientport>/api/abc@zylker.com/Workspacename
    

    Sample Response JSON Format:

    {
      "response": {
        "uri": "/api/EmailAddress/WorkspaceName",
        "action": "CREATEGROUP",
        "result": {
          "message": "Group created successfully.",
          "groupId": "11111111111111111"
        }
      }
    }
    

    This API creates a new group in the workspace identified by the URI.

    METHOD : POST

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<Workspacename>

    COMMON PARAMETERS

    Parameter Possible Values Description
    ZOHO_ACTION CREATEGROUP 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 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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

    ACTION SPECIFIC PARAMETERS

    Parameter Value
    CONFIG

    Provide the value as JSONObject using the keys given below.(Do encode the value)

    KeyTypeDescription
    groupName*StringName of the group to be created.
    groupDescStringDescription of the group.
    emailIds*JSONArrayList of user email addresses to be added in the group.
    inviteMailBooleanIf set as true, invitation mail will be sent to the specified email addresses.
    mailSubjectStringSubject of the invitation mail.
    mailMessageStringInvitation mail messasge.
    domainName
    (Only For White Label Customers)
    StringCreated group will be mapped for the specified domain.

    Note: Fields with * are mandatory.

    Possible Error Codes In CREATE GROUP

    7003 , 7103 , 8027 , 8509 , 8504 , 8506 , 8516 , 8533 , 7282 , 6028 , 8060

    Update Group

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



    Sample Request:

    curl -d 'ZOHO_ACTION=UPDATEGROUPINFO&ZOHO_OUTPUT_FORMAT=JSON&ZOHO_ERROR_FORMAT=JSON
            &authtoken=f7d016b46be2acsd4cfa32a592f40101&ZOHO_API_VERSION=1.0'
    
         --data-urlencode 'CONFIG={
            "groupName":"",
            "newGroupName":"",
            "newGroupDesc":""
            }'
    
         -X POST
         https://<hostname>:<webclientport>/api/abc@zylker.com/Workspacename
    

    Sample Response JSON Format:

    {
      "response": {
        "uri": "/api/EmailAddress/WorkspaceName",
        "action": "UPDATEGROUPINFO",
        "result": {
          "message": "Group info updated successfully.",
        }
      }
    }
    

    This API updates the group details present in the workspace identified by the URI.

    METHOD : POST

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<Workspacename>

    COMMON PARAMETERS

    Parameter Possible Values Description
    ZOHO_ACTION UPDATEGROUPINFO 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 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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

    ACTION SPECIFIC PARAMETERS

    Parameter Value
    CONFIG

    Provide the value as JSONObject using the keys given below.(Do encode the value)

    KeyTypeDescription
    groupName*StringName of the group to be updated.
    newGroupNameStringNew name for the group.
    newGroupDescStringNew description for the group.

    Note: Fields with * are mandatory.

    Possible Error Codes In UPDATE GROUP

    7003 , 7103 , 8027 , 8509 , 8504 , 8506 , 8516 , 8533 , 7281 , 7282

    Delete Group

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



    Sample Request:

    curl -d 'ZOHO_ACTION=DELETEGROUP&ZOHO_OUTPUT_FORMAT=JSON&ZOHO_ERROR_FORMAT=JSON
            &authtoken=f7d016b46be2acsd4cfa32a592f40101&ZOHO_API_VERSION=1.0'
    
         --data-urlencode 'CONFIG={
            "groupNames":["",""],
            }'
    
         -X POST
         https://<hostname>:<webclientport>/api/abc@zylker.com/Workspacename
    

    Sample Response JSON Format:

    {
      "response": {
        "uri": "/api/EmailAddress/WorkspaceName",
        "action": "DELETEGROUP",
        "result": {
          "message": "Group(s) deleted successfully.",
        }
      }
    }
    

    This API deletes the specified groups present in the workspace identified by the URI.

    METHOD : POST

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<Workspacename>

    COMMON PARAMETERS

    Parameter Possible Values Description
    ZOHO_ACTION DELETEGROUP 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 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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

    ACTION SPECIFIC PARAMETERS

    Parameter Value
    CONFIG

    Provide the value as JSONObject using the keys given below.(Do encode the value)

    KeyTypeDescription
    groupNames*JSONArrayList of groups to be deleted.

    Note: Fields with * are mandatory.

    Possible Error Codes In DELETE GROUP

    7003 , 7103 , 8027 , 8509 , 8504 , 8506 , 8516 , 8533 , 7281

    Group Info

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



    Sample Request:

    curl -d "ZOHO_ACTION=GROUPINFO&ZOHO_OUTPUT_FORMAT=JSON&ZOHO_ERROR_FORMAT=JSON
             &authtoken=f7d016b46be2acsd4cfa32a592f40101&ZOHO_API_VERSION=1.0"
         https://<hostname>:<webclientport>/api/abc@zylker.com/Workspacename
    

    Sample Response JSON Format:

    {
      "response": {
        "uri": "/api/EmailAddress/WorkspaceName",
        "action": "GROUPINFO",
        "result": [
          {
            "groupId": "999999999999999",
            "groupName": "Group-1",
            "groupDescription": "",
            "createdTime": "21 hrs ago",
            "membersList": [
              "user1@zoho.com"
            ]
          },
          {
            "groupId": "888888888888888",
            "groupName": "Group-2",
            "groupDescription": "",
            "createdTime": "21 hrs ago",
            "membersList": [
              "user1@zoho.com",
              "user2@zoho.com"
            ]
          }
        ]
      }
    }
    

    This API returns metadata of groups present in the workspace identified by the URI.

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<Workspacename>

    COMMON PARAMETERS

    Parameter Possible Values Description
    ZOHO_ACTION GROUPINFO 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 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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

    ACTION SPECIFIC PARAMETERS

    Parameter Value
    CONFIG

    Provide the value as JSONObject using the keys given below.(Do encode the value)

    KeyTypeDescription
    groupNamesJSONArrayList of groupnames for which metadata is needed.
    When not provided, metadata of all available groups present in workspace is returned.

    Note: Fields with * are mandatory.

    Possible Error Codes In GROUP INFO

    7003 , 7103 , 8027 , 8509 , 8504 , 8506 , 8516 , 8533 , 7281

    Add Group Members

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



    Sample Request:

    curl -d 'ZOHO_ACTION=ADDGROUPMEMBERS&ZOHO_OUTPUT_FORMAT=JSON
            &ZOHO_ERROR_FORMAT=JSON&authtoken=f7d016b46be2acsd4cfa32a592f40101&ZOHO_API_VERSION=1.0'
    
         --data-urlencode 'CONFIG={
            "groupName":"",
            "emailIds":["",""],
            "inviteMail":"",
            "mailSubject":"",
            "mailMessage":""
            }'
    
         -X POST
         https://<hostname>:<webclientport>/api/abc@zylker.com/Workspacename
    

    Sample Response JSON Format:

    {
      "response": {
        "uri": "/api/EmailAddress/WorkspaceName",
        "action": "ADDGROUPMEMBERS",
        "result": {
          "message": "Member(s) added to the group successfully.",
        }
      }
    }
    

    This API adds the specified email addresses to the group present in the workspace identified by the URI.

    METHOD : POST

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<Workspacename>

    COMMON PARAMETERS

    Parameter Possible Values Description
    ZOHO_ACTION ADDGROUPMEMBERS 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 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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

    ACTION SPECIFIC PARAMETERS

    Parameter Value
    CONFIG

    Provide the value as JSONObject using the keys given below.(Do encode the value)

    KeyTypeDescription
    groupName*StringGroupname for which the email addresses to be added.
    emailIds*JSONArrayList of email addresses to be added in the group.
    inviteMailBooleanIf set as true, invitation mail will be sent to the specified email addresses.
    mailSubjectStringSubject of the invitation mail.
    mailMessageStringInvitation mail messasge.

    Note: Fields with * are mandatory.

    Possible Error Codes In ADD GROUP MEMBERS

    7003 , 7103 , 8027 , 8509 , 8504 , 8506 , 8516 , 8533 , 7281 , 6028

    Remove Group Members

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



    Sample Request:

    curl -d 'ZOHO_ACTION=REMOVEGROUPMEMBERS&ZOHO_OUTPUT_FORMAT=JSON&ZOHO_ERROR_FORMAT=JSON
            &authtoken=f7d016b46be2acsd4cfa32a592f40101&ZOHO_API_VERSION=1.0'
    
         --data-urlencode 'CONFIG={
            "groupName":"",
            "emailIds":["",""]
            }'
    
         -X POST
         https://<hostname>:<webclientport>/api/abc@zylker.com/Workspacename
    

    Sample Response JSON Format:

    {
      "response": {
        "uri": "/api/EmailAddress/WorkspaceName",
        "action": "REMOVEGROUPMEMBERS",
        "result": {
          "message": "Member(s) removed from the group successfully.",
        }
      }
    }
    

    This API removes the specified email addresses from the group present in the workspace identified by the URI.

    METHOD : POST

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<Workspacename>

    COMMON PARAMETERS

    Parameter Possible Values Description
    ZOHO_ACTION REMOVEGROUPMEMBERS 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 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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

    ACTION SPECIFIC PARAMETERS

    Parameter Value
    CONFIG

    Provide the value as JSONObject using the keys given below.(Do encode the value)

    KeyTypeDescription
    groupName*StringGroupname from which the email addresses to be removed.
    emailIds*JSONArrayList of user email addresses to be removed from the group.
    notifyUserBooleanIf set as true, a notification mail will be sent to the provided email addresses.

    Note: Fields with * are mandatory.

    Possible Error Codes In REMOVE GROUP MEMBERS

    7003 , 7103 , 8027 , 8509 , 8504 , 8506 , 8516 , 8533 , 7281

    Error Codes in Sharing API

    This section explains about the error response sent from the Zoho Analytics server on failure of Sharing APIs. You can use this for appropriate error handling.

    Error Handling

    Sample error XML Format:

    
    <response uri="/api/abc@zylker.com/Employee" action="GETVIEWURL">
        <error> 
            <code>7103</code>
            <message>
            Workspace not found! Please check whether the workspace exists
            </message>
        </error>
    </response>
    
    

    Sample error JSON Format:

    {
        "response": 
        {
            "uri": "\/api\/abc@zylker.com\/Employee",
            "action": "GETVIEWURL",
            "error": 
            {
            "code":7103,
            "message": "Workspace not found! Please check whether the workspace exists"
            } 
        }
    }
    

    Error Codes

    Error Code Reason Solution
    7003 Required parameters are missing in the request. Send all the required parameters related tot hat particular action.
    7103 The workspace name specified in the API request URL does not exist. Please provide an existing workspace name to get the sharing details.
    7301 You (your full name) do not have the permission to do this operation. Only workspace owner has the permission Provide an authtoken for the Administrator or Owner of the workspace.
    8026 Permission parameter missing. Atleast any one of the following parameters is required : [ZOHO_READ, ZOHO_EXPORT, ZOHO_VUD, ZOHO_ADDROW, ZOHO_UPDATEROW, ZOHO_DELETEROW, ZOHO_DELETEALLROWS, ZOHO_IMPORT_APPEND, ZOHO_IMPORT_ADDORUPDATE, ZOHO_IMPORT_DELETEALLADD, ZOHO_IMPORT_DELETEUPDATEADD, ZOHO_SHARE, ZOHO_VUD_SELCOL, ZOHO_DRILLDOWN].
    8027 Mentioned view/workspace is not found. Provie a valid view/workspace 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.
    8509 The Email IDs provided in ZOHO_EMAILS parameter is not proper / not in the Email ID format. Check the email addresses passed in the parameter and provide a proper email address.
    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 onprem-support@zohoanalytics.com . Zoho Analytics will get back to you with the best possible solution.

    Embed API

    With this API you can embed reports & dashboards created in Zoho Analytics into your Web pages/applications programmatically. This offers great possibilities to developers for creating dynamic reporting content embedded within their websites & applications seamlessly.

    Get View URL

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

    Sample Request:

    using ZReports;
    
    namespace Test
    {
        AUTHTOKEN = "************";
        EMAIL = "user@zylker.com";
        DBNAME = "EmployeeDB";
        TBNAME = "EmployeeTB";
    
        class Program
        {
            public IReportClient getClient()
            {
                IReportClient RepClient = new ReportClient(AUTHTOKEN);
                return RepClient;
            }
    
            public void getviewurl(IReportClient rc)
            {
                string uri = rc.GetURI(EMAIL,DBNAME,TBNAME);
                string result = rc.GetViewUrl(uri, null);
                Console.WriteLine(result);
            }
    
            static void Main(string[] args)
            {
                Program obj = new Program();
                IReportClient rc = obj.getClient();
                obj.getviewurl(rc);
            }
        }
    }
    
    package main
    
    import (
            "fmt"
            "zoho/pkg/reportclient"
    
    )
    
    var(
            email = "user@zylker.com"
            dbname = "Employee"
            tbname = "sample"
            authtoken = "************"
    )
    
    func getviewurl() {
            url := reportclient.GetUri(email, dbname, tbname)
            viewurl , err := reportclient.GetViewUrl(url)
            if(err != nil){
                    fmt.Println(err.ErrorMessage)
                    fmt.Println(err.ErrorCode)
                    fmt.Println(err.Action)
                    fmt.Println(err.HttpStatusCode)
            }else{
                    fmt.Println(viewurl)
            }
    
    }
    
    func main() {
            reportclient.SetAuthToken(authtoken)
            getviewurl()
    }
    
    import com.adventnet.zoho.client.report.*;
    
    public class Sample 
    {
        String email = "user@zylker.com";
        String dbname = "EmployeeDB";
        String tbname = "EmployeeTB";
        String authtoken = "************";
        Map config = new HashMap();
    
        private ReportClient rc = new ReportClient(authtoken);
        rc.setIamServerURL("https://<hostname>:<webclientport>/iam");
        rc.setReportServerURL("https://<hostname>:<webclientport>");
    
        public void getviewurl() throws Exception
        {
            String uri = rc.getURI(email,dbname,tbname);
            String result =  rc.getViewURL(uri,config);
            System.out.println(result);
        }
    
        public static void main(String[] args) throws Exception 
        {
            Sample obj = new Sample();
            obj.getviewurl();
        }
    }
    
    <?php
        require 'ReportClient.php';
    
        $EMAIL_ID = "abc@zylker.com";
        $DB_NAME = "EmployeeDB";
        $TABLE_NAME = "EmployeeTB";
        $AUTHTOKEN = "************";
    
        $report_client_request = new ReportClient($AUTHTOKEN); 
    
        $uri = $report_client_request->getURI($EMAIL_ID, $DB_NAME, $TABLE_NAME);
        $view_url = $report_client_request->getViewUrl($uri);
    ?>
    
    from __future__ import with_statement
    from ReportClient import ReportClient
    import sys
    
    class Sample:
    
        LOGINEMAILID="abc@zylker.com"
        AUTHTOKEN="************"
        DATABASENAME="Employee"
        TABLENAME="Employee"
        rc = None
        rc = ReportClient(self.AUTHTOKEN)
    
        def getviewurl(self,rc):
            uri = rc.getURI(self.LOGINEMAILID,self.DATABASENAME,self.TABLENAME)
            result = rc.getViewUrl(uri)
            print result
    
    obj = Sample()
    obj.getviewurl(obj.rc)
    
    curl -d "ZOHO_ACTION=GETVIEWURL&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
             &ZOHO_API_VERSION=1.0&authtoken=************" 
             https://<hostname>:<webclientport>/api/abc@zylker.com/Employee/EmployeeDetails
    
    

    Sample Response XML Format:

    <response uri="/api/abc@zylker.com/Employee/EmployeeDetails" action="GETVIEWURL">
        <result>
            <viewurl>
                https://<hostname>:<webclientport>/ZDBDataSheetView.cc?&
                            OBJID=9999999999999&STANDALONE=true&REMTOOLBAR=true&
                            ZDB_THEME_NAME=blue
            </viewurl> 
        </result>
    </response>
    
    

    Sample Response JSON Format:

    {
        "response": 
        {
            "uri": "\/api\/abc@zylker.com\/Employee\/EmployeeDetails",
            "action": "GETVIEWURL",
            "result": 
            {
                "viewurl": "https://<hostname>:<webclientport>/ZDBDataSheetView.cc?&
                                        OBJID=9999999999999&STANDALONE=true&REMTOOLBAR=true&
                                        ZDB_THEME_NAME=blue"
            } 
        }
    }
    

    This API returns the URL to access the mentioned view. You need to provide the workspace name and the view name as input for the API.

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<Workspacename>/<Tablename>

    Common Parameters

    Parameter Possible Values Description
    ZOHO_ACTION GETVIEWURL 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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

    POSSIBLE ERROR CODES IN GET VIEW Request URI

    7103, 7138, 8504, 8506, 8516, 8533

    Get Embed URL

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



    Sample Request:

    using ZReports;
    
    namespace Test
    {
        AUTHTOKEN = "************";
        EMAIL = "user@zylker.com";
        DBNAME = "EmployeeDB";
        TBNAME = "EmployeeTB";
    
        class Program
        {
            public IReportClient getClient()
            {
                IReportClient RepClient = new ReportClient(AUTHTOKEN);
                return RepClient;
            }
    
            public void getEmbedURL(IReportClient RepClient)
            {
                string tableURI = RepClient.GetURI(EMAIL, DBNAME, TBNAME);
                string result = RepClient.GetEmbedURL(tableURI, null);
            }
    
            static void Main(string[] args)
            {
                Program obj = new Program();
                IReportClient rc = obj.getClient();
                obj.getEmbedURL(rc);
            }
        }
    }
    
    package main
    
    import (
            "fmt"
            "zoho/pkg/reportclient"
    
    )
    
    var(
            email = "user@zylker.com"
            dbname = "Employee"
            tbname = "sample"
            authtoken = "************"
    )
    
    func getembedurl() {
            url := reportclient.GetUri(email, dbname, tbname)
            params := map[string]string{}
            embedurl , err := reportclient.GetEmbedUrl(url, params)
            if(err != nil){
                    fmt.Println(err.ErrorMessage)
                    fmt.Println(err.ErrorCode)
                    fmt.Println(err.Action)
                    fmt.Println(err.HttpStatusCode)
            }else{
                    fmt.Println(embedurl)
            }
    }
    
    func main() {
            reportclient.SetAuthToken(authtoken)
            getembedurl()
    }
    
    import com.adventnet.zoho.client.report.*;
    
    public class Sample 
    {
        String email = "user@zylker.com";
        String dbname = "EmployeeDB";
        String tbname = "EmployeeTB";
        String authtoken = "************";
        Map config = new HashMap();
    
        private ReportClient rc = new ReportClient(authtoken);
    
        public void getembedurl() throws Exception
        {
            String uri = rc.getURI(email,dbname,tbname);
            String result =  rc.getEmbedURL(uri,config);
            System.out.println(result);
        }
    
        public static void main(String[] args) throws Exception 
        {
            Sample obj = new Sample();
            obj.getembedurl();
        }
    }
    
    <?php
        require 'ReportClient.php';
    
        $EMAIL_ID = "abc@zylker.com";
        $DB_NAME = "EmployeeDB";
        $TABLE_NAME = "EmployeeTB";
        $AUTHTOKEN = "************";
    
        $report_client_request = new ReportClient($AUTHTOKEN); 
    
        $uri = $report_client_request->getURI($EMAIL_ID, $DB_NAME, $TABLE_NAME);
        $criteria = "Department"='Finance';
        $embed_url = $report_client_request->getEmbedURL($uri ,$criteria);
    ?>
    
    from __future__ import with_statement
    from ReportClient import ReportClient
    import sys
    
    class Sample:
    
        LOGINEMAILID="abc@zylker.com"
        AUTHTOKEN="************"
        DATABASENAME="Employee"
        TABLENAME="Employee"
        rc = None
        rc = ReportClient(self.AUTHTOKEN)
    
        def getembedurl(self,rc):
            uri = rc.getURI(self.LOGINEMAILID,self.DATABASENAME,self.TABLENAME)
            result = rc.getEmbedUrl(uri)
            print result
    
    obj = Sample()
    obj.getembedurl(obj.rc)
    
    curl -d "ZOHO_ACTION=GETEMBEDURL&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
             &ZOHO_API_VERSION=1.0&authtoken=************" 
             https://<hostname>:<webclient port>/api/abc@zylker.com/EmployeeDB/EmployeeDetails
    
    

    Sample Response XML Format:

    <response uri="/api/abc@zylker.com/SalesDB/Sales" action="GETEMBEDURL">
        <result>
            <embedurlhttps://<hostname>:<webclientport>/ZDBDataSheetView.cc?&
                  OBJID=100000000000026025&REMTOOLBAR=>true&FS=OS
                  &RSCONFIG=Ksp6SkShM5/PySm0q3lMQC4lNc6BUVBGQC4wp+YS6ahHG8e1j
                  035yQrpZwAZdq7I
            </embedurl>
        </result>
    </response>
    
    

    Sample Response JSON Format:

    {
        "response":
        {
            "uri":"\/api\/abc@zylker.com\/SalesDB\/Sales",
            "action":"GETEMBEDURL",
            "result": {"embedUrl":"https://<hostname>:<webclientport>/ZDBDataSheetView.cc?&
                OBJID=100000000000026025&REMTOOLBAR=true&FS=OS
                &RSCONFIG=Ksp6SkShM5/PySm0q3lMQC4lNc6BUVBGQC4wp+YS6ahHG8e1j
                035yQrpZwAZdq7I"}
        }
    }
    

    The Get Embed URL API is used to get the embed URL for the particular table / view. The generated URL is a short-living URL which adds more security to the URL. This URL does not require login and controlled by the permissions which can be passed as URL parameters.

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<Workspacename>/<Tablename>

    Common Parameters

    Parameter Possible Values Description
    ZOHO_ACTION GETEMBEDURL 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user to access the Zoho Account.
    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

    URL PARAMETERS

    Parameter Possible Values Description
    ZOHO_CUSTOMDOMAIN
    (optional)
    true/false Default value false.
    True - It will return the embed url with your domain address.
    False - It will return the embed url with zoho domain address.
    SHORTEN_URL
    (optional)
    true/false Default is false.
    If set as true, the generated url looks like "<domain_name>/open-view/<view_id>?<parameters>".
    If set as false, the generated url looks like "<domain_name>/ZDBDataSheetView.cc?<parameters>"
    ZOHO_CRITERIA
    (optional)
    criteria If that parameter is not sent, then all the rows are visible. If criteria is sent, the rows matching the criteria alone are visible.
    ZOHO_DRILLDOWN_PERMISSION
    (optional)
    true/false Permission to drill down in a chart.
    ZOHO_VUD_PERMISSION
    (optional)
    true/false Default is false.
    In case it is true, then the view have the permission to view the Underlying data.
    In case its false, then the view don’t have the permission to view the Underlying data.
    ZOHO_VUD_COLUMNS
    (optional)
    List of comma separated column names.E.g.,: Name, Department To limit the view underlying data option to specified columns only. This param is only valid if theZOHO_VUD_PERMISSION param is set to true
    ZOHO_INCLUDE_TOOLBAR
    (optional)
    true/false Default is false.
    In case it is true, then the toolbar is visible in the embed mode.
    In case its false, no toolbar is visible in the embed mode.
    ZOHO_VALIDITY_PERIOD
    (optional)
    <number> Controls the validity period of the embed url.
    Default is 3600 seconds (One hour).
    Value in seconds.
    ZOHO_THEME_COLOR
    (optional)
    blue/brown Theme color.
    Default is blue
    ZOHO_DATATYPE_SYMBOL
    (optional)
    true/false Controls to display the datatype symbol in the table column.
    Default is false
    ZOHO_SEARCH_BOX
    (optional)
    true/false Controls to display the search box in the table
    ZOHO_LEGEND_POSITION
    (optional)
  • RIGHT
  • LEFT
  • TOPLEFT
  • TOPRIGHT
  • TOPCENTER
  • BOTTOMLEFT
  • BOTTOMRIGHT
  • BOTTOMCENTER
  • NONE
  • Controls to display the position on the legend
    ZOHO_EXPORT_PERMISSION
    (optional)
    true/false Default is false.
    If set as true, then the view have the permission to export the data.
    If set as false, then the view don’t have the permission to export the data.
    ZOHO_INCLUDE_TITLE
    (optional)
    true/false Default is true.
    If set as true, view name is visible.
    If set as false, view name is hidden.
    ZOHO_INCLUDE_DESCRIPTION
    (optional)
    true/false Default is true.
    If set as true, view description is visible.
    If set as false, view description is hidden.

    Possible Error Codes In GET EMBED URL

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

    Create Slide Show

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



    Sample Request:

    curl -d 'ZOHO_ACTION=CREATESLIDESHOW&ZOHO_OUTPUT_FORMAT=JSON&ZOHO_ERROR_FORMAT=JSON
            &authtoken=f7d016b46be2acsd4cfa32a592f40101&ZOHO_API_VERSION=1.0'
    
         --data-urlencode 'CONFIG={
            "slideName":"",
            "viewNames":["",""],
            "accessWithoutLogin":"",
            }'
    
         -X POST
         https://<hostname>:<webclientport>/api/abc@zylker.com/Workspacename
    

    Sample Response JSON Format:

    {
      "response": {
        "uri": "/api/EmailAddress/WorkspaceName,
        "action": "CREATESLIDESHOW",
        "result": {
          "message": "Slideshow generated successfully."
        }
      }
    }
    

    This API creates a new slideshow in the workspace identified by the URI.

    METHOD : POST

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<Workspacename>

    COMMON PARAMETERS

    Parameter Possible Values Description
    ZOHO_ACTION CREATESLIDESHOW 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 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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

    ACTION SPECIFIC PARAMETERS

    Parameter Value
    CONFIG

    Provide the value as JSONObject using the keys given below.(Do encode the value)

    KeyTypeDescription
    slideName*StringName of the slideshow to be created.
    viewNames*JSONArrayList of view names to be included in the slideshow.
    accessWithoutLoginBooleanIf set as true, anyone with the slideshow url can access the slideshow.
    If set as false, only the users having read access for the views present in the slideshow can access.

    Note: Fields with * are mandatory.

    Possible Error Codes In CREATE SLIDE SHOW

    7103 , 7138 , 8504 , 8506 , 8516 , 8533

    Update Slide Show

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



    Sample Request:

    curl -d 'ZOHO_ACTION=UPDATESLIDESHOW&ZOHO_OUTPUT_FORMAT=JSON&ZOHO_ERROR_FORMAT=JSON
            &authtoken=f7d016b46be2acsd4cfa32a592f40101&ZOHO_API_VERSION=1.0'
    
         --data-urlencode 'CONFIG={
            "slideName":"",
            "newSlideName":["",""],
            "viewNames":"",
            "accessWithoutLogin":"",
            "regenerateSlideKey":""
            }'
    
         -X POST
         https://<hostname>:<webclientport>/api/abc@zylker.com/Workspacename
    

    Sample Response JSON Format:

    {
      "response": {
        "uri": "/api/EmailAddress/WorkspaceName",
        "action": "UPDATESLIDESHOW",
        "result": {
          "message": "Slideshow updated successfully."
        }
      }
    }
    

    This API updates the slideshow details present in the workspace identified by the URI.

    METHOD : POST

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<Workspacename>

    COMMON PARAMETERS

    Parameter Possible Values Description
    ZOHO_ACTION UPDATESLIDESHOW 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 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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

    ACTION SPECIFIC PARAMETERS

    Parameter Value
    CONFIG

    Provide the value as JSONObject using the keys given below.(Do encode the value)

    KeyTypeDescription
    slideName*StringName of the slideshow to be updated.
    newSlideNameStringNew name for the slideshow.
    viewNamesJSONArrayList of view names to be included in the slideshow.
    Note: Existing views mapped for the slideshows will be replaced by the given views.
    accessWithoutLoginBooleanIf set as true, anyone with the slideshow url can access the slideshow.
    If set as false, only the users having read access for the views present in the slideshow can access.
    regenerateSlideKeyBooleanIf set as true existing slideshow url will be expired.

    Note: Fields with * are mandatory.

    Possible Error Codes In UPDATE SLIDE SHOW

    7103 , 7138 , 8504 , 8506 , 8516 , 8533

    Delete Slide Show

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



    Sample Request:

    curl -d 'ZOHO_ACTION=DELETESLIDESHOW&ZOHO_OUTPUT_FORMAT=JSON&ZOHO_ERROR_FORMAT=JSON
            &authtoken=f7d016b46be2acsd4cfa32a592f40101&ZOHO_API_VERSION=1.0'
    
         --data-urlencode 'CONFIG={
            "slideNames":["",""],
            }'
    
         -X POST
         https://<hostname>:<webclientport>/api/abc@zylker.com/Workspacename
    

    Sample Response JSON Format:

    {
      "response": {
        "uri": "/api/EmailAddress/WorkspaceName",
        "action": "DELETESLIDESHOW",
        "result": {
          "message": "Slideshow(s) deleted successfully."
        }
      }
    }
    

    This API deletes the provided slideshows present in the workspace identified by the URI.

    METHOD : POST

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<Workspacename>

    COMMON PARAMETERS

    Parameter Possible Values Description
    ZOHO_ACTION DELETESLIDESHOW 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 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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

    ACTION SPECIFIC PARAMETERS

    Parameter Value
    CONFIG

    Provide the value as JSONObject using the keys given below.(Do encode the value)

    KeyTypeDescription
    slideNames*JSONArrayName of the slideshows to be deleted.

    Note: Fields with * are mandatory.

    Possible Error Codes In DELETE SLIDE SHOW

    7103 , 7138 , 8504 , 8506 , 8516 , 8533

    Get Slide List

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



    Sample Request:

    curl -d "ZOHO_ACTION=GETSLIDELIST&ZOHO_OUTPUT_FORMAT=JSON&ZOHO_ERROR_FORMAT=JSON
             &authtoken=f7d016b46be2acsd4cfa32a592f40101&ZOHO_API_VERSION=1.0"
         https://<hostname>:<webclientport>/api/abc@zylker.com/Workspacename
    

    Sample Response JSON Format:

    {
      "response": {
        "uri": "/api/EmailAddress/WorkspaceName",
        "action": "GETSLIDELIST",
        "result": {
          "slideList": [
            {
              "slideName": "slide1",
              "slideId": "11111111111111",
              "accessWithoutLogin": "withoutLogin"
            },
            {
              "slideName": "slide2",
              "slideId": "22222222222222",
              "accessWithoutLogin": "withoutLogin"
            },
            {
              "slideName": "slide3",
              "slideId": "33333333333333",
              "accessWithoutLogin": "withLogin"
            }
          ]
        }
      }
    }
    

    This API returns the list of all slideshows present in the workspace identified by the URI.

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<Workspacename>

    COMMON PARAMETERS

    Parameter Possible Values Description
    ZOHO_ACTION GETSLIDELIST 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 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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

    Possible Error Codes In GET SLIDE LIST

    7103 , 7138 , 8504 , 8506 , 8516 , 8533

    Get Slide Info

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



    Sample Request:

    curl -d 'ZOHO_ACTION=GETSLIDEINFO&ZOHO_OUTPUT_FORMAT=JSON&ZOHO_ERROR_FORMAT=JSON
            &authtoken=f7d016b46be2acsd4cfa32a592f40101&ZOHO_API_VERSION=1.0'
    
         --data-urlencode 'CONFIG={
            "slideName":"",
            }'
    
         https://<hostname>:<webclientport>/api/abc@zylker.com/Workspacename
    

    Sample Response JSON Format:

    {
      "response": {
        "uri": "/api/EmailAddress/WorkspaceName",
        "action": "GETSLIDEINFO",
        "result": {
          "slideInfo": {
            "slideName": "slide1",
            "accessType": "withLogin",
            "viewNames": [
              "View_1",
              "View_2",
              "View_3",
            ]
          }
        }
      }
    }
    

    This API returns metadata of the given slideshow present in the workspace identified by the URI.

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<Workspacename>

    COMMON PARAMETERS

    Parameter Possible Values Description
    ZOHO_ACTION GETSLIDEINFO 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 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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

    ACTION SPECIFIC PARAMETERS

    Parameter Value
    CONFIG

    Provide the value as JSONObject using the keys given below.(Do encode the value)

    KeyTypeDescription
    slideName*StringName of the slideshow for which metadata is needed.

    Note: Fields with * are mandatory.

    Possible Error Codes In GET SLIDE INFO

    7103 , 7138 , 8504 , 8506 , 8516 , 8533

    Get Slide Url

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



    Sample Request:

    curl -d 'ZOHO_ACTION=GETSLIDEURL&ZOHO_OUTPUT_FORMAT=JSON&ZOHO_ERROR_FORMAT=JSON
            &authtoken=f7d016b46be2acsd4cfa32a592f40101&ZOHO_API_VERSION=1.0'
    
         --data-urlencode 'CONFIG={
            "slideName":"",
            "autoplay":"",
            "slideInterval":"",
            "includeTitle":"",
            "includeDesc":"",
            "includeSocialWidgets":"",
            }'
    
         https://<hostname>:<webclientport>/api/abc@zylker.com/Workspacename
    

    Sample Response JSON Format:

    {
      "response": {
        "uri": "/api/EmailAddress/WorkspaceName",
        "action": "GETSLIDEURL",
        "result": {
          "slideUrl": "https://analytics.zoho.com/ZDBSlideshow.cc?SLIDEID=100002000000008001&SLIDEKEY=87e8b28353d06066337bf7e42b54ddf7&AUTOPLAY=true&INTERVAL=25&INCLUDETITLE=true&INCLUDEDESC=true&SOCIALWIDGETS=false"
        }
      }
    }
    

    This API returns the URL to access the mentioned slideshow present in the workspace identified by the URI.

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>/<Workspacename>

    COMMON PARAMETERS

    Parameter Possible Values Description
    ZOHO_ACTION GETSLIDEURL 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 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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

    ACTION SPECIFIC PARAMETERS

    Parameter Value
    CONFIG

    Provide the value as JSONObject using the keys given below.(Do encode the value)

    KeyTypeDescription
    slideName*StringName of the slideshow for which the access url is needed.
    autoplayBooleanIf set as true, views present in the slideshow scroll automatically.
    slideIntervalIntegerTime interval(in seconds) at which the views present in the slideshow switch.
    Note:value should be between 10 to 300.
    includeTitleBooleanIf set as false, view name will be hidden.
    includeDescBooleanIf set as false, view description will be hidden.
    includeSocialWidgetsBooleanIf set as true, social widgets will be visible.
    withCustomDomain
    (Only For White Label Customers)
    BoleanIf set as true analytics domain will be replace by your custom domain name.

    Note: Fields with * are mandatory.

    Possible Error Codes In GET SLIDE URL

    7103 , 7138 , 8504 , 8506 , 8516 , 8533

    Error Codes in Embed API

    This section explains about the error response sent from the Zoho Analytics server on failure of Sharing APIs. You can use this for appropriate error handling.

    Error Handling

    Sample error XML Format:

    
    <response uri="/api/abc@zylker.com/Employee" action="GETVIEWURL">
        <error> 
            <code>7103</code>
            <message>
            Workspace not found! Please check whether the workspace exists
            </message>
        </error>
    </response>
    
    

    Sample error JSON Format:

    {
        "response": 
        {
            "uri": "\/api\/abc@zylker.com\/Employee",
            "action": "GETVIEWURL",
            "error": 
            {
            "code":7103,
            "message": "Workspace not found! Please check whether the workspace exists"
            } 
        }
    }
    

    Error Codes

    Error Code Reason Solution
    7103 The workspace name specified in the API request URL does not exist. Please provide an existing workspace name to get the sharing details.
    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.
    8023 You do not have the required permission to perform this operation. Kindly contact our support team.
    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 onprem-support@zohoanalytics.com . Zoho Analytics will get back to you with the best possible solution.

    User Management API

    This section lists the User Management APIs for managing users in the Zoho Analytics Administrator account.

    Manage User APIs are used to Add / Remove / Activate / Deactivate Users to your Zoho Analytics Account. This APIs can be invoked only by the Administrator of the Zoho Analytics account to add / activate / deactivate users to his account.

    Get Users

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

    Sample Request:

    using ZReports;
    
    namespace Test
    {
        AUTHTOKEN = "************";
        EMAIL = "user@zylker.com";
    
        class Program
        {
            public IReportClient getClient()
            {
                IReportClient RepClient = new ReportClient(AUTHTOKEN);
                return RepClient;
            }
    
            public void getusers(IReportClient rc)
            {
                try
                {
                    string uri = rc.GetURI(EMAIL);
                    var result = rc.GetUsers(uri, null);
                }
                catch (Exception e)
                {
                    Console.WriteLine(e);
                }
            }
    
            static void Main(string[] args)
            {
                Program obj = new Program();
                IReportClient rc = obj.getClient();
                obj.getusers(rc);
            }
        }
    }
    
    package main
    
    import (
            "fmt"
            "zoho/pkg/reportclient"
    
    )
    
    var(
            email = "user@zylker.com"
            authtoken = "************"
    )
    
    func getusers(){
        url := reportclient.GetUserUri(email)
        params := map[string]string{}
        result , err := reportclient.GetUsers(url, params)
        if(err != nil){
            fmt.Println(err.ErrorMessage)
            fmt.Println(err.ErrorCode)
            fmt.Println(err.Action)
            fmt.Println(err.HttpStatusCode)
        }else{
            fmt.Println(result)
        }
    }
    
    func main() {
            reportclient.SetAuthToken(authtoken)
            getusers()
    }
    
    import com.adventnet.zoho.client.report.*;
    
    public class Sample 
    {
        String email = "user@zylker.com";
        String authtoken = "************";
    
        private ReportClient rc = new ReportClient(authtoken);
        rc.setIamServerURL("https://<hostname>:<webclientport>/iam");
        rc.setReportServerURL("https://<hostname>:<webclientport>");
    
        public void getusers() throws Exception
        {
            String uri = rc.getURI(email);
            ArrayList resp = rc.getUsers(uri, null);
        }
    
        public static void main(String[] args) throws Exception 
        {
            Sample obj = new Sample();
            obj.getusers();
        }
    }
    
    <?php
        require 'ReportClient.php';
    
        $EMAIL_ID = "abc@zylker.com";
        $AUTHTOKEN = "************";
    
        $report_client_request = new ReportClient($AUTHTOKEN); 
    
        $uri = $request->getUserURI($EMAIL_ID);
        $result = $request->getUsers($uri);
    ?>
    
    from __future__ import with_statement
    from ReportClient import ReportClient
    import sys
    
    class Sample:
    
        LOGINEMAILID="abc@zylker.com"
        AUTHTOKEN="************"
        rc = None
        rc = ReportClient(self.AUTHTOKEN)
    
        def getusers(self,rc):
            uri = rc.getUserURI(self.LOGINEMAILID)
            result = rc.getUsers(uri)
            print result
    
    obj = Sample()
    obj.getusers(obj.rc)
    
    curl -d "ZOHO_ACTION=GETUSERS&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
             &ZOHO_API_VERSION=1.0&authtoken=************
             https://<hostname>:<webclientport>/api/abc@zylker.com
    
    

    Sample Response XML Format:

    <?xml version="1.0" encoding="UTF-8" ?>
    <response uri="/api/user@zylker.com" action="GETUSERS">
        <result>
            <user emailId="user@zylker.com" status="true" role="Admin"> </user>
            <user emailId="user+1@zylker.com" status="true" role="User"> </user>
            <user emailId="user+2@zylker.com" status="true" role="User"> </user>
        </result>
    </response>
    
    

    Sample Response JSON Format:

    {
      "response": {
        "uri": "/api/user@zylker.com",
        "action": "GETUSERS",
        "result": [
          {
            "emailId": "user@zylker.com",
            "status": true,
            "role": "Admin"
          },
          {
            "emailId": "user+1@zylker.com",
            "status": true,
            "role": "User"
          },
          {
            "emailId": "user+2@zylker.com",
            "status": true,
            "role": "User"
          },
          {
            "emailId": "user+3@zylker.com",
            "status": true,
            "role": "User"
          },
          {
            "emailId": "user+4@zylker.com",
            "status": true,
            "role": "User"
          },
          {
            "emailId": "user+5@zylker.com",
            "status": true,
            "role": "User"
          }
        ]
      }
    }
    
    

    The Get users API is used to get the users in Zoho Analytics Account. The Server Administrator and the Workspace Owner alone can use this API to get the users list in the Zoho Analytics account.

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>

    Common Parameters

    Parameter Name Possible Values Description
    ZOHO_ACTION GETUSERS 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    ZOHO_API_VERSION 1.0 The API version of Zoho Analytics based on which the application(/service) has been written. This parameter allows Zoho Analytics to handle applications based on the older versions.The current API version is 1.0.

    In case of any error other than the above said, mail the API request URL parameters and error response details to onprem-support@zohoanalytics.com . Zoho Analytics will get back to you with the best possible solution.

    POSSIBLE ERROR CODES IN GETUSERS

    8504, 8506, 8516, 8533

    Add Users

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

    Sample Request:

    using ZReports;
    
    namespace Test
    {
        AUTHTOKEN = "************";
        EMAIL = "user@zylker.com";
    
        class Program
        {
            public IReportClient getClient()
            {
                IReportClient RepClient = new ReportClient(AUTHTOKEN);
                return RepClient;
            }
    
            public void addUser(IReportClient RepClient)
            {
                string userURI = RepClient.GetURI(EMAIL);
                string emailIds = "user1@zylker.com";
                RepClient.AddUser(userURI, emailIds, null);
            }
    
            static void Main(string[] args)
            {
                Program obj = new Program();
                IReportClient rc = obj.getClient();
                obj.addUser(rc);
            }
        }
    }
    
    package main
    
    import (
            "fmt"
            "zoho/pkg/reportclient"
    
    )
    
    var(
            email = "user@zylker.com"
            authtoken = "************"
    )
    
    func adduser() {
            url := reportclient.GetUserUri(email)
            emailids := "user1@zylker.com"
            err := reportclient.AddUser(url, emailids)
            if(err != nil){
                    fmt.Println(err.ErrorMessage)
                    fmt.Println(err.ErrorCode)
                    fmt.Println(err.Action)
                    fmt.Println(err.HttpStatusCode)
            }else{
                    fmt.Println("Success")
            }
    }
    
    func main() {
            reportclient.SetAuthToken(authtoken)
            adduser()
    }
    
    import com.adventnet.zoho.client.report.*;
    
    public class Sample 
    {
        String email = "user@zylker.com";
        String authtoken = "************";
        String emails = "abc@zylker.com";
        Map config = new HashMap();
    
        private ReportClient rc = new ReportClient(authtoken);
        rc.setIamServerURL("https://<hostname>:<webclientport>/iam");
        rc.setReportServerURL("https://<hostname>:<webclientport>");
    
        public void adduser() throws Exception
        {
            String uri = rc.getURI(email);
            rc.addUser(uri,emails,config);
        }
    
        public static void main(String[] args) throws Exception 
        {
            Sample obj = new Sample();
            obj.adduser();
        }
    }
    
    <?php
        require 'ReportClient.php';
    
        $EMAIL_ID = "abc@zylker.com";
        $AUTHTOKEN = "************";
    
        $report_client_request = new ReportClient($AUTHTOKEN); 
    
        $uri = $report_client_request->getUserURI($EMAIL_ID);
        $emails = "user1@yourdomain.com,user2@yourdomain.com";
        $report_client_request->addUser($uri, $emails);
    ?>
    
    from __future__ import with_statement
    from ReportClient import ReportClient
    import sys
    
    class Sample:
    
        LOGINEMAILID="abc@zylker.com"
        AUTHTOKEN="************"
        rc = None
        rc = ReportClient(self.AUTHTOKEN)
    
        def AddUser(self,rc):
            uri = rc.getUserURI(self.LOGINEMAILID)
            emailIds = "user@zylker.com"
            rc.addUser(self,uri,emailIds)
    
    obj = Sample()
    obj.AddUser(obj.rc)
    
    curl -d "ZOHO_ACTION=ADDUSER&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
             &ZOHO_API_VERSION=1.0&authtoken=f7d016asw6be276cd4cfa32a592f40101
             &ZOHO_EMAILS=user@zylker.com" 
             https://<hostname>:<webclientport>/api/abc@zylker.com
    
    

    Sample Response XML Format:

    <response uri="/api/abc@zylker.com" action="ADDUSER">
        <result>
            <message>User(s) added successfully</message>
        </result>
    </response>
    
    

    Sample Response JSON Format:

    {
        "response": 
        {
            "uri": "\/api\/abc@zylker.com",
            "action": "ADDUSER",
            "result": 
            {
                "message": "User(s) added successfully"
            } 
        }
    }
    

    Use this API to add users to your Zoho Analytics Account (provided you are the Administrator). The users will be added in "Active State" by default and the active user count in your account will be increased accordingly. Incase your account already has exceeded the allowed user count limit, then the newly added users will be set as "Deactive". An invitation mail will be triggered to the newly added users.

    Note: This API is used to just add users into your (Administrator's) Zoho Analytics Account. This API does not create user accounts.

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>

    Common Parameters

    Parameter Possible Values Description
    ZOHO_ACTION ADDUSER 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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

    Action Specific Parameters

    Parameter Name Possible Values Description
    ZOHO_EMAILS User email ID's This parameter holds the email addresses of the users to be added in your (Administrator's) Zoho Analytics Account.
    The email addresses should be comma separated.
    Ex:ZOHO_EMAILS=user1@yourdomain.com,user2@yourdomain.com
    ROLE VIEWER (to add a Viewer) or MANAGER (to add a Manager) This parameter is mandatory to add a manager or a viewer. Learn more about Managers and Viewers here.
    Note: To add a viewer, you need to purchase a viewer license.

    POSSIBLE ERROR CODES IN ADD USER

    8504, 8506, 8509, 8516, 8533

    Remove User

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

    Sample Request:

    using ZReports;
    
    namespace Test
    {
        AUTHTOKEN = "************";
        EMAIL = "user@zylker.com";
    
        class Program
        {
            public IReportClient getClient()
            {
                IReportClient RepClient = new ReportClient(AUTHTOKEN);
                return RepClient;
            }
    
            public void removeUser(IReportClient RepClient)
            {
                string userURI = RepClient.GetURI(EMAIL);
                string emailIds = "user1@zylker.com";
                RepClient.RemoveUser(userURI, emailIds, null);
            }
    
            static void Main(string[] args)
            {
                Program obj = new Program();
                IReportClient rc = obj.getClient();
                obj.removeUser(rc);
            }
        }
    }
    
    package main
    
    import (
            "fmt"
            "zoho/pkg/reportclient"
    
    )
    
    var(
            email = "user@zylker.com"
            authtoken = "************"
    )
    
    func removeuser() {
            url := reportclient.GetUserUri(email)
            emailids := "user1@zylker.com"
            err := reportclient.RemoveUser(url, emailids)
            if(err != nil){
                    fmt.Println(err.ErrorMessage)
                    fmt.Println(err.ErrorCode)
                    fmt.Println(err.Action)
                    fmt.Println(err.HttpStatusCode)
            }else{
                    fmt.Println("Success")
            }
    }
    
    func main() {
            reportclient.SetAuthToken(authtoken)
            removeuser()
    }
    
    import com.adventnet.zoho.client.report.*;
    
    public class Sample 
    {
        String email = "user@zylker.com";
        String authtoken = "************";
        String emails = "abc@zylker.com";
        Map config = new HashMap();
    
        private ReportClient rc = new ReportClient(authtoken);
        rc.setIamServerURL("https://<hostname>:<webclientport>/iam");
        rc.setReportServerURL("https://<hostname>:<webclientport>");
    
        public void removeuser() throws Exception
        {
            String uri = rc.getURI(email);
            rc.removeUser(uri,emails,config);
        }
    
        public static void main(String[] args) throws Exception 
        {
            Sample obj = new Sample();
            obj.removeuser();
        }
    }
    
    <?php
        require 'ReportClient.php';
    
        $EMAIL_ID = "abc@zylker.com";
        $AUTHTOKEN = "************";
    
        $report_client_request = new ReportClient($AUTHTOKEN);
    
        $uri = $report_client_request->getUserURI($EMAIL_ID);
        $emails = "user1@yourdomain.com,user2@yourdomain.com";
        $report_client_request->removeUser($uri, $emails);
    ?>
    
    from __future__ import with_statement
    from ReportClient import ReportClient
    import sys
    
    class Sample:
    
        LOGINEMAILID="abc@zylker.com"
        AUTHTOKEN="************"
        rc = None
        rc = ReportClient(self.AUTHTOKEN)
    
        def RemoveUser(self,rc):
            uri = rc.getUserURI(self.LOGINEMAILID)
            emailIds = "user@zylker.com"
            rc.removeUser(self,uri,emailIds)
    
    obj = Sample()
    obj.RemoveUser(obj.rc)
    
    curl -d "ZOHO_ACTION=REMOVEUSER&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
             &ZOHO_API_VERSION=1.0&authtoken=************
             &ZOHO_EMAILS=user@zylker.com" 
             https://<hostname>:<webclientport>/api/abc@zylker.com
    
    

    Sample Response XML Format:

    <?xml version="1.0" encoding="UTF-8" ?>
      <response uri="/api/abc@zylker.com" action="REMOVEUSER">
        <result>
            <message>User(s) removed from Zoho Analytics successfully</message>
        </result>
    </response>
    
    

    Sample Response JSON Format:

    {
        "response": 
        {
            "uri": "\/api\/abc@zylker.com",
            "action": "REMOVEUSER",
            "result": 
            {
                "message": "User(s) removed successfully"
            } 
        }
    }
    

    The API to delete the users from the Administrator's Zoho Analytics Account. In case an active user is removed/deleted, then the count of the users associated with the account will decrease. The usage details are below.

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>

    Common Parameters

    Parameter Possible Values Description
    ZOHO_ACTION REMOVEUSER 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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

    Action Specific Parameters

    Parameter Name Possible Values Description
    ZOHO_EMAILS User email ID's This parameter holds the email addresses of the users to be deleted from the Zoho Analytics account.
    The email addresses should be comma separated.
    Ex:- ZOHO_EMAILS=user1@yourdomain.com,user2@yourdomain.com.
    Please note that removing the users from Zoho Analytics account doesn't remove the user from Zoho. It just removes the user from the Administrators Zoho Analytics Account.

    POSSIBLE ERROR CODES IN REMOVE USER

    8504, 8506, 8509, 8516, 8533

    Activate User

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

    Sample Request:

    using ZReports;
    
    namespace Test
    {
        AUTHTOKEN = "************";
        EMAIL = "user@zylker.com";
    
        class Program
        {
            public IReportClient getClient()
            {
                IReportClient RepClient = new ReportClient(AUTHTOKEN);
                return RepClient;
            }
    
            public void activateUser(IReportClient RepClient)
            {
                string userURI = RepClient.GetURI(EMAIL);
                string emailIds = "user1@zylker.com";
                RepClient.ActivateUser(userURI, emailIds, null);
            }
    
            static void Main(string[] args)
            {
                Program obj = new Program();
                IReportClient rc = obj.getClient();
                obj.activateUser(rc);
            }
        }
    }
    
    package main
    
    import (
            "fmt"
            "zoho/pkg/reportclient"
    
    )
    
    var(
            email = "user@zylker.com"
            authtoken = "************"
    )
    
    func activateuser() {
            url := reportclient.GetUserUri(email)
            emailids := "user1@zylker.com"
            err := reportclient.ActivateUser(url, emailids)
            if(err != nil){
                    fmt.Println(err.ErrorMessage)
                    fmt.Println(err.ErrorCode)
                    fmt.Println(err.Action)
                    fmt.Println(err.HttpStatusCode)
            }else{
                    fmt.Println("Success")
            }
    }
    
    func main() {
            reportclient.SetAuthToken(authtoken)
            activateuser()
    }
    
    import com.adventnet.zoho.client.report.*;
    
    public class Sample 
    {
        String email = "user@zylker.com";
        String authtoken = "************";
        String emails = "abc@zylker.com";
        Map config = new HashMap();
    
        private ReportClient rc = new ReportClient(authtoken);
        rc.setIamServerURL("https://<hostname>:<webclientport>/iam");
        rc.setReportServerURL("https://<hostname>:<webclientport>");
    
        public void activateuser() throws Exception
        {
            String uri = rc.getURI(email);
            rc.activateUser(uri,emails,config);
        }
    
        public static void main(String[] args) throws Exception 
        {
            Sample obj = new Sample();
            obj.activateuser();
        }
    }
    
    <?php
        require 'ReportClient.php';
    
        $EMAIL_ID = "abc@zylker.com";
        $AUTHTOKEN = "************";
    
        $report_client_request = new ReportClient($AUTHTOKEN);
    
        $uri = $report_client_request->getUserURI($EMAIL_ID);
        $emails = "user1@yourdomain.com,user2@yourdomain.com";
        $report_client_request->activateUser($uri, $emails);
    ?>
    
    from __future__ import with_statement
    from ReportClient import ReportClient
    import sys
    
    class Sample:
    
        LOGINEMAILID="abc@zylker.com"
        AUTHTOKEN="************"
        rc = None
        rc = ReportClient(self.AUTHTOKEN)
    
        def ActivateUser(self,rc):
            uri = rc.getUserURI(self.LOGINEMAILID)
            emailIds = "user@zylker.com"
            rc.activateUser(self,uri,emailIds)
    
    obj = Sample()
    obj.ActivateUser(obj.rc)
    
    curl -d "ZOHO_ACTION=ACTIVATEUSER&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
             &ZOHO_API_VERSION=1.0&authtoken=************
             &ZOHO_EMAILS=user@zylker.com" 
             https://<hostname>:<webclientport>/api/abc@zylker.com
    
    

    Sample Response XML Format:

    <response uri="/api/abc@zylker.com" action="ACTIVATEUSER">
        <result>
            <message>User(s) activated successfully</message>
        </result>
    </response>
    
    

    Sample Response JSON Format:

    {
        "response": 
        {
            "uri": "\/api\/abc@zylker.com",
            "action": "ACTIVATEUSER",
            "result": 
            {
                "message": "User(s) activated successfully"
            } 
        }
    }
    

    You can activate an user using the Activate User API. Once you activate a user, he/she will be a part of the total active user count. This API will fail to activate the user, if the user count limit available for the account is reached.

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>

    Common Parameters

    Parameter Possible Values Description
    ZOHO_ACTION ACTIVATEUSER 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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

    Action Specific Parameters

    Parameter Name Possible Values Description
    ZOHO_EMAILS User email ID's This parameter holds the email addresses of the users to be activated in Administrator's Zoho Analytics Account.
    The email addresses should be comma separated.
    Ex:- ZOHO_EMAILS=user1@yourdomain.com,user2@yourdomain.com

    POSSIBLE ERROR CODES IN ACTIVATE USER

    8504, 8506, 8509, 8516, 8533

    Deactivate User

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

    Sample Request:

    using ZReports;
    
    namespace Test
    {
        AUTHTOKEN = "************";
        EMAIL = "user@zylker.com";
    
        class Program
        {
            public IReportClient getClient()
            {
                IReportClient RepClient = new ReportClient(AUTHTOKEN);
                return RepClient;
            }
    
            public void deActivateUser(IReportClient RepClient)
            {
                string userURI = RepClient.GetURI(EMAIL);
                string emailIds = "user1@zylker.com";
                RepClient.DeActivateUser(userURI, emailIds, null);
            }
    
            static void Main(string[] args)
            {
                Program obj = new Program();
                IReportClient rc = obj.getClient();
                obj.deActivateUser(rc);
            }
        }
    }
    
    package main
    
    import (
            "fmt"
            "zoho/pkg/reportclient"
    
    )
    
    var(
            email = "user@zylker.com"
            authtoken = "************"
    )
    
    func deactivateuser() {
            url := reportclient.GetUserUri(email)
            emailids := "user1@zylker.com"
            err := reportclient.DeActivateUser(url, emailids)
            if(err != nil){
                    fmt.Println(err.ErrorMessage)
                    fmt.Println(err.ErrorCode)
                    fmt.Println(err.Action)
                    fmt.Println(err.HttpStatusCode)
            }else{
                    fmt.Println("Success")
            }
    }
    
    func main() {
            reportclient.SetAuthToken(authtoken)
            deactivateuser()
    }
    
    import com.adventnet.zoho.client.report.*;
    
    public class Sample 
    {
        String email = "user@zylker.com";
        String authtoken = "************";
        String emails = "abc@zylker.com";
        Map config = new HashMap();
    
        private ReportClient rc = new ReportClient(authtoken);
        rc.setIamServerURL("https://<hostname>:<webclientport>/iam");
        rc.setReportServerURL("https://<hostname>:<webclientport>");
    
        public void deactivateuser() throws Exception
        {
            String uri = rc.getURI(email);
            rc.deActivateUser(uri,emails,config);
        }
    
        public static void main(String[] args) throws Exception 
        {
            Sample obj = new Sample();
            obj.deactivateuser();
        }
    }
    
    <?php
        require 'ReportClient.php';
    
        $EMAIL_ID = "abc@zylker.com";
        $AUTHTOKEN = "************";
    
        $report_client_request = new ReportClient($AUTHTOKEN); 
    
        $uri = $report_client_request->getUserURI($EMAIL_ID);
        $emails = "user1@yourdomain.com,user2@yourdomain.com";
        $report_client_request->deActivateUser($uri, $emails);
    ?>
    
    from __future__ import with_statement
    from ReportClient import ReportClient
    import sys
    
    class Sample:
    
        LOGINEMAILID="abc@zylker.com"
        AUTHTOKEN="************"
        rc = None
        rc = ReportClient(self.AUTHTOKEN)
    
        def DeActivateUser(self,rc):
            uri = rc.getUserURI(self.LOGINEMAILID)
            emailIds = "user@zylker.com"
            rc.deActivateUser(self,uri,emailIds)
    
    obj = Sample()
    obj.DeActivateUser(obj.rc)
    
    curl -d "ZOHO_ACTION=DEACTIVATEUSER&ZOHO_OUTPUT_FORMAT=XML
             &ZOHO_ERROR_FORMAT=XML&ZOHO_API_VERSION=1.0&authtoken=************
             &ZOHO_EMAILS=user@zylker.com" 
             https://<hostname>:<webclientport>/api/abc@zylker.com
    
    

    Sample Response XML Format:

    <response uri="/api/abc@zylker.com" action="DEACTIVATEUSER">
        <result>
            <message>User(s) de-activated successfully</message>
        </result>
    </response>
    
    

    Sample Response JSON Format:

    {
        "response": 
        {
            "uri": "\/api\/abc@zylker.com",
            "action": "DEACTIVATEUSER",
            "result": 
            {
                "message": "User(s) de-activated successfully"
            } 
        }
    }
    

    This API is used to de-activate the specified users from the Administrator's Zoho Analytics Account. The activated users will be de-activated using the Deactivate Users API. Once the user is de-activated, the user count will be decreased if the user(s) was in Active State. The usage details are below.

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>

    Common Parameters

    Parameter Possible Values Description
    ZOHO_ACTION DEACTIVATEUSER 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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

    Action Specific Parameters

    Parameter Name Possible Values Description
    ZOHO_EMAILS User email ID's This parameter holds the email addresses of the users to be deactivated from the Zoho Analytics account.
    The email addresses should be comma separated.
    Ex:- ZOHO_EMAILS=user1@yourdomain.com,user2@yourdomain.com

    POSSIBLE ERROR CODES IN DEACTIVATE USER

    8504, 8506, 8509, 8516, 8533

    Change User Role

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

    Sample Request:

    using ZReports;
    
    namespace Test
    {
        AUTHTOKEN = "************";
        EMAIL = "user@zylker.com";
    
        class Program
        {
            public IReportClient getClient()
            {
                IReportClient RepClient = new ReportClient(AUTHTOKEN);
                return RepClient;
            }
    
            public void changeUserRole(IReportClient RepClient)
            {
                string userURI = RepClient.GetURI(EMAIL);
                string emailIds = "user1@zylker.com";
                string role = "MANAGER";
                RepClient.ChangeUserRole(userURI, emailIds, role, null);
            }
    
            static void Main(string[] args)
            {
                Program obj = new Program();
                IReportClient rc = obj.getClient();
                obj.changeUserRole(rc);
            }
        }
    }
    
    package main
    
    import (
            "fmt"
            "zoho/pkg/reportclient"
    
    )
    
    var(
            email = "user@zylker.com"
            authtoken = "************"
    )
    
    func changeuserrole() {
            url := reportclient.GetUserUri(email)
            emailids := "user1@zylker.com"
            role := "MANAGER"
            
            err := reportclient.ChangeUserRole(url, emailids, role)
            if(err != nil){
                    fmt.Println(err.ErrorMessage)
                    fmt.Println(err.ErrorCode)
                    fmt.Println(err.Action)
                    fmt.Println(err.HttpStatusCode)
            }else{
                    fmt.Println("Success")
            }
    }
    
    func main() {
            reportclient.SetAuthToken()
            changeuserrole()
    }
    
    import com.adventnet.zoho.client.report.*;
    
    public class Sample 
    {
        String email = "user@zylker.com";
        String authtoken = "************";
        String emails = "abc@zylker.com";
        Map config = new HashMap();
    
        private ReportClient rc = new ReportClient(authtoken);
        rc.setIamServerURL("https://<hostname>:<webclientport>/iam");
        rc.setReportServerURL("https://<hostname>:<webclientport>");
    
        public void changeUserRole() throws Exception
        {
            String uri = rc.getURI(email);
            rc.changeUserRole(uri,emails,role);
        }
    
        public static void main(String[] args) throws Exception 
        {
            Sample obj = new Sample();
            obj.changeUserRole();
        }
    }
    
    
    <?php
        require 'ReportClient.php';
    
        $EMAIL_ID = "abc@zylker.com";
        $AUTHTOKEN = "************";
    
        $report_client_request = new ReportClient($CLIENT_ID, $CLIENT_SECRET, $REFRESH_TOKEN); 
    
        $uri = $report_client_request->getUserURI($EMAIL_ID);
        $emails = "user1@yourdomain.com,user2@yourdomain.com";
        $report_client_request->changeUserRole($uri, $emails, $role);
    ?>
    
    from __future__ import with_statement
    from ReportClient import ReportClient
    import sys
    
    class Sample:
    
        LOGINEMAILID="abc@zylker.com"
        AUTHTOKEN="************"
        rc = None
        rc = ReportClient(self.AUTHTOKEN)
    
        def changeUserRole(self,rc):
            uri = rc.getUserURI(self.LOGINEMAILID)
            emailIds = "user@zylker.com"
            role = "MANAGER"
            rc.changeUserRole(uri,emailIds,role)
    
    obj = Sample()
    obj.changeUserRole(obj.rc)
    
    curl -d "ZOHO_ACTION=CHANGEUSERROLE&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
             &ZOHO_API_VERSION=1.0&authtoken=f7d016asw6be276cd4cfa32a592f40101
             &ZOHO_EMAILS=user@zylker.com" 
             https://<hostname>:<webclientport>/api/abc@zylker.com
    
    

    Sample Response JSON Format:

    {
        "response": 
        {
            "uri": "\/api\/abc@zylker.com",
            "action": "CHANGEUSERROLE",
            "result": 
            {
                "message": "User(s) role has been changed successfully."
            } 
        }
    }
    

    This API updates the role of specific users in your Zoho Analytics application, and is only applicable if you have purchased a Viewer license. To purchase a viewer license, click here. To learn more about Viewers and Managers, click here.

    Request URI

    https://<hostname>:<webclientport>/api/<zohoanalyticsemailaddress>

    Common Parameters

    Parameter Possible Values Description
    ZOHO_ACTION CHANGEUSERROLE 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.
    authtoken user authtoken Auth Token is an unique token that authenticates the user.
    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

    Action Specific Parameters

    Parameter Name Possible Values Description
    ZOHO_EMAILS User email ID's Email addresses of the users whose role has to be changed.
    The email addresses should be comma separated.
    Ex:ZOHO_EMAILS=user1@yourdomain.com,user2@yourdomain.com
    ROLE VIEWER (to add a Viewer) or MANAGER (to add a Manager) This parameters allows you to change the user role from Manager to Viewer, and vice versa. Learn more about Managers and Viewers here.
    Note: To add a viewer, you need to purchase a viewer license.

    POSSIBLE ERROR CODES IN ADD USER

    8504, 8506, 8509, 8516, 8533

    Error Codes in UserManagement API

    Sample error message:

    
    The sample response sent from the server if the  error is occured.
    
    

    XML Format:

    <response uri="/api/abc@zylker.com" action="ADDUSER">
        <error>
            <code>6021</code>
            <message>
                Sorry, you cannot activate additional user(s). Your plan limit allows you to 
                have only 2 shared users.Kindly ;Upgrade your plan to activate more users.
            </message>
        </error>
    </response>
    
    
    

    JSON Format:

    {
        "response": 
        {
            "uri": "\/api\/abc@zylker.com",
            "action": "ADDUSER",
            "error": 
            {
                "code":6021,
                "message": "Sorry, you cannot activate additional user(s). 
                             Your plan limit allows you to have
                only 2 shared users.Kindly ;Upgrade your plan to activate more users."
            } 
        }
    }
    

    This section explains about the possible error responses that could be returned by Zoho Analytics on failure of the Manage User API calls discussed above. The sample error response is below.

    Error Codes:

    Error Code Reason Solution
    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.
    8509 The Email IDs provided in ZOHO_EMAILS parameter is not proper / not in the Email ID format. Check the email addresses passed in the parameter and provide a proper email address.
    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 you encounter any other errors, please mail the API request URL parameters and error response details to onprem-support@zohoanalytics.com . We will get back to you shortly with the best possible solution.

    Client Libraries

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

    Java Library

    The Java client libraries wraps the raw HTTP based API of Zoho Analytics with easy to use methods for Java language. This enables Java developers to easily use Zoho Analytics On-Premise API.

    Javadocs

    Click here for javadocs.

    Download Java Client Library

    Download the Java client library from this link.

    Python Library

    The Python client libraries wraps the raw HTTP based API of Zoho Analytics with easy to use methods for Python language. This enables Python developers to easily use Zoho Analytics On-Premise API.

    Pythondocs

    Click here for pythondocs. (Note: The main class is ReportClient).

    Download Python Client Library

    Download the Python client library from this link.

    PHP Library

    The PHP client libraries wraps the raw HTTP based API of Zoho Analytics with easy to use methods for PHP language. This enables PHP developers to easily use Zoho Analytics On-Premise API.

    phpdocs

    Click here for phpdocs.

    Download php Client Library

    Download the php client library from this link.

    GO Library

    The GO client libraries wraps the raw HTTP based API of Zoho Analytics with easy to use methods for GO language. This enables GO developers to easily use Zoho Analytics On-Premise API.

    godocs

    Click here for godocs.

    Download go Client Library

    Download the go client library from this link.

    C# Library

    The C# client libraries wraps the raw HTTP based API of Zoho Analytics with easy to use methods for the C#.Net platform. This enables C#.Net developers to easily use Zoho Analytics On-Premise API.

    Prerequisites:

    It is recommend to go through the Zoho Analytics On-Premise API Documentation and the Prerequisites before using the C# client library code in your application.

    C#-docs

    Click here for csharpdocs.

    Download C# Client Library:

    Download the C# client library (dll) from this link.

    Add reference to your C# Projects using these.dll files. With this you will be able to perform Zoho Analytics On-Premise API operations using the available functions.

    Methods Summary:

    C#.Net developers need to create a ReportClient object to access the library functions. The sample code snippet is below.

    IReportClient RepClient = new ReportClient("-----your authtoken-----");

    The ReportClient constructor has a single argument called AuthToken. You can find more information on how to get a AuthToken here. Once the ReportClient object is created, you can invoke the methods from your C#.Net programming language.