Documentation

OrgAPI extends AnalyticsClient
in package

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

Table of Contents

Constants

CLIENT_VERSION  = "2.3.0"

Properties

$ac  : mixed
$accounts_server_url  : string
$analytics_server_url  : string
$connection_timeout  : int
$proxy  : bool
$proxy_host  : string
$proxy_password  : string
$proxy_port  : int
$proxy_type  : string
$proxy_user_name  : string
$read_timeout  : int
$req_headers  : mixed

Methods

__construct()  : mixed
Creates a new OrgAPI instance.
activateUsers()  : mixed
Activate users in the specified organization.
addUsers()  : mixed
Add users to the specified organization.
changeUserRole()  : mixed
Change role for the specified users.
createWorkspace()  : string
Returns a new BulkAPI instance.
deactivateUsers()  : mixed
Deactivate users in the specified organization.
getAdmins()  : array<string|int, mixed>
Returns list of admins for a specified organization.
getBulkInstance()  : BulkAPI
Returns a new BulkAPI instance.
getConnectionTimeout()  : int
Returns the timeout until a connection is established.A value of zero means the timeout is not used.
getDashboards()  : array<string|int, mixed>
Returns list of all accessible dashboards.
getMetaDetails()  : array<string|int, mixed>
Returns details of the specified workspace/view.
getOrgInstance()  : OrgAPI
Returns a new OrgAPI instance.
getOrgs()  : array<string|int, mixed>
Returns list of all accessible organizations.
getOwnedDashboards()  : array<string|int, mixed>
Returns list of owned dashboards.
getOwnedWorkspaces()  : array<string|int, mixed>
Returns list of owned workspaces.
getReadTimeout()  : int
Returns the timeout until waiting to read data. A value of zero means the timeout is not used. The default value is 15000.
getRecentViews()  : array<string|int, mixed>
Returns list of recently accessed views.
getResourceDetails()  : array<string|int, mixed>
Returns resource usage details of the specified organization.
getSharedDashboards()  : array<string|int, mixed>
Returns list of shared dashboards.
getSharedWorkspaces()  : array<string|int, mixed>
Returns list of shared workspaces.
getSubscriptionDetails()  : array<string|int, mixed>
Returns subscription details of the specified organization.
getUsers()  : array<string|int, mixed>
Returns list of users for the specified organization.
getViewDetails()  : array<string|int, mixed>
Returns details of the specified view.
getViewInstance()  : ViewAPI
Returns a new ViewAPI instance.
getWorkspaceDetails()  : array<string|int, mixed>
Returns details of the specified workspace.
getWorkspaceInstance()  : WorkspaceAPI
Returns a new WorkspaceAPI instance.
getWorkspaces()  : array<string|int, mixed>
Returns list of all accessible workspaces.
removeUsers()  : mixed
Remove users from the specified organization.
setConnectionTimeout()  : mixed
Sets the timeout until a connection is established. A value of zero means the timeout is not used. The default value is 15000.
setProxy()  : mixed
Used to specify the proxy server details.
setReadTimeout()  : mixed
Sets the timeout until waiting to read data. A value of zero means the timeout is not used. The default value is 15000.

Constants

CLIENT_VERSION

public const CLIENT_VERSION = "2.3.0"

CLIENT_VERSION It contain the API client version.It is a constant one.

Properties

$accounts_server_url

private string $accounts_server_url = "https://@@ACCOUNTS_URL"

Account URL.

$analytics_server_url

private string $analytics_server_url = "https://@@ANALYTICS_URL"

The base request API URL.

$connection_timeout

private int $connection_timeout

It is a time value until a connection is established.

$proxy

private bool $proxy = \FALSE

It will indicate whether the proxy is set or not.

$proxy_host

private string $proxy_host

The hostname/ip address of the proxy-server.

$proxy_password

private string $proxy_password

The password for proxy-server authentication.

$proxy_type

private string $proxy_type

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

$proxy_user_name

private string $proxy_user_name

The user name for proxy-server authentication.

$read_timeout

private int $read_timeout

It is a time value until waiting to read data.

Methods

activateUsers()

Activate users in the specified organization.

public activateUsers(array<string|int, mixed> $email_ids[, array<string|int, mixed> $config = array() ]) : mixed
Parameters
$email_ids : array<string|int, mixed>

The email address of the users to be activated.

$config : array<string|int, mixed> = array()

Contains any additional control parameters. Can be null.

Tags
throws
IOException

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

throws
ServerException

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

throws
ParseException

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

addUsers()

Add users to the specified organization.

public addUsers(array<string|int, mixed> $email_ids[, array<string|int, mixed> $config = array() ]) : mixed
Parameters
$email_ids : array<string|int, mixed>

The email address of the users to be added.

$config : array<string|int, mixed> = array()

Contains any additional control parameters. Can be null.

Tags
throws
IOException

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

throws
ServerException

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

throws
ParseException

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

changeUserRole()

Change role for the specified users.

public changeUserRole(array<string|int, mixed> $email_ids, string $role[, array<string|int, mixed> $config = array() ]) : mixed
Parameters
$email_ids : array<string|int, mixed>

The email address of the users.

$role : string

New role for the users.

$config : array<string|int, mixed> = array()

Contains any additional control parameters. Can be null.

Tags
throws
IOException

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

throws
ServerException

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

throws
ParseException

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

createWorkspace()

Returns a new BulkAPI instance.

public createWorkspace(string $workspace_name[, array<string|int, mixed> $config = array() ]) : string
Parameters
$workspace_name : string

Name of the workspace.

$config : array<string|int, mixed> = array()

Contains any additional control parameters. Can be null.

Tags
throws
IOException

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

throws
ServerException

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

throws
ParseException

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

Return values
string

Created workspace id.

deactivateUsers()

Deactivate users in the specified organization.

public deactivateUsers(array<string|int, mixed> $email_ids[, array<string|int, mixed> $config = array() ]) : mixed
Parameters
$email_ids : array<string|int, mixed>

The email address of the users to be deactivated.

$config : array<string|int, mixed> = array()

Contains any additional control parameters. Can be null.

Tags
throws
IOException

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

throws
ServerException

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

throws
ParseException

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

getAdmins()

Returns list of admins for a specified organization.

public getAdmins() : array<string|int, mixed>
Tags
throws
IOException

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

throws
ServerException

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

throws
ParseException

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

Return values
array<string|int, mixed>

Organization admin list.

getBulkInstance()

Returns a new BulkAPI instance.

public getBulkInstance(string $org_id, string $workspace_id) : BulkAPI
Parameters
$org_id : string

The ID of the organization.

$workspace_id : string

The ID of the workspace.

Return values
BulkAPI

instance.

getConnectionTimeout()

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

public getConnectionTimeout() : int
Return values
int

Connection timeout limit.

getDashboards()

Returns list of all accessible dashboards.

public getDashboards() : array<string|int, mixed>
Tags
throws
IOException

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

throws
ServerException

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

throws
ParseException

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

Return values
array<string|int, mixed>

Dashboard list.

getMetaDetails()

Returns details of the specified workspace/view.

public getMetaDetails(string $workspace_name, string $view_name) : array<string|int, mixed>
Parameters
$workspace_name : string

Name of the workspace.

$view_name : string

Name of the view.

Tags
throws
IOException

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

throws
ServerException

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

throws
ParseException

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

Return values
array<string|int, mixed>

Workspace (or) View meta details.

getOrgInstance()

Returns a new OrgAPI instance.

public getOrgInstance(string $org_id) : OrgAPI
Parameters
$org_id : string

The ID of the organization.

Return values
OrgAPI

instance.

getOrgs()

Returns list of all accessible organizations.

public getOrgs() : array<string|int, mixed>
Tags
throws
IOException

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

throws
ServerException

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

throws
ParseException

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

Return values
array<string|int, mixed>

Organization list.

getOwnedDashboards()

Returns list of owned dashboards.

public getOwnedDashboards() : array<string|int, mixed>
Tags
throws
IOException

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

throws
ServerException

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

throws
ParseException

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

Return values
array<string|int, mixed>

Dashboard list.

getOwnedWorkspaces()

Returns list of owned workspaces.

public getOwnedWorkspaces() : array<string|int, mixed>
Tags
throws
IOException

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

throws
ServerException

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

throws
ParseException

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

Return values
array<string|int, mixed>

Workspace list.

getReadTimeout()

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

public getReadTimeout() : int
Return values
int

Read timeout limit.

getRecentViews()

Returns list of recently accessed views.

public getRecentViews() : array<string|int, mixed>
Tags
throws
IOException

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

throws
ServerException

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

throws
ParseException

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

Return values
array<string|int, mixed>

View list.

getResourceDetails()

Returns resource usage details of the specified organization.

public getResourceDetails() : array<string|int, mixed>
Tags
throws
IOException

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

throws
ServerException

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

throws
ParseException

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

Return values
array<string|int, mixed>

Resource details.

getSharedDashboards()

Returns list of shared dashboards.

public getSharedDashboards() : array<string|int, mixed>
Tags
throws
IOException

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

throws
ServerException

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

throws
ParseException

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

Return values
array<string|int, mixed>

Dashboard list.

getSharedWorkspaces()

Returns list of shared workspaces.

public getSharedWorkspaces() : array<string|int, mixed>
Tags
throws
IOException

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

throws
ServerException

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

throws
ParseException

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

Return values
array<string|int, mixed>

Workspace list.

getSubscriptionDetails()

Returns subscription details of the specified organization.

public getSubscriptionDetails() : array<string|int, mixed>
Tags
throws
IOException

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

throws
ServerException

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

throws
ParseException

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

Return values
array<string|int, mixed>

Subscription details.

getUsers()

Returns list of users for the specified organization.

public getUsers() : array<string|int, mixed>
Tags
throws
IOException

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

throws
ServerException

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

throws
ParseException

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

Return values
array<string|int, mixed>

User list.

getViewDetails()

Returns details of the specified view.

public getViewDetails(string $view_id[, array<string|int, mixed> $config = array() ]) : array<string|int, mixed>
Parameters
$view_id : string

The ID of the view.

$config : array<string|int, mixed> = array()

Contains any additional control parameters. Can be null.

Tags
throws
IOException

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

throws
ServerException

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

throws
ParseException

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

Return values
array<string|int, mixed>

View details.

getViewInstance()

Returns a new ViewAPI instance.

public getViewInstance(string $org_id, string $workspace_id, string $view_id) : ViewAPI
Parameters
$org_id : string

The ID of the organization.

$workspace_id : string

The ID of the workspace.

$view_id : string

The ID of the view.

Return values
ViewAPI

instance.

getWorkspaceDetails()

Returns details of the specified workspace.

public getWorkspaceDetails(string $workspace_id) : array<string|int, mixed>
Parameters
$workspace_id : string

The ID of the workspace.

Tags
throws
IOException

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

throws
ServerException

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

throws
ParseException

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

Return values
array<string|int, mixed>

Workspace details.

getWorkspaceInstance()

Returns a new WorkspaceAPI instance.

public getWorkspaceInstance(string $org_id, string $workspace_id) : WorkspaceAPI
Parameters
$org_id : string

The ID of the organization.

$workspace_id : string

The ID of the workspace.

Return values
WorkspaceAPI

instance.

getWorkspaces()

Returns list of all accessible workspaces.

public getWorkspaces() : array<string|int, mixed>
Tags
throws
IOException

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

throws
ServerException

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

throws
ParseException

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

Return values
array<string|int, mixed>

Workspace list.

removeUsers()

Remove users from the specified organization.

public removeUsers(array<string|int, mixed> $email_ids[, array<string|int, mixed> $config = array() ]) : mixed
Parameters
$email_ids : array<string|int, mixed>

The email address of the users to be removed.

$config : array<string|int, mixed> = array()

Contains any additional control parameters. Can be null.

Tags
throws
IOException

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

throws
ServerException

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

throws
ParseException

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

setConnectionTimeout()

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

public setConnectionTimeout(int $time_limit) : mixed
Parameters
$time_limit : int

An integer value.

setProxy()

Used to specify the proxy server details.

public setProxy(string $proxy_host, int $proxy_port, string $proxy_type, string $proxy_user_name, string $proxy_password) : mixed
Parameters
$proxy_host : string

The hostname/ip address of the proxy-server.

$proxy_port : int

The proxy server port.

$proxy_type : string

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

$proxy_user_name : string

The user name for proxy-server authentication.

$proxy_password : string

The password for proxy-server authentication.

setReadTimeout()

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

public setReadTimeout(int $time_limit) : mixed
Parameters
$time_limit : int

An integer value.


        
On this page

Search results