Survey banner
The Dataiku Community is moving to a new home! We are temporary in read only mode: LEARN MORE

Accessing Dashboard URL using Python recipe

Varun017
Level 2
Accessing Dashboard URL using Python recipe

Hello,

I have a requirement wherein I have to get the URL of the dashboard for a given Dataiku Project through Python recipe.

How can this be done can someone please help me.

Thanks

Varun

 

 

0 Kudos
4 Replies
Turribeach

There are no built-in API methods to get the dashboard URL but this works for me:

import dataiku
client = dataiku.api_client()
project = client.get_project('some_project_key')
dss_url = client.get_general_settings().get_raw()['studioExternalUrl']
dashboards = project.list_dashboards()
for dashboard in dashboards:
    dashboard_url = dss_url + 'projects/' + project.project_key.upper() + '/dashboards/' + dashboard['id'] + '_' + urllib.parse.quote(dashboard['name']) + '/view/'
    print(dashboard_url)
0 Kudos
Varun017
Level 2
Author

Hi,

On running the code shared , I am getting the following error.

Could you please help me here.

Also for dashboard[ 'id' ] which id do we need to provide. 

It would be nice if you can please clarify on this.

Thanks,

Varun

0 Kudos

Upgrade to Dataiku v12. 

0 Kudos
Varun017
Level 2
Author

Hi,

Seems like I need admin access to run below code.

dss_url = client.get_general_settings().get_raw()['studioExternalUrl']

as I am getting below  error

DataikuException: com.dataiku.dip.exceptions.UnauthorizedException: Action forbidden, you are not admin    

 

0 Kudos