Transfer ownership of Databricks SQL objects

This article shows how to transfer ownership of a dashboard, query, or alert using the Permissions REST API.

Requirements

Important

To access Databricks REST APIs, you must authenticate.

Transfer ownership of a dashboard

curl --request POST \
  --url https://<base-url>/api/2.0/preview/sql/permissions/dashboard/<dashboard-uid>/transfer \
  --header 'Authorization: Bearer <api-key>' \
  --data '{"new_owner": "<new-owner-email>"}'

Replace the placeholders as follows:

  • <base-url>: the URL of your workspace
  • <dashboard-uuid>: the unique ID of the dashboard. To find the dashboard’s ID, open the dashboard and copy the value after /dashboards/ and before o=.
  • <new-owner-email>: the email address of the new owner
  • <api-key>: your personal access token

Transfer ownership of a query

curl --request POST \
  --url https://<base-url>/api/2.0/preview/sql/permissions/query/<query-uid>/transfer \
  --header 'Authorization: Bearer <api-key>' \
  --data '{"new_owner": "<new-owner-email>"}'

Replace the placeholders as follows:

  • <base-url>: the URL of your workspace
  • <query-uuid>: the unique ID of the dashboard. To find the query’s ID, open the query in the SQL editor and copy the value after /queries/ and before o=.
  • <new-owner-email>: the email address of the new owner
  • <api-key>: your personal access token

Transfer ownership of an alert

curl --request POST \
  --url https://<base-url>/api/2.0/preview/sql/permissions/alert/<alert-uid>/transfer \
  --header 'Authorization: Bearer <api-key>' \
  --data '{"new_owner": "<new-owner-email>"}'

Replace the placeholders as follows:

  • <base-url>: the URL of your workspace
  • <alert-uuid>: the unique ID of the dashboard. To find the alert’s ID, open the alert and copy the value after /alerts/ and before o=.
  • <new-owner-email>: the email address of the new owner. The new owner must be an administrator.
  • <api-key>: your personal access token