databricksdatabricks-reposdatabricks-rest-api

Databricks Api: set Permissions for all Repos


The databricks docu allows to set permissions for specific repos such as:

PATCH /api/2.0/permissions/repos/{RepoID}

I would now set the permissions for all Repos. How can I do that? Simply removing the repoID leads to an error, in the UI it is possible.


Solution

  • You can change permissions on the /Repos folder, then that permissions will be inherited from it & propagated to all repositories. You can get object ID of that folder using Get Status REST API, and then change permissions using the /api/2.0/permissions/directories/<object_id> REST endpoint.

    P.S. it's better to use Databricks Python SDK instead of using REST API directly.