Class OrgAPI


  • public class OrgAPI
    extends java.lang.Object
    OrgAPI contains organization level operations.
    • Constructor Summary

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void activateUsers​(org.json.JSONArray emailIds, org.json.JSONObject config)
      Activate users in the specified organization.
      void addUsers​(org.json.JSONArray emailIds, org.json.JSONObject config)
      Add users to the specified organization.
      void changeUserRole​(org.json.JSONArray emailIds, java.lang.String role, org.json.JSONObject config)
      Change role for the specified users.
      long createWorkspace​(java.lang.String workspaceName, org.json.JSONObject config)
      Create a blank workspace in the specified organization.
      void deactivateUsers​(org.json.JSONArray emailIds, org.json.JSONObject config)
      Deactivate users in the specified organization.
      org.json.JSONArray getAdmins()
      Returns list of admins for a specified organization.
      org.json.JSONArray getAutoMLAnalysis()
      Returns all AutoML analysis available in the organization.
      org.json.JSONObject getMetaDetails​(java.lang.String workspaceName, java.lang.String viewName)
      Returns details of the specified workspace/view.
      org.json.JSONArray getOrgWorkspaces()
      Returns list of all accessible workspaces in the specified organization.
      org.json.JSONArray getResourceDetails()
      Returns resource usage details of the specified organization.
      org.json.JSONObject getSubscriptionDetails()
      Returns subscription details of the specified organization.
      org.json.JSONArray getUsers()
      Returns list of users for the specified organization.
      void removeUsers​(org.json.JSONArray emailIds, org.json.JSONObject config)
      Remove users from the specified organization.
      • Methods inherited from class java.lang.Object

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

      • OrgAPI

        protected OrgAPI​(AnalyticsClient ac,
                         long orgId)
        Creates a new OrgAPI instance.
        Parameters:
        ac - AnalyticsClient instance.
        orgId - The ID of the organization.
    • Method Detail

      • createWorkspace

        public long createWorkspace​(java.lang.String workspaceName,
                                    org.json.JSONObject config)
                             throws ServerException,
                                    ParseException,
                                    java.io.IOException,
                                    org.json.JSONException
        Create a blank workspace in the specified organization.
        Parameters:
        workspaceName - Name of the workspace.
        config - Contains any additional control configurations. Can be null.
        Returns:
        A long of new workspace 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.
        java.io.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.
      • getAdmins

        public org.json.JSONArray getAdmins()
                                     throws ServerException,
                                            ParseException,
                                            java.io.IOException,
                                            org.json.JSONException
        Returns list of admins for a specified organization.
        Returns:
        A JSONArray of organization admins.
        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.
        java.io.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.
      • getUsers

        public org.json.JSONArray getUsers()
                                    throws ServerException,
                                           ParseException,
                                           java.io.IOException,
                                           org.json.JSONException
        Returns list of users for the specified organization.
        Returns:
        A JSONArray of users.
        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.
        java.io.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.
      • addUsers

        public void addUsers​(org.json.JSONArray emailIds,
                             org.json.JSONObject config)
                      throws ServerException,
                             ParseException,
                             java.io.IOException,
                             org.json.JSONException
        Add users to the specified organization.
        Parameters:
        emailIds - The email address of the users to be added.
        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.
        java.io.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.
      • removeUsers

        public void removeUsers​(org.json.JSONArray emailIds,
                                org.json.JSONObject config)
                         throws ServerException,
                                ParseException,
                                java.io.IOException,
                                org.json.JSONException
        Remove users from the specified organization.
        Parameters:
        emailIds - The email address of the users to be removed.
        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.
        java.io.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.
      • activateUsers

        public void activateUsers​(org.json.JSONArray emailIds,
                                  org.json.JSONObject config)
                           throws ServerException,
                                  ParseException,
                                  java.io.IOException,
                                  org.json.JSONException
        Activate users in the specified organization.
        Parameters:
        emailIds - The email address of the users to be activated.
        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.
        java.io.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.
      • deactivateUsers

        public void deactivateUsers​(org.json.JSONArray emailIds,
                                    org.json.JSONObject config)
                             throws ServerException,
                                    ParseException,
                                    java.io.IOException,
                                    org.json.JSONException
        Deactivate users in the specified organization.
        Parameters:
        emailIds - The email address of the users to be deactivated.
        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.
        java.io.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.
      • changeUserRole

        public void changeUserRole​(org.json.JSONArray emailIds,
                                   java.lang.String role,
                                   org.json.JSONObject config)
                            throws ServerException,
                                   ParseException,
                                   java.io.IOException,
                                   org.json.JSONException
        Change role for the specified users.
        Parameters:
        emailIds - The email address of the users.
        role - Name of the role to be updated. Can be one of "USER"/"VIEWER"/"ORGADMIN".
        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.
        java.io.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.
      • getMetaDetails

        public org.json.JSONObject getMetaDetails​(java.lang.String workspaceName,
                                                  java.lang.String viewName)
                                           throws ServerException,
                                                  ParseException,
                                                  java.io.IOException,
                                                  org.json.JSONException
        Returns details of the specified workspace/view.
        Parameters:
        workspaceName - The name of the workspace.
        viewName - The name of the view.
        Returns:
        A JSONObject of workspace/view 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.
        java.io.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.
      • getSubscriptionDetails

        public org.json.JSONObject getSubscriptionDetails()
                                                   throws ServerException,
                                                          ParseException,
                                                          java.io.IOException,
                                                          org.json.JSONException
        Returns subscription details of the specified organization.
        Returns:
        A JSONObject of subscription 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.
        java.io.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.
      • getResourceDetails

        public org.json.JSONArray getResourceDetails()
                                              throws ServerException,
                                                     ParseException,
                                                     java.io.IOException,
                                                     org.json.JSONException
        Returns resource usage details of the specified organization.
        Returns:
        A JSONArray of resource 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.
        java.io.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.
      • getOrgWorkspaces

        public org.json.JSONArray getOrgWorkspaces()
                                            throws ServerException,
                                                   ParseException,
                                                   java.io.IOException,
                                                   org.json.JSONException
        Returns list of all accessible workspaces in the specified organization.
        Returns:
        A JSONArray of workspace list.
        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.
        java.io.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.
      • getAutoMLAnalysis

        public org.json.JSONArray getAutoMLAnalysis()
                                             throws ServerException,
                                                    ParseException,
                                                    java.io.IOException,
                                                    org.json.JSONException
        Returns all AutoML analysis available in the organization.
        Returns:
        AutoML analysis list.
        Throws:
        ServerException - If the server failed to process the request.
        ParseException - If the response could not be parsed.
        java.io.IOException - If communication errors occur.
        org.json.JSONException - If JSON processing fails.