How to share objects using the Dataiku API

Turribeach
Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,088 Neuron
edited September 30 in Using Dataiku

Hi,

It appears that the settings.add_exposed_object() method is undocumented. So documenting here few examples for the benefit of others:

import dataiku

client = dataiku.api_client()
project = client.get_project(source_project_key)
settings = project.get_settings() # Share Managed Folder
settings.add_exposed_object('MANAGED_FOLDER', 'folder_id', 'destination_project_key')
settings.save() # Share Dataset
settings.add_exposed_object('DATASET', 'dataset_id', 'destination_project_key')
settings.save()

Setup Info
    Tags
      Help me…