...

Package reportclient

import "zoho/pkg/reportclient"

Index

Variables
func GetDbUri(emailid, dbname string) string
func GetOAuthToken(params map[string]string) (token string)
func GetUri(emailid, dbname, tbname string) string
func GetUserUri(emailid string) string
func Getinfo(resp interface{}) interface{}
func Getkeyinfo(resp interface{}, key string) interface{}
func SetOAuthToken(clientid, clientsecret, refreshtoken string)
func UrlSplCharReplace(value string) string
func ActivateUser(useruri, emailIds string) (SeErr *ServerException)
func AddColumn(tableuri, columnname, datatype string) (SeErr *ServerException)
func AddDbOwner(dburi, emailIds string, params map[string]string) (SeErr *ServerException)
func AddGroupMembers(dburi string, config string) (SeErr *ServerException)
func AddLookup(tableuri, columnname, refertable, refercolumn, onerror string) (SeErr *ServerException)
func AddRow(tableuri string, columnvalues map[string]string) (addedrows interface{}, SeErr *ServerException)
func AddUser(useruri, emailIds string) (SeErr *ServerException)
func AutoGenReports(tableuri string, source string, params map[string]string) (result interface{}, SeErr *ServerException)
func ChangeUserRole(useruri, emailIds, role string) (SeErr *ServerException)
func CopyDatabase(dburi, newdbname, dbkey string, params map[string]string) (newdbid string, SeErr *ServerException)
func CopyFormula(tableuri, formulaname, dbname, dbkey string) (SeErr *ServerException)
func CopyReports(dburi, viewname, dbname, dbkey string) (SeErr *ServerException)
func CreateAnalysisView(dburi, reportconfig string) (SeErr *ServerException)
func CreateBlankDb(useruri string, dbname string, params map[string]string) (SeErr *ServerException)
func CreateGroup(dburi string, config string) (groupId string, SeErr *ServerException)
func CreateSimilarViews(tableuri, refview, foldername string, customformula, aggformula bool, params map[string]string) (result interface{}, SeErr *ServerException)
func CreateSlideShow(dburi string, config string) (SeErr *ServerException)
func CreateTable(dburi, tableconfig string) (SeErr *ServerException)
func DeActivateUser(useruri, emailIds string) (SeErr *ServerException)
func DeleteColumn(tableuri, columnname string) (SeErr *ServerException)
func DeleteData(tableuri string, params map[string]string) (deletedrowcount string, SeErr *ServerException)
func DeleteDatabase(useruri, dbname string) (SeErr *ServerException)
func DeleteGroups(dburi string, config string) (SeErr *ServerException)
func DeleteSlideShow(dburi string, config string) (SeErr *ServerException)
func DeleteView(dburi, viewname string, params map[string]string) (SeErr *ServerException)
func DisableDomainDB(useruri, dbname, domainname string, params map[string]string) (SeErr *ServerException)
func EnableDomainDB(useruri, dbname, domainname string, params map[string]string) (SeErr *ServerException)
func ExportData(tableuri, file, outputformat string, params map[string]string) (SeErr *ServerException)
func FolderList(dburi string, params map[string]string) (folderlist interface{}, SeErr *ServerException)
func GetCopyDbKey(dburi string) (dbkey string, SeErr *ServerException)
func GetDashboards(useruri string, params map[string]string) (dashboards interface{}, SeErr *ServerException)
func GetDatabaseId(useruri, dbname string) (dbid string, SeErr *ServerException)
func GetDatabaseMetadata(uri, metadata string) (metainfo interface{}, SeErr *ServerException)
func GetDatabaseName(useruri, dbid string) (databasename string, SeErr *ServerException)
func GetEmbedUrl(tableuri string, params map[string]string) (embedurl string, SeErr *ServerException)
func GetInfo(tableuri string) (info interface{}, SeErr *ServerException)
func GetSlideInfo(dburi string, config string) (slideInfo interface{}, SeErr *ServerException)
func GetSlideList(dburi string) (slideList interface{}, SeErr *ServerException)
func GetSlideUrl(dburi string, config string) (slideInfo interface{}, SeErr *ServerException)
func GetUsers(useruri string, params map[string]string) (userslist interface{}, SeErr *ServerException)
func GetViewInfo(dburi, viewid string) (viewinfo interface{}, SeErr *ServerException)
func GetViewUrl(tableuri string) (viewurl string, SeErr *ServerException)
func GetViewname(useruri, objid string) (viewname string, SeErr *ServerException)
func GroupInfo(dburi string, config string) (groupInfo interface{}, SeErr *ServerException)
func HideColumn(tableuri string, columnnames []string, params map[string]string) (result interface{}, SeErr *ServerException)
func IsColumnExist(tableuri string, columnname string, params map[string]string) (result string, SeErr *ServerException)
func IsDbExist(useruri string, dbname string, params map[string]string) (result string, SeErr *ServerException)
func IsViewExist(dburi string, viewname string, params map[string]string) (result string, SeErr *ServerException)
func MyWorkspaceList(useruri string, params map[string]string) (workspacelist interface{}, SeErr *ServerException)
func RecentItems(useruri string) (recentitems interface{}, SeErr *ServerException)
func RemoveDbOwner(dburi, emailIds string, params map[string]string) (SeErr *ServerException)
func RemoveGroupMembers(dburi string, config string) (SeErr *ServerException)
func RemoveLookup(tableuri, columnname string) (SeErr *ServerException)
func RemoveShare(dburi, emailIds string, params map[string]string) (SeErr *ServerException)
func RemoveUser(useruri, emailIds string) (SeErr *ServerException)
func RenameColumn(tableuri, olcolumnname, newcolumnname string) (SeErr *ServerException)
func RenameView(dburi, viewname, newviewname, newdesc string) (SeErr *ServerException)
func SaveAsViews(dburi, viewtocopy, newviewname string, params map[string]string) (result string, SeErr *ServerException)
func SendAPIImportRequest(config map[string]string) (msg interface{}, SeErr *ServerException)
func SendAPIRequest(config map[string]string, isreturn bool) (msg interface{}, SeErr *ServerException)
func SendImportRequest(config map[string]string) (msg interface{}, SeErr *ServerException)
func SendRequest(config map[string]string, isreturn bool) (msg interface{}, SeErr *ServerException)
func ShareView(dburi, emailIds, views string, params map[string]string) (SeErr *ServerException)
func SharedWorkspaceList(useruri string, params map[string]string) (workspacelist interface{}, SeErr *ServerException)
func ShowColumn(tableuri string, columnnames []string, params map[string]string) (result interface{}, SeErr *ServerException)
func UpdateCloudDBConnection(viewuri string, conninfo string, params map[string]string) (SeErr *ServerException)
func UpdateData(tableuri string, params map[string]string) (updatedrowcount string, SeErr *ServerException)
func UpdateGroupInfo(dburi string, config string) (SeErr *ServerException)
func UpdateRemoteDBConnection(dburi string, conninfo string, params map[string]string) (SeErr *ServerException)
func UpdateSlideShow(dburi string, config string) (SeErr *ServerException)
func ViewList(dburi string, params map[string]string) (viewlist interface{}, SeErr *ServerException)
func ViewMetadata(viewuri string, params map[string]string) (viewInfo interface{}, SeErr *ServerException)
type ImportResult
    func ImportData(tableuri, file, importtype, autoidentity, onerror string, params map[string]string) (ImportResult, *ServerException)
type PlanInfo
    func GetPlanInfo(useruri string) (PlanInfo, *ServerException)
type ShareInfo
    func GetShareInfo(dburi string) (ShareInfo, *ServerException)
type ServerException

Variables

var (
    ReportsUri     = "https://@@REPORTS_URL"
    AccountsUri    = "https://@@ACCOUNTS_URL"
    RequestUri     string
    Action         string
    OutputFormat   = "JSON"
    ErrorFormat    = "JSON"
    ApiVersion     = "1.0"
    Importfilepath string
    Exportfilename string
    IsOAuth        = false
    ValidJson      = "true"

    AccessToken string
)

func GetDbUri

func GetDbUri(emailid, dbname string) string

GetDbUri - Returns the URI for the specified workspace in the Zoho Analytics account.

emailid - Email id of the user.

dbname - Name of the workspace.

func GetOAuthToken

func GetOAuthToken(params map[string]string) (token string)

GetOAuthToken - Internal method for getting OAuth token.

func GetUri

func GetUri(emailid, dbname, tbname string) string

GetUri - Returns the URI for the specified table in the Zoho Analytics account.

emailid - Email id of the user.

dbname - Name of the workspace.

tbname - Name of the table.

func GetUserUri

func GetUserUri(emailid string) string

GetUserUri - Returns the URI for the specified user login email id.

emailid - Email id of the user.

func Getinfo

func Getinfo(resp interface{}) interface{}

Internally used.

func Getkeyinfo

func Getkeyinfo(resp interface{}, key string) interface{}

Internally used.

func SetOAuthToken

func SetOAuthToken(clientid, clientsecret, refreshtoken string)

SetOAuthToken - Set an OAuthtoken for the specified user.

clientid - The clientid for the user.

clientsecret - The clientsecret for the user.

refreshtoken - The refreshtoken for the user.

func UrlSplCharReplace

func UrlSplCharReplace(value string) string

Internally used. For handling special character's in the workspace name or table name.

func ActivateUser

func ActivateUser(useruri, emailIds string) (SeErr *ServerException)

ActivateUser - Activate the specified user(s) in your Zoho Analytics Account.

useruri - The URI of the user.

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

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func AddColumn

func AddColumn(tableuri, columnname, datatype string) (SeErr *ServerException)

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

tableuri - The URI of the table.

columnname - Contains the name of the column to be added.

datatype - Contains the datatype of the column to be added.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func AddDbOwner

func AddDbOwner(dburi, emailIds string, params map[string]string) (SeErr *ServerException)

AddDbOwner - This method is used to add new users as admins to the Analytics workspace.

dburi - The URI of the workspace.

emailIds - It contains the users email-id.

params - Contains any additional control parameters. Can be null.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func AddGroupMembers

func AddGroupMembers(dburi string, config string) (SeErr *ServerException)

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

dburi - The URI of the workspace.

config - Contains the required information to add members into the group.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func AddLookup

func AddLookup(tableuri, columnname, refertable, refercolumn, onerror string) (SeErr *ServerException)

AddLookup - Add the lookup for the given column.

tableuri - The URI of the table.

columnname - Name of the column (Child column).

refertable - Name of the referred table (parent table).

refercolumn - Name of the referred column (parent column).

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

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func AddRow

func AddRow(tableuri string, columnvalues map[string]string) (addedrows interface{}, SeErr *ServerException)

AddRow - Adds row to the specified table identified by the URI.

tableuri - The URI of the table.

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

addedrows - Successfully added rows with value.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func AddUser

func AddUser(useruri, emailIds string) (SeErr *ServerException)

AddUser - Add the specified user(s) into your Zoho Analytics Account.

useruri - The URI of the user.

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

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func AutoGenReports

func AutoGenReports(tableuri string, source string, params map[string]string) (result interface{}, SeErr *ServerException)

AutoGenReports - Generate reports for table or column.

tableuri - The URI of the table.

source - Should be column or table.

params - Can contain any additional params.

result - Returns Generated result as interface.

ServerException - Throws a server exception. If the server has received the request but did not process the request due to some error.

func ChangeUserRole

func ChangeUserRole(useruri, emailIds, role string) (SeErr *ServerException)

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

useruri - The URI of the user.

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

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

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func CopyDatabase

func CopyDatabase(dburi, newdbname, dbkey string, params map[string]string) (newdbid string, SeErr *ServerException)

CopyDatabase - Copy a specified workspace identified by the URI.

dburi - The URI of the workspace.

newdbname - Contains new workspace name.

dbkey - Contains workspace key of the source workspace.

params - Contains any additional control parameters. Can be null.

newdbid - The new workspace id.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func CopyFormula

func CopyFormula(tableuri, formulaname, dbname, dbkey string) (SeErr *ServerException)

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

tableuri - The URI of the table.

formulaname - This parameter holds the list of formula names.

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

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

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func CopyReports

func CopyReports(dburi, viewname, dbname, dbkey string) (SeErr *ServerException)

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

dburi - The URI of the workspace.

viewname - This parameter holds the list of view names.

dbname - The workspace name where the report's had to be copied.

dbkey - The secret key used for allowing the user to copy the reports.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func CreateAnalysisView

func CreateAnalysisView(dburi, reportconfig string) (SeErr *ServerException)

CreateAnalysisView - Create a report in the specified workspace.

dburi - The URI of the workspace.

reportconfig - Report structure in JSON format.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func CreateBlankDb

func CreateBlankDb(useruri string, dbname string, params map[string]string) (SeErr *ServerException)

CreateBlankDb - Create a blank workspace.

useruri - The URI of the user.

dbname - The name of new workspace.

params - Can contain any additional params.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func CreateGroup

func CreateGroup(dburi string, config string) (groupId string, SeErr *ServerException)

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

dburi - The URI of the workspace.

config - Contains required details to create the group.

groupId - Created group id.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func CreateSimilarViews

func CreateSimilarViews(tableuri, refview, foldername string, customformula, aggformula bool, params map[string]string) (result interface{}, SeErr *ServerException)

CreateSimilarViews - Create reports similar as another table reports.

tableuri - The URI of the table.

refview - The reference table name.

foldername - Folder name where the reports to be saved.

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

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

params - Can contain any additional params.

result - Returns Generated result as interface.

ServerException - Throws a server exception. If the server has received the request but did not process the request due to some error.

func CreateSlideShow

func CreateSlideShow(dburi string, config string) (SeErr *ServerException)

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

dburi - The URI of the workspace.

config - Contains slide configuration.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func CreateTable

func CreateTable(dburi, tableconfig string) (SeErr *ServerException)

CreateTable - Create a table in the specified workspace.

dburi - The URI of the workspace.

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

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func DeActivateUser

func DeActivateUser(useruri, emailIds string) (SeErr *ServerException)

DeActivateUser - Deactivate the specified user(s) in your Zoho Analytics Account.

useruri - The URI of the user.

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

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func DeleteColumn

func DeleteColumn(tableuri, columnname string) (SeErr *ServerException)

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

tableuri - The URI of the table.

columnname - Contains the name of the column to be deleted.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func DeleteData

func DeleteData(tableuri string, params map[string]string) (deletedrowcount string, SeErr *ServerException)

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

tableuri - The URI of the table.

params - Contains any additional control parameters. Can be null.

deletedrowcount - Successfully deleted row count.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func DeleteDatabase

func DeleteDatabase(useruri, dbname string) (SeErr *ServerException)

DeleteDatabase - Delete a specified workspace from a Zoho Analytics Account.

useruri - The URI of the user.

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

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func DeleteGroups

func DeleteGroups(dburi string, config string) (SeErr *ServerException)

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

dburi - The URI of the workspace.

config - Contains details on the groups to be deleted.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func DeleteSlideShow

func DeleteSlideShow(dburi string, config string) (SeErr *ServerException)

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

dburi - The URI of the workspace.

config - Contains slide configuration.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func DeleteView

func DeleteView(dburi, viewname string, params map[string]string) (SeErr *ServerException)

DeleteView - Deletes the specified view from the workspace identified by the URI.

dburi - The URI of the workspace.

viewname - View name to be deleted.

params - Can contain any additional params.

ServerException - Throws a server exception. If the server has received the request but did not process the request due to some error.

func DisableDomainDB

func DisableDomainDB(useruri, dbname, domainname string, params map[string]string) (SeErr *ServerException)

DisableDomainDB - Disable workspace in custom domain..

useruri - The URI of the user.

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

domainname - Custom domain name.

params - Can contain any additional params.

ServerException - Throws a server exception. If the server has received the request but did not process the request due to some error.

func EnableDomainDB

func EnableDomainDB(useruri, dbname, domainname string, params map[string]string) (SeErr *ServerException)

EnableDomainDB - Enable workspace for custom domain..

useruri - The URI of the user.

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

domainname - Custom domain name.

params - Can contain any additional params.

ServerException - Throws a server exception. If the server has received the request but did not process the request due to some error.

func ExportData

func ExportData(tableuri, file, outputformat string, params map[string]string) (SeErr *ServerException)

ExportData - Exports the data/report of table (or report) identified by the URI.

tableuri - The URI of the table.

file - The name of the file.

outputformat - The format in which the data is to be exported.

params - Contains any additional control parameters. Can be null.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func FolderList

func FolderList(dburi string, params map[string]string) (folderlist interface{}, SeErr *ServerException)

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

dburi - The URI of the workspace.

params - Can contain any additional params.

folderlist - Contains metainfo of all accessible folders present in the workspace.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func GetCopyDbKey

func GetCopyDbKey(dburi string) (dbkey string, SeErr *ServerException)

GetCopyDbKey - Get workspace key for the particular workspace.

dburi - The URI of the workspace.

dbkey - Returns the workspace key.

ServerException - Throws a server exception. If the server has received the request but did not process the request due to some error.

func GetDashboards

func GetDashboards(useruri string, params map[string]string) (dashboards interface{}, SeErr *ServerException)

GetDashboards - Returns the list of owned/shared dashboards present in the ZohoAnalytics account identified by the URI.

useruri - The URI of the user.

params - Can contain any additional params.

dashboards - Contains the dashboards info that present in the organization.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func GetDatabaseId

func GetDatabaseId(useruri, dbname string) (dbid string, SeErr *ServerException)

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

useruri - The URI of the user.

dbname - The name of the workspace.

dbid - Contains the workspace ID.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func GetDatabaseMetadata

func GetDatabaseMetadata(uri, metadata string) (metainfo interface{}, SeErr *ServerException)

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

uri - The URI of the user or workspace.

metadata - It specifies the information to be fetched.

metainfo - Contains the metadata.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func GetDatabaseName

func GetDatabaseName(useruri, dbid string) (databasename string, SeErr *ServerException)

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

useruri - The URI of the user.

dbid - The ID of the workspace.

databasename - Contains the workspace name.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func GetEmbedUrl

func GetEmbedUrl(tableuri string, params map[string]string) (embedurl string, SeErr *ServerException)

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

tableuri - The URI of the table.

params - Contains any additional control parameters. Can be null.

embedurl - The embed URI.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func GetInfo

func GetInfo(tableuri string) (info interface{}, SeErr *ServerException)

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

tableuri - The URI of the table.

info - Contains the View-Id (object id) and workspace-Id.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func GetSlideInfo

func GetSlideInfo(dburi string, config string) (slideInfo interface{}, SeErr *ServerException)

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

dburi - The URI of the workspace.

config - Contains slide configuration.

slideInfo - Contains meta information of the provided slide.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func GetSlideList

func GetSlideList(dburi string) (slideList interface{}, SeErr *ServerException)

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

dburi - The URI of the workspace.

slideList - Contains list of slideshows present in the workspace.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func GetSlideUrl

func GetSlideUrl(dburi string, config string) (slideInfo interface{}, SeErr *ServerException)

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

dburi - The URI of the workspace.

config - Contains slide configuration.

slideInfo - Contains Slide URL.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func GetUsers

func GetUsers(useruri string, params map[string]string) (userslist interface{}, SeErr *ServerException)

GetUsers - Return all the users list for that account.

useruri - The URI of the user.

params - Can contain any additional params.

userslist - Returns users list as interface.

ServerException - Throws a server exception. If the server has received the request but did not process the request due to some error.

func GetViewInfo

func GetViewInfo(dburi, viewid string) (viewinfo interface{}, SeErr *ServerException)

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

dburi - The URI of the workspace.

viewid - The id of view.

viewinfo - Contains the view information.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func GetViewUrl

func GetViewUrl(tableuri string) (viewurl string, SeErr *ServerException)

GetViewUrl - This method returns the URL to access the mentioned view.

tableuri - The URI of the table.

viewurl - The view URI.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func GetViewname

func GetViewname(useruri, objid string) (viewname string, SeErr *ServerException)

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

useruri - The URI of the user.

objid - The view id (object id).

viewname - Contains the View name.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func GroupInfo

func GroupInfo(dburi string, config string) (groupInfo interface{}, SeErr *ServerException)

GroupInfo - Get the meta information of groups present in the workspace identified by the URI.

dburi - The URI of the workspace.

config - Can contain any additional information.

groupInfo - Contains meta information of groups present in the workspace.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func HideColumn

func HideColumn(tableuri string, columnnames []string, params map[string]string) (result interface{}, SeErr *ServerException)

HideColumn - Hide the specified columns in the particular table.

tableuri - The URI of the table.

columnnames - Contains array of column names.

params - Can contain any additional params.

result - Returns Generated result as interface.

ServerException - Throws a server exception. If the server has received the request but did not process the request due to some error.

func IsColumnExist

func IsColumnExist(tableuri string, columnname string, params map[string]string) (result string, SeErr *ServerException)

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

tableuri - The URI of the table.

columnname - The name of the column.

params - Can contain any additional params.

result - Returns True, if column exist. False, otherwise.

ServerException - Throws a server exception. If the server has received the request but did not process the request due to some error.

func IsDbExist

func IsDbExist(useruri string, dbname string, params map[string]string) (result string, SeErr *ServerException)

IsDbExist - Checks whether the workspace exist or not in the Zoho Analytics Account identified by URI.

useruri - The URI of the user.

dbname - The workspace name.

params - Can contain any additional params.

result - Returns True, if workspace exist. False, otherwise.

ServerException - Throws a server exception. If the server has received the request but did not process the request due to some error.

func IsViewExist

func IsViewExist(dburi string, viewname string, params map[string]string) (result string, SeErr *ServerException)

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

dburi - The URI of the workspace.

viewname - The name of the view.

params - Can contain any additional params.

result - Returns True, if view exist. False, otherwise.

ServerException - Throws a server exception. If the server has received the request but did not process the request due to some error.

func MyWorkspaceList

func MyWorkspaceList(useruri string, params map[string]string) (workspacelist interface{}, SeErr *ServerException)

MyWorkspaceList - Returns the list of all owned workspace present in the ZohoAnalytics account identified by the URI.

useruri - The URI of the user.

params - Can contain any additional params.

workspacelist - Contains metainfo of all owned workspace present in the organization.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func RecentItems

func RecentItems(useruri string) (recentitems interface{}, SeErr *ServerException)

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

useruri - The URI of the user.

recentitems - Contains the list of details about recently accessed views.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func RemoveDbOwner

func RemoveDbOwner(dburi, emailIds string, params map[string]string) (SeErr *ServerException)

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

dburi - The URI of the workspace.

emailIds - It contains the users email-id.

params - Contains any additional control parameters. Can be null.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func RemoveGroupMembers

func RemoveGroupMembers(dburi string, config string) (SeErr *ServerException)

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

dburi - The URI of the workspace.

config - Contains the required information to remove members from the group.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func RemoveLookup

func RemoveLookup(tableuri, columnname string) (SeErr *ServerException)

RemoveLookup - Remove the lookup for the given column.

tableuri - The URI of the table.

columnname - Name of the column.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func RemoveShare

func RemoveShare(dburi, emailIds string, params map[string]string) (SeErr *ServerException)

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

dburi - The URI of the workspace.

emailIds - It contains the owners email-id.

params - Contains any additional control parameters. Can be null.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func RemoveUser

func RemoveUser(useruri, emailIds string) (SeErr *ServerException)

RemoveUser - Remove the specified user(s) from your Zoho Analytics Account.

useruri - The URI of the user.

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

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func RenameColumn

func RenameColumn(tableuri, olcolumnname, newcolumnname string) (SeErr *ServerException)

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

tableuri - The URI of the table.

olcolumnname - Contains the name of the column to be modified.

newcolumnname - Contains the new column name.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func RenameView

func RenameView(dburi, viewname, newviewname, newdesc string) (SeErr *ServerException)

RenameView - Rename the specified view with the new name and description.

dburi - The URI of the workspace.

viewname - Current name of the view.

newviewname - New name for the view.

newdesc - New description for the view.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func SaveAsViews

func SaveAsViews(dburi, viewtocopy, newviewname string, params map[string]string) (result string, SeErr *ServerException)

SaveAsViews - Copy views within the workspace(Duplicate views).

dburi - The URI of the workspace.

viewtocopy - The reference view name.

newviewname - New view name.

params - Can contain any additional params.

result - Duplicate views result.

ServerException - Throws a server exception. If the server has received the request but did not process the request due to some error.

func SendAPIImportRequest

func SendAPIImportRequest(config map[string]string) (msg interface{}, SeErr *ServerException)

func SendAPIRequest

func SendAPIRequest(config map[string]string, isreturn bool) (msg interface{}, SeErr *ServerException)

func SendImportRequest

func SendImportRequest(config map[string]string) (msg interface{}, SeErr *ServerException)

SendImportRequest - Internally used for Import data.

Send request to the server and get response.

func SendRequest

func SendRequest(config map[string]string, isreturn bool) (msg interface{}, SeErr *ServerException)

SendRequest - Internally used for send request.

Send request to the server and get response.

func ShareView

func ShareView(dburi, emailIds, views string, params map[string]string) (SeErr *ServerException)

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

dburi - The URI of the workspace.

emailIds - It contains the owners email-id.

views - It contains the view names.

params - Contains any additional control parameters. Can be null.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func SharedWorkspaceList

func SharedWorkspaceList(useruri string, params map[string]string) (workspacelist interface{}, SeErr *ServerException)

SharedWorkspaceList - Returns the list of all shared workspace present in the ZohoAnalytics account identified by the URI.

useruri - The URI of the user.

params - Can contain any additional params.

workspacelist - Contains metainfo of all shared workspace present in the organization.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func ShowColumn

func ShowColumn(tableuri string, columnnames []string, params map[string]string) (result interface{}, SeErr *ServerException)

ShowColumn - Show the hidden columns in the particular table.

tableuri - The URI of the table.

columnnames - Contains array of column names.

params - Can contain any additional params.

result - Returns Generated result as interface.

ServerException - Throws a server exception. If the server has received the request but did not process the request due to some error.

func UpdateCloudDBConnection

func UpdateCloudDBConnection(viewuri string, conninfo string, params map[string]string) (SeErr *ServerException)

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

viewuri - The URI of the view.

conninfo - Contains connection information to be updated.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func UpdateData

func UpdateData(tableuri string, params map[string]string) (updatedrowcount string, SeErr *ServerException)

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

tableuri - The URI of the table.

params - Contains any additional control parameters. Can be null.

updatedrowcount - Successfully updated row count.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func UpdateGroupInfo

func UpdateGroupInfo(dburi string, config string) (SeErr *ServerException)

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

dburi - The URI of the workspace.

config - Contains details on the group which has to be updated.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func UpdateRemoteDBConnection

func UpdateRemoteDBConnection(dburi string, conninfo string, params map[string]string) (SeErr *ServerException)

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

dburi - The URI of the workspace.

conninfo - Contains connection information to be updated.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func UpdateSlideShow

func UpdateSlideShow(dburi string, config string) (SeErr *ServerException)

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

dburi - The URI of the workspace.

config - Contains slide configuration.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func ViewList

func ViewList(dburi string, params map[string]string) (viewlist interface{}, SeErr *ServerException)

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

dburi - The URI of the workspace.

params - Can contain any additional params.

viewlist - Contains metainfo of all accessible views present in the workspace.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

func ViewMetadata

func ViewMetadata(viewuri string, params map[string]string) (viewInfo interface{}, SeErr *ServerException)

ViewMetadata - Returns metainfo of the given view identified by the URI.

viewuri - The URI of the view.

params - Can contain any additional params.

viewInfo - Contains metainfo of the provided view.

SeErr - Throws a server exception. If the server has received the request but did not process the request due to some error.

type ImportResult

ImportResult - It contains the result of an import operation.

ImportErrors - The first 100 import errors.

ColumnDetails - The column names of the imported columns.

ImportType - The type of the import operation.

Warnings - The number of rows that were imported with warnings.

SelectedColumnCount - The number of columns that were imported.See ZOHO_SELECTED_COLUMNS parameter.

SuccessRowCount - The number of rows that were imported successfully without errors.

ImportOperation - The type of import operation.

TotalColumnCount - The total columns that were present in the imported file.

TotalRowCount - The total row count in the imported file.

type ImportResult struct {
    ImportErrors        string
    ColumnDetails       interface{}
    ImportType          string
    Warnings            float64
    SelectedColumnCount float64
    SuccessRowCount     float64
    ImportOperation     string
    TotalColumnCount    float64
    TotalRowCount       float64
}

func ImportData

func ImportData(tableuri, file, importtype, autoidentity, onerror string, params map[string]string) (ImportResult, *ServerException)

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

tableuri - The URI of the table.

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

importtype - The type of import.

autoidentity - Used to specify whether to auto identify the CSV format.

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

params - Contains any additional control parameters. Can be null.

ImportResult - Structure pointer for the import result.

ServerException - Throws a server exception. If the server has received the request but did not process the request due to some error.

type PlanInfo

PlanInfo - It contains the plan details.

Plan - The type of the user plan.

Addons - The addon details.

BillingDate - The billing date.

RowsAllowed - The total rows allowed to the user.

RowsUsed - The number of rows used by the user.

TrialAvailed - Used to identify the trial pack.

TrialPlan - The trial plan detail.

TrialStatus - The trial plan status.

TrialEndDate - The end date of the trial plan.

type PlanInfo struct {
    Plan         string
    Addons       string
    BillingDate  string
    RowsAllowed  string
    RowsUsed     string
    TrialAvailed string
    TrialPlan    string
    TrialStatus  string
    TrialEndDate string
}

func GetPlanInfo

func GetPlanInfo(useruri string) (PlanInfo, *ServerException)

GetPlanInfo - Get the plan information.

useruri - The URI of the user.

PlanInfo - Returns plan-info structure pointer.

ServerException - Throws a server exception. If the server has received the request but did not process the request due to some error.

type ShareInfo

ShareInfo - It contains the workspace shared details.

AdminMembers - Admins of the workspace.

GroupMembers - Group Members of the workspace.

SharedUsers - Shared Users of the workspace.

UserInfo - The PermissionInfo for the shared user.

GroupInfo - The PermissionInfo for the groups.

PublicInfo - The PermissionInfo for the public link.

PrivateInfo - The PermissionInfo for the private link.

type ShareInfo struct {
    AdminMembers interface{}
    GroupMembers interface{}
    SharedUsers  interface{}
    UserInfo     interface{}
    GroupInfo    interface{}
    PublicInfo   interface{}
    PrivateInfo  interface{}
}

func GetShareInfo

func GetShareInfo(dburi string) (ShareInfo, *ServerException)

GetShareInfo - Get the sharing information of the workspace.

dburi - The URI of the workspace.

ShareInfo - Returns shareinfo structure pointer.

ServerException - Throws a server exception. If the server has received the request but did not process the request due to some error.

type ServerException

ServerException - ServerException is thrown if the Analytics server has received the request but did not process the request due to some error.

ErrorCode - The error code sent by the server.

ErrorMessage - The error message sent by the server.

HttpStatusCode - The HTTP status code for the request.

Action - The action to be performed over the resource specified by the URI.

type ServerException struct {
    ErrorCode      float64
    ErrorMessage   string
    HttpStatusCode int
    Action         string
}