Transfer ownership of Databricks SQL objects

Preview

This feature is in Public Preview.

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.

  • The following examples authenticate by passing the personal access token in the HTTP header. To avoid leaking the personal access token in your shell’s command history, you can store the personal access token in a .netrc file. See Store tokens in a .netrc file and use them in curl.
  • Only an administrator can transfer ownership of a query, dashboard, or alert.

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 query 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