Organization
This section shows how to create, modify and list organizations in AI & Analytics Engine by
- Using the Graphical User Interface (GUI)
- Using API access through SDK
Using the GUI
Creating an organization
In order to create an organization, you must first press the "NEW ORGANIZATION" button in the main area of the web UI.
Once pressed, the following 2 step menus appear:
Step 1 | Step 2 |
---|---|
![]() |
![]() |
You are required to enter a name and optional description for the organization. Afterwards, there is an optional stage for adding additional users (via e-mail address) and specify their access priveledge level in the organization.
Example: A user with 2 organizations: "PI EXCHANGE", and "SAMPLE ORG" which was newly created:
Updating information for an organization
When inside the organization, the information can be updated by choosing the "SETTINGS" tab and updating the info within it and clicking the "SAVE" button:
Deleting an organization
When inside the organization, it can be deleted by clicking on the garbage bin icon in the top right corner of the organization display. Once clicked, you have to verify the deletion.
Listing organizations for a user
Organization are listed visually in the main workspace of the user. It can be seen here on the left side.
Listing users that can access an organization
You can inspect the list of users with access to the organization by selecting the "USERS" tab. Inside, a list will appear, as we will see in the next section.
Adding a user to an organization
To add a user, enter the organization menu, and click the lower right '+' icon. It will expand to allow you to add a user. Then, add the user details: (e-mail / privileges) and press "ADD" when finished. The new user will appear in the list of users for this organization.
Step 1 | Step 2 |
---|---|
![]() |
![]() |
Deleting a user from an organization
For deleting a user participation in a specific organization, enter the organization menu, select the "USERS" tab and then click on garbage bin icon on the right side of the user. It will open a deletion menu where you confirm the deletion.
Step 1 | Step 2 |
---|---|
![]() |
![]() |
Using API access through SDK
To access the API functions, you must first authenticate into the platform.
from aiaengine import api
client = api.Client()
Importing org
Then you need to import org
to proceed with the next steps.
from aiaengine.api import org
Creating an organization
Now you can create an organization with input name
and description
. A unique id is generated for the organization and will be frequently used in relevant functions.
create_org_response = client.orgs.CreateOrg(
org.CreateOrgRequest(
name='Org Name',
description='What is your org about'
)
)
org_id = create_org_response.id
Retrieving information of an organization
You can retrieve information of an organization that has been created by specifying the org
id.
client.orgs.GetOrg(
org.GetOrgRequest(
id='id_of_org'
)
)
Updating information for an organization
You can also update the name and description for an exisiting organization.
client.orgs.UpdateOrg(
org.UpdateOrgRequest(
id='id_of_updated_org',
name='Updated Org',
description='This org has been updated',
logo_url='url_of_logo_if_available'
)
)
Deleting an organization
If an organization is no longer needed, you can remove it by specifying the org
id.
client.orgs.DeleteOrg(
org.DeleteOrgRequest(
id='id_of_deleted_org'
)
)
Listing organizations for a user
For a particular user, you can list all the organizations that this user are associated with by specifying the user id.
client.orgs.ListOrgs(
org.ListUserOrgsRequest(
user_id='id_of_user'
)
)
Here if user_id
is omitted or set to None
, the above code returns the list of organizations associated with the current user.
Listing users that can access an organization
Similarly, you can list all the users who can access to an organization by proving the org
id.
client.orgs.ListOrgUsers(
org.ListOrgUsersRequest(
id='id_of_org'
)
)
Adding a user to an organization
By specifying the id and role of an existing user in the platform, you can add the user into your organization.
client.orgs.CreateOrgUser(
org.CreateOrgUserRequest(
id='id_of_org',
user_id='id_of_added_user',
role_id='org-editor'
)
)
Deleting a user from an organization
Once a user does not belong to your organization, you can remove the user by specifying both ids of your organization and the user.
client.orgs.DeleteOrgUser(
org.DeleteOrgUserRequest(
id='id_of_org_that_user_can_access',
user_id='id_of_user_whose_access_to_org_is_deleted'
)
)