Shimoku docs
Search…
Managing Businesses
Businesses are created inside a Universe. Any number of Businesses can be created.
A Business has a set of suites that can be viewed by an admin user and an unlimited number of viewer users. Managing Businesses with Shimoku’s SDK goes as follows:
The shimoku.business object has the following methods:
  • get_business(business_id: str) to retrieve business data
  • get_universe_businesses() to retrieve all the businesses of a universe
  • _find_business_by_name_filter(name: Optional[str]) to find business by name
  • create_business(name: str) to create a new business in your universe owned by the user owner_id and with name
  • update_business(business_id: str, business_data: Dict) to update the data of a business. You are allowed only to change the name field in the business case.
  • get_business_apps(business_id: str) to retrieve in cascade all suites (apps) that belong to a business.
  • get_business_app_ids(business_id: str) to retrieve in cascade all suites id (app_id) that belong to a business.
  • get_business_all_apps_with_filter(business_id: str, app_filter: Dict) to retrieve (filter) all the apps of a business
  • delete_business(business_id: str) to delete permanently a business in cascade with all the suites, paths and reports it contains.
  • rename_business(business_id: str, new_name: str) Change the name of a business

The Methods

1. get_business()

business Dict[str, Any] = shimoku.business.get_business(business_id)
That returns a dictionary such as:
business = {
'id': 'f74gh9', # business uuid
'name': 'Ikea', # business name
'owner': '38c7f', # user uuid
'createdAt': '2021-01-01',
'updatedAt '2021-09-24',
}

2. get_business_apps

apps: List[Dict[str, Any]] = shimoku.business.get_business_apps(business_id)
That returns a dictionary such as:
apps = [
{
'id': 'aaaa1' # business uuid
'owner': '38c7f', # user uuid
'createdAt': '2021-01-01',
'updatedAt '2021-09-24',
...
},
{
'id': 'bbbb1' # business uuid
'owner': '38c7f # user uuid
'createdAt': '2021-01-01',
'updatedAt '2021-09-24',
...
},
]

3. get_business_app_ids

app_ids: List[int] = shimoku.business.get_business_app_ids(business_id)
That returns a dictionary such as:
# This business contains 3 suites
app_ids = [
'a19f1', # a Suite UUID
'920a0', # another Suite UUID
'c5d1d', # another Suite UUID
]
Such as in:

4. create_business

business: Dict = shimoku.business.create_business(name)
That returns the business created:
business = {
'id': 'f74gh9', # business uuid
'name': 'Ikea', # business name
'owner': '38c7f', # user uuid
'createdAt': '2021-01-01',
'updatedAt '2021-09-24',
}

5. update_business

business: Dict = shimoku.business.update_business(business_id, business_data)
Where business_data is a dictionary such as:
business_data = {'name': 'NEW NAME'}
That returns the business created:
business = {
'id': 'f74gh9', # business uuid
'name': 'NEW NAME', # updated business name
'owner': '38c7f', # user uuid
'createdAt': '2021-01-01',
'updatedAt '2021-09-24',
}
The only field that can be updated for business is actually the field name

6. rename_business

business: Dict = shimoku.business.rename_business(business_id, new_name)
Where new_name is a string such as:
new_name = 'NEW NAME'
That returns the business created:
business = {
'id': 'f74gh9', # business uuid
'name': 'NEW NAME', # updated business name
'owner': '38c7f', # user uuid
'createdAt': '2021-01-01',
'updatedAt '2021-09-24',
}

The updated name will be available on the Settings page of the Front-End

7. delete_business

shimoku.business.delete_business(business_id)
It will remove in cascade all data, reports, apps (suites) before remove the business
Copy link
On this page
The Methods
1. get_business()
2. get_business_apps
3. get_business_app_ids
4. create_business
5. update_business
6. rename_business
7. delete_business