public class OrgAPI
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
OrgAPI(AnalyticsClient ac,
long orgId)
Creates a new
OrgAPI instance. |
Modifier and Type | Method and 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.JSONObject |
getMetaDetails(java.lang.String workspaceName,
java.lang.String viewName)
Returns details of the specified workspace/view.
|
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.
|
protected OrgAPI(AnalyticsClient ac, long orgId)
OrgAPI
instance.ac
- AnalyticsClient
instance.orgId
- The ID of the organization.public long createWorkspace(java.lang.String workspaceName, org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
workspaceName
- Name of the workspace.config
- Contains any additional control configurations. Can be null.long
of new workspace id.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.public org.json.JSONArray getAdmins() throws ServerException, ParseException, java.io.IOException, org.json.JSONException
JSONArray
of organization admins.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.public org.json.JSONArray getUsers() throws ServerException, ParseException, java.io.IOException, org.json.JSONException
JSONArray
of users.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.public void addUsers(org.json.JSONArray emailIds, org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
emailIds
- The email address of the users to be added.config
- Contains any additional control configurations. Can be null.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.public void removeUsers(org.json.JSONArray emailIds, org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
emailIds
- The email address of the users to be removed.config
- Contains any additional control configurations. Can be null.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.public void activateUsers(org.json.JSONArray emailIds, org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
emailIds
- The email address of the users to be activated.config
- Contains any additional control configurations. Can be null.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.public void deactivateUsers(org.json.JSONArray emailIds, org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
emailIds
- The email address of the users to be deactivated.config
- Contains any additional control configurations. Can be null.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.public void changeUserRole(org.json.JSONArray emailIds, java.lang.String role, org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
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.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.public org.json.JSONObject getMetaDetails(java.lang.String workspaceName, java.lang.String viewName) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
workspaceName
- The name of the workspace.viewName
- The name of the view.JSONObject
of workspace/view details.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.public org.json.JSONObject getSubscriptionDetails() throws ServerException, ParseException, java.io.IOException, org.json.JSONException
JSONObject
of subscription details.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.public org.json.JSONArray getResourceDetails() throws ServerException, ParseException, java.io.IOException, org.json.JSONException
JSONArray
of resource details.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.Copyright © 2023 AdventNet Inc. All Rights Reserved.