Module AnalyticsClient :: Class AnalyticsClient :: Class ViewAPI
[hide private]
[frames] | no frames]

Class ViewAPI

source code

ViewAPI contains view level operations.

Instance Methods [hide private]
 
__init__(self, ac, org_id, workspace_id, view_id) source code
 
rename(self, view_name, config={})
Rename a specified view in the workspace.
source code
 
delete(self, config={})
Delete a specified view in the workspace.
source code
string
save_as(self, new_view_name, config={})
Copy a specified view within the workspace.
source code
 
copy_formulas(self, formula_names, dest_workspace_id, config={}, dest_org_id=None)
Copy the specified formulas from one table to another within the workspace or across workspaces.
source code
 
add_favorite(self)
Adds a specified view as favorite.
source code
 
remove_favorite(self)
Remove a specified view from favorite.
source code
 
create_similar_views(self, ref_view_id, folder_id, config={})
Create reports for the specified table based on the reference table.
source code
 
auto_analyse(self, config={})
Auto generate reports for the specified table.
source code
dictionary
get_my_permissions(self)
Returns permissions for the specified view.
source code
string
get_view_url(self, config={})
Returns the URL to access the specified view.
source code
string
get_embed_url(self, config={})
Returns embed URL to access the specified view.
source code
string
get_private_url(self, config={})
Returns private URL to access the specified view.
source code
string
create_private_url(self, config={})
Create a private URL for the specified view.
source code
 
remove_private_access(self)
Remove private link access for the specified view.
source code
string
make_view_public(self, config={})
Make the specified view publically accessible.
source code
 
remove_public_access(self)
Remove public access for the specified view.
source code
dictionary
get_publish_configurations(self)
Returns publish configurations for the specified view.
source code
 
update_publish_configurations(self, config={})
Update publish configurations for the specified view.
source code
string
add_column(self, column_name, data_type, config={})
Add a column in the specified table.
source code
 
hide_columns(self, column_ids)
Hide the specified columns in the table.
source code
 
show_columns(self, column_ids)
Show the specified hidden columns in the table.
source code
dictionary
add_row(self, column_values, config={})
Add a single row in the specified table.
source code
dictionary
update_row(self, column_values, criteria, config={})
Update rows in the specified table.
source code
string
delete_row(self, criteria, config={})
Delete rows in the specified table.
source code
 
rename_column(self, column_id, column_name, config={})
Rename a specified column in the table.
source code
 
delete_column(self, column_id, config={})
Delete a specified column in the table.
source code
 
add_lookup(self, column_id, ref_view_id, ref_column_id, config={})
Add a lookup in the specified child table.
source code
 
remove_lookup(self, column_id, config={})
Remove the lookup for the specified column in the table.
source code
 
auto_analyse_column(self, column_id, config={})
Auto generate reports for the specified column.
source code
 
refetch_data(self, config={})
Sync data from available datasource for the specified view.
source code
dictionary
get_last_import_details(self)
Returns last import details of the specified view.
source code
list
get_formula_columns(self)
Returns list of all formula columns for the specified table.
source code
string
add_formula_column(self, formula_name, expression, config={})
Add a formula column in the specified table.
source code
 
edit_formula_column(self, formula_id, expression, config={})
Edit the specified formula column.
source code
 
delete_formula_column(self, formula_id, config={})
Delete the specified formula column.
source code
list
get_aggregate_formulas(self)
Returns list of all aggregate formulas for the specified table.
source code
string
add_aggregate_formula(self, formula_name, expression, config={})
Add an aggregate formula in the specified table.
source code
 
edit_aggregate_formula(self, formula_id, expression, config={})
Edit the specified aggregate formula.
source code
 
delete_aggregate_formula(self, formula_id, config={})
Delete the specified aggregate formula.
source code
list
get_view_dependents(self)
Returns list of dependents views for the specified view.
source code
dictionary
get_column_dependents(self, column_id)
Returns list of dependents views and formulas for the specified column.
source code
 
update_shared_details(self, config={})
Update shared details of the specified view.
source code
Method Details [hide private]

rename(self, view_name, config={})

source code 

Rename a specified view in the workspace.

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

delete(self, config={})

source code 

Delete a specified view in the workspace.

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

save_as(self, new_view_name, config={})

source code 

Copy a specified view within the workspace.

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

copy_formulas(self, formula_names, dest_workspace_id, config={}, dest_org_id=None)

source code 

Copy the specified formulas from one table to another within the workspace or across workspaces.

Parameters:
  • formula_names (list) - The name of the formula columns to be copied.
  • dest_workspace_id (string) - The ID of the destination workspace.
  • dest_org_id (string) - Id of the organization where the destination workspace is present. Can be None.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

add_favorite(self)

source code 

Adds a specified view as favorite.

Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

remove_favorite(self)

source code 

Remove a specified view from favorite.

Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

create_similar_views(self, ref_view_id, folder_id, config={})

source code 

Create reports for the specified table based on the reference table.

Parameters:
  • ref_view_id (string) - The ID of the reference view.
  • folder_id (string) - The folder id where the views to be saved.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

auto_analyse(self, config={})

source code 

Auto generate reports for the specified table.

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

get_my_permissions(self)

source code 

Returns permissions for the specified view.

Returns: dictionary
Permission details.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

get_view_url(self, config={})

source code 

Returns the URL to access the specified view.

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

get_embed_url(self, config={})

source code 

Returns embed URL to access the specified view.

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

get_private_url(self, config={})

source code 

Returns private URL to access the specified view.

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

create_private_url(self, config={})

source code 

Create a private URL for the specified view.

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

remove_private_access(self)

source code 

Remove private link access for the specified view.

Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

make_view_public(self, config={})

source code 

Make the specified view publically accessible.

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

remove_public_access(self)

source code 

Remove public access for the specified view.

Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

get_publish_configurations(self)

source code 

Returns publish configurations for the specified view.

Returns: dictionary
Publish details.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

update_publish_configurations(self, config={})

source code 

Update publish configurations for the specified view.

Parameters:
  • config (dictionary) - Contains the control parameters.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

add_column(self, column_name, data_type, config={})

source code 

Add a column in the specified table.

Parameters:
  • column_name (string) - The name of the column.
  • data_type (string) - The data-type of the column.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Returns: string
Created column id.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

hide_columns(self, column_ids)

source code 

Hide the specified columns in the table.

Parameters:
  • column_ids (list) - Ids of the columns to be hidden.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

show_columns(self, column_ids)

source code 

Show the specified hidden columns in the table.

Parameters:
  • column_ids (list) - Ids of the columns to be shown.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

add_row(self, column_values, config={})

source code 

Add a single row in the specified table.

Parameters:
  • column_values (dictionary) - Contains the values for the row. The column names are the key.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Returns: dictionary
Column Names and Added Row Values.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

update_row(self, column_values, criteria, config={})

source code 

Update rows in the specified table.

Parameters:
  • column_values (dictionary) - Contains the values for the row. The column names are the key.
  • criteria (string) - The criteria to be applied for updating data. Only rows matching the criteria will be updated. Should be null for update all rows.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Returns: dictionary
Updated Columns List and Updated Rows Count.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

delete_row(self, criteria, config={})

source code 

Delete rows in the specified table.

Parameters:
  • criteria (string) - The criteria to be applied for deleting data. Only rows matching the criteria will be deleted. Should be null for delete all rows.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Returns: string
Deleted rows details.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

rename_column(self, column_id, column_name, config={})

source code 

Rename a specified column in the table.

Parameters:
  • column_id (string) - Id of the column.
  • column_name (string) - New name for the column.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

delete_column(self, column_id, config={})

source code 

Delete a specified column in the table.

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

add_lookup(self, column_id, ref_view_id, ref_column_id, config={})

source code 

Add a lookup in the specified child table.

Parameters:
  • column_id (string) - Id of the column.
  • ref_view_id (string) - The id of the table contains the parent column.
  • ref_column_id (string) - The id of the parent column.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

remove_lookup(self, column_id, config={})

source code 

Remove the lookup for the specified column in the table.

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

auto_analyse_column(self, column_id, config={})

source code 

Auto generate reports for the specified column.

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

refetch_data(self, config={})

source code 

Sync data from available datasource for the specified view.

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

get_last_import_details(self)

source code 

Returns last import details of the specified view.

Returns: dictionary
Last import details.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

get_formula_columns(self)

source code 

Returns list of all formula columns for the specified table.

Returns: list
Formula column list.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

add_formula_column(self, formula_name, expression, config={})

source code 

Add a formula column in the specified table.

Parameters:
  • formula_name (string) - Name of the formula column to be created.
  • expression (string) - Formula expression.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Returns: string
Created formula id.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

edit_formula_column(self, formula_id, expression, config={})

source code 

Edit the specified formula column.

Parameters:
  • formula_id (string) - Id of the formula column to be updated.
  • expression (string) - Formula expression.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

delete_formula_column(self, formula_id, config={})

source code 

Delete the specified formula column.

Parameters:
  • formula_id (string) - Id of the formula column to be deleted.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

get_aggregate_formulas(self)

source code 

Returns list of all aggregate formulas for the specified table.

Returns: list
Aggregate Formula list.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

add_aggregate_formula(self, formula_name, expression, config={})

source code 

Add an aggregate formula in the specified table.

Parameters:
  • formula_name (string) - Name of the aggregate formula to be created.
  • expression (string) - Formula expression.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Returns: string
Created formula id.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

edit_aggregate_formula(self, formula_id, expression, config={})

source code 

Edit the specified aggregate formula.

Parameters:
  • formula_id (string) - Id of the aggregate formula to be updated.
  • expression (string) - Formula expression.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

delete_aggregate_formula(self, formula_id, config={})

source code 

Delete the specified aggregate formula.

Parameters:
  • formula_id (string) - Id of the aggregate formula to be deleted.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

get_view_dependents(self)

source code 

Returns list of dependents views for the specified view.

Returns: list
Dependent view list.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

get_column_dependents(self, column_id)

source code 

Returns list of dependents views and formulas for the specified column.

Returns: dictionary
Dependent details.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.

update_shared_details(self, config={})

source code 

Update shared details of the specified view.

Parameters:
  • config (dictionary) - Contains the control parameters.
Raises:
  • ServerError - If the server has received the request but did not process the request due to some error.
  • ParseError - If the server has responded but client was not able to parse the response.