cancel
Showing results for 
Search instead for 
Did you mean: 
Administration & Architecture
Explore discussions on Databricks administration, deployment strategies, and architectural best practices. Connect with administrators and architects to optimize your Databricks environment for performance, scalability, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 

Creating Groups with API and Python

Derek_Czarny
New Contributor III

I am working on a notebook to help me create Azure Databricks Groups.  When I create a group in a workspace using the UI, it automatically creates the group at the account level and links them.  When I create a group using the API, and I create the workspace group, it creates it as a local group to the workspace.  Using a different API, I was able to create the group at the account level.  I have not found the API so I can do the exact same thing that happens in the UI.  Any suggestions?  

1 ACCEPTED SOLUTION

Accepted Solutions

szymon_dybczak
Contributor III

Hi @Derek_Czarny ,

Unfortunately, there is no single endpoint that replicates what you can do in the UI. But you can achieve the same with following approach:

- create group at account level using below endpoint:

https://docs.databricks.com/api/account/accountgroups/create

- associate this group with workspace using below endpoint

https://docs.databricks.com/api/account/workspaceassignment/update

View solution in original post

5 REPLIES 5

szymon_dybczak
Contributor III

Hi @Derek_Czarny ,

Unfortunately, there is no single endpoint that replicates what you can do in the UI. But you can achieve the same with following approach:

- create group at account level using below endpoint:

https://docs.databricks.com/api/account/accountgroups/create

- associate this group with workspace using below endpoint

https://docs.databricks.com/api/account/workspaceassignment/update

Derek_Czarny
New Contributor III

I am finally able to circle back to this.  I can create the account group just fine.  When I go to create the workspace group, I keep getting an error message:

Response: {"error_code":"ENDPOINT_NOT_FOUND","message":"No API found for 'POST /accounts/[REDACTED]/workspaces/[REDACTED]/permissionassignments/principals/[REDACTED]'"

 

Hi @Derek_Czarny ,

I guess you're using wrong http method. You should use PUT method instead POST.

Derek_Czarny
New Contributor III

That was it, thank you.  I was looking at the wrong details.  I really appreciate it.

Cool, I'm happy that it worked for you

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group