Skip to main content

Credential

View as Markdown

Get GA

GET /api/2.0/git-credentials/{id}

Gets the Git credential with the specified credential ID.

API scopes: workspace

Parameters

idint64path

The ID for the corresponding credential to access.

Example: 93488329053511

principal_idint64query

The ID of the service principal whose credentials will be modified. Only service principal managers can perform this action.

Example: 8573549053511

Response

credential_idint64

ID of the credential object in the workspace.

Example: 93488329053511

git_providerstring

The Git provider associated with the credential.

Example: gitHub

git_usernamestring

The username provided with your Git provider account and associated with the credential. For most Git providers it is only used to set the Git committer & author names for commits, however it may be required for authentication depending on your Git provider / token requirements. Required for AWS CodeCommit.

Example: testuser

namestringPublic Preview

the name of the git credential, used for identification and ease of lookup

Example: My GitHub PAT

is_default_for_providerbooleanPublic Preview

if the credential is the default for the given provider

Example: false

git_emailstring

The authenticating email associated with your Git provider user account. Used for authentication with the remote repository and also sets the author & committer identity for commits. Required for most Git providers except AWS CodeCommit. Learn more at https://docs.databricks.com/aws/en/repos/get-access-tokens-from-git-provider

Example: user@your-organization.com

List GA

GET /api/2.0/git-credentials

Lists the calling user's Git credentials.

API scopes: workspace

Parameters

principal_idint64query

The ID of the service principal whose credentials will be listed. Only service principal managers can perform this action.

Example: 8573549053511

Response

credentialsarray of object

List of credentials.

Show child attributesHide child attributes
credential_idint64

ID of the credential object in the workspace.

Example: 93488329053511

git_providerstring

The Git provider associated with the credential. One of gitHub, bitbucketCloud, gitLab, azureDevOpsServices (Azure DevOps Services, including Microsoft Entra ID authentication), gitHubEnterprise, bitbucketServer (Bitbucket Data Center), gitLabEnterpriseEdition (GitLab Self-Managed), or awsCodeCommit.

Example: gitHub

git_usernamestring

The username provided with your Git provider account and associated with the credential. For most Git providers it is only used to set the Git committer & author names for commits, however it may be required for authentication depending on your Git provider / token requirements. Required for AWS CodeCommit.

Example: testuser

namestringPublic Preview

the name of the git credential, used for identification and ease of lookup

Example: My GitHub PAT

is_default_for_providerbooleanPublic Preview

if the credential is the default for the given provider

Example: false

git_emailstring

The authenticating email associated with your Git provider user account. Used for authentication with the remote repository and also sets the author & committer identity for commits. Required for most Git providers except AWS CodeCommit. Learn more at https://docs.databricks.com/aws/en/repos/get-access-tokens-from-git-provider

Example: user@your-organization.com

Create GA

POST /api/2.0/git-credentials

Creates a Git credential entry for the user. Use the PATCH endpoint to update existing credentials, or the DELETE endpoint to delete existing credentials.

API scopes: workspace

Request body

git_providerstring

Git provider. This field is case-insensitive. The available Git providers are gitHub, bitbucketCloud, gitLab, azureDevOpsServices (Azure DevOps Services, including Microsoft Entra ID authentication), gitHubEnterprise, bitbucketServer (Bitbucket Data Center), gitLabEnterpriseEdition (GitLab Self-Managed), and awsCodeCommit.

Example: gitHub

git_usernamestring

The username provided with your Git provider account and associated with the credential. For most Git providers it is only used to set the Git committer & author names for commits, however it may be required for authentication depending on your Git provider / token requirements. Required for AWS CodeCommit.

Example: testuser

personal_access_tokenstring

The personal access token used to authenticate to the corresponding Git provider. For certain providers, support may exist for other types of scoped access tokens. Learn more.

principal_idint64

The ID of the service principal whose credentials will be modified. Only service principal managers can perform this action.

Example: 8573549053511

namestringPublic Preview

the name of the git credential, used for identification and ease of lookup

Example: My GitHub PAT

is_default_for_providerbooleanPublic Preview

if the credential is the default for the given provider

Example: false

git_emailstring

The authenticating email associated with your Git provider user account. Used for authentication with the remote repository and also sets the author & committer identity for commits. Required for most Git providers except AWS CodeCommit. Learn more at https://docs.databricks.com/aws/en/repos/get-access-tokens-from-git-provider

Example: user@your-organization.com

Response

credential_idint64

ID of the credential object in the workspace.

Example: 93488329053511

git_providerstring

The Git provider associated with the credential.

Example: gitHub

git_usernamestring

The username provided with your Git provider account and associated with the credential. For most Git providers it is only used to set the Git committer & author names for commits, however it may be required for authentication depending on your Git provider / token requirements. Required for AWS CodeCommit.

Example: testuser

namestringPublic Preview

the name of the git credential, used for identification and ease of lookup

Example: My GitHub PAT

is_default_for_providerbooleanPublic Preview

if the credential is the default for the given provider

Example: false

git_emailstring

The authenticating email associated with your Git provider user account. Used for authentication with the remote repository and also sets the author & committer identity for commits. Required for most Git providers except AWS CodeCommit. Learn more at https://docs.databricks.com/aws/en/repos/get-access-tokens-from-git-provider

Example: user@your-organization.com

Update GA

PATCH /api/2.0/git-credentials/{id}

Updates the specified Git credential.

API scopes: workspace

Parameters

idint64path

The ID for the corresponding credential to access.

Example: 93488329053511

Request body

personal_access_tokenstring

The personal access token used to authenticate to the corresponding Git provider. For certain providers, support may exist for other types of scoped access tokens. Learn more.

git_providerstring

Git provider. This field is case-insensitive. The available Git providers are gitHub, bitbucketCloud, gitLab, azureDevOpsServices (Azure DevOps Services, including Microsoft Entra ID authentication), gitHubEnterprise, bitbucketServer (Bitbucket Data Center), gitLabEnterpriseEdition (GitLab Self-Managed), and awsCodeCommit.

Example: gitHub

git_usernamestring

The username provided with your Git provider account and associated with the credential. For most Git providers it is only used to set the Git committer & author names for commits, however it may be required for authentication depending on your Git provider / token requirements. Required for AWS CodeCommit.

Example: testuser

principal_idint64

The ID of the service principal whose credentials will be modified. Only service principal managers can perform this action.

Example: 8573549053511

namestringPublic Preview

the name of the git credential, used for identification and ease of lookup

Example: My GitHub PAT

is_default_for_providerbooleanPublic Preview

if the credential is the default for the given provider

Example: false

git_emailstring

The authenticating email associated with your Git provider user account. Used for authentication with the remote repository and also sets the author & committer identity for commits. Required for most Git providers except AWS CodeCommit. Learn more at https://docs.databricks.com/aws/en/repos/get-access-tokens-from-git-provider

Example: user@your-organization.com

Delete GA

DELETE /api/2.0/git-credentials/{id}

Deletes the specified Git credential.

API scopes: workspace

Parameters

idint64path

The ID for the corresponding credential to access.

Example: 93488329053511

principal_idint64query

The ID of the service principal whose credentials will be modified. Only service principal managers can perform this action.

Example: 8573549053511