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


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

The header “ZANALYTICS-ORGID“ with the organization ID should be sent with the API request to identify the organization.


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

    Config Attributes

    Attribute Name Possible Value Description
    columns* JSON object of permissons
    Sample:
    {"columnName1":"value1","columnName2":"value2"}
    Columns JSON object.
    dateFormat date format Specify this in-case any date field is being added and its format cannot be auto recognized.

    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

    Config Attributes

    Attribute Name Possible Value Description
    columns* JSON object of permissons
    Sample:
    {"columnName1":"value1","columnName2":"value2"}
    Columns JSON object.
    criteria criteria value If criteria is sent, then the rows matching the criteria alone are updated.
    updateAllRows true/false To update all the rows in the table.
    dateFormat date format Specify this in-case any date field is being added and its format cannot be auto recognized.

    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

    Config Attributes

    Attribute Name Possible Value Description
    criteria criteria value If criteria is sent, then the rows matching the criteria alone are deleted.
    deleteAllRows true/false 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 Possible Value Description
    FILE (or) DATA* File (or) String 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 import.

    Config Attributes

    Attribute Name Possible Value Description
    tableName* table name The name of the table.
    fileType*
    • csv
    • json
    The format of the file to be imported.
    autoIdentify* true/false To specify whether to auto identify the CSV format.
    onError abort/skiprow/setcolumnempty 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 JSON array of column names
    Sample:
    ["column1","column2"]
    Controls the columns that need to be imported.
    skipTop number Number of rows that are to be skipped from the top in the CSV file being imported.
    thousandSeparator 0/1/2/3 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 0/1 Controls the action to be taken in case there is a decimal separator in the data.
    • 0 - DOT
    • 1 - COMMA
    dateFormat Format of the date.
    Sample:
    dd-MMM-YYYY
    Specify this in-case any date field is being imported and its format cannot be auto recognized by Zoho Analytics.
    columnDateFormat JSON Object with column name as key and date format as value.
    Sample:
    {"columnName1":"dd-MMM-YYYY","columnName2":"MM/dd/yyyy"}
    Specify this in case multiple date fields are being imported having different format each.

    CSV Specific Attributes

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

    Attribute Name Possible Value Description
    commentChar character If the character mentioned is found at the beginning of the row, the csv row will be skipped.
    delimiter 0/1/2/3 The delimiter character used for separating the fields in a row in the CSV.
    • 0 - COMMA
    • 1 - TAB
    • 2 - SEMICOLON
    • 3 - SPACE
    quoted 0/1/2 The Text Qualifier.
    • 0 - NONE
    • 1 - SINGLE QUOTE
    • 2 - DOUBLE QUOTE

    JSON Specific Attributes

    Attribute Name Possible Value Description
    retainColumnNames true/false 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 Possible Value Description
    FILE (or) DATA* File (or) String 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 import.

    Config Attributes

    Attribute Name Possible Value Description
    importType* append/truncateadd/updateadd The name of the table.
    • 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*
    • csv
    • json
    The format of the file to be imported.
    autoIdentify* true/false To specify whether to auto identify the CSV format.
    onError abort/skiprow/setcolumnempty 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)
    JSON array of column names
    Sample:
    ["column1","column2"]
    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.
    selectedColumns JSON array of column names
    Sample:
    ["column1","column2"]
    Controls the columns that need to be imported.
    skipTop number Number of rows that are to be skipped from the top in the CSV file being imported.
    thousandSeparator 0/1/2/3 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 0/1 Controls the action to be taken in case there is a decimal separator in the data.
    • 0 - DOT
    • 1 - COMMA
    dateFormat Format of the date.
    Sample:
    dd-MMM-YYYY
    Specify this in-case any date field is being imported and its format cannot be auto recognized by Zoho Analytics.
    columnDateFormat JSON Object with column name as key and date format as value.
    Sample:
    {"columnName1":"dd-MMM-YYYY","columnName2":"MM/dd/yyyy"}
    Specify this in case multiple date fields are being imported having different format each.

    CSV Specific Attributes

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

    Attribute Name Possible Value Description
    commentChar character If the character mentioned is found at the beginning of the row, the csv row will be skipped.
    delimiter 0/1/2/3 The delimiter character used for separating the fields in a row in the CSV.
    • 0 - COMMA
    • 1 - TAB
    • 2 - SEMICOLON
    • 3 - SPACE
    quoted 0/1/2 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.

    Attribute Name Possible Value Description
    retainColumnNames true/false 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:

    Note: The job details will be available for only for one hour from the time of job completion.


    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 Possible Value 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.

    Config Attributes

    Attribute Name Possible Value Description
    tableName* table name The name of the table.
    fileType*
    • csv
    • json
    The format of the file to be imported.
    autoIdentify* true/false To specify whether to auto identify the CSV format.
    onError abort/skiprow/setcolumnempty 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 JSON array of column names
    Sample:
    ["column1","column2"]
    Controls the columns that need to be imported.
    skipTop number Number of rows that are to be skipped from the top in the CSV file being imported.
    thousandSeparator 0/1/2/3 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 0/1 Controls the action to be taken in case there is a decimal separator in the data.
    • 0 - DOT
    • 1 - COMMA
    dateFormat Format of the date.
    Sample:
    dd-MMM-YYYY
    Specify this in-case any date field is being imported and its format cannot be auto recognized by Zoho Analytics.
    columnDateFormat JSON Object with column name as key and date format as value.
    Sample:
    {"columnName1":"dd-MMM-YYYY","columnName2":"MM/dd/yyyy"}
    Specify this in case multiple date fields are being imported having different format each.
    callbackUrl 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.

    Attribute Name Possible Value Description
    commentChar character If the character mentioned is found at the beginning of the row, the csv row will be skipped.
    delimiter 0/1/2/3 The delimiter character used for separating the fields in a row in the CSV.
    • 0 - COMMA
    • 1 - TAB
    • 2 - SEMICOLON
    • 3 - SPACE
    quoted 0/1/2 The Text Qualifier.
    • 0 - NONE
    • 1 - SINGLE QUOTE
    • 2 - DOUBLE QUOTE

    JSON Specific Attributes

    Attribute Name Possible Value Description
    retainColumnNames true/false 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 Possible Value 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.

    Config Attributes

    Attribute Name Possible Value Description
    importType* append/truncateadd/updateadd The name of the table.
    • 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*
    • csv
    • json
    The format of the file to be imported.
    autoIdentify* true/false To specify whether to auto identify the CSV format.
    onError abort/skiprow/setcolumnempty 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)
    JSON array of column names
    Sample:
    ["column1","column2"]
    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.
    selectedColumns JSON array of column names
    Sample:
    ["column1","column2"]
    Controls the columns that need to be imported.
    skipTop number Number of rows that are to be skipped from the top in the CSV file being imported.
    thousandSeparator 0/1/2/3 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 0/1 Controls the action to be taken in case there is a decimal separator in the data.
    • 0 - DOT
    • 1 - COMMA
    dateFormat Format of the date.
    Sample:
    dd-MMM-YYYY
    Specify this in-case any date field is being imported and its format cannot be auto recognized by Zoho Analytics.
    columnDateFormat JSON Object with column name as key and date format as value.
    Sample:
    {"columnName1":"dd-MMM-YYYY","columnName2":"MM/dd/yyyy"}
    Specify this in case multiple date fields are being imported having different format each.
    callbackUrl 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.

    Attribute Name Possible Value Description
    commentChar character If the character mentioned is found at the beginning of the row, the csv row will be skipped.
    delimiter 0/1/2/3 The delimiter character used for separating the fields in a row in the CSV.
    • 0 - COMMA
    • 1 - TAB
    • 2 - SEMICOLON
    • 3 - SPACE
    quoted 0/1/2 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.

    Attribute Name Possible Value Description
    retainColumnNames true/false 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.

    Config Attributes

    Attribute Name Possible Value Description
    responseFormat*
    • csv
    • json
    • xml
    • pdf
    • html
    • image
    The format of the data to be exported.
    criteria Criteria value If criteria is sent, then the rows matching the criteria alone are exported.
    selectedColumns JSON array of column names
    Sample:
    ["column1","column2"]
    Controls the columns that need to be exported.
    showHiddenCols true/false Controls whether the columns that have been hidden in the table have to be exported.
    Default value - false.
    showPersonalCols true/false Controls whether the columns that have been marked as personal data in the table have to be exported.
    Default value - false.
    generateTOC true/false To generate Table Of Contents.
    Default value - false.
    Only for dashboards
    dashboardLayout 0/1 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

    Attribute Name Possible Value Description
    delimiter 0/1/2/3 The delimiter character used for separating the fields in a row in the CSV.
    • 0 - COMMA
    • 1 - TAB
    • 2 - SEMICOLON
    • 3 - SPACE
    recordDelimiter 0/1/2 The record delimiter (newline character) to use.
    • 0 - DOS
    • 1 - UNIX
    • 2 - MAC
    quoted 0/1 The quote character to use for quoting the values.
    • 0 - SINGLE
    • 1 - DOUBLE
    includeHeader true/false To include the column names in the first row of the CSV exported.
    Default value - true.

    JSON Specific Attributes

    Attribute Name Possible Value Description
    keyValueFormat true/false To return JSON data as ColumnName - Value pair.
    Default value - true.

    PDF Specific Attributes

    Attribute Name Possible Value Description
    paperSize 0/1/2/3/4/5 The size of the paper.
    • 0 - LETTER
    • 1 - LEGAL
    • 2 - TABLOID
    • 3 - A3
    • 4 - A4
    • 5 - AUTO
    paperStyle Portrait/Landscape To controls the orientation.
    showTitle 0/1/2 To controls the title positioning.
    • 0 - AT TOP
    • 1 - AT BOTTOM
    • 2 - NONE
    showDesc 0/1/2 To controls the description positioning.
    • 0 - AT TOP
    • 1 - AT BOTTOM
    • 2 - NONE
    exportLanguage 0/1/2/3/4 PDF will be rendered using the specified language.
    • 0 - ENGLISH
    • 1 - EUROPEAN
    • 2 - CHINESE
    • 3 - JAPANESE
    • 4 - KOREAN
    zoomfactor 0 to 100 To control the zoom factor for the PDF.
    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
    0/1/2/3/4/5 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
    Custom text. If any of the header/footer setting is 5 (.ie, CUSTOM) then the corresponding custom value/text should be passed.

    HTML Specific Attributes

    Attribute Name Possible Value Description
    includeTitle 0/1/2 To contol the title positioning.
    Default value - 0.
    • 0 - AT TOP
    • 1 - AT BOTTOM
    • 2 - NONE
    includeDesc 0/1/2 To contol the description positioning.
    Default value - 0.
    • 0 - AT TOP
    • 1 - AT BOTTOM
    • 2 - NONE

    IMAGE Specific Attributes

    Attribute Name Possible Value Description
    width number The width of the image.
    Default value - 500.
    height number The height of the image.
    Default value - 400.
    title true/false To include the view name in the exported view.
    Default value - true.
    description true/false To include the view description in the exported view.
    Default value - true.
    legend true/false Controls whether the legend is to be included in the image generated.
    Default value - true.
    imageFormat png/jpg The format of the exported image.
    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:

    Note: The exported data will be available for download only for a period of one hour from the time of job completion.


    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

    Config Attributes

    Attribute Name Possible Value Description
    responseFormat*
    • csv
    • json
    • xml
    • pdf
    • html
    • image
    The format of the data to be exported.
    criteria Criteria value If criteria is sent, then the rows matching the criteria alone are exported.
    selectedColumns JSON array of column names
    Sample:
    ["column1","column2"]
    Controls the columns that need to be exported.
    showHiddenCols true/false Controls whether the columns that have been hidden in the table have to be exported.
    Default value - false.
    showPersonalCols true/false Controls whether the columns that have been marked as personal data in the table have to be exported.
    Default value - false.
    generateTOC true/false To generate Table Of Contents.
    Default value - false.
    Only for dashboards
    dashboardLayout 0/1 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 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

    Attribute Name Possible Value Description
    delimiter 0/1/2/3 The delimiter character used for separating the fields in a row in the CSV.
    • 0 - COMMA
    • 1 - TAB
    • 2 - SEMICOLON
    • 3 - SPACE
    recordDelimiter 0/1/2 The record delimiter (newline character) to use.
    • 0 - DOS
    • 1 - UNIX
    • 2 - MAC
    quoted 0/1 The quote character to use for quoting the values.
    • 0 - SINGLE
    • 1 - DOUBLE
    includeHeader true/false To include the column names in the first row of the CSV exported.
    Default value - true.

    JSON Specific Attributes

    Attribute Name Possible Value Description
    keyValueFormat true/false To return JSON data as ColumnName - Value pair.
    Default value - true.

    PDF Specific Attributes

    Attribute Name Possible Value Description
    paperSize 0/1/2/3/4/5 The size of the paper.
    • 0 - LETTER
    • 1 - LEGAL
    • 2 - TABLOID
    • 3 - A3
    • 4 - A4
    • 5 - AUTO
    paperStyle Portrait/Landscape To controls the orientation.
    showTitle 0/1/2 To controls the title positioning.
    • 0 - AT TOP
    • 1 - AT BOTTOM
    • 2 - NONE
    showDesc 0/1/2 To controls the description positioning.
    • 0 - AT TOP
    • 1 - AT BOTTOM
    • 2 - NONE
    exportLanguage 0/1/2/3/4 PDF will be rendered using the specified language.
    • 0 - ENGLISH
    • 1 - EUROPEAN
    • 2 - CHINESE
    • 3 - JAPANESE
    • 4 - KOREAN
    zoomfactor 0 to 100 To control the zoom factor for the PDF.
    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
    0/1/2/3/4/5 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
    Custom text. If any of the header/footer setting is 5 (.ie, CUSTOM) then the corresponding custom value/text should be passed.

    HTML Specific Attributes

    Attribute Name Possible Value Description
    includeTitle 0/1/2 To contol the title positioning.
    Default value - 0.
    • 0 - AT TOP
    • 1 - AT BOTTOM
    • 2 - NONE
    includeDesc 0/1/2 To contol the description positioning.
    Default value - 0.
    • 0 - AT TOP
    • 1 - AT BOTTOM
    • 2 - NONE

    IMAGE Specific Attributes

    Attribute Name Possible Value Description
    width number The width of the image.
    Default value - 500.
    height number The height of the image.
    Default value - 400.
    title true/false To include the view name in the exported view.
    Default value - true.
    description true/false To include the view description in the exported view.
    Default value - true.
    legend true/false Controls whether the legend is to be included in the image generated.
    Default value - true.
    imageFormat png/jpg The format of the exported image.
    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

    Config Attributes

    Attribute Name Possible Value Description
    sqlQuery* 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*
    • csv
    • json
    • xml
    • pdf
    • html
    The format of the data to be exported.
    criteria Criteria value If criteria is sent, then the rows matching the criteria alone are exported.
    selectedColumns JSON array of column names
    Sample:
    ["column1","column2"]
    Controls the columns that need to be exported.
    showHiddenCols true/false Controls whether the columns that have been hidden in the table have to be exported.
    Default value - false.
    showPersonalCols true/false Controls whether the columns that have been marked as personal data in the table have to be exported.
    Default value - false.
    callbackUrl 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

    Attribute Name Possible Value Description
    delimiter 0/1/2/3 The delimiter character used for separating the fields in a row in the CSV.
    • 0 - COMMA
    • 1 - TAB
    • 2 - SEMICOLON
    • 3 - SPACE
    recordDelimiter 0/1/2 The record delimiter (newline character) to use.
    • 0 - DOS
    • 1 - UNIX
    • 2 - MAC
    quoted 0/1 The quote character to use for quoting the values.
    • 0 - SINGLE
    • 1 - DOUBLE
    includeHeader true/false To include the column names in the first row of the CSV exported.
    Default value - true.

    JSON Specific Attributes

    Attribute Name Possible Value Description
    keyValueFormat true/false To return JSON data as ColumnName - Value pair.
    Default value - true.

    PDF Specific Attributes

    Attribute Name Possible Value Description
    paperSize 0/1/2/3/4/5 The size of the paper.
    • 0 - LETTER
    • 1 - LEGAL
    • 2 - TABLOID
    • 3 - A3
    • 4 - A4
    • 5 - AUTO
    paperStyle Portrait/Landscape To controls the orientation.
    showTitle 0/1/2 To controls the title positioning.
    • 0 - AT TOP
    • 1 - AT BOTTOM
    • 2 - NONE
    showDesc 0/1/2 To controls the description positioning.
    • 0 - AT TOP
    • 1 - AT BOTTOM
    • 2 - NONE
    exportLanguage 0/1/2/3/4 PDF will be rendered using the specified language.
    • 0 - ENGLISH
    • 1 - EUROPEAN
    • 2 - CHINESE
    • 3 - JAPANESE
    • 4 - KOREAN
    zoomfactor 0 to 100 To control the zoom factor for the PDF.
    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
    0/1/2/3/4/5 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
    Custom text. If any of the header/footer setting is 5 (.ie, CUSTOM) then the corresponding custom value/text should be passed.

    HTML Specific Attributes

    Attribute Name Possible Value Description
    includeTitle 0/1/2 To contol the title positioning.
    Default value - 0.
    • 0 - AT TOP
    • 1 - AT BOTTOM
    • 2 - NONE
    includeDesc 0/1/2 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

    Config Attributes

    Attribute Name Possible Value Description
    workspaceName* workspace name The name of the workspace.
    workspaceDesc workspace description 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

    Config Attributes

    Attribute Name Possible Value Description
    newWorkspaceName* workspace name The name of the new workspace.
    newWorkspaceDesc workspace description The description of the new workspace.
    workspaceKey source workspace secret key The secret key used for allowing the user to copy the source workspace.
    copyWithData true/false To copy the workspace with table data.
    copyWithImportSource true/false To copy the workspace with import sources.

    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

    Config Attributes

    Attribute Name Possible Value Description
    workspaceName* workspace name The new name of the workspace.
    workspaceDesc workspace description 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

    Config Attributes

    Attribute Name Possible Value Description
    tableDesign* <Table Structure> JSON object of table structure.

    Table Structure

    Attribute Name Possible Value Description
    TABLENAME* table name The name of the table.
    TABLEDESCRIPTION table description The description of the table.
    FOLDERNAME folder name The name of the folder where the table have to be created.
    COLUMNS* <Column Structure> JSON Array of column structures.

    Column Structure

    Attribute Name Possible Value Description
    COLUMNNAME* column name The name of the column.
    DATATYPE* supported data types:
    • PLAIN
    • MULTI_LINE
    • EMAIL
    • NUMBER
    • POSITIVE_NUMBER
    • DECIMAL_NUMBER
    • CURRENCY
    • PERCENT
    • DATE
    • BOOLEAN
    • URL
    • AUTO_NUMBER
    • GEO
    The data type of the column.
    MANDATORY true/false Controls whether the column should contain a mandatory non-empty value.
    Default value - false.
    DESCRIPTION column description The description of the column.
    DEFAULT Default value for the column Fills the provided value when a cell in the column is empty.
    GEOROLE 0 to 8 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 204 No Content

    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

    Config Attributes

    Attribute Name Possible Value Description
    viewName* view name The name of the new view.
    viewDesc view description The description of the new view.
    copyWithData true/false To copy table with data.
    copyWithLookup true/false To copy table with lookup details.
    folderId folder id 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

    Config Attributes

    Attribute Name Possible Value Description
    viewName* view name The new name of the view.
    viewDesc view description 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

    Config Attributes

    Attribute Name Possible Value Description
    deleteDependentViews true/false 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

    Config Attributes

    Attribute Name Possible Value Description
    folderName* folder name The name of the folder.
    folderDesc folder description The description of the 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

    Config Attributes

    Attribute Name Possible Value Description
    folderName* folder name The new name of the folder.
    folderDesc folder description The new description of the folder.

    Possible Error Codes

    7103 , 7138 , 7277 , 8504 , 8506 , 8516


    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:

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

    Sample value for CONFIG parameter:

    Copy
    { "columnName": "<column-name>", "dataType": "<data-type>", }

    Sample Response:

    HTTP/1.1 200 OK
    Content-Type:application/json;charset=UTF-8
    
    {
        "status": "success",
        "summary": "Add column",
        "data": {
            "columnId": "1767024000003145067"
        }
    }
    

    Add a column in the specified table.

    request uri

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

    oauthscope: ZohoAnalytics.modeling.create

    Config Attributes

    Attribute Name Possible Value Description
    columnName* column name The name of the column.
    dataType* supported data types:
    • PLAIN
    • MULTI_LINE
    • EMAIL
    • NUMBER
    • POSITIVE_NUMBER
    • DECIMAL_NUMBER
    • CURRENCY
    • PERCENT
    • DATE
    • BOOLEAN
    • URL
    • AUTO_NUMBER
    The data type of the column.

    Possible Error Codes

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


    Rename Column

    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>/columns/<column-id>?CONFIG=<encoded_json_value> -X 'PUT' -H 'ZANALYTICS-ORGID: <org-id>' -H 'Authorization: Zoho-oauthtoken <access_token>'

    Sample value for CONFIG parameter:

    Copy
    { "columnName": "<column-name>" }

    Sample Response:

    HTTP/1.1 204 No Content

    Rename a specified column in the table.

    request uri

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

    oauthscope: ZohoAnalytics.modeling.update

    Config Attributes

    Attribute Name Possible Value Description
    columnName* column name The new name of the column.

    Possible Error Codes

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


    Delete Column

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



    Sample Request: