- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2022 08:42 AM
I'm looking to automate the creation of Top Level repositories in Databricks however isn't possible using cli or API if this repo is private repository(Azure DevOps Repository) because require setup the token in user setting.
databricks repos create \
--url https://<orgname>:<PAT_token>@dev.azure.com/<orgname>/<projectname>/_git/<reponame>; \
--provider azureDevOpsServices \
--path /Repos/Repository/<reponame> \
--debug
That's a problem because use a git command like git clone with the same structure works without problems.
git clone https://<orgname>:<PAT_token>@dev.azure.com/<orgname>/<projectname>/_git/<reponame>;
Someone with any idea to solve this challenge?
- Labels:
-
AzureDevopsRepo
-
Git Repo
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2022 06:31 AM
We have API availabe for repos https://docs.databricks.com/dev-tools/api/latest/repos.html#operation/get-repos also we are currently supporting SP.
Step 1: As an admin Create a Service Principal
Use this API SCIM API 2.0 (ServicePrincipals) | Databricks on AWS
Related doc: https://docs.databricks.com/administration-guide/users-groups/service-principals.html
Step 2: As an admin create a Databricks token on behalf of the Service Principal
Use this API:
Token Management API 2.0 | Databricks on AWS
Related doc: https://docs.databricks.com/administration-guide/users-groups/service-principals.html
Step 3: Using the Service Principal Databricks Token call the Git Credentials API
Add the Git token via this API: Git Credentials API 2.0 | Databricks on AWS
Step 4: Invoke Repos APIs as service principal using the SPNs Databricks Token
Related stackoverflow questions: Databricks REST API call for updating branch error : User Settings > Git Integration to set up an Az...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2022 03:04 AM
Thanks @Kaniz Fatma , I don't have problem creating PAT, the issue it's create the repo in databricks including the PAT.
PD: Take the consideration I don't wanna use Databricks user setting because everything it's deployed by command line.
Regards,
Luis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2022 06:31 AM
We have API availabe for repos https://docs.databricks.com/dev-tools/api/latest/repos.html#operation/get-repos also we are currently supporting SP.
Step 1: As an admin Create a Service Principal
Use this API SCIM API 2.0 (ServicePrincipals) | Databricks on AWS
Related doc: https://docs.databricks.com/administration-guide/users-groups/service-principals.html
Step 2: As an admin create a Databricks token on behalf of the Service Principal
Use this API:
Token Management API 2.0 | Databricks on AWS
Related doc: https://docs.databricks.com/administration-guide/users-groups/service-principals.html
Step 3: Using the Service Principal Databricks Token call the Git Credentials API
Add the Git token via this API: Git Credentials API 2.0 | Databricks on AWS
Step 4: Invoke Repos APIs as service principal using the SPNs Databricks Token
Related stackoverflow questions: Databricks REST API call for updating branch error : User Settings > Git Integration to set up an Az...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2022 02:44 PM
Hi @Luis Arias,
Just a friendly follow-up. Did Atanu's response help you to resolved your question? please let us know

