Class ViewAPI

java.lang.Object
com.zoho.analytics.client.ViewAPI

public class ViewAPI extends Object
ViewAPI contains view level operations.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    ViewAPI(AnalyticsClient ac, long orgId, long workspaceId, long viewId)
    Creates a new ViewAPI instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    addAggregateFormula(String formulaName, String expression, org.json.JSONObject config)
    Add a aggregate formula in the specified table.
    long
    addColumn(String columnName, String dataType, org.json.JSONObject config)
    Add a column in the specified table.
    void
    Adds a specified view as favorite.
    long
    addFormulaColumn(String formulaName, String expression, org.json.JSONObject config)
    Add a formula column in the specified table.
    void
    addLookup(long columnId, long refViewId, long refColumnId, org.json.JSONObject config)
    Add a lookup in the specified child table.
    org.json.JSONObject
    addRow(org.json.JSONObject columnValues, org.json.JSONObject config)
    Add a single row in the specified table.
    void
    addTagsToView(org.json.JSONArray tagIds, org.json.JSONObject config)
    Adds multiple tags to the specified view.
    void
    autoAnalyse(org.json.JSONObject config)
    Auto generate reports for the specified table.
    void
    autoAnalyseColumn(long columnId, org.json.JSONObject config)
    Auto generate reports for the specified column.
    void
    copyFormulas(org.json.JSONArray formulaNames, long destWorkspaceId, org.json.JSONObject config, Long destOrgId)
    Copy the specified formulas from one table to another within the workspace or across workspaces.
    long
    createAlert(String alertName, org.json.JSONObject scheduleDetails, org.json.JSONArray rules, org.json.JSONObject config)
    Create a data alert for the specified view.
    createPrivateURL(org.json.JSONObject config)
    Create a private URL for the specified view.
    void
    createSimilarViews(long refViewId, long folderId, org.json.JSONObject config)
    Create reports for the specified table based on the reference table.
    void
    delete(org.json.JSONObject config)
    Delete a specified view in the workspace.
    void
    deleteAggregateFormula(long formulaId, org.json.JSONObject config)
    Delete the specified aggregate formula.
    void
    deleteColumn(long columnId, org.json.JSONObject config)
    Delete a specified column in the table.
    void
    deleteFormulaColumn(long formulaId, org.json.JSONObject config)
    Delete the specified formula column.
    int
    deleteRow(String criteria, org.json.JSONObject config)
    Delete rows in the specified table.
    void
    editAggregateFormula(long formulaId, String expression, org.json.JSONObject config)
    Edit the specified aggregate formula.
    void
    editFormulaColumn(long formulaId, String expression, org.json.JSONObject config)
    Edit the specified formula column.
    org.json.JSONArray
    Returns list of all aggregate formulas for the specified table.
    org.json.JSONArray
    Returns list of data alerts configured for the specified view.
    org.json.JSONObject
    getColumnDependents(long columnId)
    Returns list of dependents views and formulas for the specified column.
    getEmbedURL(org.json.JSONObject config)
    Returns embed URL to access the specified view.
    org.json.JSONArray
    Returns list of all formula columns for the specified table.
    org.json.JSONObject
    Returns last import details of the specified view.
    org.json.JSONObject
    Returns permissions for the specified view.
    getPrivateURL(org.json.JSONObject config)
    Returns private URL to access the specified view.
    org.json.JSONObject
    Returns publish configurations for the specified view.
    org.json.JSONObject
    Retrieves metadata information for the current table, including the list of available columns and their attributes.
    org.json.JSONArray
    Returns list of dependents views for the specified view.
    org.json.JSONObject
    Returns the view metadata that can be used while configuring a data alert for the specified view.
    org.json.JSONArray
    Returns the list of tags associated with the specified view.
    getViewURL(org.json.JSONObject config)
    Returns the URL to access the specified view.
    void
    hideColumns(org.json.JSONArray columnIds)
    Hide the specified columns in the table.
    makeViewPublic(org.json.JSONObject config)
    Make the specified view publically accessible.
    void
    refetchData(org.json.JSONObject config)
    Sync data from available datasource for the specified view.
    void
    Remove a specified view from favorite.
    void
    removeLookup(long columnId, org.json.JSONObject config)
    Remove the lookup for the specified column in the table.
    void
    Remove private link access for the specified view.
    void
    Remove public access for the specified view.
    void
    removeTagsFromView(org.json.JSONArray tagIds, boolean dissociateAll, org.json.JSONObject config)
    Removes multiple tags from the specified view.
    void
    rename(String viewName, org.json.JSONObject config)
    Rename a specified view in the workspace.
    void
    renameColumn(long columnId, String columnName)
    Rename a specified column in the table.
    void
    reorderColumns(org.json.JSONArray columnIds, org.json.JSONObject config)
    Updates the column order of the current table.
    long
    saveAs(String newViewName, org.json.JSONObject config)
    Copy a specified view within the workspace.
    void
    showColumns(org.json.JSONArray columnIds)
    Show the specified hidden columns in the table.
    void
    sortDataByColumns(org.json.JSONArray columnIds, Integer sortOrder, boolean resetSort, org.json.JSONObject config)
    Sorts the data in the current table based on specified columns.
    void
    updatePublishConfigurations(org.json.JSONObject config)
    Update publish configurations for the specified view.
    org.json.JSONObject
    updateRow(org.json.JSONObject columnValues, String criteria, org.json.JSONObject config)
    Update rows in the specified table.
    void
    UpdateSharedDetails(org.json.JSONObject config)
    Update the existing sharing configuration for the specified view.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ViewAPI

      protected ViewAPI(AnalyticsClient ac, long orgId, long workspaceId, long viewId)
      Creates a new ViewAPI instance.
      Parameters:
      ac - AnalyticsClient instance.
      orgId - The ID of the organization.
      workspaceId - The ID of the workspace.
      viewId - The ID of the view.
  • Method Details

    • addRow

      public org.json.JSONObject addRow(org.json.JSONObject columnValues, org.json.JSONObject config) throws ServerException, ParseException, IOException, org.json.JSONException
      Add a single row in the specified table.
      Parameters:
      columnValues - Contains the values for the row. The column names are the key.
      config - Contains any additional control configurations. Can be null.
      Returns:
      A JSONObject of values of the added rows.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • updateRow

      public org.json.JSONObject updateRow(org.json.JSONObject columnValues, String criteria, org.json.JSONObject config) throws ServerException, ParseException, IOException, org.json.JSONException
      Update rows in the specified table.
      Parameters:
      columnValues - Contains the values for the row. The column names are the key.
      criteria - The criteria to be applied for updating data. Only rows matching the criteria will be updated. Should be null for update all rows.
      config - Contains any additional control configurations. Can be null.
      Returns:
      A JSONObject of values of the updated rows.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • deleteRow

      public int deleteRow(String criteria, org.json.JSONObject config) throws ServerException, ParseException, IOException, org.json.JSONException
      Delete rows in the specified table.
      Parameters:
      criteria - The criteria to be applied for deleting data. Only rows matching the criteria will be deleted. Should be null for delete all rows.
      config - Contains any additional control configurations. Can be null.
      Returns:
      A int of deleted rows count.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • rename

      public void rename(String viewName, org.json.JSONObject config) throws ServerException, ParseException, IOException, org.json.JSONException
      Rename a specified view in the workspace.
      Parameters:
      viewName - The new name of the view.
      config - Contains any additional control configurations. Can be null.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • delete

      public void delete(org.json.JSONObject config) throws ServerException, ParseException, IOException, org.json.JSONException
      Delete a specified view in the workspace.
      Parameters:
      config - Contains any additional control configurations. Can be null.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • saveAs

      public long saveAs(String newViewName, org.json.JSONObject config) throws ServerException, ParseException, IOException, org.json.JSONException
      Copy a specified view within the workspace.
      Parameters:
      newViewName - The name of the new view.
      config - Contains any additional control configurations. Can be null.
      Returns:
      A long of view id.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • createSimilarViews

      public void createSimilarViews(long refViewId, long folderId, org.json.JSONObject config) throws ServerException, ParseException, IOException, org.json.JSONException
      Create reports for the specified table based on the reference table.
      Parameters:
      refViewId - The ID of the reference view.
      folderId - The folder id where the views to be saved.
      config - Contains any additional control configurations. Can be null.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • autoAnalyse

      public void autoAnalyse(org.json.JSONObject config) throws ServerException, ParseException, IOException, org.json.JSONException
      Auto generate reports for the specified table.
      Parameters:
      config - Contains any additional control configurations. Can be null.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • addFavorite

      public void addFavorite() throws ServerException, ParseException, IOException, org.json.JSONException
      Adds a specified view as favorite.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • removeFavorite

      public void removeFavorite() throws ServerException, ParseException, IOException, org.json.JSONException
      Remove a specified view from favorite.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • getViewURL

      public String getViewURL(org.json.JSONObject config) throws ServerException, ParseException, IOException, org.json.JSONException
      Returns the URL to access the specified view.
      Parameters:
      config - Contains any additional control configurations. Can be null.
      Returns:
      A String of view URL.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • getEmbedURL

      public String getEmbedURL(org.json.JSONObject config) throws ServerException, ParseException, IOException, org.json.JSONException
      Returns embed URL to access the specified view.
      Parameters:
      config - Contains any additional control configurations. Can be null.
      Returns:
      A String of Embed URL.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • getPrivateURL

      public String getPrivateURL(org.json.JSONObject config) throws ServerException, ParseException, IOException, org.json.JSONException
      Returns private URL to access the specified view.
      Parameters:
      config - Contains any additional control configurations. Can be null.
      Returns:
      A String of private URL.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • createPrivateURL

      public String createPrivateURL(org.json.JSONObject config) throws ServerException, ParseException, IOException, org.json.JSONException
      Create a private URL for the specified view.
      Parameters:
      config - Contains any additional control configurations. Can be null.
      Returns:
      A String of private URL.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • removePrivateAccess

      public void removePrivateAccess() throws ServerException, ParseException, IOException, org.json.JSONException
      Remove private link access for the specified view.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • makeViewPublic

      public String makeViewPublic(org.json.JSONObject config) throws ServerException, ParseException, IOException, org.json.JSONException
      Make the specified view publically accessible.
      Parameters:
      config - Contains any additional control configurations. Can be null.
      Returns:
      A String of public URL.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • removePublicAccess

      public void removePublicAccess() throws ServerException, ParseException, IOException, org.json.JSONException
      Remove public access for the specified view.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • getPublishConfigurations

      public org.json.JSONObject getPublishConfigurations() throws ServerException, ParseException, IOException, org.json.JSONException
      Returns publish configurations for the specified view.
      Returns:
      A JSONObject of publish details.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • updatePublishConfigurations

      public void updatePublishConfigurations(org.json.JSONObject config) throws ServerException, ParseException, IOException, org.json.JSONException
      Update publish configurations for the specified view.
      Parameters:
      config - Contains the control configurations.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • getMyPermissions

      public org.json.JSONObject getMyPermissions() throws ServerException, ParseException, IOException, org.json.JSONException
      Returns permissions for the specified view.
      Returns:
      A JSONObject of permission details.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • addColumn

      public long addColumn(String columnName, String dataType, org.json.JSONObject config) throws ServerException, ParseException, IOException, org.json.JSONException
      Add a column in the specified table.
      Parameters:
      columnName - The name of the column.
      dataType - The data-type of the column.
      config - Contains any additional control configurations. Can be null.
      Returns:
      A long of column id.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • renameColumn

      public void renameColumn(long columnId, String columnName) throws ServerException, ParseException, IOException, org.json.JSONException
      Rename a specified column in the table.
      Parameters:
      columnId - The id of the column.
      columnName - The new name of the column.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • deleteColumn

      public void deleteColumn(long columnId, org.json.JSONObject config) throws ServerException, ParseException, IOException, org.json.JSONException
      Delete a specified column in the table.
      Parameters:
      columnId - The id of the column.
      config - Contains any additional control configurations. Can be null.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • addLookup

      public void addLookup(long columnId, long refViewId, long refColumnId, org.json.JSONObject config) throws ServerException, ParseException, IOException, org.json.JSONException
      Add a lookup in the specified child table.
      Parameters:
      columnId - The id of the column.
      refViewId - The ID of the table contains the parent column.
      refColumnId - The ID of the parent column.
      config - Contains any additional control configurations. Can be null.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • removeLookup

      public void removeLookup(long columnId, org.json.JSONObject config) throws ServerException, ParseException, IOException, org.json.JSONException
      Remove the lookup for the specified column in the table.
      Parameters:
      columnId - The id of the column.
      config - Contains any additional control configurations. Can be null.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • hideColumns

      public void hideColumns(org.json.JSONArray columnIds) throws ServerException, ParseException, IOException, org.json.JSONException
      Hide the specified columns in the table.
      Parameters:
      columnIds - The array of column ids to be hidden.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • showColumns

      public void showColumns(org.json.JSONArray columnIds) throws ServerException, ParseException, IOException, org.json.JSONException
      Show the specified hidden columns in the table.
      Parameters:
      columnIds - The array of column ids to be shown.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • autoAnalyseColumn

      public void autoAnalyseColumn(long columnId, org.json.JSONObject config) throws ServerException, ParseException, IOException, org.json.JSONException
      Auto generate reports for the specified column.
      Parameters:
      columnId - The id of the column.
      config - Contains any additional control configurations. Can be null.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • copyFormulas

      public void copyFormulas(org.json.JSONArray formulaNames, long destWorkspaceId, org.json.JSONObject config, Long destOrgId) throws ServerException, ParseException, IOException, org.json.JSONException
      Copy the specified formulas from one table to another within the workspace or across workspaces.
      Parameters:
      formulaNames - The name of the formula columns to be copied.
      destWorkspaceId - The ID of the destination workspace.
      config - Contains any additional control configurations. Can be null.
      destOrgId - Id of the organization where the destination workspace is present. Can be null.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • refetchData

      public void refetchData(org.json.JSONObject config) throws ServerException, ParseException, IOException, org.json.JSONException
      Sync data from available datasource for the specified view.
      Parameters:
      config - Contains any additional control configurations. Can be null.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • getLastImportDetails

      public org.json.JSONObject getLastImportDetails() throws ServerException, ParseException, IOException, org.json.JSONException
      Returns last import details of the specified view.
      Returns:
      A JSONObject of last import details.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • getFormulaColumns

      public org.json.JSONArray getFormulaColumns() throws ServerException, ParseException, IOException, org.json.JSONException
      Returns list of all formula columns for the specified table.
      Returns:
      A JSONArray of custom formulas.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • addFormulaColumn

      public long addFormulaColumn(String formulaName, String expression, org.json.JSONObject config) throws ServerException, ParseException, IOException, org.json.JSONException
      Add a formula column in the specified table.
      Parameters:
      formulaName - Name of the formula column to be created.
      expression - Formula expression.
      config - Contains any additional control configurations. Can be null.
      Returns:
      A long of created formula id.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • editFormulaColumn

      public void editFormulaColumn(long formulaId, String expression, org.json.JSONObject config) throws ServerException, ParseException, IOException, org.json.JSONException
      Edit the specified formula column.
      Parameters:
      formulaId - Id of the formula column to be updated.
      expression - Formula expression.
      config - Contains any additional control configurations. Can be null.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • deleteFormulaColumn

      public void deleteFormulaColumn(long formulaId, org.json.JSONObject config) throws ServerException, ParseException, IOException, org.json.JSONException
      Delete the specified formula column.
      Parameters:
      formulaId - Id of the formula column to be deleted.
      config - Contains any additional control configurations. Can be null.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • getAggregateFormulas

      public org.json.JSONArray getAggregateFormulas() throws ServerException, ParseException, IOException, org.json.JSONException
      Returns list of all aggregate formulas for the specified table.
      Returns:
      A JSONArray of aggregate formulas.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • addAggregateFormula

      public long addAggregateFormula(String formulaName, String expression, org.json.JSONObject config) throws ServerException, ParseException, IOException, org.json.JSONException
      Add a aggregate formula in the specified table.
      Parameters:
      formulaName - Name of the aggregate formula to be created.
      expression - Formula expression.
      config - Contains any additional control configurations. Can be null.
      Returns:
      A long of created formula id.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • editAggregateFormula

      public void editAggregateFormula(long formulaId, String expression, org.json.JSONObject config) throws ServerException, ParseException, IOException, org.json.JSONException
      Edit the specified aggregate formula.
      Parameters:
      formulaId - Id of the aggregate formula to be updated.
      expression - Formula expression.
      config - Contains any additional control configurations. Can be null.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • deleteAggregateFormula

      public void deleteAggregateFormula(long formulaId, org.json.JSONObject config) throws ServerException, ParseException, IOException, org.json.JSONException
      Delete the specified aggregate formula.
      Parameters:
      formulaId - Id of the aggregate formula to be deleted.
      config - Contains any additional control configurations. Can be null.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • getViewDependents

      public org.json.JSONArray getViewDependents() throws ServerException, ParseException, IOException, org.json.JSONException
      Returns list of dependents views for the specified view.
      Returns:
      A JSONArray of dependent views.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • getColumnDependents

      public org.json.JSONObject getColumnDependents(long columnId) throws ServerException, ParseException, IOException, org.json.JSONException
      Returns list of dependents views and formulas for the specified column.
      Parameters:
      columnId - Id of the column.
      Returns:
      A JSONObject of dependent views and formulas.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • UpdateSharedDetails

      public void UpdateSharedDetails(org.json.JSONObject config) throws ServerException, ParseException, IOException, org.json.JSONException
      Update the existing sharing configuration for the specified view.
      Parameters:
      config - Contains the required control configurations.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • getTableMetadata

      public org.json.JSONObject getTableMetadata() throws ServerException, ParseException, IOException, org.json.JSONException
      Retrieves metadata information for the current table, including the list of available columns and their attributes.
      Returns:
      A JSONObject containing table metadata.
      Throws:
      ServerException - If the server has received the request but did not process it.
      ParseException - If the response could not be parsed.
      IOException - If communication errors occur.
      org.json.JSONException - If JSON processing fails.
    • reorderColumns

      public void reorderColumns(org.json.JSONArray columnIds, org.json.JSONObject config) throws ServerException, ParseException, IOException, org.json.JSONException
      Updates the column order of the current table.
      Parameters:
      columnIds - JSONArray containing the full set of column IDs in the new order in which they should appear.
      config - Contains any additional control configurations. Can be null.
      Throws:
      ServerException - If the server failed to process the request.
      ParseException - If the response could not be parsed.
      IOException - If communication errors occur.
      org.json.JSONException - If JSON processing fails.
    • sortDataByColumns

      public void sortDataByColumns(org.json.JSONArray columnIds, Integer sortOrder, boolean resetSort, org.json.JSONObject config) throws ServerException, ParseException, IOException, org.json.JSONException
      Sorts the data in the current table based on specified columns.
      Parameters:
      columnIds - JSONArray of column IDs to sort by.
      sortOrder - Sorting order: 1 - Ascending 2 - Descending
      resetSort - If true, resets existing sort configuration.
      config - Contains any additional control configurations. Can be null.
      Throws:
      ServerException - If the server failed to process the request.
      ParseException - If the response could not be parsed.
      IOException - If communication errors occur.
      org.json.JSONException - If JSON processing fails.
    • getViewTags

      public org.json.JSONArray getViewTags() throws ServerException, ParseException, IOException, org.json.JSONException
      Returns the list of tags associated with the specified view.
      Returns:
      A JSONArray of tags.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • addTagsToView

      public void addTagsToView(org.json.JSONArray tagIds, org.json.JSONObject config) throws ServerException, ParseException, IOException, org.json.JSONException
      Adds multiple tags to the specified view.
      Parameters:
      tagIds - List of tag ids to be associated with the view.
      config - Contains any additional control configurations. Can be null.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • removeTagsFromView

      public void removeTagsFromView(org.json.JSONArray tagIds, boolean dissociateAll, org.json.JSONObject config) throws ServerException, ParseException, IOException, org.json.JSONException
      Removes multiple tags from the specified view.
      Parameters:
      tagIds - List of tag ids to be dissociated. Can be null when dissociateAll is true.
      dissociateAll - To dissociate all the associated tags from the view.
      config - Contains any additional control configurations. Can be null.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • getAlertsInView

      public org.json.JSONArray getAlertsInView() throws ServerException, ParseException, IOException, org.json.JSONException
      Returns list of data alerts configured for the specified view.
      Returns:
      A JSONArray of data alerts.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • createAlert

      public long createAlert(String alertName, org.json.JSONObject scheduleDetails, org.json.JSONArray rules, org.json.JSONObject config) throws ServerException, ParseException, IOException, org.json.JSONException
      Create a data alert for the specified view.
      Parameters:
      alertName - Name of the data alert.
      scheduleDetails - Contains the schedule configurations of the data alert.
      rules - Contains the rules to be evaluated by the data alert.
      config - Contains any additional control configurations. Can be null.
      Returns:
      A long of new data alert id.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.
    • getViewMetadataForAlert

      public org.json.JSONObject getViewMetadataForAlert() throws ServerException, ParseException, IOException, org.json.JSONException
      Returns the view metadata that can be used while configuring a data alert for the specified view.
      Returns:
      A JSONObject of view metadata for data alert configuration.
      Throws:
      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 the client was not able to parse the response.
      IOException - If any communication related errors like request time out occurs, when trying to contact the service.
      org.json.JSONException - If any errors while processing the JSON data.