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

Class OrgAPI

source code

OrgAPI contains organization level operations.

Instance Methods [hide private]
 
__init__(self, ac, org_id) source code
string
create_workspace(self, workspace_name, config={})
Create a blank workspace in the specified organization.
source code
list
get_admins(self)
Returns list of admins for a specified organization.
source code
list
get_users(self)
Returns list of users for the specified organization.
source code
 
add_users(self, email_ids, config={})
Add users to the specified organization.
source code
 
remove_users(self, email_ids, config={})
Remove users from the specified organization.
source code
 
activate_users(self, email_ids, config={})
Activate users in the specified organization.
source code
 
deactivate_users(self, email_ids, config={})
Deactivate users in the specified organization.
source code
 
change_user_role(self, email_ids, role, config={})
Change role for the specified users.
source code
dictionary
get_subscription_details(self)
Returns subscription details of the specified organization.
source code
dictionary
get_resource_details(self)
Returns resource usage details of the specified organization.
source code
dictionary
get_meta_details(self, workspace_name, view_name)
Returns details of the specified workspace/view.
source code
Method Details [hide private]

create_workspace(self, workspace_name, config={})

source code 

Create a blank workspace in the specified organization.

Parameters:
  • workspace_name (string) - The name of the workspace.
  • config (dictionary) - Contains any additional control parameters. Can be None.
Returns: string
Created workspace 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.

get_admins(self)

source code 

Returns list of admins for a specified organization.

Returns: list
Organization admin 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_users(self)

source code 

Returns list of users for the specified organization.

Returns: list
User 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_users(self, email_ids, config={})

source code 

Add users to the specified organization.

Parameters:
  • email_ids (list) - The email address of the users to be added.
  • 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_users(self, email_ids, config={})

source code 

Remove users from the specified organization.

Parameters:
  • email_ids (list) - The email address of the users to be removed.
  • 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.

activate_users(self, email_ids, config={})

source code 

Activate users in the specified organization.

Parameters:
  • email_ids (list) - The email address of the users to be activated.
  • 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.

deactivate_users(self, email_ids, config={})

source code 

Deactivate users in the specified organization.

Parameters:
  • email_ids (list) - The email address of the users to be deactivated.
  • 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.

change_user_role(self, email_ids, role, config={})

source code 

Change role for the specified users.

Parameters:
  • email_ids (list) - The email address of the users to be deactivated.
  • role (string) - New role for the users.
  • 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_subscription_details(self)

source code 

Returns subscription details of the specified organization.

Returns: dictionary
Subscription 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_resource_details(self)

source code 

Returns resource usage details of the specified organization.

Returns: dictionary
Resource 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_meta_details(self, workspace_name, view_name)

source code 

Returns details of the specified workspace/view.

Parameters:
  • workspace_name (string) - Name of the workspace.
  • view_name (string) - Name of the view.
Returns: dictionary
Workspace (or) View meta 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.