Page

token_auth = dmda.DomoTokenAuth(
    domo_instance=os.environ['DOMO_INSTANCE'],
    domo_access_token=os.environ["DOMO_ACCESS_TOKEN"],
)

page_id = 384424178

DomoPage


source

DomoPage

 DomoPage (id:int, title:str=None, top_page_id:int=None,
           parent_page_id:int=None,
           auth:domolibrary.client.DomoAuth.DomoAuth=None,
           is_locked:bool=None, collections:list=<factory>,
           owners:list=<factory>, cards:list=<factory>,
           custom_attributes:dict=<factory>, layout:domolibrary.classes.Do
           moPage_Content.PageLayout=<factory>, domo_cards:List[Any]=None,
           domo_datasets:List[Any]=None,
           Lineage:domolibrary.classes.DomoLineage.DomoLineage=None)

Domo Pages


source

DomoPages

 DomoPages (auth:domolibrary.client.DomoAuth.DomoAuth,
            pages:List[__main__.DomoPage]=None)

sample implementation of get_pages

dmic_pages = DomoPages(auth = token_auth)
(await dmic_pages.get())[0:5]
[DomoPage(id=1613954604, title='_-ST Superman-_', top_page_id=None, parent_page_id=1008358638, is_locked=False, collections=None, owners=[], cards=[], custom_attributes={}, layout={}, domo_cards=None, domo_datasets=None),
 DomoPage(id=124947681, title='1nw', top_page_id=None, parent_page_id=None, is_locked=False, collections=None, owners=[], cards=[], custom_attributes={}, layout={}, domo_cards=None, domo_datasets=None),
 DomoPage(id=1316566624, title='20210623_TRAINING_DomoStats Activity Log App', top_page_id=522373865, parent_page_id=127044793, is_locked=False, collections=None, owners=[], cards=[], custom_attributes={}, layout={}, domo_cards=None, domo_datasets=None),
 DomoPage(id=377152481, title='2023 Bowl Games', top_page_id=None, parent_page_id=1148061566, is_locked=False, collections=None, owners=[], cards=[], custom_attributes={}, layout={}, domo_cards=None, domo_datasets=None),
 DomoPage(id=1630657884, title='2023-10-24 Success Strategy - New', top_page_id=None, parent_page_id=None, is_locked=False, collections=None, owners=[], cards=[], custom_attributes={}, layout={}, domo_cards=None, domo_datasets=None)]
domo_pages = await DomoPages.get_pages(auth=token_auth, return_raw=False)
domo_pages[0:5]
[DomoPage(id=1613954604, title='_-ST Superman-_', top_page_id=None, parent_page_id=1008358638, is_locked=False, collections=None, owners=[], cards=[], custom_attributes={}, layout={}, domo_cards=None, domo_datasets=None),
 DomoPage(id=124947681, title='1nw', top_page_id=None, parent_page_id=None, is_locked=False, collections=None, owners=[], cards=[], custom_attributes={}, layout={}, domo_cards=None, domo_datasets=None),
 DomoPage(id=1316566624, title='20210623_TRAINING_DomoStats Activity Log App', top_page_id=522373865, parent_page_id=127044793, is_locked=False, collections=None, owners=[], cards=[], custom_attributes={}, layout={}, domo_cards=None, domo_datasets=None),
 DomoPage(id=377152481, title='2023 Bowl Games', top_page_id=None, parent_page_id=1148061566, is_locked=False, collections=None, owners=[], cards=[], custom_attributes={}, layout={}, domo_cards=None, domo_datasets=None),
 DomoPage(id=1630657884, title='2023-10-24 Success Strategy - New', top_page_id=None, parent_page_id=None, is_locked=False, collections=None, owners=[], cards=[], custom_attributes={}, layout={}, domo_cards=None, domo_datasets=None)]

DomoPage Cont

get_by_id


source

DomoPage.get_by_id

 DomoPage.get_by_id (page_id:str,
                     auth:domolibrary.client.DomoAuth.DomoAuth,
                     return_raw:bool=False, debug_api:bool=False,
                     include_layout:bool=False,
                     include_recursive_children:bool=True,
                     include_recursive_parents:bool=False,
                     debug_num_stacks_to_drop=2,
                     session:httpx.AsyncClient=None, id=None)
Type Default Details
page_id str
auth DomoAuth
return_raw bool False
debug_api bool False
include_layout bool False
include_recursive_children bool True if True, will drill down to all the Children. Set to False to prevent calculating children
include_recursive_parents bool False
debug_num_stacks_to_drop int 2
session AsyncClient None
id NoneType None

sample implementations of get_by_id

retrieve page without get_children_recursion

try:
    await DomoPage.get_by_id(
        page_id=page_id,
        auth=token_auth,
        return_raw=False,
        include_layout=True,
        include_recursive_children=False,
    )

except PageRetrieval_byId_Error as e:
    print(e)
with parent_page and top_page
try:
    domo_page = await DomoPage.get_by_id(
        page_id=30507758,
        auth=token_auth,
        return_raw=False,
        include_layout=True,
        include_recursive_parents=True,
        include_recursive_children=False,
    )

    print(domo_page.custom_attributes["top_page"])
    print(domo_page.custom_attributes["parent_page"])
    domo_page.custom_attributes.get("parent_hierarchy", None)

except PageRetrieval_byId_Error as e:
    print(e)
None
None

with get_children_recursion

try:
    domo_page = await DomoPage.get_by_id(
        page_id=30507758,
        auth=token_auth,
        return_raw=False,
        include_recursive_children=True,
        include_recursive_parents=False,
        debug_api = False
    )

    print([
        f"{fc['hierarchy']} - {fc['path']} : {fc['page'].title}"
        for fc in domo_page.flat_children
    ])
except dmde.DomoError as e:
    print(e)
['0 - Welcome : Welcome']

source

Page_NoAccess

 Page_NoAccess (page_id, page_title, domo_instance, function_name,
                parent_class)

base exception


source

DomoPage.test_page_access

 DomoPage.test_page_access (suppress_no_access_error:bool=False,
                            debug_api:bool=False, return_raw:bool=False,
                            session:httpx.AsyncClient=None,
                            debug_num_stacks_to_drop=2)

throws an error if user doesn’t have access to the page API returns the owners of the page

Type Default Details
suppress_no_access_error bool False suppresses error if user doesn’t have access
debug_api bool False
return_raw bool False
session AsyncClient None
debug_num_stacks_to_drop int 2

sample implementation of test_page_access

domo_page = await DomoPage.get_by_id(page_id=30507758, auth=token_auth)

res = await domo_page.test_page_access(suppress_no_access_error=True)

res.response
{'pageId': 30507758,
 'ownerId': 587894148,
 'pageName': 'Welcome',
 'owners': [{'id': 587894148,
   'type': 'USER',
   'displayName': 'Bryan Van Kampen'},
  {'id': 1814479647, 'type': 'GROUP', 'displayName': 'Admin Test'}],
 'pageAccess': True}

source

DomoPage.get_accesslist

 DomoPage.get_accesslist (auth:domolibrary.client.DomoAuth.DomoAuth=None,
                          return_raw:bool=False, debug_api:bool=False,
                          session:httpx.AsyncClient=None,
                          debug_num_stacks_to_drop=2)

sample get_accesslist

domo_page = DomoPage(id=page_id, auth=token_auth)

(await domo_page.get_accesslist(return_raw=False, debug_api=False))['domo_users'][0:5]
[DomoUser(id='1022327751', display_name='James Johnson', email_address='james.johnson@domo.com', role_id=2097317660, department=None, title=None, avatar_key='/api/content/v1/avatar/USER/1022327751', phone_number='801-864-3010', web_landing_page=None, web_mobile_landing_page=None, employee_id=None, employee_number=None, hire_date=None, reports_to=None, publisher_domain=None, subscriber_domain=None, virtual_user_id=None, created_dt=datetime.datetime(2023, 4, 7, 17, 27, 58), last_activity_dt=datetime.datetime(2024, 1, 22, 20, 51, 7, 102000), custom_attributes={'is_explicit_share': False, 'group_membership': [DomoGroup(id=49793884, name='ADM | Orientation', type='open', is_system=False, description='', custom_attributes={'is_owner': False})], 'is_owner': False}, role=None, domo_api_clients=None, domo_access_tokens=None),
 DomoUser(id='1180517272', display_name='Paige Farmer', email_address='paige.farmer@domo.com', role_id=2, department=None, title=None, avatar_key='/api/content/v1/avatar/USER/1180517272', phone_number=None, web_landing_page=None, web_mobile_landing_page=None, employee_id=None, employee_number=None, hire_date=None, reports_to=None, publisher_domain=None, subscriber_domain=None, virtual_user_id=None, created_dt=datetime.datetime(2023, 6, 6, 18, 53, 14), last_activity_dt=datetime.datetime(2024, 1, 22, 21, 29, 28, 655000), custom_attributes={'is_explicit_share': False, 'group_membership': [DomoGroup(id=49793884, name='ADM | Orientation', type='open', is_system=False, description='', custom_attributes={'is_owner': False})], 'is_owner': False}, role=None, domo_api_clients=None, domo_access_tokens=None),
 DomoUser(id='1294899258', display_name='Savannah West', email_address='savannah.west@domo.com', role_id=2, department=None, title=None, avatar_key='/api/content/v1/avatar/USER/1294899258', phone_number=None, web_landing_page=None, web_mobile_landing_page=None, employee_id=None, employee_number=None, hire_date=None, reports_to=None, publisher_domain=None, subscriber_domain=None, virtual_user_id=None, created_dt=datetime.datetime(2023, 6, 6, 18, 57, 23), last_activity_dt=datetime.datetime(2024, 1, 22, 21, 38, 26, 750000), custom_attributes={'is_explicit_share': False, 'group_membership': [DomoGroup(id=49793884, name='ADM | Orientation', type='open', is_system=False, description='', custom_attributes={'is_owner': False})], 'is_owner': False}, role=None, domo_api_clients=None, domo_access_tokens=None),
 DomoUser(id='1345408759', display_name='Alexis Lorenz (DataMaven)', email_address='DataMaven42@gmail.com', role_id=1, department='Owner', title='Major Domo Support Specialist', avatar_key='/api/content/v1/avatar/USER/1345408759', phone_number='518-496-4710', web_landing_page=None, web_mobile_landing_page=None, employee_id=None, employee_number=None, hire_date=1590156374000, reports_to='2009312032', publisher_domain=None, subscriber_domain=None, virtual_user_id=None, created_dt=datetime.datetime(2020, 5, 8, 17, 55, 20), last_activity_dt=datetime.datetime(2024, 10, 23, 15, 26, 6, 391000), custom_attributes={'is_explicit_share': True, 'group_membership': [], 'is_owner': False}, role=None, domo_api_clients=None, domo_access_tokens=None),
 DomoUser(id='1387513974', display_name='Soren Dahl', email_address='soren.dahl@domo.com', role_id=2, department=None, title=None, avatar_key='/api/content/v1/avatar/USER/1387513974', phone_number=None, web_landing_page=None, web_mobile_landing_page=None, employee_id=None, employee_number=None, hire_date=None, reports_to=None, publisher_domain=None, subscriber_domain=None, virtual_user_id=None, created_dt=datetime.datetime(2023, 6, 6, 18, 56, 13), last_activity_dt=datetime.datetime(2024, 1, 22, 21, 43, 42, 732000), custom_attributes={'is_explicit_share': False, 'group_membership': [DomoGroup(id=49793884, name='ADM | Orientation', type='open', is_system=False, description='', custom_attributes={'is_owner': False})], 'is_owner': False}, role=None, domo_api_clients=None, domo_access_tokens=None)]

sample share_page

# import domolibrary.classes.DomoGroup as dmg

dmic_groups = dmg.DomoGroups(auth=token_auth)
domo_groups = await dmic_groups.get()
domo_group=  domo_groups[0]

domo_page = DomoPage(id=page_id, auth=token_auth)

await domo_page.share(
    auth=token_auth,
    domo_groups=[domo_group],
    message=None,
    debug_api=False,
)
ResponseGetData(status=200, response='page 384424178 successfully shared with 49793884', is_success=True, parent_class=None)
try:
    print((await domo_page.get_cards()))
except dmde.DomoError as e:
    print(e)
[DomoCard(id=1975100587, title='Exit Velocity Buckets', description='', type='kpi', urn='1975100587', chart_type=None, dataset_id='4ef43af5-67e7-4b9e-bd58-c4e592aa289a', datastore_id=None, domo_collections=None, domo_source_code=None, certification=DictDot(state='NOT_CERTIFIED', adminCertified=False), owners=[DomoUser(id='1898323170', display_name='Creed Smith', email_address='creed.smith@domo.com', role_id=2, department=None, title=None, avatar_key='/api/content/v1/avatar/USER/1898323170', phone_number=None, web_landing_page=None, web_mobile_landing_page=None, employee_id=None, employee_number=None, hire_date=None, reports_to='1819752006', publisher_domain=None, subscriber_domain=None, virtual_user_id=None, created_dt=datetime.datetime(2021, 9, 10, 18, 29, 54), last_activity_dt=datetime.datetime(2024, 1, 22, 20, 30, 14, 922000), custom_attributes={}, role=DomoRole(id=2, name='Privileged', description='Full access except for editing users and settings owners', is_system_role=True, is_default_role=None, grants=[], membership_ls=[]), domo_api_clients=None, domo_access_tokens=None)]), DomoCard(id=2056437956, title='Trying Card Beast Mode', description='', type='kpi', urn='2056437956', chart_type=None, dataset_id='4ef43af5-67e7-4b9e-bd58-c4e592aa289a', datastore_id=None, domo_collections=None, domo_source_code=None, certification=DictDot(state='NOT_CERTIFIED', adminCertified=False), owners=[DomoUser(id='1898323170', display_name='Creed Smith', email_address='creed.smith@domo.com', role_id=2, department=None, title=None, avatar_key='/api/content/v1/avatar/USER/1898323170', phone_number=None, web_landing_page=None, web_mobile_landing_page=None, employee_id=None, employee_number=None, hire_date=None, reports_to='1819752006', publisher_domain=None, subscriber_domain=None, virtual_user_id=None, created_dt=datetime.datetime(2021, 9, 10, 18, 29, 54), last_activity_dt=datetime.datetime(2024, 1, 22, 20, 30, 14, 922000), custom_attributes={}, role=DomoRole(id=2, name='Privileged', description='Full access except for editing users and settings owners', is_system_role=True, is_default_role=None, grants=[], membership_ls=[]), domo_api_clients=None, domo_access_tokens=None)]), DomoCard(id=684364303, title='domo_kbs', description=None, type='kpi', urn='684364303', chart_type=None, dataset_id='04c1574e-c8be-4721-9846-c6ffa491144b', datastore_id=None, domo_collections=None, domo_source_code=None, certification=DictDot(state='NOT_CERTIFIED', adminCertified=False), owners=[DomoUser(id='1893952720', display_name='Jae Wilson1', email_address='jae@datacrew.space', role_id=810756122, department='Business Improvement', title=None, avatar_key='/api/content/v1/avatar/USER/1893952720', phone_number=None, web_landing_page=None, web_mobile_landing_page=None, employee_id=None, employee_number=None, hire_date=None, reports_to=None, publisher_domain=None, subscriber_domain=None, virtual_user_id=None, created_dt=datetime.datetime(2020, 5, 8, 17, 55, 18), last_activity_dt=datetime.datetime(2025, 1, 30, 19, 15, 22, 295000), custom_attributes={}, role=DomoRole(id=810756122, name='super_admin', description='all grants - updated on 2024-11-07', is_system_role=0, is_default_role=None, grants=[], membership_ls=[]), domo_api_clients=None, domo_access_tokens=None)]), DomoCard(id=1027750237, title='Cadell 75th Percentile Test - Chart', description='', type='kpi', urn='1027750237', chart_type=None, dataset_id='4ef43af5-67e7-4b9e-bd58-c4e592aa289a', datastore_id=None, domo_collections=None, domo_source_code=None, certification=DictDot(state='NOT_CERTIFIED', adminCertified=False), owners=[DomoUser(id='1774387618', display_name='Cadell Falconer', email_address='cadell.falconer@domo.com', role_id=2, department=None, title=None, avatar_key='/api/content/v1/avatar/USER/1774387618', phone_number=None, web_landing_page=None, web_mobile_landing_page=None, employee_id=None, employee_number=None, hire_date=None, reports_to=None, publisher_domain=None, subscriber_domain=None, virtual_user_id=None, created_dt=datetime.datetime(2021, 10, 21, 0, 45), last_activity_dt=datetime.datetime(2024, 1, 22, 20, 20, 57, 605000), custom_attributes={}, role=DomoRole(id=2, name='Privileged', description='Full access except for editing users and settings owners', is_system_role=True, is_default_role=None, grants=[], membership_ls=[]), domo_api_clients=None, domo_access_tokens=None)]), DomoCard(id=1647061204, title='Cadell 75th Percentile Test - Baseball Stats', description='We are testing descriptions', type='kpi', urn='1647061204', chart_type=None, dataset_id='4ef43af5-67e7-4b9e-bd58-c4e592aa289a', datastore_id=None, domo_collections=None, domo_source_code=None, certification=DictDot(state='NOT_CERTIFIED', adminCertified=False), owners=[DomoUser(id='1774387618', display_name='Cadell Falconer', email_address='cadell.falconer@domo.com', role_id=2, department=None, title=None, avatar_key='/api/content/v1/avatar/USER/1774387618', phone_number=None, web_landing_page=None, web_mobile_landing_page=None, employee_id=None, employee_number=None, hire_date=None, reports_to=None, publisher_domain=None, subscriber_domain=None, virtual_user_id=None, created_dt=datetime.datetime(2021, 10, 21, 0, 45), last_activity_dt=datetime.datetime(2024, 1, 22, 20, 20, 57, 605000), custom_attributes={}, role=DomoRole(id=2, name='Privileged', description='Full access except for editing users and settings owners', is_system_role=True, is_default_role=None, grants=[], membership_ls=[]), domo_api_clients=None, domo_access_tokens=None)]), DomoCard(id=1548948000, title='View of 75th Percentile Test - Baseball Stats', description='', type='kpi', urn='1548948000', chart_type=None, dataset_id='4ef43af5-67e7-4b9e-bd58-c4e592aa289a', datastore_id=None, domo_collections=None, domo_source_code=None, certification=DictDot(state='NOT_CERTIFIED', adminCertified=False), owners=[DomoUser(id='1898323170', display_name='Creed Smith', email_address='creed.smith@domo.com', role_id=2, department=None, title=None, avatar_key='/api/content/v1/avatar/USER/1898323170', phone_number=None, web_landing_page=None, web_mobile_landing_page=None, employee_id=None, employee_number=None, hire_date=None, reports_to='1819752006', publisher_domain=None, subscriber_domain=None, virtual_user_id=None, created_dt=datetime.datetime(2021, 9, 10, 18, 29, 54), last_activity_dt=datetime.datetime(2024, 1, 22, 20, 30, 14, 922000), custom_attributes={}, role=DomoRole(id=2, name='Privileged', description='Full access except for editing users and settings owners', is_system_role=True, is_default_role=None, grants=[], membership_ls=[]), domo_api_clients=None, domo_access_tokens=None)]), DomoCard(id=42181136, title='Legal Disclaimer Notice', description='', type='Text', urn='42181136', chart_type=None, dataset_id=None, datastore_id=None, domo_collections=None, domo_source_code=None, certification=DictDot(state='NOT_CERTIFIED', adminCertified=False), owners=[DomoUser(id='68216396', display_name='Elliott Leonard', email_address='egleonard88@gmail.com', role_id=1, department='Owner', title=None, avatar_key='/api/content/v1/avatar/USER/68216396', phone_number='9702198956', web_landing_page=None, web_mobile_landing_page=None, employee_id=None, employee_number=None, hire_date=None, reports_to='1741757362', publisher_domain=None, subscriber_domain=None, virtual_user_id=None, created_dt=datetime.datetime(2021, 8, 3, 20, 12, 56), last_activity_dt=datetime.datetime(2025, 1, 24, 22, 27, 42, 885000), custom_attributes={}, role=DomoRole(id=1, name='Admin', description='Full access to everything', is_system_role=True, is_default_role=None, grants=[], membership_ls=[]), domo_api_clients=None, domo_access_tokens=None)])]
try:
    print((await domo_page.get_datasets()))

except dmde.DomoError as e:
    print(e)
[DomoDataset(id='4ef43af5-67e7-4b9e-bd58-c4e592aa289a', display_type='dataset-view', data_provider_type='dataset-view', name='View of 75th Percentile Test - Baseball Stats', description='', row_count=484, column_count=11, stream_id=614, owner={'id': '1898323170', 'name': 'Creed Smith', 'type': 'USER', 'group': False}, formula={'calculation_628752ca-a54d-44c6-a24f-4f4b45c049ff': {'templateId': 1163, 'id': 'calculation_628752ca-a54d-44c6-a24f-4f4b45c049ff', 'name': 'Count of Unique Players', 'formula': 'COUNT(DISTINCT `player_id`)', 'status': 'VALID', 'dataType': 'LONG', 'persistedOnDataSource': True, 'isAggregatable': True, 'bignumber': False, 'columnPositions': [{'columnName': '`player_id`', 'columnPosition': 15}], 'variable': False}, 'calculation_9adef197-df7f-4c53-a43d-5e4308fc3567': {'templateId': 1165, 'id': 'calculation_9adef197-df7f-4c53-a43d-5e4308fc3567', 'name': '75th Percentile', 'formula': '((CASE WHEN   \n-- Row index\nROW_NUMBER() OVER(PARTITION BY `Age Bucket` ORDER BY `HR`) =\n\n-- 75th Percentile Index (by age bucket)\nFLOOR(.75*(COUNT(`player_id`) OVER(PARTITION BY `Age Bucket`)+1)) THEN `HR` END )\n\n+\n(\nCASE WHEN \n-- Row index\nROW_NUMBER() OVER(PARTITION BY `Age Bucket` ORDER BY `HR`) =\n\n-- 75th Percentile Index (by age bucket)\nCEILING(.75*(COUNT(`player_id`) OVER(PARTITION BY `Age Bucket`)+1)) THEN `HR` END \n\n) )/2', 'status': 'VALID', 'dataType': 'DECIMAL', 'persistedOnDataSource': True, 'isAggregatable': True, 'bignumber': False, 'columnPositions': [{'columnName': '`HR`', 'columnPosition': 81}, {'columnName': '`Age Bucket`', 'columnPosition': 59}, {'columnName': '`Age Bucket`', 'columnPosition': 179}, {'columnName': '`player_id`', 'columnPosition': 148}, {'columnName': '`HR`', 'columnPosition': 202}, {'columnName': '`HR`', 'columnPosition': 295}, {'columnName': '`Age Bucket`', 'columnPosition': 273}, {'columnName': '`Age Bucket`', 'columnPosition': 395}, {'columnName': '`player_id`', 'columnPosition': 364}, {'columnName': '`HR`', 'columnPosition': 418}], 'variable': False}}, Schema=DomoDataset_Schema(dataset_id='4ef43af5-67e7-4b9e-bd58-c4e592aa289a', columns=[]), Stream=DomoStream(id=614, dataset_id='4ef43af5-67e7-4b9e-bd58-c4e592aa289a', transport_description=None, transport_version=None, update_method=None, data_provider_name=None, data_provider_key=None, account_id=None, account_display_name=None, account_userid=None, has_mapping=False, configuration=[], configuration_tables=[], configuration_query=None), Tags=DomoTags(tag_ls=['file-upload-new', 'um_REPLACE', 's_file-upload-new']), PDP=<domolibrary.classes.DomoPDP.Dataset_PDP_Policies object at 0x70856630c530>, Certification=None), DomoDataset(id='4ef43af5-67e7-4b9e-bd58-c4e592aa289a', display_type='dataset-view', data_provider_type='dataset-view', name='View of 75th Percentile Test - Baseball Stats', description='', row_count=484, column_count=11, stream_id=614, owner={'id': '1898323170', 'name': 'Creed Smith', 'type': 'USER', 'group': False}, formula={'calculation_628752ca-a54d-44c6-a24f-4f4b45c049ff': {'templateId': 1163, 'id': 'calculation_628752ca-a54d-44c6-a24f-4f4b45c049ff', 'name': 'Count of Unique Players', 'formula': 'COUNT(DISTINCT `player_id`)', 'status': 'VALID', 'dataType': 'LONG', 'persistedOnDataSource': True, 'isAggregatable': True, 'bignumber': False, 'columnPositions': [{'columnName': '`player_id`', 'columnPosition': 15}], 'variable': False}, 'calculation_9adef197-df7f-4c53-a43d-5e4308fc3567': {'templateId': 1165, 'id': 'calculation_9adef197-df7f-4c53-a43d-5e4308fc3567', 'name': '75th Percentile', 'formula': '((CASE WHEN   \n-- Row index\nROW_NUMBER() OVER(PARTITION BY `Age Bucket` ORDER BY `HR`) =\n\n-- 75th Percentile Index (by age bucket)\nFLOOR(.75*(COUNT(`player_id`) OVER(PARTITION BY `Age Bucket`)+1)) THEN `HR` END )\n\n+\n(\nCASE WHEN \n-- Row index\nROW_NUMBER() OVER(PARTITION BY `Age Bucket` ORDER BY `HR`) =\n\n-- 75th Percentile Index (by age bucket)\nCEILING(.75*(COUNT(`player_id`) OVER(PARTITION BY `Age Bucket`)+1)) THEN `HR` END \n\n) )/2', 'status': 'VALID', 'dataType': 'DECIMAL', 'persistedOnDataSource': True, 'isAggregatable': True, 'bignumber': False, 'columnPositions': [{'columnName': '`HR`', 'columnPosition': 81}, {'columnName': '`Age Bucket`', 'columnPosition': 59}, {'columnName': '`Age Bucket`', 'columnPosition': 179}, {'columnName': '`player_id`', 'columnPosition': 148}, {'columnName': '`HR`', 'columnPosition': 202}, {'columnName': '`HR`', 'columnPosition': 295}, {'columnName': '`Age Bucket`', 'columnPosition': 273}, {'columnName': '`Age Bucket`', 'columnPosition': 395}, {'columnName': '`player_id`', 'columnPosition': 364}, {'columnName': '`HR`', 'columnPosition': 418}], 'variable': False}}, Schema=DomoDataset_Schema(dataset_id='4ef43af5-67e7-4b9e-bd58-c4e592aa289a', columns=[]), Stream=DomoStream(id=614, dataset_id='4ef43af5-67e7-4b9e-bd58-c4e592aa289a', transport_description=None, transport_version=None, update_method=None, data_provider_name=None, data_provider_key=None, account_id=None, account_display_name=None, account_userid=None, has_mapping=False, configuration=[], configuration_tables=[], configuration_query=None), Tags=DomoTags(tag_ls=['file-upload-new', 'um_REPLACE', 's_file-upload-new']), PDP=<domolibrary.classes.DomoPDP.Dataset_PDP_Policies object at 0x70856630f6e0>, Certification=None), DomoDataset(id='4ef43af5-67e7-4b9e-bd58-c4e592aa289a', display_type='dataset-view', data_provider_type='dataset-view', name='View of 75th Percentile Test - Baseball Stats', description='', row_count=484, column_count=11, stream_id=614, owner={'id': '1898323170', 'name': 'Creed Smith', 'type': 'USER', 'group': False}, formula={'calculation_628752ca-a54d-44c6-a24f-4f4b45c049ff': {'templateId': 1163, 'id': 'calculation_628752ca-a54d-44c6-a24f-4f4b45c049ff', 'name': 'Count of Unique Players', 'formula': 'COUNT(DISTINCT `player_id`)', 'status': 'VALID', 'dataType': 'LONG', 'persistedOnDataSource': True, 'isAggregatable': True, 'bignumber': False, 'columnPositions': [{'columnName': '`player_id`', 'columnPosition': 15}], 'variable': False}, 'calculation_9adef197-df7f-4c53-a43d-5e4308fc3567': {'templateId': 1165, 'id': 'calculation_9adef197-df7f-4c53-a43d-5e4308fc3567', 'name': '75th Percentile', 'formula': '((CASE WHEN   \n-- Row index\nROW_NUMBER() OVER(PARTITION BY `Age Bucket` ORDER BY `HR`) =\n\n-- 75th Percentile Index (by age bucket)\nFLOOR(.75*(COUNT(`player_id`) OVER(PARTITION BY `Age Bucket`)+1)) THEN `HR` END )\n\n+\n(\nCASE WHEN \n-- Row index\nROW_NUMBER() OVER(PARTITION BY `Age Bucket` ORDER BY `HR`) =\n\n-- 75th Percentile Index (by age bucket)\nCEILING(.75*(COUNT(`player_id`) OVER(PARTITION BY `Age Bucket`)+1)) THEN `HR` END \n\n) )/2', 'status': 'VALID', 'dataType': 'DECIMAL', 'persistedOnDataSource': True, 'isAggregatable': True, 'bignumber': False, 'columnPositions': [{'columnName': '`HR`', 'columnPosition': 81}, {'columnName': '`Age Bucket`', 'columnPosition': 59}, {'columnName': '`Age Bucket`', 'columnPosition': 179}, {'columnName': '`player_id`', 'columnPosition': 148}, {'columnName': '`HR`', 'columnPosition': 202}, {'columnName': '`HR`', 'columnPosition': 295}, {'columnName': '`Age Bucket`', 'columnPosition': 273}, {'columnName': '`Age Bucket`', 'columnPosition': 395}, {'columnName': '`player_id`', 'columnPosition': 364}, {'columnName': '`HR`', 'columnPosition': 418}], 'variable': False}}, Schema=DomoDataset_Schema(dataset_id='4ef43af5-67e7-4b9e-bd58-c4e592aa289a', columns=[]), Stream=DomoStream(id=614, dataset_id='4ef43af5-67e7-4b9e-bd58-c4e592aa289a', transport_description=None, transport_version=None, update_method=None, data_provider_name=None, data_provider_key=None, account_id=None, account_display_name=None, account_userid=None, has_mapping=False, configuration=[], configuration_tables=[], configuration_query=None), Tags=DomoTags(tag_ls=['file-upload-new', 'um_REPLACE', 's_file-upload-new']), PDP=<domolibrary.classes.DomoPDP.Dataset_PDP_Policies object at 0x7085662f2a50>, Certification=None), DomoDataset(id='4ef43af5-67e7-4b9e-bd58-c4e592aa289a', display_type='dataset-view', data_provider_type='dataset-view', name='View of 75th Percentile Test - Baseball Stats', description='', row_count=484, column_count=11, stream_id=614, owner={'id': '1898323170', 'name': 'Creed Smith', 'type': 'USER', 'group': False}, formula={'calculation_628752ca-a54d-44c6-a24f-4f4b45c049ff': {'templateId': 1163, 'id': 'calculation_628752ca-a54d-44c6-a24f-4f4b45c049ff', 'name': 'Count of Unique Players', 'formula': 'COUNT(DISTINCT `player_id`)', 'status': 'VALID', 'dataType': 'LONG', 'persistedOnDataSource': True, 'isAggregatable': True, 'bignumber': False, 'columnPositions': [{'columnName': '`player_id`', 'columnPosition': 15}], 'variable': False}, 'calculation_9adef197-df7f-4c53-a43d-5e4308fc3567': {'templateId': 1165, 'id': 'calculation_9adef197-df7f-4c53-a43d-5e4308fc3567', 'name': '75th Percentile', 'formula': '((CASE WHEN   \n-- Row index\nROW_NUMBER() OVER(PARTITION BY `Age Bucket` ORDER BY `HR`) =\n\n-- 75th Percentile Index (by age bucket)\nFLOOR(.75*(COUNT(`player_id`) OVER(PARTITION BY `Age Bucket`)+1)) THEN `HR` END )\n\n+\n(\nCASE WHEN \n-- Row index\nROW_NUMBER() OVER(PARTITION BY `Age Bucket` ORDER BY `HR`) =\n\n-- 75th Percentile Index (by age bucket)\nCEILING(.75*(COUNT(`player_id`) OVER(PARTITION BY `Age Bucket`)+1)) THEN `HR` END \n\n) )/2', 'status': 'VALID', 'dataType': 'DECIMAL', 'persistedOnDataSource': True, 'isAggregatable': True, 'bignumber': False, 'columnPositions': [{'columnName': '`HR`', 'columnPosition': 81}, {'columnName': '`Age Bucket`', 'columnPosition': 59}, {'columnName': '`Age Bucket`', 'columnPosition': 179}, {'columnName': '`player_id`', 'columnPosition': 148}, {'columnName': '`HR`', 'columnPosition': 202}, {'columnName': '`HR`', 'columnPosition': 295}, {'columnName': '`Age Bucket`', 'columnPosition': 273}, {'columnName': '`Age Bucket`', 'columnPosition': 395}, {'columnName': '`player_id`', 'columnPosition': 364}, {'columnName': '`HR`', 'columnPosition': 418}], 'variable': False}}, Schema=DomoDataset_Schema(dataset_id='4ef43af5-67e7-4b9e-bd58-c4e592aa289a', columns=[]), Stream=DomoStream(id=614, dataset_id='4ef43af5-67e7-4b9e-bd58-c4e592aa289a', transport_description=None, transport_version=None, update_method=None, data_provider_name=None, data_provider_key=None, account_id=None, account_display_name=None, account_userid=None, has_mapping=False, configuration=[], configuration_tables=[], configuration_query=None), Tags=DomoTags(tag_ls=['file-upload-new', 'um_REPLACE', 's_file-upload-new']), PDP=<domolibrary.classes.DomoPDP.Dataset_PDP_Policies object at 0x708566c90650>, Certification=None), DomoDataset(id='4ef43af5-67e7-4b9e-bd58-c4e592aa289a', display_type='dataset-view', data_provider_type='dataset-view', name='View of 75th Percentile Test - Baseball Stats', description='', row_count=484, column_count=11, stream_id=614, owner={'id': '1898323170', 'name': 'Creed Smith', 'type': 'USER', 'group': False}, formula={'calculation_628752ca-a54d-44c6-a24f-4f4b45c049ff': {'templateId': 1163, 'id': 'calculation_628752ca-a54d-44c6-a24f-4f4b45c049ff', 'name': 'Count of Unique Players', 'formula': 'COUNT(DISTINCT `player_id`)', 'status': 'VALID', 'dataType': 'LONG', 'persistedOnDataSource': True, 'isAggregatable': True, 'bignumber': False, 'columnPositions': [{'columnName': '`player_id`', 'columnPosition': 15}], 'variable': False}, 'calculation_9adef197-df7f-4c53-a43d-5e4308fc3567': {'templateId': 1165, 'id': 'calculation_9adef197-df7f-4c53-a43d-5e4308fc3567', 'name': '75th Percentile', 'formula': '((CASE WHEN   \n-- Row index\nROW_NUMBER() OVER(PARTITION BY `Age Bucket` ORDER BY `HR`) =\n\n-- 75th Percentile Index (by age bucket)\nFLOOR(.75*(COUNT(`player_id`) OVER(PARTITION BY `Age Bucket`)+1)) THEN `HR` END )\n\n+\n(\nCASE WHEN \n-- Row index\nROW_NUMBER() OVER(PARTITION BY `Age Bucket` ORDER BY `HR`) =\n\n-- 75th Percentile Index (by age bucket)\nCEILING(.75*(COUNT(`player_id`) OVER(PARTITION BY `Age Bucket`)+1)) THEN `HR` END \n\n) )/2', 'status': 'VALID', 'dataType': 'DECIMAL', 'persistedOnDataSource': True, 'isAggregatable': True, 'bignumber': False, 'columnPositions': [{'columnName': '`HR`', 'columnPosition': 81}, {'columnName': '`Age Bucket`', 'columnPosition': 59}, {'columnName': '`Age Bucket`', 'columnPosition': 179}, {'columnName': '`player_id`', 'columnPosition': 148}, {'columnName': '`HR`', 'columnPosition': 202}, {'columnName': '`HR`', 'columnPosition': 295}, {'columnName': '`Age Bucket`', 'columnPosition': 273}, {'columnName': '`Age Bucket`', 'columnPosition': 395}, {'columnName': '`player_id`', 'columnPosition': 364}, {'columnName': '`HR`', 'columnPosition': 418}], 'variable': False}}, Schema=DomoDataset_Schema(dataset_id='4ef43af5-67e7-4b9e-bd58-c4e592aa289a', columns=[]), Stream=DomoStream(id=614, dataset_id='4ef43af5-67e7-4b9e-bd58-c4e592aa289a', transport_description=None, transport_version=None, update_method=None, data_provider_name=None, data_provider_key=None, account_id=None, account_display_name=None, account_userid=None, has_mapping=False, configuration=[], configuration_tables=[], configuration_query=None), Tags=DomoTags(tag_ls=['file-upload-new', 'um_REPLACE', 's_file-upload-new']), PDP=<domolibrary.classes.DomoPDP.Dataset_PDP_Policies object at 0x708566c93020>, Certification=None), DomoDataset(id='04c1574e-c8be-4721-9846-c6ffa491144b', display_type='domo-jupyterdata', data_provider_type='domo-jupyterdata', name='domo_kbs', description=None, row_count=1185, column_count=7, stream_id=825, owner={'id': '1893952720', 'name': 'Jae Wilson1', 'type': 'USER', 'group': False}, formula={'calculation_ca9d4b1c-f73a-4f76-9f94-d3c4ca6871c5': {'templateId': 2664, 'id': 'calculation_ca9d4b1c-f73a-4f76-9f94-d3c4ca6871c5', 'name': 'rowcount', 'formula': 'sum(1)', 'status': 'VALID', 'dataType': 'LONG', 'persistedOnDataSource': True, 'isAggregatable': True, 'bignumber': False, 'variable': False}, 'calculation_38846559-d190-4ab1-809b-bcd361db5670': {'templateId': 2665, 'id': 'calculation_38846559-d190-4ab1-809b-bcd361db5670', 'name': 'max_views', 'formula': 'max(views)', 'status': 'VALID', 'dataType': 'LONG', 'persistedOnDataSource': True, 'isAggregatable': True, 'bignumber': False, 'columnPositions': [{'columnName': 'views', 'columnPosition': 4}], 'variable': False}}, Schema=DomoDataset_Schema(dataset_id='04c1574e-c8be-4721-9846-c6ffa491144b', columns=[]), Stream=DomoStream(id=825, dataset_id='04c1574e-c8be-4721-9846-c6ffa491144b', transport_description=None, transport_version=None, update_method=None, data_provider_name=None, data_provider_key=None, account_id=None, account_display_name=None, account_userid=None, has_mapping=False, configuration=[], configuration_tables=[], configuration_query=None), Tags=DomoTags(tag_ls=['developer_documentation', 'hackercore']), PDP=<domolibrary.classes.DomoPDP.Dataset_PDP_Policies object at 0x708566c907a0>, Certification=None)]

Sample update page layout by background color

try:
    domo_page = await DomoPage.get_by_id(
        page_id=page_id, auth=token_auth, return_raw=False, include_layout=True
    )

    body = domo_page.layout.get_body()

    if not hasattr(body, "background"):
        new_background_body = dmpg_c.PageLayout.generate_new_background_body()
        body["background"] = new_background_body

    body["background"]["selectedColor"] = "#FF0000"

    print((await DomoPage.update_layout(auth=token_auth, body=body, layout_id=domo_page.layout.id)))

except dmde.DomoError as e:
    print(e)
🛑  CRUD_Page_Error 🛑 - function: get_traceback || status 400 || unable to update layout 302522863 at domo-community

Sample implementation of add_page_owner

await token_auth.who_am_i()
domo_users = await dmdu.DomoUsers.all_users(auth = token_auth)

await domo_page.add_owner( group_id_ls=[], user_id_ls=[token_auth.user_id]
)
ResponseGetData(status=200, response='successfully added owners to pages 384424178', is_success=True, parent_class=None)