Govern Custom Pages Handler#

Admins can manage custom pages.

Retrieve the definition of a custom page#

import dataikuapi

host = "http(s)://GOVERN_HOST:GOVERN_PORT"
apiKey = "Your API key secret"
client = dataikuapi.GovernClient(host, apiKey)

# retrieve the custom pages handler
custom_pages_handler = client.get_custom_pages_handler()

# get a custom page by its ID
custom_page = custom_pages_handler.get_custom_page('cp.cust_page_1')

# get its definition
custom_page_def = custom_page.get_definition()

# print its definition
print(custom_page_def.get_raw())

# retrieve custom pages order
order = custom_pages_handler.get_order()

# update custom pages order
order = custom_pages_handler.save_order(["cp.id1", "cp.id2"])

Reference documentation#

dataikuapi.govern.admin_custom_pages_handler.GovernAdminCustomPagesHandler(client)

Handle to edit the custom pages Do not create this directly, use get_custom_pages_handler()

dataikuapi.govern.admin_custom_pages_handler.GovernAdminCustomPageListItem(...)

An item in a list of custom pages.

dataikuapi.govern.admin_custom_pages_handler.GovernAdminCustomPage(...)

A handle to interact with a custom page as an administrator.

dataikuapi.govern.admin_custom_pages_handler.GovernAdminCustomPageDefinition(...)

The definition of a custom page.