Module ReportClient :: Class ReportClient
[hide private]
[frames] | no frames]

Class ReportClient

source code

ReportClient provides the python based language binding to the https based API of Zoho Analytics.

Instance Methods [hide private]
 
__init__(self, refreshToken, clientId, clientSecret)
Creates a new ReportClient instance.
source code
 
getOAuthToken(self, clientId, clientSecret, refreshToken)
Internal method for getting OAuth token.
source code
 
__sendRequest(self, url, httpMethod, payLoad, action, callBackData)
Internal method to send request to the server.
source code
 
invalidOAUTH(self, respObj)
Internal method to check whether accesstoken expires or not.
source code
 
handleResponse(self, response, action, callBackData)
Internal method.
source code
dictionary
addRow(self, tableURI, columnValues, config=None)
Adds a row to the specified table identified by the URI.
source code
string
deleteData(self, tableURI, criteria, config)
Delete the data in the specified table identified by the URI.
source code
string
updateData(self, tableURI, columnValues, criteria, config=None)
Update the data in the specified table identified by the URI.
source code
ImportResult
importData(self, tableURI, importType, importContent, autoIdentify='TRUE', onError='ABORT', importConfig=None)
Bulk import data into the table identified by the URI.
source code
ImportResult
importDataAsString(self, tableURI, importType, importContent, autoIdentify, onError, importConfig=None)
Bulk import data into the table identified by the URI.
source code
 
exportData(self, tableOrReportURI, format, exportToFileObj, criteria=None, config=None)
Export the data in the specified table identified by the URI.
source code
 
exportDataUsingSQL(self, tableOrReportURI, format, exportToFileObj, sql, config=None)
Export the data with the specified SQL query identified by the URI.
source code
string
copyDatabase(self, dbURI, config=None)
Copy the specified workspace identified by the URI.
source code
 
deleteDatabase(self, userURI, workspaceName, config=None)
Delete the specified workspace.
source code
 
enableDomainDB(self, userUri, dbName, domainName, config=None)
Enable workspace for custom domain.
source code
 
disableDomainDB(self, userUri, dbName, domainName, config=None)
Disable workspace for custom domain.
source code
 
createTable(self, dbURI, tableDesign, config=None)
Create a table in the specified workspace.
source code
dictionary
autoGenReports(self, tableURI, source, config=None)
Generate reports for the particular table.
source code
 
createAnalysisView(self, dbURI, reportDesign, config=None)
Create a report in the specified workspace.
source code
dictionary
createSimilarViews(self, tableURI, refView, folderName, customFormula, aggFormula, config=None)
This method is used to create similar views .
source code
 
renameView(self, dbURI, viewName, newViewName, viewDesc='', config=None)
Rename the specified view with the new name and description.
source code
string
saveAs(self, dbURI, viewToCopy, newViewName, config=None)
Create a new view by copying the structure and data of existing view.
source code
 
deleteView(self, dbURI, viewName, config=None)
Deletes the specified view from workspace.
source code
 
copyReports(self, dbURI, views, dbName, dbKey, config=None)
The Copy Reports API is used to copy one or more reports from one workspace to another within the same account or even across user accounts.
source code
 
copyFormula(self, tableURI, formula, dbName, dbKey, config=None)
The Copy Formula API is used to copy one or more formula columns from one table to another within the same workspace or across workspaces and even across one user account to another.
source code
 
addColumn(self, tableURI, columnName, dataType, config=None)
Add the column into Zoho Analytics Table.
source code
 
deleteColumn(self, tableURI, columnName, config=None)
Delete the column from Zoho Analytics Table.
source code
 
renameColumn(self, tableURI, oldColumnName, newColumnName, config=None)
Rename the column from Zoho Analytics Table.
source code
list
hideColumn(self, tableURI, columnNames, config=None)
Hide the columns in the table.
source code
list
showColumn(self, tableURI, columnNames, config=None)
Show the columns in the table.
source code
 
addLookup(self, tableURI, columnName, referedTable, referedColumn, onError, config=None)
Add the lookup for the given column.
source code
 
removeLookup(self, tableURI, columnName, config=None)
Remove the lookup for the given column.
source code
 
updateCloudDBConnection(self, tableURI, connInfo, config={})
Updates cloud connection information of the given view identified by the URI.
source code
 
updateRemoteDBConnection(self, dbURI, connInfo, config={})
Updates cloud connection information of the given live connect workspace identified by the URI.
source code
 
createBlankDb(self, userURI, dbName, dbDesc, config=None)
Create a blank workspace.
source code
dictionary
getDatabaseMetadata(self, requestURI, metadata, config=None)
This method is used to get the meta information about the reports.
source code
string
getDatabaseName(self, userURI, dbid, config=None)
Get workspace name for a specified workspace identified by the URI.
source code
string
getDatabaseID(self, userURI, dbName, config=None)
Get workspace ID for a specified workspace identified by the URI.
source code
string
isDbExist(self, userURI, dbName, config=None)
Checks whether the workspace exist or not in thw ZohoAnalytics account identified by the URI.
source code
string
isViewExist(self, dbURI, viewName, config=None)
Checks whether the view exist or not in the workspace identified by dbURI.
source code
string
isColumnExist(self, tableURI, columnName, config=None)
Checks whether the column exist or not in the workspace identified by tableURI.
source code
string
getCopyDBKey(self, dbURI, config=None)
Get copy workspace key for specified workspace identified by the URI.
source code
string
getViewName(self, userURI, objid, config=None)
This function returns the name of a view in Zoho Analytics.
source code
dictionary
getInfo(self, tableURI, config=None)
This method returns the workspace ID (DBID) and View ID (OBJID) of the corresponding workspace.
source code
dictionary
getViewInfo(self, dbURI, viewID, config=None)
Returns view details like view name,description,type from the the particular workspace identified by dbURI.
source code
List
recentItems(self, userURI, config=None)
Returns the details of recently accessed views from the ZohoAnalytics account identified by the URI.
source code
List
getDashboards(self, userURI, config=None)
Returns the list of owned/shared dashboards present in the zoho analytics account identified by the URI.
source code
List
myWorkspaceList(self, userURI, config=None)
Returns the list of all owned workspaces present in the ZohoAnalytics account identified by the URI.
source code
List
sharedWorkspaceList(self, userURI, config=None)
Returns the list of all shared workspaces present in the ZohoAnalytics account identified by the URI.
source code
List
viewList(self, dbURI, config=None)
Returns the list of all accessible views present in the workspace identified by the URI.
source code
List
folderList(self, dbURI, config=None)
Returns the list of all accessible views present in the workspace identified by the URI.
source code
dictionary
viewMetadata(self, tableURI, config=None)
Returns metainfo of the given view identified by the URI.
source code
 
shareView(self, dbURI, emailIds, views, criteria=None, config=None)
This method is used to share the views (tables/reports/dashboards) created in Zoho Analytics with users.
source code
 
removeShare(self, dbURI, emailIds, config=None)
This method is used to remove the shared views (tables/reports/dashboards) in Zoho Analytics from the users.
source code
 
addDbOwner(self, dbURI, emailIds, config=None)
This method is used to add new admins to the Analytics workspace.
source code
 
removeDbOwner(self, dbURI, emailIds, config=None)
This method is used to remove the existing admins from the Analytics workspace.
source code
ShareInfo
getShareInfo(self, dbURI, config=None)
Get the shared informations.
source code
List
groupInfo(self, dbURI, groupInfo=None)
Get meta information on the groups present in the workspace identified by the URI.
source code
string
createGroup(self, dbURI, groupInfo=None)
Create a new group in the workspace identified by the URI.
source code
 
deleteGroup(self, dbURI, groupInfo=None)
Deletes the specified groups present in the workspace identified by the URI.
source code
 
updateGroupInfo(self, dbURI, groupInfo=None)
Updates the specified group information present in the workspace identified by the URI.
source code
 
addGroupMembers(self, dbURI, groupInfo=None)
Add new members for the specified group present in the workspace identified by the URI.
source code
 
removeGroupMembers(self, dbURI, groupInfo=None)
Remove members from the specified group present in the workspace identified by the URI.
source code
string
getViewUrl(self, tableURI, config=None)
This method returns the URL to access the mentioned view.
source code
string
getEmbedUrl(self, tableURI, criteria=None, config=None)
This method is used to get the embed URL of the particular table / view.
source code
dictionary
getSlideList(self, dbURI, slideInfo=None)
Get the list of all available slideshow present in the workspace identified by the URI.
source code
dictionary
getSlideInfo(self, dbURI, slideInfo=None)
Get meta-information of the provided slide present in the workspace identified by the URI.
source code
dictionary
getSlideUrl(self, dbURI, slideInfo=None)
Get the URL to access the mentioned slide present in the workspace identified by the URI.
source code
 
createSlideShow(self, dbURI, slideInfo=None)
Create a new slideshow in the workspace identified by the URI.
source code
 
updateSlideShow(self, dbURI, slideInfo=None)
Update the mentioned slide information present in the workspace identified by the URI.
source code
 
deleteSlideShow(self, dbURI, slideInfo=None)
Delete the mentioned slides present in the workspace identified by the URI.
source code
list
getUsers(self, userURI, config=None)
Returns the users list for the user account.
source code
 
addUser(self, userURI, emailIds, config=None)
Add the users to the Zoho Analytics Account.
source code
 
removeUser(self, userURI, emailIds, config=None)
Remove the users from the Zoho Analytics Account.
source code
 
activateUser(self, userURI, emailIds, config=None)
Activate the users in the Zoho Analytics Account.
source code
 
deActivateUser(self, userURI, emailIds, config=None)
Deactivate the users in the Zoho Analytics Account.
source code
PlanInfo
getPlanInfo(self, userURI, config=None)
Get the plan informations.
source code
 
changeUserRole(self, userURI, emailIds, role, config=None)
Change the role of specified users with the new role provided.
source code
string
getUserURI(self, dbOwnerName)
Returns the URI for the specified user..
source code
string
getDBURI(self, dbOwnerName, dbName)
Returns the URI for the specified workspace.
source code
string
getURI(self, dbOwnerName, dbName, tableOrReportName)
Returns the URI for the specified workspace table (or report).
source code
 
splCharReplace(self, value)
Internal method for handling special characters in tale or workspace name.
source code
 
getResp(self, url, httpMethod, payLoad)
Internal method.(For google app integ).
source code
Method Details [hide private]

__init__(self, refreshToken, clientId, clientSecret)
(Constructor)

source code 

Creates a new ReportClient instance.

Parameters:
  • refreshToken (string) - User's refresh token.
  • clientId (string) - User's client id.
  • clientSecret (string) - User's client secret.

handleResponse(self, response, action, callBackData)

source code 

Internal method. To be used by classes extending this.

addRow(self, tableURI, columnValues, config=None)

source code 

Adds a row to the specified table identified by the URI.

Parameters:
  • tableURI (string) - The URI of the table. See getURI.
  • columnValues (dictionary) - Contains the values for the row. The column name(s) are the key.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Returns: dictionary
The values of the row.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

deleteData(self, tableURI, criteria, config)

source code 

Delete the data in the specified table identified by the URI.

Parameters:
  • tableURI (string) - The URI of the table. See getURI.
  • criteria (string) - The criteria to be applied for deleting. Only rows matching the criteria will be updated. Can be None. In-case it is None, then all rows will be deleted.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Returns: string
Deleted row count.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

updateData(self, tableURI, columnValues, criteria, config=None)

source code 

Update the data in the specified table identified by the URI.

Parameters:
  • tableURI (string) - The URI of the table. See getURI.
  • columnValues (dictionary) - Contains the values for the row. The column name(s) are the key.
  • criteria (string) - The criteria to be applied for updating. Only rows matching the criteria will be updated. Can be None. In-case it is None, then all rows will be updated.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Returns: string
Updated row count.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

importData(self, tableURI, importType, importContent, autoIdentify='TRUE', onError='ABORT', importConfig=None)

source code 

Bulk import data into the table identified by the URI.

Parameters:
  • tableURI (string) - The URI of the table. See getURI.
  • importType (string) - The type of import. Can be one of
    1. APPEND
    2. TRUNCATEADD
    3. UPDATEADD

    See Import types for more details.

  • importContent (string) - The data in csv format.
  • autoIdentify (string) - Used to specify whether to auto identify the CSV format. Allowable values - true/false.
  • onError (string) - This parameter controls the action to be taken In-case there is an error during import.
  • importConfig (dictionary) - Contains any additional control parameters. See Import types for more details.
Returns: ImportResult
An ImportResult containing the results of the Import
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

importDataAsString(self, tableURI, importType, importContent, autoIdentify, onError, importConfig=None)

source code 

Bulk import data into the table identified by the URI.

Parameters:
  • tableURI (string) - The URI of the table. See getURI.
  • importType (string) - The type of import. Can be one of
    1. APPEND
    2. TRUNCATEADD
    3. UPDATEADD

    See Import types for more details.

  • importContent (string) - The data in csv format or json.
  • autoIdentify (string) - Used to specify whether to auto identify the CSV format. Allowable values - true/false.
  • onError (string) - This parameter controls the action to be taken In-case there is an error during import.
  • importConfig (dictionary) - Contains any additional control parameters. See Import types for more details.
Returns: ImportResult
An ImportResult containing the results of the Import.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

exportData(self, tableOrReportURI, format, exportToFileObj, criteria=None, config=None)

source code 

Export the data in the specified table identified by the URI.

Parameters:
  • tableOrReportURI (string) - The URI of the table. See getURI.
  • format (string) - The format in which the data is to be exported. See Supported Export Formats for the supported types.
  • exportToFileObj (file) - File (or file like object) to which the exported data is to be written
  • criteria (string) - The criteria to be applied for exporting. Only rows matching the criteria will be exported. Can be None. In-case it is None, then all rows will be exported.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

exportDataUsingSQL(self, tableOrReportURI, format, exportToFileObj, sql, config=None)

source code 

Export the data with the specified SQL query identified by the URI.

Parameters:
  • tableOrReportURI (string) - The URI of the workspace. See getDBURI.
  • format (string) - The format in which the data is to be exported. See Supported Export Formats for the supported types.
  • exportToFileObj (file) - File (or file like object) to which the exported data is to be written
  • sql (string) - The sql whose output need to be exported.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

copyDatabase(self, dbURI, config=None)

source code 

Copy the specified workspace identified by the URI.

Parameters:
  • dbURI (string) - The URI of the workspace. See getDBURI.
  • config (dictionary) - Contains any additional control parameters like ZOHO_DATABASE_NAME.
Returns: string
The new workspace id.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

deleteDatabase(self, userURI, workspaceName, config=None)

source code 

Delete the specified workspace.

Parameters:
  • userURI (string) - The URI of the user. See getUserURI.
  • workspaceName (string) - The name of the workspace to be deleted.
  • config (dictionary) - Contains any additional control parameters.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

enableDomainDB(self, userUri, dbName, domainName, config=None)

source code 

Enable workspace for custom domain.

Parameters:
  • userUri (string) - The URI of the user. See getUserURI.
  • dbName (string) - The workspace name.
  • domainName (string) - The domain name.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

disableDomainDB(self, userUri, dbName, domainName, config=None)

source code 

Disable workspace for custom domain.

Parameters:
  • userUri (string) - The URI of the user. See getUserURI.
  • dbName (string) - The workspace name.
  • domainName (string) - The domain name.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

createTable(self, dbURI, tableDesign, config=None)

source code 

Create a table in the specified workspace.

Parameters:
  • dbURI (string) - The URI of the workspace. See getDBURI.
  • tableDesign (string) - Table structure in JSON format (includes table name, description, folder name, column and lookup details, is system table).
  • config (dictionary) - Contains any additional control parameters. Can be None.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

autoGenReports(self, tableURI, source, config=None)

source code 

Generate reports for the particular table.

Parameters:
  • tableURI (string) - The URI of the table. See getURI.
  • source (string) - Source should be column or table.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Returns: dictionary
Auto generate report result.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

createAnalysisView(self, dbURI, reportDesign, config=None)

source code 

Create a report in the specified workspace.

Parameters:
  • dbURI (string) - The URI of the workspace. See getDBURI.
  • reportDesign (string) - Report structure in JSON format.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

createSimilarViews(self, tableURI, refView, folderName, customFormula, aggFormula, config=None)

source code 

This method is used to create similar views .

Parameters:
  • tableURI (string) - The URI of the table. See getURI.
  • refView (string) - It contains the reference view name.
  • folderName (string) - It contains the folder name where the reports to be saved.
  • customFormula (bool) - If its true the reports created with custom formula.
  • aggFormula (bool) - If its true the reports created with aggregate formula.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Returns: dictionary
created reports result.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

renameView(self, dbURI, viewName, newViewName, viewDesc='', config=None)

source code 

Rename the specified view with the new name and description.

Parameters:
  • dbURI (string) - The URI of the workspace. See getDBURI.
  • viewName (string) - Current name of the view.
  • newViewName (string) - New name for the view.
  • viewDesc (string) - New description for the view.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

saveAs(self, dbURI, viewToCopy, newViewName, config=None)

source code 

Create a new view by copying the structure and data of existing view.

Parameters:
  • dbURI (string) - The URI of the workspace. See getDBURI.
  • viewToCopy (string) - Name of the view to be copied.
  • newViewName (string) - Name of the view to be created.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Returns: string
The status about the request (success or failure).
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

deleteView(self, dbURI, viewName, config=None)

source code 

Deletes the specified view from workspace.

Parameters:
  • dbURI (string) - The URI of the workspace. See getDBURI.
  • viewName (string) - Current name of the view.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

copyReports(self, dbURI, views, dbName, dbKey, config=None)

source code 

The Copy Reports API is used to copy one or more reports from one workspace to another within the same account or even across user accounts.

Parameters:
  • dbURI (string) - The URI of the workspace. See getDBURI.
  • views (string) - This parameter holds the list of view names.
  • dbName (string) - The workspace name where the report's had to be copied.
  • dbKey (string) - The secret key used for allowing the user to copy the report.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

copyFormula(self, tableURI, formula, dbName, dbKey, config=None)

source code 

The Copy Formula API is used to copy one or more formula columns from one table to another within the same workspace or across workspaces and even across one user account to another.

Parameters:
  • tableURI (string) - The URI of the table. See getURI.
  • formula (string) - This parameter holds the list of formula names.
  • dbName (string) - The workspace name where the formula's had to be copied.
  • dbKey (string) - The secret key used for allowing the user to copy the formula.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

addColumn(self, tableURI, columnName, dataType, config=None)

source code 

Add the column into Zoho Analytics Table.

Parameters:
  • tableURI (string) - The URI of the table. See getURI.
  • columnName (string) - The column name to be added into Zoho Analytics Table.
  • dataType (string) - The data type of the column to be added into Zoho Analytics Table.
  • config (dictionary) - Contains any additional control parameters.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

deleteColumn(self, tableURI, columnName, config=None)

source code 

Delete the column from Zoho Analytics Table.

Parameters:
  • tableURI (string) - The URI of the table. See getURI.
  • columnName (string) - The column name to be deleted from Zoho Analytics Table.
  • config (dictionary) - Contains any additional control parameters.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

renameColumn(self, tableURI, oldColumnName, newColumnName, config=None)

source code 

Rename the column from Zoho Analytics Table.

Parameters:
  • tableURI (string) - The URI of the table. See getURI.
  • oldColumnName (string) - The column name to be renamed in Zoho Analytics Table.
  • newColumnName (string) - New name for the column.
  • config (dictionary) - Contains any additional control parameters.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

hideColumn(self, tableURI, columnNames, config=None)

source code 

Hide the columns in the table.

Parameters:
  • tableURI (string) - The URI of the table. See getURI.
  • columnNames (list) - Contains list of column names.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Returns: list
Column status.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

showColumn(self, tableURI, columnNames, config=None)

source code 

Show the columns in the table.

Parameters:
  • tableURI (string) - The URI of the table. See getURI.
  • columnNames (list) - Contains list of column names.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Returns: list
Column status.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

addLookup(self, tableURI, columnName, referedTable, referedColumn, onError, config=None)

source code 

Add the lookup for the given column.

Parameters:
  • tableURI (string) - The URI of the table. See getURI.
  • columnName (string) - Name of the column (Child column).
  • referedTable (string) - Name of the referred table (parent table).
  • referedColumn (string) - Name of the referred column (parent column).
  • onError (string) - This parameter controls the action to be taken In-case there is an error during lookup.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

removeLookup(self, tableURI, columnName, config=None)

source code 

Remove the lookup for the given column.

Parameters:
  • tableURI (string) - The URI of the table. See getURI.
  • columnName (string) - Name of the column.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

updateCloudDBConnection(self, tableURI, connInfo, config={})

source code 

Updates cloud connection information of the given view identified by the URI.

Parameters:
  • tableURI (string) - The URI of the table. See getURI.
  • connInfo (dictionary) - Contains connection information to be updated.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

updateRemoteDBConnection(self, dbURI, connInfo, config={})

source code 

Updates cloud connection information of the given live connect workspace identified by the URI.

Parameters:
  • dbURI (string) - The URI of the workspace. See getDBURI.
  • connInfo (dictionary) - Contains connection information to be updated.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

createBlankDb(self, userURI, dbName, dbDesc, config=None)

source code 

Create a blank workspace.

Parameters:
  • userURI (string) - The URI of the user. See getUserURI.
  • dbName (string) - The workspace name.
  • dbDesc (string) - The workspace description.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

getDatabaseMetadata(self, requestURI, metadata, config=None)

source code 

This method is used to get the meta information about the reports.

Parameters:
  • requestURI (string) - The URI of the workspace or table.
  • metadata (string) - It specifies the information to be fetched.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Returns: dictionary
The metadata of the workspace.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

getDatabaseName(self, userURI, dbid, config=None)

source code 

Get workspace name for a specified workspace identified by the URI.

Parameters:
  • userURI (string) - The URI of the user. See getUserURI.
  • dbid (string) - The ID of the workspace.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Returns: string
The workspace name.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

getDatabaseID(self, userURI, dbName, config=None)

source code 

Get workspace ID for a specified workspace identified by the URI.

Parameters:
  • userURI (string) - The URI of the user. See getUserURI.
  • dbName (string) - The name of the workspace.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Returns: string
The workspace ID.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

isDbExist(self, userURI, dbName, config=None)

source code 

Checks whether the workspace exist or not in thw ZohoAnalytics account identified by the URI.

Parameters:
  • userURI (string) - The URI of the user. See getUserURI.
  • dbName (string) - workspace name.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Returns: string
Returns True, if workspace exist. False, otherwise.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

isViewExist(self, dbURI, viewName, config=None)

source code 

Checks whether the view exist or not in the workspace identified by dbURI.

Parameters:
  • dbURI (string) - The URI of the workspace. See getDBURI.
  • viewName (string) - Name of the view.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Returns: string
Returns True, if view exist. False, otherwise.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

isColumnExist(self, tableURI, columnName, config=None)

source code 

Checks whether the column exist or not in the workspace identified by tableURI.

Parameters:
  • tableURI (string) - The URI of the table. See getURI.
  • columnName (string) - Name of the column.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Returns: string
Returns True, if column exist. False, otherwise.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

getCopyDBKey(self, dbURI, config=None)

source code 

Get copy workspace key for specified workspace identified by the URI.

Parameters:
  • dbURI (string) - The URI of the workspace. See getDBURI.
  • config (dictionary) - Contains any additional control parameters like ZOHO_REGENERATE_KEY. Can be None.
Returns: string
Copy workspace key.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

getViewName(self, userURI, objid, config=None)

source code 

This function returns the name of a view in Zoho Analytics.

Parameters:
  • userURI (string) - The URI of the user. See getUserURI.
  • objid (string) - The view id (object id).
  • config (dictionary) - Contains any additional control parameters. Can be None.
Returns: string
The View name.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

getInfo(self, tableURI, config=None)

source code 

This method returns the workspace ID (DBID) and View ID (OBJID) of the corresponding workspace.

Parameters:
  • tableURI (string) - The URI of the table. See getURI.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Returns: dictionary
The View-Id (object id) and workspace-Id.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

getViewInfo(self, dbURI, viewID, config=None)

source code 

Returns view details like view name,description,type from the the particular workspace identified by dbURI.

Parameters:
  • dbURI (string) - The URI of the workspace. See getDBURI.
  • viewID (string) - The ID of the view.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Returns: dictionary
The information about the view.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

recentItems(self, userURI, config=None)

source code 

Returns the details of recently accessed views from the ZohoAnalytics account identified by the URI.

Parameters:
  • userURI (string) - The URI of the user. See getUserURI.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Returns: List
Recently modified views.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

getDashboards(self, userURI, config=None)

source code 

Returns the list of owned/shared dashboards present in the zoho analytics account identified by the URI.

Parameters:
  • userURI (string) - The URI of the user. See getUserURI.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Returns: List
The details of dashboards present in the organization.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

myWorkspaceList(self, userURI, config=None)

source code 

Returns the list of all owned workspaces present in the ZohoAnalytics account identified by the URI.

Parameters:
  • userURI (string) - The URI of the user. See getUserURI.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Returns: List
Metainfo of owned workspaces present in the organization.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

sharedWorkspaceList(self, userURI, config=None)

source code 

Returns the list of all shared workspaces present in the ZohoAnalytics account identified by the URI.

Parameters:
  • userURI (string) - The URI of the user. See getUserURI.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Returns: List
Metainfo of shared workspaces present in the organization.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

viewList(self, dbURI, config=None)

source code 

Returns the list of all accessible views present in the workspace identified by the URI.

Parameters:
  • dbURI (string) - The URI of the workspace. See getUserURI.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Returns: List
Metainfo of all accessible views present in the workspace.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

folderList(self, dbURI, config=None)

source code 

Returns the list of all accessible views present in the workspace identified by the URI.

Parameters:
  • dbURI (string) - The URI of the workspace. See getUserURI.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Returns: List
Metainfo of all accessible folders present in the workspace.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

viewMetadata(self, tableURI, config=None)

source code 

Returns metainfo of the given view identified by the URI.

Parameters:
  • tableURI (string) - The URI of the table. See getURI.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Returns: dictionary
Metainfo of the provided view.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

shareView(self, dbURI, emailIds, views, criteria=None, config=None)

source code 

This method is used to share the views (tables/reports/dashboards) created in Zoho Analytics with users.

Parameters:
  • dbURI (string) - The URI of the workspace. See getDBURI.
  • emailIds (string) - It contains the owners email-id.
  • views (string) - It contains the view names.
  • criteria (string) - Set criteria for share. Can be None.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

removeShare(self, dbURI, emailIds, config=None)

source code 

This method is used to remove the shared views (tables/reports/dashboards) in Zoho Analytics from the users.

Parameters:
  • dbURI (string) - The URI of the workspace. See getDBURI.
  • emailIds (string) - It contains the owners email-id.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

addDbOwner(self, dbURI, emailIds, config=None)

source code 

This method is used to add new admins to the Analytics workspace.

Parameters:
  • dbURI (string) - The URI of the workspace. See getDBURI.
  • emailIds (string) - It contains the owners email-id.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

removeDbOwner(self, dbURI, emailIds, config=None)

source code 

This method is used to remove the existing admins from the Analytics workspace.

Parameters:
  • dbURI (string) - The URI of the workspace. See getDBURI.
  • emailIds (string) - It contains the owners email-id.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

getShareInfo(self, dbURI, config=None)

source code 

Get the shared informations.

Parameters:
  • dbURI (string) - The URI of the workspace. See getDBURI.
  • config (dictionary) - Contains any additional control parameters like ZOHO_REGENERATE_KEY. Can be None.
Returns: ShareInfo
ShareInfo object.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

groupInfo(self, dbURI, groupInfo=None)

source code 

Get meta information on the groups present in the workspace identified by the URI.

Parameters:
  • dbURI (string) - The URI of the workspace. See getDBURI.
  • groupConfig (dictionary) - Contains any additional control parameters. Can be None.
Returns: List
Meta information of groups present in the workspace.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

createGroup(self, dbURI, groupInfo=None)

source code 

Create a new group in the workspace identified by the URI.

Parameters:
  • dbURI (string) - The URI of the workspace. See getDBURI.
  • groupConfig (dictionary) - Contains the required details to create a group.
Returns: string
Created group id.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

deleteGroup(self, dbURI, groupInfo=None)

source code 

Deletes the specified groups present in the workspace identified by the URI.

Parameters:
  • dbURI (string) - The URI of the workspace. See getDBURI.
  • groupConfig (dictionary) - Contains details on the groups to be deleted.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

updateGroupInfo(self, dbURI, groupInfo=None)

source code 

Updates the specified group information present in the workspace identified by the URI.

Parameters:
  • dbURI (string) - The URI of the workspace. See getDBURI.
  • groupConfig (dictionary) - Contains details on the group which has to be updated.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

addGroupMembers(self, dbURI, groupInfo=None)

source code 

Add new members for the specified group present in the workspace identified by the URI.

Parameters:
  • dbURI (string) - The URI of the workspace. See getDBURI.
  • groupConfig (dictionary) - Contains the required information to add members into the group.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

removeGroupMembers(self, dbURI, groupInfo=None)

source code 

Remove members from the specified group present in the workspace identified by the URI.

Parameters:
  • dbURI (string) - The URI of the workspace. See getDBURI.
  • groupConfig (dictionary) - Contains the required information to remove members from the group.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

getViewUrl(self, tableURI, config=None)

source code 

This method returns the URL to access the mentioned view.

Parameters:
  • tableURI (string) - The URI of the table. See getURI.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Returns: string
The view URI.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

getEmbedUrl(self, tableURI, criteria=None, config=None)

source code 

This method is used to get the embed URL of the particular table / view. This API is available only for the White Label Administrator.

Parameters:
  • tableURI (string) - The URI of the table. See getURI.
  • criteria (string) - Set criteria for URL. Can be None.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Returns: string
The embed URI.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

getSlideList(self, dbURI, slideInfo=None)

source code 

Get the list of all available slideshow present in the workspace identified by the URI.

Parameters:
  • dbURI (string) - The URI of the workspace. See getDBURI.
  • slideInfo - Contains any additional control parameters. Can be None.
  • groupConfig (dictionary)
Returns: dictionary
List of slideshows present in the workspace.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

getSlideInfo(self, dbURI, slideInfo=None)

source code 

Get meta-information of the provided slide present in the workspace identified by the URI.

Parameters:
  • dbURI (string) - The URI of the workspace. See getDBURI.
  • slideInfo - Contains slide configuration.
  • groupConfig (dictionary)
Returns: dictionary
Meta information of the provided slide present in the workspace.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

getSlideUrl(self, dbURI, slideInfo=None)

source code 

Get the URL to access the mentioned slide present in the workspace identified by the URI.

Parameters:
  • dbURI (string) - The URI of the workspace. See getDBURI.
  • slideInfo (dictionary) - Contains slide configuration.
Returns: dictionary
Access url of the provided slide.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

createSlideShow(self, dbURI, slideInfo=None)

source code 

Create a new slideshow in the workspace identified by the URI.

Parameters:
  • dbURI (string) - The URI of the workspace. See getDBURI.
  • slideInfo - Contains required information to create a slideshow.
  • groupConfig (dictionary)
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

updateSlideShow(self, dbURI, slideInfo=None)

source code 

Update the mentioned slide information present in the workspace identified by the URI.

Parameters:
  • dbURI (string) - The URI of the workspace. See getDBURI.
  • slideInfo - Contains required information to update the slideshow.
  • groupConfig (dictionary)
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

deleteSlideShow(self, dbURI, slideInfo=None)

source code 

Delete the mentioned slides present in the workspace identified by the URI.

Parameters:
  • dbURI (string) - The URI of the workspace. See getDBURI.
  • slideInfo - Contains required information to delete slideshows.
  • groupConfig (dictionary)
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

getUsers(self, userURI, config=None)

source code 

Returns the users list for the user account.

Parameters:
  • userURI (string) - The URI of the user. See getUserURI.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Returns: list
The list of user details.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

addUser(self, userURI, emailIds, config=None)

source code 

Add the users to the Zoho Analytics Account.

Parameters:
  • userURI (string) - The URI of the user. See getUserURI.
  • emailIds (string) - The email addresses of the users to be added to the Zoho Analytics Account separated by comma.
  • config (dictionary) - Contains any additional control parameters.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

removeUser(self, userURI, emailIds, config=None)

source code 

Remove the users from the Zoho Analytics Account.

Parameters:
  • userURI (string) - The URI of the user. See getUserURI.
  • emailIds (string) - The email addresses of the users to be removed from the Zoho Analytics Account separated by comma.
  • config (dictionary) - Contains any additional control parameters.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

activateUser(self, userURI, emailIds, config=None)

source code 

Activate the users in the Zoho Analytics Account.

Parameters:
  • userURI (string) - The URI of the user. See getUserURI.
  • emailIds (string) - The email addresses of the users to be activated in the Zoho Analytics Account separated by comma.
  • config (dictionary) - Contains any additional control parameters.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

deActivateUser(self, userURI, emailIds, config=None)

source code 

Deactivate the users in the Zoho Analytics Account.

Parameters:
  • userURI (string) - The URI of the user. See getUserURI.
  • emailIds (string) - The email addresses of the users to be deactivated in the Zoho Analytics Account separated by comma.
  • config (dictionary) - Contains any additional control parameters.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

getPlanInfo(self, userURI, config=None)

source code 

Get the plan informations.

Parameters:
  • userURI (string) - The URI of the user. See getUserURI.
  • config (dictionary) - Contains any additional control parameters like ZOHO_REGENERATE_KEY. Can be None.
Returns: PlanInfo
PlanInfo object.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

changeUserRole(self, userURI, emailIds, role, config=None)

source code 

Change the role of specified users with the new role provided.

Parameters:
  • userURI (string) - The URI of the user. See getUserURI.
  • emailIds (string) - The email addresses of the users whose role has to be changed.
  • role - New role for the users. can be one of "ORGADMIN"/"USER".
  • config (dictionary) - Contains any additional control parameters.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

getUserURI(self, dbOwnerName)

source code 

Returns the URI for the specified user..

Parameters:
  • dbOwnerName (string) - User email-id of the workspace.
Returns: string
The URI for the specified user.

getDBURI(self, dbOwnerName, dbName)

source code 

Returns the URI for the specified workspace.

Parameters:
  • dbOwnerName (string) - The owner of the workspace.
  • dbName (string) - The name of the workspace.
Returns: string
The URI for the specified workspace.

getURI(self, dbOwnerName, dbName, tableOrReportName)

source code 

Returns the URI for the specified workspace table (or report).

Parameters:
  • dbOwnerName (string) - The admin of the workspace containing the table (or report).
  • dbName (string) - The name of the workspace containing the table (or report).
  • tableOrReportName (string) - The name of the table (or report).
Returns: string
The URI for the specified table (or report).