Import Data
With the Zoho Analytics API, you can add/update data in bulk. The data to be added/updated should be in CSV or JSON file formats.
REQUEST URI
https://<ZohoAnalytics_Server_URI>/api/<OwnerEmail>/<WorkspaceName>/<TableName>
Post
COMMON PARAMETERS
Parameter | Possible Values | Description |
---|---|---|
ZOHO_ACTION | IMPORT | This parameter specifies the action to be performed by the API request. Value of ZOHO_ACTION parameter should be in the same case(UPPER CASE) as given in this document. |
ZOHO_OUTPUT_FORMAT | XML/JSON | This parameter specifies the output format for the response. |
ZOHO_ERROR_FORMAT | XML/JSON | Specifies the output format for the response in case an error occurs when trying to process the request. |
ZOHO_API_VERSION | 1.0 | The API version of Zoho Analytics based on which the application(/service) has been written. This parameter allows the Zoho Analytics to handle applications based on the older versions.The current API version is 1.0. |
AUTHORIZATION
To make authenticated API request, append the access token in Authorization request header.
Header Name | Value | Description |
---|---|---|
Authorization | Zoho-oauthtoken<space><access_token> | The Access token provides a secure and temporary access to Zoho Analytics API's. Each access token will be valid only for an hour, and can be used only for the set of operations that is described in the scope. |
ACTION SPECIFIC PARAMETERS
Parameter | Possible Values | Description |
---|---|---|
ZOHO_FILE or ZOHO_IMPORT_DATA (mandatory) | File or String | ZOHO_FILE - The file to be import.
ZOHO_IMPORT_DATA - The string to be import. |
ZOHO_IMPORT_FILETYPE (optional) | CSV/JSON | Default value is CSV. Format of the file to be imported. Supported formats are:
|
ZOHO_IMPORT_TYPE (mandatory) | APPEND/TRUNCATEADD/UPDATEADD |
|
ZOHO_AUTO_IDENTIFY (mandatory) | TRUE/FALSE | Used to specify whether to auto identify the CSV format. |
ZOHO_ON_IMPORT_ERROR (mandatory) | ABORT/SKIPROW/SETCOLUMNEMPTY | This parameter controls the action to be taken incase there is an error during import.
|
ZOHO_CREATE_TABLE (mandatory) | true/false. | Default is false.
|
ZOHO_SELECTED_COLUMNS (optional) | List of comma separated column names. Name, Department | Specify the columns to be imported into the Zoho Analytics table from the data being uploaded. Incase of JSON files you need to specify the column names capturing the full JSON tree hierarchy eg., employee.Name, employee.Department |
ZOHO_MATCHING_COLUMNS (mandatory only when the ZOHO_IMPORT_TYPE is UPDATEADD) | List of comma separated column names. Name,Department | The values in the columns to be matched will be used for comparison to check whether data row(s) being imported matches with an existing row(s) in the table. The existing rows in the table that match will be updated with values from data imported. The remaining rows are appended to the table as new rows. |
ZOHO_SKIPTOP (optional) | Number of rows that are to be skipped from the top in the CSV file being imported. | |
ZOHO_THOUSAND_SEPARATOR (optional) | 0 / 1 / 2 / 3 | Default is 0. This parameter controls the action to be taken in case there is a thousand separator in the data. 0 - COMMA 1 - DOT 2 - SPACE 3 - SINGLE QUOTE |
ZOHO_DECIMAL_SEPARATOR (optional) | 0 / 1 | Default is 0. This parameter controls the action to be taken in case there is a decimal separator in the data. 0 - DOT 1 - COMMA |
ZOHO_DATE_FORMAT (optional) | Format of the date. dd-MMM-YYYY | The format of date value. Specify this in-case any date field is being imported and its format cannot be auto recognized by Zoho Analytics. |
ZOHO_IMPORT_JSON_RETCOLNAMES (optional) | true/false. | Default value is false.
|
ZOHO_COLUMN_DATEFORMAT (optional) | {"columnName1":"","columnName2":""} do encode this value and use. | with column name as key and date format as value.Specify this in case multiple date fields are being imported having different format each. |
CSV FORMAT DETAILS
These parameters need to be specified if the ZOHO_AUTO_IDENTIFY is set to false.
Parameter | Possible Values | Description |
---|---|---|
ZOHO_COMMENTCHAR | Comment Character. If the character mentioned is found at the beginning of the row, the csv row will be skipped. | |
ZOHO_DELIMITER | 0 / 1 / 2 / 3 | Delimiter which separates the values in the file. 0 - if the delimiter is COMMA 1 - if the delimiter is TAB 2 - if the delimiter is SEMICOLON 3 - if the delimiter is SPACE |
ZOHO_QUOTED | 0 / 1 / 2 | The Text Qualifier. 0 - None 1 - SINGLE QUOTE 2 - DOUBLE QUOTE |
POSSIBLE ERROR CODES
7103 , 7138 , 7235 , 8002 , 8004 , 8504 , 8506 , 8516 , 8533