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

Introduction

The Zoho Analytics API allows you to perform most of the operations that you do with our web client.

Zoho Analytics API is built using REST principles, which ensures predictable URLs that make writing applications easy. This API follows HTTP rules, enabling a wide range of HTTP clients can be used to interact with the API.

Every resource is exposed as a URL. The URL of each resource can be obtained by accessing the API Root Endpoint.

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

API Specification

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

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


Server URI

The following server URI are available for Zoho Analytics. Choose the server URI based on your data centre.

Data Centre ZohoAnalytics_Server_URI ZohoAccounts_Server_URI DeveloperConsole
US
(United States)
analyticsapi.zoho.com accounts.zoho.com api-console.zoho.com
EU
(Europe)
analyticsapi.zoho.eu accounts.zoho.eu api-console.zoho.eu
IN
(India)
analyticsapi.zoho.in accounts.zoho.in api-console.zoho.in
AU
(Australia)
analyticsapi.zoho.com.au accounts.zoho.com.au api-console.zoho.com.au
CN
(China)
analyticsapi.zoho.com.cn accounts.zoho.com.cn api-console.zoho.com.cn
JP
(Japan)
analyticsapi.zoho.jp accounts.zoho.jp api-console.zoho.jp


Request Format

Sample Request:

Copy
curl https://analyticsapi.zoho.com/restapi/v2/workspaces --data-urlencode 'CONFIG={ "workspaceName":"<workspace-name>" }' -X 'POST' -H 'ZANALYTICS-ORGID: <org-id>' -H 'Authorization: Zoho-oauthtoken <access_token>'

All API requests should be placed as HTTPS requests. A request consists of the following components:

URI

The URI of each resource can be obtained by accessing the API Root Endpoint.

Sample: https://<ZohoAnalytics_Server_URI>/restapi/v2/workspaces

Config to be passed in Query String

The following snippet shows the config that should be passed as query string with the URI defined above.

https://<end_point>?CONFIG={"workspaceName":"<workspace-name>"}

Authorization Using OAuth 2.0

Access token have to be passed in the header for authorization purpose in the format given below.

Authorization: Zoho-oauthtoken <access_token>

Organization ID

Zoho Analytics Organization


For every organization in Zoho Analytics an unique ID (Organization ID) is present. The header “ZANALYTICS-ORGID“ with the 'Organization ID' should be sent with the API request to identify the organization.

ZANALYTICS-ORGID: <organization_id>

Using Get Organizations API the list of all accessible organizations can be obtained.


Note: In case of importing CSV or JSON files, multipart/form-data format should be used. (This is the default format used by HTML forms that contain file type fields used for uploading files.)


Response Format

Sample Response:

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "status": "success",
    "summary": "Create workspace",
    "data": {
        "workspaceId": "1767024000003145002"
    }
}

Zoho Analytics supports JSON response format for APIs. CSV, JSON, XML, PDF, HTML and Image response formats are supported only for Export API.

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

Formats such as CSV, PDF can be specified only for EXPORT API. These formats don’t have any generic parseable header/footer. See this link for more details about these formats.


Error handling

Sample Error:

HTTP/1.1 400 Bad Request
Content-Type:application/json;charset=UTF-8

{
    "status": "failure",
    "summary": "META_DBNAME_DUPLICATE",
    "data": {
        "errorCode": 7101,
        "errorMessage": "Workspace with the same name exists already. Provide an alternate name"
    }
}

API execution could result in Error conditions. In such cases, follow the below steps to identify an error condition and handle the same:


Applying Filter Criteria

Example


(( "Sales"."Region"='East' and "Sales"<1000) or ("Sales"."Region"='West'
and "Sales"<2000))

Sample


A sample delete request that deletes all the rows that match the criteria 
"Sales"."Region"='East' is given below.

URL:


https://analyticsapi.zoho.com/restapi/v2/workspaces/1767025050053160012/views/1769024500004160002/rows?CONFIG={"criteria":"\"Sales\".\"Region\"='East'"}

Zoho Analytics API allows you to apply filter criteria while you execute the various actions. On applying a criteria, the action will be performed only on the data that matches the given filter criteria.

You can apply criteria as part of the following API actions:

The filter criteria has to be passed as a JSON attribute named “criteria“ in the API request.

Format

The filter criteria that is passed as part of the request, should follow the same format as that of the SQL SELECT WHERE clause.

The generalized format of a simple criteria is given below:

(<columnname/SQL expression/SQL function calls> <relational operator> <value/column name/SQL expression/SQL function calls>)

On using criteria for views which involves multiple tables having the same column name, the criteria should append with the table name to avoid name mismatch.

<tablename>.<columnname> <relational operator> <value/column name/SQL expression/SQL function calls>

Description

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

Name Description
column name Refers to the column name of your table or query table on which you are applying a criteria.
SQL Expression You could provide any valid SQL Expression.
The above expression subtracts the value in the “Cost” column from the value in the “Sales” column. You could use any of the Arithmetic operators supported in an SQL SELECT WHERE clause.
Supported Arithmetic Operators: +, -, *, /
SQL Function call Oracle, MS SQL Server, MySQL, DB2, Sybase, ANSI SQL, Informix and PostgreSQL databases
Eg.: year(date_column) = 2008 .
Note: All supported in-built function from different databases will be documented soon.
relational operator This could be any of the relational operators supported in an SQL SELECT WHERE clause.
Supported Relational Operators:
  • =
  • !=
  • <
  • >
  • <=
  • >=
  • LIKE
  • NOT LIKE
  • IN
  • NOT IN
  • BETWEEN
  • value Refers to the exact value to match.
    Eg.: "Department" = 'Finance'
    here 'Finance' is a literal value to match.

    NOTES FOR CRITERIA FORMATION:

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

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

    Authentication

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


    Registering New Client

    Follow the below steps to register with Zoho's Developer console.

    1. Visit DeveloperConsole and click GET STARTED.
    2. Choose Client Type that suits your application type. Zoho Analytics
      • Client-based Applications: Applications that are built to run exclusively on browsers independent of web servers.
      • Server-based Applications: Web-based applications that are built to run with a dedicated HTTP server.
        NOTE:Server-based applications are chosen when your application is used by multiple users and requires user intervention during authorization.
      • Mobile-based Applications: Applications that are built to run on smartphones and tablets.
      • Non-browser Applications: Applications that run on devices without browsers such as smart TVs and printers.
      • Self Client: For standalone server-side application performing a back-end job, and you do not have a domain and a redirect URL.
        NOTE:Self Client type is recommended for users using ZohoAnalytics UploadTool and ZohoAnalytics Client Libraries.
    3. After choosing the client type, provide the required details and click 'Create'.

    On successful registration, you will be provided with a set of OAuth 2.0 credentials such as <Client_ID> and <Client_Secret> that will be only known to Zoho and your application. (Do not share this credentials anywhere.)


    Generating Code

    After generating <Client_ID> and <Client_Secret>, a grant code has to be generated. Based on the client type the code can be generated in two ways.


    Self Client Method

    Save this code and continue to step 3.


    Redirect Method

    
    The below URL is used to generate code.
    
    https://accounts.zoho.com/oauth/v2/auth?scope=<SCOPE>&client_id=<CLIENT_ID>&state=testing&response_type=code&redirect_uri=<REDIRECT_URI>&access_type=offline&prompt=consent
    


    Generating Tokens

    REFRESH TOKEN

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

    ACCESS TOKEN

    A token that is sent to the resource server to access the protected resources of the user. Each access token will be valid only for an hour, and can be used only for the set of operations that is described in the scope.

    After generating the code, a POST request has to be made for the following URI, with the params given below, to generate refresh_token and access_token.

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

    
    The below URL is used to generate access token and refresh token.
    
    https://accounts.zoho.com/oauth/v2/token?code=<CODE>&client_id=<CLIENT_ID>&client_secret=<CLIENT_SECRET>&redirect_uri=<REDIRECT_URI>&grant_type=authorization_code
    
    Parameter Name Description
    code* <code> which is obtained in the above step (Step 2)
    client_id* <client_id> obtained during Client Registration (Step 1)
    client_secret* <client_secret> obtained during Client Registration (Step 1)
    redirect_uri This param should be same redirect url mentioned while adding Client (Step 1).
    This param is not required when self client application type is choosen during Client Registration (Step 1).
    grant_type* authorization_code (provide this literal string as value)
    scope Scope (scope is nothing but a permission to access specific API) for which the token to be generated. Multiple scopes can be given, separated by commas.
    Example: ZohoAnalytics.data.all,ZohoAnalytics.modeling.create
    Refer: available scopes
    state An opaque string that is round-tripped in the protocol; that is to say, value will be passed back to the user.

    Note: Fields with * are mandatory

    1. The <access_token> will expire after an hour.

    2. The <refresh_token> is permanent and will be used to regenerate new <access_token>, if the current access token expired.

    NOTE: Each time a re-consent page is accepted, a new refresh token is generated. The maximum limit is 20 refresh tokens per user. If this limit is crossed, the first refresh token is automatically deleted to accommodate the latest one. This is done irrespective of whether the first refresh token is in use or not. (You can manually delete a refresh token by revoke request.)


    Refreshing Access Tokens

    Access Tokens have limited validity, which expires in an hour. Once the access_token expires, user (or) the app will have to use the refresh token to request for a new access token. On using an expired access token, the request terminates throwing Invalid Oauthtoken.

    NOTE: A client can create up to ten access tokens in a span of ten minutes, using a refresh token. If the limit is reached, the access token creation will be blocked for the next ten minutes.

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

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

    
    The below URL is used to Generating Access Token From Refresh Token.
    
    https://accounts.zoho.com/oauth/v2/token?refresh_token=<REFRESH_TOKEN>&client_id=<CLIENT_ID>&client_secret=<CLIENT_SECRET>&redirect_uri=<REDIRECT_URI>&grant_type=refresh_token
    
    Parameter Name Description
    refresh_token* <refresh_token> which is obtained in the above step (Step 3)
    client_id* <client_id> obtained during Client Registration (Step 1)
    client_secret* <client_secret> obtained during Client Registration (Step 1)
    redirect_uri This param should be same redirect url mentioned while registering Client (Step 1).
    This param is not required when self client application type is choosen during Client Registration (Step 1).
    grant_type* refresh_token (provide this literal string as value)

    Calling an API using OAuth authentication

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


    Revoking a Refresh Token

    You may choose to revoke a refresh token manually, when you no longer need access for a particular scope.

    Call the following POST URL with the given params to revoke a refresh token.

    POST https://<ZohoAccounts_Server_URI>/oauth/v2/token/revoke

    Request Example

    
    The below URL is used to revoke the refresh token.
    
    https://accounts.zoho.com/oauth/v2/token/revoke?token=<REFRESH_TOKEN>
    
    Parameter Name Description
    token <refresh_token> which is to be revoked


    SCOPE

    Zoho Analytics APIs use selected scopes, which control the type of API's that the client application (or) end user can access. Tokens are usually created with specific scopes to restrict it from acceessing other API's. For example, you can generate a scope to create a view (or) to view metadata and so on. Scopes contain three parameters — service name, scope name, and operation type.

    List of scopes available in Zoho Analytics :

    Scope Description
    data To access data related APIs
    Availabe Scopes: ZohoAnalytics.data.read, ZohoAnalytics.data.delete, ZohoAnalytics.data.update, ZohoAnalytics.data.create, ZohoAnalytics.data.all
    modeling To access modeling related APIs
    Availabe Scopes: ZohoAnalytics.modeling.delete, ZohoAnalytics.modeling.update, ZohoAnalytics.modeling.create, ZohoAnalytics.modeling.all
    metadata To access metadata related APIs
    Availabe Scopes: ZohoAnalytics.metadata.read, ZohoAnalytics.metadata.all
    share To access sharing related APIs
    Availabe Scopes: ZohoAnalytics.share.delete, ZohoAnalytics.share.read, ZohoAnalytics.share.create, ZohoAnalytics.share.all
    embed To access embed related APIs
    Availabe Scopes: ZohoAnalytics.embed.read, ZohoAnalytics.embed.all
    usermanagement To access usermanagement related APIs
    Availabe Scopes: ZohoAnalytics.usermanagement.read, ZohoAnalytics.usermanagement.delete, ZohoAnalytics.usermanagement.update, ZohoAnalytics.usermanagement.create, ZohoAnalytics.usermanagement.all
    fullaccess To access all ZohoAnalytics APIs
    Availabe Scope: ZohoAnalytics.fullaccess.all

    Data API

    Data APIs are used to perform addition, update, deletion, bulk import of the Zoho Analytics table data. It also offers APIs to export your tables, reports, dashboards in PDF, Excel, JSON, HTML, Image, and CSV formats.


    Add Row

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



    Sample Request:

    Copy
    curl https://analyticsapi.zoho.com/restapi/v2/workspaces/<workspace-id>/views/<view-id>/rows?CONFIG=<encoded_json_value> -X 'POST' -H 'ZANALYTICS-ORGID: <org-id>' -H 'Authorization: Zoho-oauthtoken <access_token>'

    Sample value for CONFIG parameter:

    Copy
    { "columns": { "<column-name1>": "<column-value1>", "<column-name2>": "<column-value2>" } }

    Sample Response:

    HTTP/1.1 200 OK
    Content-Type:application/json;charset=UTF-8
    
    {
        "status": "success",
        "summary": "Add row",
        "data": {
            "addedColumns": {
                "region": "East",
                "Sales": "1000"
            },
            "invalidColumns": {}
        }
    }
    

    Add a single row in the specified table.

    request uri

    POST https://<ZohoAnalytics_Server_URI>/restapi/v2/workspaces/<workspace-id>/views/<view-id>/rows

    oauthscope: ZohoAnalytics.data.create

    Query Parameters

    Parameter Name Description
    CONFIG* JSONObject

    Config parameter specifications are available in the below section.

    Fields for CONFIG JSON

    Key Description
    columns* JSONObject

    JSONObject with column name as key and data as value.

    Sample: {"columnName1":"value1","columnName2":"value2"}
    dateFormat String

    Specify this in-case any date field is being added and its format cannot be auto recognized.

    Sample: dd-MMM-YYYY
    Refer this link for more details about how to construct a custom date format.

    Possible Error Codes

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


    Update Row

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



    Sample Request:

    Copy
    curl https://analyticsapi.zoho.com/restapi/v2/workspaces/<workspace-id>/views/<view-id>/rows?CONFIG=<encoded_json_value> -X 'PUT' -H 'ZANALYTICS-ORGID: <org-id>' -H 'Authorization: Zoho-oauthtoken <access_token>'

    Sample value for CONFIG parameter:

    Copy
    { "columns": { "<column-name1>": "<column-value1>", "<column-name2>": "<column-value2>" }, "criteria": "\"<table-name>\".\"<column-name>\"='value'" }

    Sample Response:

    HTTP/1.1 200 OK
    Content-Type:application/json;charset=UTF-8
    
    {
        "status": "success",
        "summary": "Update row",
        "data": {
            "updatedColumns": {
                "region": "East",
                "Sales": "1000"
            },
            "updatedRows": 27,
            "invalidColumns": {}
        }
    }
    

    Update rows in the specified table.

    request uri

    PUT https://<ZohoAnalytics_Server_URI>/restapi/v2/workspaces/<workspace-id>/views/<view-id>/rows

    oauthscope: ZohoAnalytics.data.update

    Query Parameters

    Parameter Name Description
    CONFIG* JSONObject

    Config parameter specifications are available in the below section.

    Fields for CONFIG JSON

    Key Description
    columns* JSONObject

    JSONObject with column name as key and data as value.

    Sample: {"columnName1":"value1","columnName2":"value2"}
    criteria String

    If criteria is sent, then the rows matching the criteria alone are updated.

    Sample: {"criteria":"\"SalesTable\".\"Region\"='East'"}
    Refer this link for more details about how to construct a criteria.
    updateAllRows Boolean

    To update all the rows in the table.
    dateFormat String

    Specify this in-case any date field is being added and its format cannot be auto recognized.

    Sample: dd-MMM-YYYY
    Refer this link for more details about how to construct a custom date format.

    Possible Error Codes

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


    Delete Row

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



    Sample Request:

    Copy
    curl https://analyticsapi.zoho.com/restapi/v2/workspaces/<workspace-id>/views/<view-id>/rows?CONFIG=<encoded_json_value> -X 'DELETE' -H 'ZANALYTICS-ORGID: <org-id>' -H 'Authorization: Zoho-oauthtoken <access_token>'

    Sample value for CONFIG parameter:

    Copy
    { "criteria": "\"<table-name>\".\"<column-name>\"='value'" }

    Sample Response:

    HTTP/1.1 200 OK
    Content-Type:application/json;charset=UTF-8
    
    {
        "status": "success",
        "summary": "Delete row",
        "data": {
            "deletedRows": 27
        }
    }
    

    Delete rows in the specified table.

    request uri

    DELETE https://<ZohoAnalytics_Server_URI>/restapi/v2/workspaces/<workspace-id>/views/<view-id>/rows

    oauthscope: ZohoAnalytics.data.delete

    Query Parameters

    Parameter Name Description
    CONFIG* JSONObject

    Config parameter specifications are available in the below section.

    Fields for CONFIG JSON

    Key Description
    criteria String

    If criteria is sent, then the rows matching the criteria alone are deleted.

    Sample: {"criteria":"\"SalesTable\".\"Region\"='East'"}
    Refer this link for more details about how to construct a criteria.
    deleteAllRows Boolean

    To delete all the rows in the table.

    Possible Error Codes

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


    Error codes in Data API

    Sample Error:

    HTTP/1.1 400 Bad Request
    Content-Type:application/json;charset=UTF-8
    
    {
        "status": "failure",
        "summary": "API_NO_COLUMN_PRESENT",
        "data": {
            "errorCode": 8016,
            "errorMessage": "You need to have atleast one column for INSERT or UPDATE action"
        }
    }
    

    This section lists all possible error codes that could be sent from the Zoho Analytics server on failure of Data APIs. You can use this for appropriate error handling.

    Error Codes

    Error-Code Reason Solution
    7103 The workspace id mentioned in the API URL does not exist. Check the workspace id in the request URL and provide a valid Workspace id.
    7138 The view id mentioned in the API URL does not exist. Check the view id in the request URL and provide a valid view id.
    7235 Not even a single column name provided in source file matches with the column data in table. Check whether the column name in source data matches with column names present in analytics table.
    NOTE:Also check whether the config fileType is provided with proper value.
    7507 Value entered in the mentioned column does not follow the specified data-type. Check the value of that column and provide value in the specified data-type.
    7511 Mentioned Column is a mandatory column. Should specify the value for that mandatory column.
    8002 Specified criteria is invalid. Provide valid criteria.
    8004 The column mentioned in the criteria is not present in the table. Check the column name and provide valid name.
    8016 You need to have at-least one column for INSERT or UPDATE action. You should provide at-least one column with value.
    8504 The required parameter is not proper or has not been sent. Send the parameter with valid data.
    8506 The mentioned parameter has been sent more than the required count. Check and remove that extra parameter mentioned in the response.
    8516 Invalid value passed in the mentioned parameter. Provide the valid data to the mentioned parameter.

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

    Bulk API

    Bulk APIs are used to import bulk data into Zoho Analytics table and also offers APIs to export your tables, reports, dashboards in PDF, Excel, JSON, HTML, Image, and CSV formats.


    Import Data

    Import the provided bulk data in a new table (or) an existing table.


    In New Table

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



    Sample Request:

    Copy
    curl https://analyticsapi.zoho.com/restapi/v2/workspaces/<workspace-id>/data?CONFIG=<encoded_json_value> -F 'FILE=@/home/local/import.csv' -X 'POST' -H 'ZANALYTICS-ORGID: <org-id>' -H 'Authorization: Zoho-oauthtoken <access_token>'

    Sample value for CONFIG parameter:

    Copy
    { "tableName": "<table-name>", "fileType": "csv", "autoIdentify": "true" }

    Sample Response:

    HTTP/1.1 200 OK
    Content-Type:application/json;charset=UTF-8
    
    {
        "status": "success",
        "summary": "Import data",
        "data": {
            "viewId": "1767024000003153002",
            "importSummary": {
                "importType": "APPEND",
                "totalColumnCount": 7,
                "selectedColumnCount": 7,
                "totalRowCount": 101,
                "successRowCount": 101,
                "warnings": 0,
                "importOperation": "created"
            },
            "columnDetails": {
                "Date": "Date",
                "Region": "Plain Text",
                "Product Category": "Plain Text",
                "Product": "Plain Text",
                "Customer Name": "Plain Text",
                "Sales": "Currency",
                "Cost": "Currency"
            },
            "importErrors": ""
        }
    }
    

    Create a new table and import data on the same.

    request uri

    POST https://<ZohoAnalytics_Server_URI>/restapi/v2/workspaces/<workspace-id>/data

    oauthscope: ZohoAnalytics.data.create

    ACTION SPECIFIC PARAMETERS

    Parameter Name Description
    FILE (or) DATA* FILE - The file to be imported.

    • In the case of importing files multipart/form-data format should be used. (This is the default format used by html forms that contain file type fields used for uploading files)
    • Maximum allowed file size is 20 MB.


    DATA - The string to be imported.

    Query Parameters

    Parameter Name Description
    CONFIG* JSONObject

    Config parameter specifications are available in the below section.

    Fields for CONFIG JSON

    Key Description
    tableName* String

    The name of the table.
    fileType* String

    The format of the file to be imported.
    • csv
    • json
    autoIdentify* Boolean

    To specify whether to auto identify the CSV format.
    onError String

    Controls the action to be taken incase there is an error during import.
    • abort - Incase of any error, abort the whole import.
    • skiprow - In case of any error, skip that specific row(s) which has the problem and continue importing the rest.
    • setcolumnempty - In case of any error, set the value of the error column for the row to empty and continue importing.
    selectedColumns JSONArray

    Controls the columns that need to be imported.

    Sample: ["column1","column2"]
    skipTop Integer

    Number of rows that are to be skipped from the top in the CSV file being imported.
    thousandSeparator Integer

    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
    decimalSeparator Integer

    Controls the action to be taken in case there is a decimal separator in the data.
    • 0 - DOT
    • 1 - COMMA
    dateFormat String

    Specify this in-case any date field is being imported and its format cannot be auto recognized by Zoho Analytics.

    Sample: dd-MMM-YYYY
    Refer this link for more details about how to construct a custom date format.
    columnDateFormat JSONObject

    Specify this in case multiple date fields are being imported having different format each.
    Column name as key and date format as value.

    Sample: {"columnName1":"dd-MMM-YYYY","columnName2":"MM/dd/yyyy"}

    CSV Specific Attributes

    Note : These attributes are mandatory if autoIdentify is set to false.

    Key Description
    commentChar Char

    If the character mentioned is found at the beginning of the row, the csv row will be skipped.

    Sample: #
    delimiter Integer

    The delimiter character used for separating the fields in a row in the CSV.
    • 0 - COMMA
    • 1 - TAB
    • 2 - SEMICOLON
    • 3 - SPACE
    quoted Integer

    The Text Qualifier.
    • 0 - NONE
    • 1 - SINGLE QUOTE
    • 2 - DOUBLE QUOTE

    JSON Specific Attributes

    Key Description
    retainColumnNames Boolean

    Controls how the columns names are to be constructed from the JSON file.
    Default value - false.
    • true - the final key attribute alone will be considered as column name.
    • false - 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

    Possible Error Codes

    7103 , 7111 , 7232 , 7248 , 7249 , 8046 , 8119 , 8504 , 8506 , 8513 , 8516


    In Existing Table

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



    Sample Request:

    Copy
    curl https://analyticsapi.zoho.com/restapi/v2/workspaces/<workspace-id>/views/<view-id>/data?CONFIG=<encoded_json_value> -F 'FILE=@/home/local/import.csv' -X 'POST' -H 'ZANALYTICS-ORGID: <org-id>' -H 'Authorization: Zoho-oauthtoken <access_token>'

    Sample value for CONFIG parameter:

    Copy
    { "importType": "append", "fileType": "csv", "autoIdentify": "true" }

    Sample Response:

    HTTP/1.1 200 OK
    Content-Type:application/json;charset=UTF-8
    
    {
        "status": "success",
        "summary": "Import data",
        "data": {
            "importSummary": {
                "importType": "APPEND",
                "totalColumnCount": 7,
                "selectedColumnCount": 7,
                "totalRowCount": 755,
                "successRowCount": 755,
                "warnings": 0,
                "importOperation": "updated"
            },
            "columnDetails": {
                "Date": "Date",
                "Region": "Plain Text",
                "Product Category": "Plain Text",
                "Product": "Plain Text",
                "Customer Name": "Plain Text",
                "Sales": "Currency",
                "Cost": "Currency"
            },
            "importErrors": ""
        }
    }
    

    Import data in the specified table.

    request uri

    POST https://<ZohoAnalytics_Server_URI>/restapi/v2/workspaces/<workspace-id>/views/<view-id>/data

    oauthscope: ZohoAnalytics.data.create

    ACTION SPECIFIC PARAMETERS

    Parameter Name Description
    FILE (or) DATA* FILE - The file to be imported.
    • In the case of importing files multipart/form-data format should be used. (This is the default format used by html forms that contain file type fields used for uploading files)
    • Maximum allowed file size is 20 MB.

    DATA - The string to be imported.

    Query Parameters

    Parameter Name Description
    CONFIG* JSONObject

    Config parameter specifications are available in the below section.

    Fields for CONFIG JSON

    Key Description
    importType* String

    Controls the type of import.
    • 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.
    fileType* String

    The format of the file to be imported.
    • csv
    • json
    autoIdentify* Boolean

    To specify whether to auto identify the CSV format.
    onError String

    Controls the action to be taken incase there is an error during import.
    • abort - Incase of any error, abort the whole import.
    • skiprow - In case of any error, skip that specific row(s) which has the problem and continue importing the rest.
    • setcolumnempty - In case of any error, set the value of the error column for the row to empty and continue importing.
    matchingColumns
    (mandatory only when the importType is updateadd)
    JSONArray

    The values in the columns to be matched will be used for comparison to check whether data row(s) being imported matches with an existing row(s) in the table.
    The existing rows in the table that match will be updated with values from data imported. The remaining rows are appended to the table as new rows.

    Sample: ["column1","column2"]
    selectedColumns JSONArray

    Controls the columns that need to be imported.

    Sample: ["column1","column2"]
    skipTop Integer

    Number of rows that are to be skipped from the top in the CSV file being imported.
    thousandSeparator Integer

    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
    decimalSeparator Integer

    Controls the action to be taken in case there is a decimal separator in the data.
    • 0 - DOT
    • 1 - COMMA
    dateFormat String

    Specify this in-case any date field is being imported and its format cannot be auto recognized by Zoho Analytics.

    Sample: dd-MMM-YYYY
    Refer this link for more details about how to construct a custom date format.
    columnDateFormat JSONObject

    Specify this in case multiple date fields are being imported having different format each.
    Column name as key and date format as value.

    Sample: {"columnName1":"dd-MMM-YYYY","columnName2":"MM/dd/yyyy"}

    CSV Specific Attributes

    Note : These attributes are mandatory if autoIdentify is set to false.

    Key Description
    commentChar Char

    If the character mentioned is found at the beginning of the row, the csv row will be skipped.

    Sample: #
    delimiter Integer

    The delimiter character used for separating the fields in a row in the CSV.
    • 0 - COMMA
    • 1 - TAB
    • 2 - SEMICOLON
    • 3 - SPACE
    quoted Integer

    The Text Qualifier.
    • 0 - NONE
    • 1 - SINGLE QUOTE
    • 2 - DOUBLE QUOTE

    JSON Specific Attributes

    Note : These attributes are mandatory if autoIdentify is set to false.

    Key Description
    retainColumnNames Boolean

    Controls how the columns names are to be constructed from the JSON file.
    Default value - false.
    • true - the final key attribute alone will be considered as column name.
    • false - 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

    Possible Error Codes

    7103 , 7138 , 7232 , 7248 , 7249 , 8046 , 8119 , 8504 , 8506 , 8513 , 8516


    Import Data (Asynchronous)

    Import the provided bulk data in a new table (or) an existing table in asynchronous manner.

    Work flow of Asynchronous Import API is as follows:


    Limitations:


    Create Import Job

    Create an import job for importing the provided data in a new table (or) an existing table.


    For New Table

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



    Sample Request:

    Copy
    curl https://analyticsapi.zoho.com/restapi/v2/bulk/workspaces/<workspace-id>/data?CONFIG=<encoded_json_value> -F 'FILE=@/home/local/import.csv' -X 'POST' -H 'ZANALYTICS-ORGID: <org-id>' -H 'Authorization: Zoho-oauthtoken <access_token>'

    Sample value for CONFIG parameter:

    Copy
    { "tableName": "<table-name>", "fileType": "csv", "autoIdentify": "true" }

    Sample Response:

    HTTP/1.1 200 OK
    Content-Type:application/json;charset=UTF-8
    
    {
        "status": "success",
        "summary": "Create bulk import job",
        "data": {
            "jobId": "1767024000003153087"
        }
    }
    

    Create an import job to import data in a new table.

    request uri

    POST https://<ZohoAnalytics_Server_URI>/restapi/v2/bulk/workspaces/<workspace-id>/data

    oauthscope: ZohoAnalytics.data.create

    ACTION SPECIFIC PARAMETERS

    Parameter Name Description
    FILE* File

    The file to be imported.

    • Format should be multipart/form-data. (This is the default format used by html forms that contain file type fields used for uploading files)
    • Maximum allowed file size is 100 MB.

    Query Parameters

    Parameter Name Description
    CONFIG* JSONObject

    Config parameter specifications are available in the below section.

    Fields for CONFIG JSON

    Key Description
    tableName* String

    The name of the table.
    fileType* String

    The format of the file to be imported.
    • csv
    • json
    autoIdentify* Boolean

    To specify whether to auto identify the CSV format.
    onError String

    Controls the action to be taken incase there is an error during import.
    • abort - Incase of any error, abort the whole import.
    • skiprow - In case of any error, skip that specific row(s) which has the problem and continue importing the rest.
    • setcolumnempty - In case of any error, set the value of the error column for the row to empty and continue importing.
    selectedColumns JSONArray

    Controls the columns that need to be imported.

    Sample: ["column1","column2"]
    skipTop Integer

    Number of rows that are to be skipped from the top in the CSV file being imported.
    thousandSeparator Integer

    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
    decimalSeparator Integer

    Controls the action to be taken in case there is a decimal separator in the data.
    • 0 - DOT
    • 1 - COMMA
    dateFormat String

    Specify this in-case any date field is being imported and its format cannot be auto recognized by Zoho Analytics.

    Sample: dd-MMM-YYYY
    Refer this link for more details about how to construct a custom date format.
    columnDateFormat JSONObject

    Specify this in case multiple date fields are being imported having different format each.
    Column name as key and date format as value.

    Sample: {"columnName1":"dd-MMM-YYYY","columnName2":"MM/dd/yyyy"}
    callbackUrl String

    A valid URL, that should allow HTTP Post method.
    The Bulk Import Job's details is posted to this URL on successful completion of job or on failure of job.

    CSV Specific Attributes

    Note : These attributes are mandatory if autoIdentify is set to false.

    Key Description
    commentChar Char

    If the character mentioned is found at the beginning of the row, the csv row will be skipped.

    Sample: #
    delimiter Integer

    The delimiter character used for separating the fields in a row in the CSV.
    • 0 - COMMA
    • 1 - TAB
    • 2 - SEMICOLON
    • 3 - SPACE
    quoted Integer

    The Text Qualifier.
    • 0 - NONE
    • 1 - SINGLE QUOTE
    • 2 - DOUBLE QUOTE

    JSON Specific Attributes

    Key Description
    retainColumnNames Boolean

    Controls how the columns names are to be constructed from the JSON file.
    Default value - false.
    • true - the final key attribute alone will be considered as column name.
    • false - 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

    Possible Error Codes

    7103 , 7111 , 7232 , 7248 , 7249 , 8046 , 8119 , 8504 , 8506 , 8513 , 8516


    For Existing Table

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



    Sample Request:

    Copy
    curl https://analyticsapi.zoho.com/restapi/v2/bulk/workspaces/<workspace-id>/views/<view-id>/data?CONFIG=<encoded_json_value> -F 'FILE=@/home/local/import.csv' -X 'POST' -H 'ZANALYTICS-ORGID: <org-id>' -H 'Authorization: Zoho-oauthtoken <access_token>'

    Sample value for CONFIG parameter:

    Copy
    { "importType": "append", "fileType": "csv", "autoIdentify": "true" }

    Sample Response:

    HTTP/1.1 200 OK
    Content-Type:application/json;charset=UTF-8
    
    {
        "status": "success",
        "summary": "Create bulk import job",
        "data": {
            "jobId": "1757024000003153087"
        }
    }
    

    Create an import job to import data in the specified table.

    request uri

    POST https://<ZohoAnalytics_Server_URI>/restapi/v2/bulk/workspaces/<workspace-id>/views/<view-id>/data

    oauthscope: ZohoAnalytics.data.create

    ACTION SPECIFIC PARAMETERS

    Parameter Name Description
    FILE* File

    The file to be imported.

    • Format should be multipart/form-data. (This is the default format used by html forms that contain file type fields used for uploading files)
    • Maximum allowed file size is 100 MB.

    Query Parameters

    Parameter Name Description
    CONFIG* JSONObject

    Config parameter specifications are available in the below section.

    Fields for CONFIG JSON

    Key Description
    importType* String

    Controls the type of import.
    • 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.
    fileType* String

    The format of the file to be imported.
    • csv
    • json
    autoIdentify* Boolean

    To specify whether to auto identify the CSV format.
    onError String

    Controls the action to be taken incase there is an error during import.
    • abort - Incase of any error, abort the whole import.
    • skiprow - In case of any error, skip that specific row(s) which has the problem and continue importing the rest.
    • setcolumnempty - In case of any error, set the value of the error column for the row to empty and continue importing.
    matchingColumns
    (mandatory only when the importType is updateadd)
    JSONArray

    The values in the columns to be matched will be used for comparison to check whether data row(s) being imported matches with an existing row(s) in the table.
    The existing rows in the table that match will be updated with values from data imported. The remaining rows are appended to the table as new rows.

    Sample: ["column1","column2"]
    selectedColumns JSONArray

    Controls the columns that need to be imported.

    Sample: ["column1","column2"]
    skipTop Integer

    Number of rows that are to be skipped from the top in the CSV file being imported.
    thousandSeparator Integer

    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
    decimalSeparator Integer

    Controls the action to be taken in case there is a decimal separator in the data.
    • 0 - DOT
    • 1 - COMMA
    dateFormat String

    Specify this in-case any date field is being imported and its format cannot be auto recognized by Zoho Analytics.

    Sample: dd-MMM-YYYY
    Refer this link for more details about how to construct a custom date format.
    columnDateFormat JSONObject

    Specify this in case multiple date fields are being imported having different format each.
    Column name as key and date format as value.

    Sample: {"columnName1":"dd-MMM-YYYY","columnName2":"MM/dd/yyyy"}
    callbackUrl String

    A valid URL, that should allow HTTP Post method.
    The Bulk Import Job's details is posted to this URL on successful completion of job or on failure of job.

    CSV Specific Attributes

    Note : These attributes are mandatory if autoIdentify is set to false.

    Key Description
    commentChar Char

    If the character mentioned is found at the beginning of the row, the csv row will be skipped.

    Sample: #
    delimiter Integer

    The delimiter character used for separating the fields in a row in the CSV.
    • 0 - COMMA
    • 1 - TAB
    • 2 - SEMICOLON
    • 3 - SPACE
    quoted Integer

    The Text Qualifier.
    • 0 - NONE
    • 1 - SINGLE QUOTE
    • 2 - DOUBLE QUOTE

    JSON Specific Attributes

    Note : These attributes are mandatory if autoIdentify is set to false.

    Key Description
    retainColumnNames Boolean

    Controls how the columns names are to be constructed from the JSON file.
    Default value - false.
    • true - the final key attribute alone will be considered as column name.
    • false - 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

    Possible Error Codes

    7103 , 7111 , 7138 , 7232 , 7248 , 7249 , 8046 , 8119 , 8504 , 8506 , 8513 , 8516


    Get Import Job Details

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



    Sample Request:

    Copy
    curl https://analyticsapi.zoho.com/restapi/v2/bulk/workspaces/<workspace-id>/importjobs/<job-id> -H 'ZANALYTICS-ORGID: <org-id>' -H 'Authorization: Zoho-oauthtoken <access_token>'

    Sample Response:

    HTTP/1.1 200 OK
    Content-Type:application/json;charset=UTF-8
    
    {
        "status": "success",
        "summary": "Fetch import job info",
        "data": {
            "jobId": "1767024000003153087",
            "jobCode": "1004",
            "jobStatus": "JOB COMPLETED",
            "jobInfo": {
                "viewId": "1767024000003154002",
                "importSummary": {
                    "importType": "APPEND",
                    "totalColumnCount": 7,
                    "selectedColumnCount": 7,
                    "totalRowCount": 755,
                    "successRowCount": 755,
                    "warnings": 0,
                    "importOperation": "created"
                },
                "columnDetails": {
                    "Date": "Date",
                    "Region": "Plain Text",
                    "Product Category": "Plain Text",
                    "Product": "Plain Text",
                    "Customer Name": "Plain Text",
                    "Sales": "Currency",
                    "Cost": "Currency"
                },
                "importErrors": ""
            },
            "expiryTime": "1623764592309"
        }
    }
    

    Returns details of the specified import job.

    request uri

    GET https://<ZohoAnalytics_Server_URI>/restapi/v2/bulk/workspaces/<workspace-id>/importjobs/<job-id>

    oauthscope: ZohoAnalytics.data.create

    Possible Error Codes

    7103 , 8137 , 8138


    Export Data

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



    Sample Request:

    Copy
    curl https://analyticsapi.zoho.com/restapi/v2/workspaces/<workspace-id>/views/<view-id>/data?CONFIG=<encoded_json_value> -X 'GET' -H 'ZANALYTICS-ORGID: <org-id>' -H 'Authorization: Zoho-oauthtoken <access_token>'

    Sample value for CONFIG parameter:

    Copy
    { "responseFormat": "csv" }

    Sample Response:

    HTTP/1.1 200 OK
    Content-Type:text/csv;charset=UTF-8
    
    Date,Region,Product,Customer Name,Sales
    "15 June, 2021",East,Cereals,Vincent Herbert,682.39
    "15 June, 2021",West,Clocks,John Britto,$272.34
    "15 June, 2021",Central,Art Supplies,Susan Juliet,$45.31
    

    Export data from the specified view.

    request uri

    GET https://<ZohoAnalytics_Server_URI>/restapi/v2/workspaces/<workspace-id>/views/<view-id>/data

    oauthscope: ZohoAnalytics.data.read

    Note: Export Data API is restricted for certain resources ( given below ). For the same kindly use Asynchronous Export APIs for exporting data.
    • Tables having more than one million rows.
    • Tables and Views from live connect workspaces.
    • Dashboard and Querytable view types.

    Query Parameters

    Parameter Name Description
    CONFIG* JSONObject

    Config parameter specifications are available in the below section.

    Fields for CONFIG JSON

    Key Description
    responseFormat* String

    The format of the data to be exported.
    • csv
    • json
    • xml
    • pdf
    • html
    • image
    criteria String

    If criteria is sent, then the rows matching the criteria alone are exported.

    Sample: {"criteria":"\"SalesTable\".\"Region\"='East'"}
    Refer this link for more details about how to construct a criteria.
    selectedColumns JSONArray

    Controls the columns that need to be exported.

    Sample: ["column1","column2"]
    showHiddenCols Boolean

    Controls whether the columns that have been hidden in the table have to be exported.
    Default value - false.
    showPersonalCols Boolean

    Controls whether the columns that have been marked as personal data in the table have to be exported.
    Default value - false.
    generateTOC Boolean

    To generate Table Of Contents.Only for dashboards
    Default value - false.
    dashboardLayout Integer

    Layout type of the dashboard to be exported.Only for dashboards
    • 0 - For Each Report in New Page
    • 1 - For Layout as in Dashboard

    CSV Specific Attributes

    Key Description
    delimiter Integer

    The delimiter character used for separating the fields in a row in the CSV.
    • 0 - COMMA
    • 1 - TAB
    • 2 - SEMICOLON
    • 3 - SPACE
    recordDelimiter Integer

    The record delimiter (newline character) to use.
    • 0 - DOS
    • 1 - UNIX
    • 2 - MAC
    quoted Integer

    The quote character to use for quoting the values.
    • 0 - SINGLE
    • 1 - DOUBLE
    includeHeader Boolean

    To include the column names in the first row of the CSV exported.
    Default value - true.

    JSON Specific Attributes

    Key Description
    keyValueFormat Boolean

    To return JSON data as ColumnName - Value pair.
    Default value - true.

    PDF Specific Attributes

    Key Description
    paperSize Integer

    The size of the paper.
    • 0 - LETTER
    • 1 - LEGAL
    • 2 - TABLOID
    • 3 - A3
    • 4 - A4
    • 5 - AUTO
    paperStyle String

    To controls the orientation.
    Portrait/Landscape
    showTitle Integer

    To controls the title positioning.
    • 0 - AT TOP
    • 1 - AT BOTTOM
    • 2 - NONE
    showDesc Integer

    To controls the description positioning.
    • 0 - AT TOP
    • 1 - AT BOTTOM
    • 2 - NONE
    exportLanguage Integer

    PDF will be rendered using the specified language.
    • 0 - ENGLISH
    • 1 - EUROPEAN
    • 2 - CHINESE
    • 3 - JAPANESE
    • 4 - KOREAN
    zoomfactor Integer

    To control the zoom factor for the PDF.
    0 to 100
    Default value - 100.
    Margin Settings:
    topMargin
    bottomMargin
    leftMargin
    rightMargin
    Float

    The margin in inches for that edge. Can be decimal between 0 to 1 (like 0.5).
    Header/Footer Settings:
    leftHeader
    rightHeader
    centerHeader
    leftFooter
    rightFooter
    centerFooter
    Integer

    The header or footer value that needs to be generated for each page at that particular position.
    • 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
    Custom Header/Footer value
    leftHeaderText
    rightHeaderText
    centerHeaderText
    leftFooterText
    rightFooterText
    centerFooterText
    String

    If any of the header/footer setting is 5 (.ie, CUSTOM) then the corresponding custom value/text should be passed.

    HTML Specific Attributes

    Key Description
    includeTitle Integer

    To contol the title positioning.
    Default value - 0.
    • 0 - AT TOP
    • 1 - AT BOTTOM
    • 2 - NONE
    includeDesc Integer

    To contol the description positioning.
    Default value - 0.
    • 0 - AT TOP
    • 1 - AT BOTTOM
    • 2 - NONE

    IMAGE Specific Attributes

    Key Description
    width Integer

    The width of the image.
    Default value - 500.
    height Integer

    The height of the image.
    Default value - 400.
    title Boolean

    To include the view name in the exported view.
    Default value - true.
    description Boolean

    To include the view description in the exported view.
    Default value - true.
    legend Boolean

    Controls whether the legend is to be included in the image generated.
    Default value - true.
    imageFormat String

    The format of the exported image.
    png/jpg
    Default value - png.

    Possible Error Codes

    7103 , 7138 , 8002 , 8046 , 8119 , 8504


    Export Data (Asynchronous)

    Export a large set of data from tables/reports in asynchronous manner.

    Work flow of Bulk Export API is as follows:


    Limitations:


    Create Export Job

    Create an export job for exporting data from a single view (or) use SQL queries to export data by joining multiple tables.


    Using View ID

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



    Sample Request:

    Copy
    curl https://analyticsapi.zoho.com/restapi/v2/bulk/workspaces/<workspace-id>/views/<view-id>/data?CONFIG=<encoded_json_value> -X 'GET' -H 'ZANALYTICS-ORGID: <org-id>' -H 'Authorization: Zoho-oauthtoken <access_token>'

    Sample value for CONFIG parameter:

    Copy
    { "responseFormat": "csv" }

    Sample Response:

    HTTP/1.1 200 OK
    Content-Type:application/json;charset=UTF-8
    
    {
        "status": "success",
        "summary": "Create bulk export job",
        "data": {
            "jobId": "35130000001381001"
        }
    }
    

    Create an export job to initiate data export for the mentioned view.

    request uri

    GET https://<ZohoAnalytics_Server_URI>/restapi/v2/bulk/workspaces/<workspace-id>/views/<view-id>/data

    oauthscope: ZohoAnalytics.data.read

    Query Parameters

    Parameter Name Description
    CONFIG* JSONObject

    Config parameter specifications are available in the below section.

    Fields for CONFIG JSON

    Key Description
    responseFormat* String

    The format of the data to be exported.
    • csv
    • json
    • xml
    • pdf
    • html
    • image
    criteria String

    If criteria is sent, then the rows matching the criteria alone are exported.

    Sample: {"criteria":"\"SalesTable\".\"Region\"='East'"}
    Refer this link for more details about how to construct a criteria.
    selectedColumns JSONArray

    Controls the columns that need to be exported.

    Sample: ["column1","column2"]
    showHiddenCols Boolean

    Controls whether the columns that have been hidden in the table have to be exported.
    Default value - false.
    showPersonalCols Boolean

    Controls whether the columns that have been marked as personal data in the table have to be exported.
    Default value - false.
    generateTOC Boolean

    To generate Table Of Contents.Only for dashboards
    Default value - false.
    dashboardLayout Integer

    Layout type of the dashboard to be exported.Only for dashboards
    • 0 - For Each Report in New Page
    • 1 - For Layout as in Dashboard
    callbackUrl String

    A valid URL, that should allow HTTP Post method.
    The Bulk Export Job's details is posted to this URL on successful completion of job or on failure of job.

    CSV Specific Attributes

    Key Description
    delimiter Integer

    The delimiter character used for separating the fields in a row in the CSV.
    • 0 - COMMA
    • 1 - TAB
    • 2 - SEMICOLON
    • 3 - SPACE
    recordDelimiter Integer

    The record delimiter (newline character) to use.
    • 0 - DOS
    • 1 - UNIX
    • 2 - MAC
    quoted Integer

    The quote character to use for quoting the values.
    • 0 - SINGLE
    • 1 - DOUBLE
    includeHeader Boolean

    To include the column names in the first row of the CSV exported.
    Default value - true.

    JSON Specific Attributes

    Key Description
    keyValueFormat Boolean

    To return JSON data as ColumnName - Value pair.
    Default value - true.

    PDF Specific Attributes

    Key Description
    paperSize Integer

    The size of the paper.
    • 0 - LETTER
    • 1 - LEGAL
    • 2 - TABLOID
    • 3 - A3
    • 4 - A4
    • 5 - AUTO
    paperStyle String

    To controls the orientation.
    Portrait/Landscape
    showTitle Integer

    To controls the title positioning.
    • 0 - AT TOP
    • 1 - AT BOTTOM
    • 2 - NONE
    showDesc Integer

    To controls the description positioning.
    • 0 - AT TOP
    • 1 - AT BOTTOM
    • 2 - NONE
    exportLanguage Integer

    PDF will be rendered using the specified language.
    • 0 - ENGLISH
    • 1 - EUROPEAN
    • 2 - CHINESE
    • 3 - JAPANESE
    • 4 - KOREAN
    zoomfactor Integer

    To control the zoom factor for the PDF.
    0 to 100
    Default value - 100.
    Margin Settings:
    topMargin
    bottomMargin
    leftMargin
    rightMargin
    Float

    The margin in inches for that edge. Can be decimal between 0 to 1 (like 0.5).
    Header/Footer Settings:
    leftHeader
    rightHeader
    centerHeader
    leftFooter
    rightFooter
    centerFooter
    Integer

    The header or footer value that needs to be generated for each page at that particular position.
    • 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
    Custom Header/Footer value
    leftHeaderText
    rightHeaderText
    centerHeaderText
    leftFooterText
    rightFooterText
    centerFooterText
    String

    If any of the header/footer setting is 5 (.ie, CUSTOM) then the corresponding custom value/text should be passed.

    HTML Specific Attributes

    Key Description
    includeTitle Integer

    To contol the title positioning.
    Default value - 0.
    • 0 - AT TOP
    • 1 - AT BOTTOM
    • 2 - NONE
    includeDesc Integer

    To contol the description positioning.
    Default value - 0.
    • 0 - AT TOP
    • 1 - AT BOTTOM
    • 2 - NONE

    IMAGE Specific Attributes

    Key Description
    width Integer

    The width of the image.
    Default value - 500.
    height Integer

    The height of the image.
    Default value - 400.
    title Boolean

    To include the view name in the exported view.
    Default value - true.
    description Boolean

    To include the view description in the exported view.
    Default value - true.
    legend Boolean

    Controls whether the legend is to be included in the image generated.
    Default value - true.
    imageFormat String

    The format of the exported image.
    png/jpg
    Default value - png.

    Possible Error Codes

    7103 , 7138 , 8002 , 8046 , 8119 , 8504


    Using SQL Query

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



    Sample Request:

    Copy
    curl https://analyticsapi.zoho.com/restapi/v2/bulk/workspaces/<workspace-id>/data?CONFIG=<encoded_json_value> -X 'GET' -H 'ZANALYTICS-ORGID: <org-id>' -H 'Authorization: Zoho-oauthtoken <access_token>'

    Sample value for CONFIG parameter:

    Copy
    { "responseFormat": "csv", "sqlQuery": "select * from Sales" }

    Sample Response:

    HTTP/1.1 200 OK
    Content-Type:application/json;charset=UTF-8
    
    {
        "status": "success",
        "summary": "Create bulk export job",
        "data": {
            "jobId": "35130000001391001"
        }
    }
    

    Create an export job using SQL select statement to initiate data export.

    request uri

    GET https://<ZohoAnalytics_Server_URI>/restapi/v2/bulk/workspaces/<workspace-id>/data

    oauthscope: ZohoAnalytics.data.read

    Query Parameters

    Parameter Name Description
    CONFIG* JSONObject

    Config parameter specifications are available in the below section.

    Fields for CONFIG JSON

    Key Description
    sqlQuery* String

    SQL SELECT Query.
    Using SQL Select statements data can be exported from a single Table/Query Table or joining one or more tables.
    Check here for more details.
    responseFormat* String

    The format of the data to be exported.
    • csv
    • json
    • xml
    • pdf
    • html
    selectedColumns JSONArray

    Controls the columns that need to be exported.

    Sample: ["column1","column2"]
    showHiddenCols Boolean

    Controls whether the columns that have been hidden in the table have to be exported.
    Default value - false.
    showPersonalCols Boolean

    Controls whether the columns that have been marked as personal data in the table have to be exported.
    Default value - false.
    callbackUrl String

    A valid URL, that should allow HTTP Post method.
    The Bulk Export Job's details is posted to this URL on successful completion of job or on failure of job.

    CSV Specific Attributes

    Key Description
    delimiter Integer

    The delimiter character used for separating the fields in a row in the CSV.
    • 0 - COMMA
    • 1 - TAB
    • 2 - SEMICOLON
    • 3 - SPACE
    recordDelimiter Integer

    The record delimiter (newline character) to use.
    • 0 - DOS
    • 1 - UNIX
    • 2 - MAC
    quoted Integer

    The quote character to use for quoting the values.
    • 0 - SINGLE
    • 1 - DOUBLE
    includeHeader Boolean

    To include the column names in the first row of the CSV exported.
    Default value - true.

    JSON Specific Attributes

    Key Description
    keyValueFormat Boolean

    To return JSON data as ColumnName - Value pair.
    Default value - true.

    PDF Specific Attributes

    Key Description
    paperSize Integer

    The size of the paper.
    • 0 - LETTER
    • 1 - LEGAL
    • 2 - TABLOID
    • 3 - A3
    • 4 - A4
    • 5 - AUTO
    paperStyle String

    To controls the orientation.
    Portrait/Landscape
    showTitle Integer

    To controls the title positioning.
    • 0 - AT TOP
    • 1 - AT BOTTOM
    • 2 - NONE
    showDesc Integer

    To controls the description positioning.
    • 0 - AT TOP
    • 1 - AT BOTTOM
    • 2 - NONE
    exportLanguage Integer

    PDF will be rendered using the specified language.
    • 0 - ENGLISH
    • 1 - EUROPEAN
    • 2 - CHINESE
    • 3 - JAPANESE
    • 4 - KOREAN
    zoomfactor Integer

    To control the zoom factor for the PDF.
    Between 0 to 100
    Default value - 100.
    Margin Settings:
    topMargin
    bottomMargin
    leftMargin
    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:
    leftHeader
    rightHeader
    centerHeader
    leftFooter
    rightFooter
    centerFooter
    Integer

    The header or footer value that needs to be generated for each page at that particular position.
    • 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
    Custom Header/Footer value
    leftHeaderText
    rightHeaderText
    centerHeaderText
    leftFooterText
    rightFooterText
    centerFooterText
    String

    If any of the header/footer setting is 5 (.ie, CUSTOM) then the corresponding custom value/text should be passed.

    HTML Specific Attributes

    Key Description
    includeTitle Integer

    To contol the title positioning.
    Default value - 0.
    • 0 - AT TOP
    • 1 - AT BOTTOM
    • 2 - NONE
    includeDesc Integer

    To contol the description positioning.
    Default value - 0.
    • 0 - AT TOP
    • 1 - AT BOTTOM
    • 2 - NONE

    Possible Error Codes

    7103 , 7403 , 8002 , 8046 , 8119 , 8504


    Get Export Job Details

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



    Sample Request:

    Copy
    curl https://analyticsapi.zoho.com/restapi/v2/bulk/workspaces/<workspace-id>/exportjobs/<job-id> -H 'ZANALYTICS-ORGID: <org-id>' -H 'Authorization: Zoho-oauthtoken <access_token>'

    Sample Response:

    HTTP/1.1 200 OK
    Content-Type:application/json;charset=UTF-8
    
    {
        "status": "success",
        "summary": "Fetch export job info",
        "data": {
            "jobId": "35130000001391001",
            "jobCode": "1004",
            "jobStatus": "JOB COMPLETED",
            "downloadUrl": "https://analyticsapi.zoho.com/restapi/v2/bulk/workspaces/35130000001242001/exportjobs/35130000001391001/data",
            "expiryTime": "1623765872891"
        }
    }
    

    Returns details of the specified export job.

    request uri

    GET https://<ZohoAnalytics_Server_URI>/restapi/v2/bulk/workspaces/<workspace-id>/exportjobs/<job-id>

    oauthscope: ZohoAnalytics.data.read

    Possible Error Codes

    7103 , 8120 , 8124


    Download Exported Data

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



    Sample Request:

    Copy
    curl https://analyticsapi.zoho.com/restapi/v2/bulk/workspaces/<workspace-id>/exportjobs/<job-id>/data -H 'ZANALYTICS-ORGID: <org-id>' -H 'Authorization: Zoho-oauthtoken <access_token>'

    Sample Response:

    HTTP/1.1 200 OK
    Content-Type:text/csv;charset=UTF-8
    
    Date,Region,Product,Customer Name,Sales
    "15 June, 2021",East,Cereals,Vincent Herbert,682.39
    "15 June, 2021",West,Clocks,John Britto,$272.34
    "15 June, 2021",Central,Art Supplies,Susan Juliet,$45.31
    

    Download data for the bulk export job.

    request uri

    GET https://<ZohoAnalytics_Server_URI>/restapi/v2/bulk/workspaces/<workspace-id>/exportjobs/<job-id>/data

    oauthscope: ZohoAnalytics.data.read

    Possible Error Codes

    7103 , 8120 , 8121 , 8122 , 8124


    Error codes in Bulk API

    Sample Error:

    HTTP/1.1 400 Bad Request
    Content-Type:application/json;charset=UTF-8
    
    {
        "status": "failure",
        "summary": "META_DBOBJECT_NAME_DUPLICATED",
        "data": {
            "errorCode": 7111,
            "errorMessage": "A Table with the name Sales already exists in this workspace. Please provide an alternate name."
        }
    }
    

    This section lists all possible error codes that could be sent from the Zoho Analytics server on failure of Data APIs. You can use this for appropriate error handling.

    Error Codes

    Error-Code Reason Solution
    7103 The workspace id mentioned in the API does not exist. Provide the valid workspace id.
    7111 A table with the same name already exist. Provide an alternative name.
    7138 The view id mentioned in the API URL does not exist. Check the view id in the request URL and provide a valid view id.
    7232 Import Aborted. Check the error message returned.
    7235 Not even a single column name provided in source file matches with the column data in table. Check whether the column name in source data matches with column names present in analytics table.
    NOTE:Also check whether the config fileType is provided with proper value.
    7248 The file content is not \"multipart/form-data\" format. Check whether the file is passed as multipart-form data.
    7249 The file cannot be imported. Verify whether the file content is same as the "fileType" provided.
    7403 Parsing of SQL query failed. Check the SQL syntax provided is valid.
    7507 Value entered in the mentioned column does not follow the specified data-type. Check the value of that column and provide value in the specified data-type.
    7511 Mentioned Column is a mandatory column. Should specify the value for that mandatory column.
    8002 Specified criteria is invalid. Provide valid criteria.
    8004 The column mentioned in the criteria is not present in the table. Check the column name and provide valid name.
    8016 You need to have at-least one column for INSERT or UPDATE action. You should provide at-least one column with value.
    8046 Not even one column in the selected columns list is valid. Check whether the column name provided is present in the table.
    8119 Invalid value provided for the attribute. Check the value for the attribute provided is valid.
    8120 Export job not found. Check the export job id provided is valid and not expired.
    8121 Export job not initiated. Check the export job is completed before downloadin the data.
    8122 Export job not completed. Check the export job is completed before downloadin the data.
    8124 Export job access denied. Only the user created the job can access the job.
    8137 Import job not found. Check the import job id provided is valid and not expired.
    8138 Import job access denied. Only the user created the job can access the job.
    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.
    8513 The file size is more than the supported size. File size should be less than the mentioned size.
    8516 Invalid value passed in the mentioned parameter. Provide the valid data to the mentioned parameter.

    Modeling API

    Modeling APIs are used to add, delete and rename Zoho Analytics workspaces, views, columns, and folders. It also offers APIs to copy workspaces, reports, and formulas from one workspace to another workspace in the same account or across different accounts.


    Create Workspace

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



    Sample Request:

    Copy
    curl https://analyticsapi.zoho.com/restapi/v2/workspaces?CONFIG=<encoded_json_value> -X 'POST' -H 'ZANALYTICS-ORGID: <org-id>' -H 'Authorization: Zoho-oauthtoken <access_token>'

    Sample value for CONFIG parameter:

    Copy
    { "workspaceName": "<workspace-name>" }

    Sample Response:

    HTTP/1.1 200 OK
    Content-Type:application/json;charset=UTF-8
    
    {
        "status": "success",
        "summary": "Create workspace",
        "data": {
            "workspaceId": "1767024000003145002"
        }
    }
    

    Create a blank workspace in the specified organization.

    request uri

    POST https://<ZohoAnalytics_Server_URI>/restapi/v2/workspaces

    oauthscope: ZohoAnalytics.modeling.create

    Query Parameters

    Parameter Name Description
    CONFIG* JSONObject

    Config parameter specifications are available in the below section.

    Fields for CONFIG JSON

    Key Description
    workspaceName* String

    The name of the workspace.
    workspaceDesc String

    The description of the workspace.

    Possible Error Codes

    7101 , 8504 , 8506 , 8516


    Copy Workspace

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



    Sample Request:

    Copy
    curl https://analyticsapi.zoho.com/restapi/v2/workspaces/<workspace-id>?CONFIG=<encoded_json_value> -X 'POST' -H 'ZANALYTICS-ORGID: <source-org-id>' -H 'Authorization: Zoho-oauthtoken <access_token>'

    Sample value for CONFIG parameter:

    Copy
    { "newWorkspaceName": "<workspace-name>" }

    Sample Response:

    HTTP/1.1 200 OK
    Content-Type:application/json;charset=UTF-8
    
    {
        "status": "success",
        "summary": "Copy workspace",
        "data": {
            "workspaceId": "1767024000003145006"
        }
    }
    

    Copy the specified workspace from one organization to another or within the organization.

    Note: For ZANALYTICS-ORGID header, provide the source organization id as the value.

    request uri

    POST https://<ZohoAnalytics_Server_URI>/restapi/v2/workspaces/<workspace-id>

    oauthscope: ZohoAnalytics.modeling.create

    Query Parameters

    Parameter Name Description
    CONFIG* JSONObject

    Config parameter specifications are available in the below section.

    Fields for CONFIG JSON

    Key Description
    newWorkspaceName* String

    The name of the new workspace.
    newWorkspaceDesc String

    The description of the new workspace.
    workspaceKey String

    source workspace secret key
    The secret key used for allowing the user to copy the source workspace.
    copyWithData Boolean

    To copy the workspace with table data.
    copyWithImportSource Boolean

    To copy the workspace with import sources.

    Request Headers (Action Specific)

    Name Value Description
    ZANALYTICS-DEST-ORGID <destination-org-id> Id of the organization where the workspace have to be copied.

    Possible Error Codes

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


    Rename Workspace

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



    Sample Request:

    Copy
    curl https://analyticsapi.zoho.com/restapi/v2/workspaces/<workspace-id>?CONFIG=<encoded_json_value> -X 'PUT' -H 'ZANALYTICS-ORGID: <org-id>' -H 'Authorization: Zoho-oauthtoken <access_token>'

    Sample value for CONFIG parameter:

    Copy
    { "workspaceName": "<workspace-name>" }

    Sample Response:

    HTTP/1.1 204 No Content

    Rename a specified workspace in the organization.

    request uri

    PUT https://<ZohoAnalytics_Server_URI>/restapi/v2/workspaces/<workspace-id>

    oauthscope: ZohoAnalytics.modeling.update

    Query Parameters

    Parameter Name Description
    CONFIG* JSONObject

    Config parameter specifications are available in the below section.

    Fields for CONFIG JSON

    Key Description
    workspaceName* String

    The new name of the workspace.
    workspaceDesc String

    The new description of the workspace.

    Possible Error Codes

    7103 , 7138 , 7165 , 8504 , 8506 , 8516


    Delete Workspace

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



    Sample Request:

    Copy
    curl https://analyticsapi.zoho.com/restapi/v2/workspaces/<workspace-id> -X 'DELETE' -H 'ZANALYTICS-ORGID: <org-id>' -H 'Authorization: Zoho-oauthtoken <access_token>'

    Sample Response:

    HTTP/1.1 204 No Content

    Delete a specified workspace in the organization.

    request uri

    DELETE https://<ZohoAnalytics_Server_URI>/restapi/v2/workspaces/<workspace-id>

    oauthscope: ZohoAnalytics.modeling.delete

    Possible Error Codes

    7103 , 7138 , 7165 , 8504 , 8506 , 8516


    Create Table

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



    Sample Request:

    Copy
    curl https://analyticsapi.zoho.com/restapi/v2/workspaces/<workspace-id>/tables?CONFIG=<encoded_json_value> -X 'POST' -H 'ZANALYTICS-ORGID: <org-id>' -H 'Authorization: Zoho-oauthtoken <access_token>'

    Sample value for CONFIG parameter:

    Copy
    { "tableDesign": { "TABLENAME": "Sales", "TABLEDESCRIPTION": "Test", "COLUMNS": [{ "COLUMNNAME": "Column1", "DATATYPE": "PLAIN" }, { "COLUMNNAME": "Column2", "DATATYPE": "NUMBER" }] } }

    Sample Response:

    HTTP/1.1 200 OK
    Content-Type:application/json;charset=UTF-8
    
    {
        "status": "success",
        "summary": "Create table",
        "data": {
            "viewId": "1767024000003145011"
        }
    }
    

    Create a table in the specified workspace.

    request uri

    POST https://<ZohoAnalytics_Server_URI>/restapi/v2/workspaces/<workspace-id>/tables

    oauthscope: ZohoAnalytics.modeling.create

    Query Parameters

    Parameter Name Description
    CONFIG* JSONObject

    Config parameter specifications are available in the below section.

    Fields for CONFIG JSON

    Key Description
    tableDesign* JSONObject

    <Table Structure>

    Table Structure

    Key Description
    TABLENAME* String

    The name of the table.
    TABLEDESCRIPTION String

    The description of the table.
    FOLDERNAME String

    The name of the folder where the table have to be created.
    COLUMNS* JSONArray

    <Column Structure>

    Column Structure

    Key Description
    COLUMNNAME* String

    The name of the column.
    DATATYPE* String

    The data type of the column.
    Supported data types:
    • PLAIN
    • MULTI_LINE
    • EMAIL
    • NUMBER
    • POSITIVE_NUMBER
    • DECIMAL_NUMBER
    • CURRENCY
    • PERCENT
    • DATE
    • BOOLEAN
    • URL
    • AUTO_NUMBER
    • GEO
    MANDATORY Boolean

    Controls whether the column should contain a mandatory non-empty value.
    Default value - false.
    DESCRIPTION String

    The description of the column.
    DEFAULT String

    Default value for the column
    Fills the provided value when a cell in the column is empty.
    GEOROLE Integer

    To specify the geo location type.
    This attribute is mandatory for GEO DATATYPE.
    • 0 - Continent
    • 1 - Country
    • 2 - State/Province
    • 3 - County/Distict
    • 4 - City
    • 5 - Zip Code
    • 6 - Latitude
    • 7 - Longitude
    • 8 - Airport

    Possible Error Codes

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


    Saveas View

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



    Sample Request:

    Copy
    curl https://analyticsapi.zoho.com/restapi/v2/workspaces/<workspace-id>/views/<view-id>/saveas?CONFIG=<encoded_json_value> -X 'POST' -H 'ZANALYTICS-ORGID: <org-id>' -H 'Authorization: Zoho-oauthtoken <access_token>'

    Sample value for CONFIG parameter:

    Copy
    { "viewName": "<view-name>" }

    Sample Response:

    HTTP/1.1 200 OK
    Content-Type:application/json;charset=UTF-8
    
    {
        "status": "success",
        "summary": "Saveas view",
        "data": {
            "viewId": "1767024000004723001"
        }
    }
    

    Copy a specified view within the workspace.

    request uri

    POST https://<ZohoAnalytics_Server_URI>/restapi/v2/workspaces/<workspace-id>/views/<view-id>/saveas

    oauthscope: ZohoAnalytics.modeling.create

    Query Parameters

    Parameter Name Description
    CONFIG* JSONObject

    Config parameter specifications are available in the below section.

    Fields for CONFIG JSON

    Key Description
    viewName* String

    The name of the new view.
    viewDesc String

    The description of the new view.
    copyWithData Boolean

    To copy table with data.
    copyWithLookup Boolean

    To copy table with lookup details.
    folderId Long The folder id where the created view to be placed.

    Possible Error Codes

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


    Rename View

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



    Sample Request:

    Copy
    curl https://analyticsapi.zoho.com/restapi/v2/workspaces/<workspace-id>/views/<view-id>?CONFIG=<encoded_json_value> -X 'PUT' -H 'ZANALYTICS-ORGID: <org-id>' -H 'Authorization: Zoho-oauthtoken <access_token>'

    Sample value for CONFIG parameter:

    Copy
    { "viewName": "<view-name>" }

    Sample Response:

    HTTP/1.1 204 No Content

    Rename a specified view in the workspace.

    request uri

    PUT https://<ZohoAnalytics_Server_URI>/restapi/v2/workspaces/<workspace-id>/views/<view-id>

    oauthscope: ZohoAnalytics.modeling.update

    Query Parameters

    Parameter Name Description
    CONFIG* JSONObject

    Config parameter specifications are available in the below section.

    Fields for CONFIG JSON

    Key Description
    viewName* String

    The new name of the view.
    viewDesc String

    The new description of the view.

    Possible Error Codes

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


    Delete View

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



    Sample Request:

    Copy
    curl https://analyticsapi.zoho.com/restapi/v2/workspaces/<workspace-id>/views/<view-id> -X 'DELETE' -H 'ZANALYTICS-ORGID: <org-id>' -H 'Authorization: Zoho-oauthtoken <access_token>'

    Sample Response:

    HTTP/1.1 204 No Content

    Delete a specified view in the workspace.

    request uri

    DELETE https://<ZohoAnalytics_Server_URI>/restapi/v2/workspaces/<workspace-id>/views/<view-id>

    oauthscope: ZohoAnalytics.modeling.delete

    Query Parameters

    Parameter Name Description
    CONFIG* JSONObject

    Config parameter specifications are available in the below section.

    Fields for CONFIG JSON

    Key Description
    deleteDependentViews Boolean

    To delete dependent views while deleting a table/querytable(table/querytable which has dependent views).

    Possible Error Codes

    7103 , 7138 , 7277 , 8504 , 8506 , 8516


    Create Folder

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



    Sample Request:

    Copy
    curl https://analyticsapi.zoho.com/restapi/v2/workspaces/<workspace-id>/folders?CONFIG=<encoded_json_value> -X 'POST' -H 'ZANALYTICS-ORGID: <org-id>' -H 'Authorization: Zoho-oauthtoken <access_token>'

    Sample value for CONFIG parameter:

    Copy
    { "folderName": "<folder-name>" }

    Sample Response:

    HTTP/1.1 200 OK
    Content-Type:application/json;charset=UTF-8
    
    {
        "status": "success",
        "summary": "Create folder",
        "data": {
            "folderId": "1767024000003145066"
        }
    }
    

    Create a folder in the specified workspace.

    request uri

    POST https://<ZohoAnalytics_Server_URI>/restapi/v2/workspaces/<workspace-id>/folders

    oauthscope: ZohoAnalytics.modeling.create

    Query Parameters

    Parameter Name Description
    CONFIG* JSONObject

    Config parameter specifications are available in the below section.

    Fields for CONFIG JSON

    Key Description
    folderName* String

    The name of the folder.
    folderDesc String

    The description of the folder.
    parentFolderId Long Id of the parent folder.
    Newly created folder will be placed under this folder.

    Possible Error Codes

    7103 , 7138 , 7277 , 8504 , 8506 , 8516


    Rename Folder

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



    Sample Request:

    Copy
    curl https://analyticsapi.zoho.com/restapi/v2/workspaces/<workspace-id>/folders/<folder-id>?CONFIG=<encoded_json_value> -X 'PUT' -H 'ZANALYTICS-ORGID: <org-id>' -H 'Authorization: Zoho-oauthtoken <access_token>'

    Sample value for CONFIG parameter:

    Copy
    { "folderName": "<folder-name>" }

    Sample Response:

    HTTP/1.1 204 No Content

    Rename a specified folder in the workspace.

    request uri

    PUT https://<ZohoAnalytics_Server_URI>/restapi/v2/workspaces/<workspace-id>/folders/<folder-id>

    oauthscope: ZohoAnalytics.modeling.update

    Query Parameters

    Parameter Name Description
    CONFIG* JSONObject

    Config parameter specifications are available in the below section.

    Fields for CONFIG JSON

    Key Description
    folderName* String

    The new name of the folder.
    folderDesc String

    The new description of the folder.

    Possible Error Codes

    7103 , 7138 , 7277 , 8504 , 8506 , 8516


    Make Default Folder

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



    Sample Request:

    Copy
    curl https://analyticsapi.zoho.com/restapi/v2/workspaces/<workspace-id>/folders/<folder-id>/default -X 'PUT' -H 'ZANALYTICS-ORGID: <org-id>' -H 'Authorization: Zoho-oauthtoken <access_token>'

    Sample Response:

    HTTP/1.1 204 No Content
    

    Make the specified folder as default in the workspace.

    request uri

    PUT https://<ZohoAnalytics_Server_URI>/restapi/v2/workspaces/<workspace-id>/folders/<folder-id>/default

    oauthscope: ZohoAnalytics.modeling.update

    Possible Error Codes

    7103 , 7144 , 8504 , 8506


    Delete Folder

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



    Sample Request:

    Copy
    curl https://analyticsapi.zoho.com/restapi/v2/workspaces/<workspace-id>/folders/<folder-id> -X 'DELETE' -H 'ZANALYTICS-ORGID: <org-id>' -H 'Authorization: Zoho-oauthtoken <access_token>'

    Sample Response:

    HTTP/1.1 204 No Content

    Delete a specified folder in the workspace.

    request uri

    DELETE https://<ZohoAnalytics_Server_URI>/restapi/v2/workspaces/<workspace-id>/folders/<folder-id>

    oauthscope: ZohoAnalytics.modeling.delete

    Possible Error Codes

    7103 , 7138 , 7277 , 8504 , 8506 , 8516


    Add Column

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



    Sample Request: