cancel
Showing results for 
Search instead for 
Did you mean: 
Community Discussions
cancel
Showing results for 
Search instead for 
Did you mean: 

Can we get notebook owner using notebook path as parameter in api ?

RahulChaubey
New Contributor II

I need to get the notebook owner using api or some other way by passing notebook path as parameter.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @RahulChaubey , Hope you are doing well! 

I understand your ask but we would like to inform you that there is no direct API to get the owner of a notebook using the notebook path in Databricks. However, you can manually check the owner of the notebook by the notebook name. You can manually go to the folder where the notebook is located and check the owner of that notebook as you can see in the below image : 

Ayushi_Suthar_0-1711951835149.png

Also as an alternative way,  you can enable audit logging: https://docs.databricks.com/en/administration-guide/account-settings/audit-log-delivery.html and once that is done, you can then track subsequent actions on notebooks: https://docs.databricks.com/en/administration-guide/account-settings/audit-logs.html#notebook

Please let me know if this helps and leave a like if this information is useful, followups are appreciated.
Kudos
Ayushi

View solution in original post

3 REPLIES 3

Kaniz
Community Manager
Community Manager

Hi @RahulChaubey , 

RahulChaubey
New Contributor II

Hi @Kaniz ,
This method will give user for the current notebook we are using to run this command but I need to get the username for the notebooks using their paths which i am getting for the running jobs using api: /api/2.1/jobs/runs/list.
I have notebook paths for multiple notebooks and i want to get the owner's username from these paths 

Hi @RahulChaubey , Hope you are doing well! 

I understand your ask but we would like to inform you that there is no direct API to get the owner of a notebook using the notebook path in Databricks. However, you can manually check the owner of the notebook by the notebook name. You can manually go to the folder where the notebook is located and check the owner of that notebook as you can see in the below image : 

Ayushi_Suthar_0-1711951835149.png

Also as an alternative way,  you can enable audit logging: https://docs.databricks.com/en/administration-guide/account-settings/audit-log-delivery.html and once that is done, you can then track subsequent actions on notebooks: https://docs.databricks.com/en/administration-guide/account-settings/audit-logs.html#notebook

Please let me know if this helps and leave a like if this information is useful, followups are appreciated.
Kudos
Ayushi

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.