Zoho Analytics APIReportClient

ReportClient provides the PHP based language binding to the https based API of ZohoAnalytics.

Summary

Methods
Properties
Constants
addRow()
deleteData()
updateData()
importData()
importDataAsString()
exportData()
exportDataUsingSQL()
copyDatabase()
deleteDatabase()
enableDomainDB()
disableDomainDB()
createTable()
autoGenReports()
createAnalysisView()
createSimilarViews()
renameView()
deleteView()
copyReports()
copyFormula()
addColumn()
deleteColumn()
renameColumn()
hideColumn()
showColumn()
addLookup()
removeLookup()
updateCloudDBConnection()
updateRemoteDBConnection()
createBlankDb()
saveAs()
getDatabaseMetadata()
getDatabaseName()
getDatabaseID()
isDbExist()
isViewExist()
isColumnExist()
getCopyDbKey()
getViewName()
getInfo()
getViewInfo()
recentItems()
getDashboards()
myWorkspaceList()
sharedWorkspaceList()
viewList()
folderList()
viewMetadata()
shareView()
removeShare()
addDbOwner()
removeDbOwner()
getShareInfo()
groupInfo()
createGroup()
deleteGroup()
updateGroupInfo()
addGroupMembers()
removeGroupMembers()
getViewUrl()
getEmbedURL()
getSlideList()
getSlideInfo()
getSlideUrl()
createSlideShow()
updateSlideShow()
deleteSlideShow()
getUsers()
addUser()
removeUser()
activateUser()
deActivateUser()
getPlanInfo()
changeUserRole()
getAuthToken()
getUserURI()
getDbURI()
getURI()
setProxy()
setConnectionTimeout()
setReadTimeout()
getConnectionTimeout()
getReadTimeout()
$reports_url
$accounts_url
$zoho_action
$zoho_authtoken
$zoho_oauth
$proxy
$proxy_host
$proxy_port
$proxy_user_name
$proxy_password
$proxy_type
$connection_timeout
$read_timeout
ZOHO_API_VERSION
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

ZOHO_API_VERSION

ZOHO_API_VERSION

Properties

$reports_url

$reports_url : string

Type

string — The base request API URL.

$accounts_url

$accounts_url : string

Type

string — Account URL.

$zoho_action

$zoho_action : string

Type

string — It is action name, that is performed by the URL.

$zoho_authtoken

$zoho_authtoken : string

Type

string — It is a unique token that authenticates the user to access the Zoho Account. This is a user-specific and permanent token, that need to be passed along with every Zoho Analytics API request.

$zoho_oauth

$zoho_oauth : boolean

Type

boolean — It will indicate whether the token is OAuth token or not.

$proxy

$proxy : boolean

Type

boolean — It will indicate whether the proxy is set or not.

$proxy_host

$proxy_host : string

Type

string — The hostname/ip address of the proxy-server.

$proxy_port

$proxy_port : integer

Type

integer — The proxy server port.

$proxy_user_name

$proxy_user_name : string

Type

string — The user name for proxy-server authentication.

$proxy_password

$proxy_password : string

Type

string — The password for proxy-server authentication.

$proxy_type

$proxy_type : string

Type

string — Can be any one ( HTTP , HTTPS , BOTH ).Specify "BOTH" if same configuration can be used for both HTTP and HTTPS.

$connection_timeout

$connection_timeout : integer

Type

integer — It is a time value until a connection is established.

$read_timeout

$read_timeout : integer

Type

integer — It is a time value until waiting to read data.

Methods

addRow()

addRow(string  $table_uri, array()  $columnvalues, array()  $config = array()) : array

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

Parameters

string $table_uri

The URI of the table.

array() $columnvalues

Contains the values for the row. The column name(s) are the key.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

Returns

array —

Successfully added rows with value.

deleteData()

deleteData(string  $table_uri, string  $criteria = NULL, array()  $config = array()) : string

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

Parameters

string $table_uri

The URI of the table.

string $criteria

The criteria to be applied for deleting. Only rows matching the criteria will be deleted. Can be null. In-case it is null, then all rows will be deleted.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

Returns

string —

Deleted row count.

updateData()

updateData(string  $table_uri, array()  $columnvalues, string  $criteria = NULL, array()  $config = array()) : string

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

Parameters

string $table_uri

The URI of the table.

array() $columnvalues

Contains the values to be updated. The column name(s) are the key.

string $criteria

The criteria to be applied for updating. Only rows matching the criteria will be updated. Can be null. In-case it is null, then all rows will be updated.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

Returns

string —

Updated row count.

importData()

importData(string  $table_uri, string  $import_type, file  $file, string  $auto_identify, string  $on_error, array()  $config = array()) : object

Import the data contained in a given file into the table identified by the URI.

Parameters

string $table_uri

The URI of the table.

string $import_type

The type of import

file $file

The file containing the data to be imported into the table.

string $auto_identify

Used to specify whether to auto identify the CSV format.

string $on_error

This parameter controls the action to be taken In-case there is an error during import.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

Returns

object —

Import result class object.

importDataAsString()

importDataAsString(string  $table_uri, string  $import_type, string  $import_data, string  $auto_identify, string  $on_error, array()  $config = array()) : object

Import the data contained in a given string into the table identified by the URI.

Parameters

string $table_uri

The URI of the table.

string $import_type

The type of import

string $import_data

The string containing the data to be imported into the table.

string $auto_identify

Used to specify whether to auto identify the CSV format.

string $on_error

This parameter controls the action to be taken In-case there is an error during import.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

Returns

object —

Import result class object.

exportData()

exportData(string  $table_uri, string  $file_format, string  $criteria = NULL, array()  $config = array()) : string

Exports the data/report of table identified by the URI.

Parameters

string $table_uri

The URI of the table.

string $file_format

The format in which the data is to be exported.

string $criteria

The criteria to be applied for exporting. Only rows matching the criteria will be exported. Can be null. In-case it is null, then all rows will be updated.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

Returns

string —

Table data.

exportDataUsingSQL()

exportDataUsingSQL(string  $db_uri, string  $file_format, string  $sql_query, array()  $config = array()) : string

Exports the data with the given SQL Query.

Parameters

string $db_uri

The URI of the workspace.

string $file_format

The format in which the data is to be exported.

string $sql_query

The SQL Query whose output is exported.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

Returns

string —

Table data.

copyDatabase()

copyDatabase(string  $db_uri, string  $db_key, string  $new_db_name, array()  $config = array()) : string

Copy a specified workspace identified by the URI.

Parameters

string $db_uri

The URI of the workspace.

string $db_key

Contains workspace key that user wants to copy.

string $new_db_name

Contains new workspace name.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

Returns

string —

The new workspace id.

deleteDatabase()

deleteDatabase(string  $user_uri, string  $db_name, array()  $config = array()) 

Deletes a specified workspace from the Zoho Analytics Account.

Parameters

string $user_uri

The URI of the user.

string $db_name

The name of the workspace to be deleted from the Zoho Analytics Account.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server harefresh_tokens responded but client was not able to parse the response.

enableDomainDB()

enableDomainDB(string  $user_uri, string  $db_name, string  $domain_name, array()  $config = array()) 

Enable workspace for custom domain.

Parameters

string $user_uri

The URI of the user.

string $db_name

The workspace names which you want to show in your custom domain.

string $domain_name

Custom domain name.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

disableDomainDB()

disableDomainDB(string  $user_uri, string  $db_name, string  $domain_name, array()  $config = array()) 

Disable workspace for custom domain.

Parameters

string $user_uri

The URI of the user.

string $db_name

The workspace names which you want to disable from your custom domain.

string $domain_name

Custom domain name.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

createTable()

createTable(string  $db_uri, \JSON  $table_design_JSON, array()  $config = array()) 

Create a table in the specified workspace.

Parameters

string $db_uri

The URI of the workspace.

\JSON $table_design_JSON

Table structure in JSON format (includes table name, description, folder name, column and lookup details).

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

autoGenReports()

autoGenReports(string  $table_uri, string  $source, array()  $config = array()) : string

To generate reports.

Parameters

string $table_uri

The URI of the table.

string $source

To set column or table.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

Returns

string —

Auto-generated info.

createAnalysisView()

createAnalysisView(string  $db_uri, \JSON  $view_design_JSON, array()  $config = array()) 

Create a report in the specified workspace.

Parameters

string $db_uri

The URI of the workspace.

\JSON $view_design_JSON

Table structure in JSON format.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

createSimilarViews()

createSimilarViews(string  $table_uri, string  $ref_view, string  $folder_name, boolean  $copy_customformula, boolean  $copy_aggformula, array()  $config = array()) : string

Create reports similar as another table reports.

Parameters

string $table_uri

The URI of the table.

string $ref_view

The reference table name.

string $folder_name

Folder name where the reports to be saved.

boolean $copy_customformula

If true, it will create reports with custom formula else it will ignore that formula.

boolean $copy_aggformula

If true, it will create reports with aggregate formula else it will ignore that formula.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

Returns

string —

View-generated info.

renameView()

renameView(string  $db_uri, string  $viewname, string  $new_viewname, string  $new_viewdesc = NULL, array()  $config = array()) 

Rename the specified view with the new name and description.

Parameters

string $db_uri

The URI of the workspace.

string $viewname

Current name of the view.

string $new_viewname

New name for the view.

string $new_viewdesc

New description for the view.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

deleteView()

deleteView(string  $db_uri, string  $view_name, array()  $config = array()) 

Deletes the specified view from the workspace.

Parameters

string $db_uri

The URI of the workspace.

string $view_name

The name of the view.

array() $config

$config Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

copyReports()

copyReports(string  $db_uri, string  $views, string  $db_name, string  $db_key, array()  $config = array()) 

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

string $db_uri

The URI of the workspace.

string $views

This parameter holds the list of view names.

string $db_name

The workspace name where the reports had to be copied.

string $db_key

The secret key used for allowing the user to copy the workspace / reports.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

copyFormula()

copyFormula(string  $table_uri, string  $formula, string  $db_name, string  $db_key, array()  $config = array()) 

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

string $table_uri

The URI of the table.

string $formula

This parameter holds the list of formula names.

string $db_name

The workspace name where the formula's had to be copied.

string $db_key

The secret key used for allowing the user to copy the formula.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

addColumn()

addColumn(string  $table_uri, string  $column_name, string  $data_type, array()  $config = array()) 

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

Parameters

string $table_uri

The URI of the table.

string $column_name

Contains the name of the column to be added.

string $data_type

Contains the datatype of the column to be added.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

deleteColumn()

deleteColumn(string  $table_uri, string  $column_name, array()  $config = array()) 

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

Parameters

string $table_uri

The URI of the table.

string $column_name

Contains the name of the column to be deleted.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

renameColumn()

renameColumn(string  $table_uri, string  $old_column_name, string  $new_column_name, array()  $config = array()) 

Rename the column in the specified table identified by the URI.

Parameters

string $table_uri

The URI of the table.

string $old_column_name

Contains the name of the column to be modified.

string $new_column_name

Contains the new column name.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

hideColumn()

hideColumn(string  $table_uri, array()  $columnNames, array()  $config = array()) : array()

To hide columns in the table.

Parameters

string $table_uri

The URI of the table.

array() $columnNames

The column names of the table.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

Returns

array() —

Response result of hidecolumn.

showColumn()

showColumn(string  $table_uri, array()  $columnNames, array()  $config = array()) : array()

Get the plan informations.

Parameters

string $table_uri

The URI of the table.

array() $columnNames

The column names of the table.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

Returns

array() —

Response result of showcolumn.

addLookup()

addLookup(string  $table_uri, string  $column_name, string  $referred_table, string  $referred_column, string  $on_error, array()  $config = array()) 

Add the lookup for the given column.

Parameters

string $table_uri

The URI of the table.

string $column_name

Name of the column (Child column).

string $referred_table

Name of the referred table (parent table).

string $referred_column

Name of the referred column (parent column).

string $on_error

This parameter controls the action to be taken In-case there is an error during lookup.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

removeLookup()

removeLookup(string  $table_uri, string  $column_name, array()  $config = array()) 

Remove the lookup for the given column.

Parameters

string $table_uri

The URI of the table.

string $column_name

Name of the column.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

updateCloudDBConnection()

updateCloudDBConnection(string  $table_uri, Object  $connInfo, array()  $config = array()) 

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

Parameters

string $table_uri

The URI of the table.

Object $connInfo

Contains connection information to be updated.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

updateRemoteDBConnection()

updateRemoteDBConnection(string  $db_uri, Object  $connInfo, array()  $config = array()) 

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

Parameters

string $db_uri

The URI of the workspace.

Object $connInfo

Contains connection information to be updated.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

createBlankDb()

createBlankDb(string  $user_uri, string  $newdb_name, string  $db_desc = string, array()  $config = array()) 

Creates a blank workspace.

Parameters

string $user_uri

The URI of the user.

string $newdb_name

The name of the workspace to be created.

string $db_desc

The description of the workspace.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

saveAs()

saveAs(string  $db_uri, string  $viewto_copy, string  $new_viewname = string, array()  $config = array()) 

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

Parameters

string $db_uri

The URI of the workspace.

string $viewto_copy

Name of the view to be copied.

string $new_viewname

Name of the view to be created.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

getDatabaseMetadata()

getDatabaseMetadata(string  $user_uri, string  $metadata, array()  $config = array()) : array()

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

Parameters

string $user_uri

The URI of the user.

string $metadata

It specifies the information to be fetched.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

Returns

array() —

The metadata.

getDatabaseName()

getDatabaseName(string  $user_uri, string  $db_id, array()  $config = array()) : string

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

Parameters

string $user_uri

The URI of the user.

string $db_id

The ID of the workspace.

array() $config

$config Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

Returns

string —

workspace name for a specified workspace.

getDatabaseID()

getDatabaseID(string  $user_uri, string  $db_name, array()  $config = array()) : \long

Get workspace ID of the specified workspace identified by the URI.

Parameters

string $user_uri

The URI of the user.

string $db_name

The name of the workspace.

array() $config

$config Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

Returns

\long —

workspace ID for a specified workspace.

isDbExist()

isDbExist(string  $user_uri, string  $dbname, array()  $config = array()) : boolean

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

Parameters

string $user_uri

The URI of the user.

string $dbname

The name of the workspace.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

Returns

boolean —

True, if workspace exist. False, otherwise.

isViewExist()

isViewExist(string  $db_uri, string  $view_name, array()  $config = array()) : boolean

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

Parameters

string $db_uri

The URI of the workspace.

string $view_name

The name of the view.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

Returns

boolean —

True, if view exist. False, otherwise.

isColumnExist()

isColumnExist(string  $table_uri, string  $column_name, array()  $config = array()) : boolean

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

Parameters

string $table_uri

The URI of the table.

string $column_name

The name of the column.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

Returns

boolean —

True, if column exist. False, otherwise.

getCopyDbKey()

getCopyDbKey(string  $db_uri, array()  $config = array()) : string

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

Parameters

string $db_uri

The URI of the workspace.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

Returns

string —

Copy workspace key for a specified workspace.

getViewName()

getViewName(string  $user_uri, string  $obj_id, array()  $config = array()) : string

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

Parameters

string $user_uri

The URI of the User.

string $obj_id

The view id (object id).

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

Returns

string —

The View name.

getInfo()

getInfo(string  $table_uri, array()  $config = array()) : array()

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

Parameters

string $table_uri

The URI of the table.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

Returns

array() —

The View-Id (object id) and workspace-Id.

getViewInfo()

getViewInfo(string  $db_uri, string  $view_id, array()  $config = array()) : array()

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

Parameters

string $db_uri

The URI of the workspace.

string $view_id

ID of the view.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

Returns

array() —

view info.

recentItems()

recentItems(string  $user_uri, array()  $config = array()) : array()

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

Parameters

string $user_uri

The URI of the user.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

Returns

array() —

recently modified items.

getDashboards()

getDashboards(string  $user_uri, array()  $config = array()) : array()

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

Parameters

string $user_uri

The URI of the user.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

Returns

array() —

dashboard info.

myWorkspaceList()

myWorkspaceList(string  $user_uri, array()  $config = array()) : array()

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

Parameters

string $user_uri

The URI of the user.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

Returns

array() —

owned workspaces metadata.

sharedWorkspaceList()

sharedWorkspaceList(string  $user_uri, array()  $config = array()) : array()

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

Parameters

string $user_uri

The URI of the user.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

Returns

array() —

shared workspaces metadata.

viewList()

viewList(string  $db_uri, array()  $config = array()) : array()

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

Parameters

string $db_uri

The URI of the workspace.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

Returns

array() —

views metadata.

folderList()

folderList(string  $db_uri, array()  $config = array()) : array()

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

Parameters

string $db_uri

The URI of the workspace.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

Returns

array() —

folders metadata.

viewMetadata()

viewMetadata(string  $table_uri, array()  $config = array()) : array()

Returns metainfo of the given view identified by the URI.

Parameters

string $table_uri

The URI of the table.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

Returns

array() —

Contains meta information of the provided view.

shareView()

shareView(string  $db_uri, string  $email_ids, string  $views, string  $criteria = NULL, array()  $config = array()) 

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

Parameters

string $db_uri

The URI of the workspace.

string $email_ids

It contains the users email-id (comma separated).

string $views

It contains the view names.

string $criteria

It can be null.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

removeShare()

removeShare(string  $db_uri, string  $email_ids, array()  $config = array()) 

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

Parameters

string $db_uri

The URI of the workspace.

string $email_ids

It contains the users email-id (comma separated).

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

addDbOwner()

addDbOwner(string  $db_uri, string  $email_ids, array()  $config = array()) 

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

Parameters

string $db_uri

The URI of the workspace.

string $email_ids

It contains the users email-id (comma separated).

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

removeDbOwner()

removeDbOwner(string  $db_uri, string  $email_ids, array()  $config = array()) 

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

Parameters

string $db_uri

The URI of the workspace.

string $email_ids

It contains the owners email-id (comma separated).

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

getShareInfo()

getShareInfo(string  $db_uri, array()  $config = array()) : object

Get the shared informations.

Parameters

string $db_uri

The URI of the workspace.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

Returns

object —

ShareInfo class object.

groupInfo()

groupInfo(string  $db_uri, Object  $groupInfo = array()) : array()

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

Parameters

string $db_uri

The URI of the workspace.

Object $groupInfo

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

Returns

array() —

Contains meta information of groups present in the workspace.

createGroup()

createGroup(string  $db_uri, Object  $groupInfo) : string

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

Parameters

string $db_uri

The URI of the workspace.

Object $groupInfo

Contains the required details to create a group.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

Returns

string —

Newly created group id.

deleteGroup()

deleteGroup(string  $db_uri, Object  $groupInfo) 

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

Parameters

string $db_uri

The URI of the workspace.

Object $groupInfo

Contains details on the groups to be deleted.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

updateGroupInfo()

updateGroupInfo(string  $db_uri, Object  $groupInfo) 

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

Parameters

string $db_uri

The URI of the workspace.

Object $groupInfo

Contains details on the group which has to be updated.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

addGroupMembers()

addGroupMembers(string  $db_uri, Object  $groupInfo) 

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

Parameters

string $db_uri

The URI of the workspace.

Object $groupInfo

Contains the required information to add members into the group.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

removeGroupMembers()

removeGroupMembers(string  $db_uri, Object  $groupInfo) 

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

Parameters

string $db_uri

The URI of the workspace.

Object $groupInfo

Contains the required information to remove members from the group.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

getViewUrl()

getViewUrl(string  $table_uri, array()  $config = array()) : string

This method returns the URL to access the mentioned view.

Parameters

string $table_uri

The URI of the table.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

Returns

string —

The View URI.

getEmbedURL()

getEmbedURL(string  $table_uri, string  $criteria = NULL, array()  $config = array()) : string

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

Parameters

string $table_uri

The URI of the table.

string $criteria

It can be null.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

Returns

string —

The embed URI.

getSlideList()

getSlideList(string  $db_uri, Object  $slideInfo = array()) : array()

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

Parameters

string $db_uri

The URI of the workspace.

Object $slideInfo

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

Returns

array() —

Contains list of slideshows present in the workspace.

getSlideInfo()

getSlideInfo(string  $db_uri, Object  $slideInfo) : array()

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

Parameters

string $db_uri

The URI of the workspace.

Object $slideInfo

Contains slide configuration.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

Returns

array() —

Contains meta information of the provided slide.

getSlideUrl()

getSlideUrl(string  $db_uri, Object  $slideInfo) : array()

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

Parameters

string $db_uri

The URI of the workspace.

Object $slideInfo

Contains slide configuration.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

Returns

array() —

Contains Slide URL.

createSlideShow()

createSlideShow(string  $db_uri, Object  $slideInfo) 

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

Parameters

string $db_uri

The URI of the workspace.

Object $slideInfo

Contains slide configuration.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

updateSlideShow()

updateSlideShow(string  $db_uri, Object  $slideInfo) 

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

Parameters

string $db_uri

The URI of the workspace.

Object $slideInfo

Contains slide configuration.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

deleteSlideShow()

deleteSlideShow(string  $db_uri, Object  $slideInfo) 

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

Parameters

string $db_uri

The URI of the workspace.

Object $slideInfo

Contains slide configuration.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

getUsers()

getUsers(string  $user_uri, array()  $config = array()) : array()

Returns users list for the particular account.

Parameters

string $user_uri

The URI of the user.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

Returns

array() —

Users list.

addUser()

addUser(string  $user_uri, string  $emails, array()  $config = array()) 

Adds the specified user(s) into your Zoho Analytics Account.

Parameters

string $user_uri

The URI of the user.

string $emails

The email addresses of the users to be added to your Zoho Analytics Account separated by comma.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

removeUser()

removeUser(string  $user_uri, string  $emails, array()  $config = array()) 

Removes the specified user(s) from your Zoho Analytics Account.

Parameters

string $user_uri

The URI of the user.

string $emails

The email addresses of the users to be removed from your Zoho Analytics Account separated by comma.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

activateUser()

activateUser(string  $user_uri, string  $emails, array()  $config = array()) 

Activates the specified user(s) in your Zoho Analytics Account.

Parameters

string $user_uri

The URI of the user.

string $emails

The email addresses of the users to be activated in your Zoho Analytics Account separated by comma.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

deActivateUser()

deActivateUser(string  $user_uri, string  $emails, array()  $config = array()) 

Deactivates the specified user(s) from your Zoho Analytics Account.

Parameters

string $user_uri

The URI of the user.

string $emails

The email addresses of the users to be deactivated from your Zoho Analytics Account separated by comma.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

getPlanInfo()

getPlanInfo(string  $user_uri, array()  $config = array()) : object

Get the plan informations.

Parameters

string $user_uri

The URI of the user.

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

Returns

object —

PlanInfo class object.

changeUserRole()

changeUserRole(string  $user_uri, string  $emails, string  $role, array()  $config = array()) 

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

Parameters

string $user_uri

The URI of the user.

string $emails

The email addresses of the users whose role has to be changed.

string $role

New role for the users. can be one of "ORGADMIN"/"USER".

array() $config

Contains any additional control parameters. Can be null.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

ServerException

If the server has received the request but did not process the request due to some error.

ParseException

If the server has responded but client was not able to parse the response.

getAuthToken()

getAuthToken() : string

Returns the authtoken of the user.

Returns

string —

AuthToken.

getUserURI()

getUserURI(string  $email) : string

Returns the URI for the specified user login email id. This URI should be used only in case of METADATA Action.

Parameters

string $email

User email id to get the workspace metadata.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

Returns

string —

URI for the user.

getDbURI()

getDbURI(string  $email, string  $db_name) : string

Returns the URI for the specified workspace. This URI should be used only in case of COPYDATABASE,GETCOPYDBKEY Action.

Parameters

string $email

User email id.

string $db_name

The name of the workspace.

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

Returns

string —

URI for the workspace.

getURI()

getURI(string  $email, string  $db_name, string  $table_name) : string

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

Parameters

string $email

The owner of the workspace containing the table (or report).

string $db_name

The name of the workspace containing the table (or report).

string $table_name

The name of the table (or report).

Throws

IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

Returns

string —

URI for the table.

setProxy()

setProxy(string  $proxy_host, integer  $proxy_port, string  $proxy_type, string  $proxy_user_name, string  $proxy_password) 

Used to specify the proxy server details.

Parameters

string $proxy_host

The hostname/ip address of the proxy-server.

integer $proxy_port

The proxy server port.

string $proxy_type

Can be any one ( HTTP , HTTPS , BOTH ).Specify "BOTH" if same configuration can be used for both HTTP and HTTPS.

string $proxy_user_name

The user name for proxy-server authentication.

string $proxy_password

The password for proxy-server authentication.

setConnectionTimeout()

setConnectionTimeout(integer  $time_limit) 

Sets the timeout until a connection is established. A value of zero means the timeout is not used. The default value is 15000.

Parameters

integer $time_limit

An integer value.

setReadTimeout()

setReadTimeout(integer  $time_limit) 

Sets the timeout until waiting to read data. A value of zero means the timeout is not used. The default value is 15000.

Parameters

integer $time_limit

An integer value.

getConnectionTimeout()

getConnectionTimeout() : integer

Returns the timeout until a connection is established.A value of zero means the timeout is not used.

Returns

integer —

Connection timeout limit.

getReadTimeout()

getReadTimeout() : integer

Returns the timeout until waiting to read data. A value of zero means the timeout is not used. The default value is 15000.

Returns

integer —

Read timeout limit.