Edit

Share via


Workspaces - List Git Connections

Returns a list of Git connections.

Note

This API is part of a Preview release and is provided for evaluation and development purposes only. It may change based on feedback and is not recommended for production use.

This API supports pagination. A maximum of 1,000 records can be returned per request. With the continuous token provided in the response, you can get the next 1,000 records.

Permissions

The caller must be a Fabric administrator or authenticate using a service principal.

Required Delegated Scopes

Tenant.Read.All or Tenant.ReadWrite.All

Limitations

Maximum 25 requests per minute.

Microsoft Entra supported identities

This API supports the Microsoft identities listed in this section.

Identity Support
User Yes
Service principal and Managed identities Yes

Interface

GET https://api.fabric.microsoft.com/v1/admin/workspaces/discoverGitConnections
GET https://api.fabric.microsoft.com/v1/admin/workspaces/discoverGitConnections?continuationToken={continuationToken}

URI Parameters

Name In Required Type Description
continuationToken
query

string

A token for retrieving the next page of results.

Responses

Name Type Description
200 OK

GitConnections

The operation was successful.

429 Too Many Requests

ErrorResponse

The service rate limit was exceeded. The server returns a Retry-After header indicating, in seconds, how long the client must wait before sending additional requests.

Headers

Retry-After: integer

Other Status Codes

ErrorResponse

Common error codes:

  • InsufficientPrivileges - The caller doesn't have permissions to call the API.

Examples

Get a list of Git connections for tenant example

Sample request

GET https://api.fabric.microsoft.com/v1/admin/workspaces/discoverGitConnections

Sample response

{
  "value": [
    {
      "workspaceId": "41ce06d1-d81b-4ea0-bc6d-2ce3dd2f8e87",
      "gitProviderDetails": {
        "organizationName": "Test Organization",
        "projectName": "Test Project",
        "gitProviderType": "AzureDevOps",
        "repositoryName": "Test Repo",
        "branchName": "Test Branch",
        "directoryName": "/Test Directory"
      }
    },
    {
      "workspaceId": "17d8929d-ab32-46d1-858b-fdea74e93bf2",
      "gitProviderDetails": {
        "ownerName": "Test Owner",
        "gitProviderType": "GitHub",
        "repositoryName": "Test Repo",
        "branchName": "Test Branch",
        "directoryName": "/"
      }
    },
    {
      "workspaceId": "e2c1a8b2-1234-4e56-9876-abcdef123456",
      "gitProviderDetails": {
        "ownerName": "Enterprise Org",
        "customDomainName": "my-enterprise.ghe.com",
        "gitProviderType": "GitHub",
        "repositoryName": "Enterprise Repo",
        "branchName": "main",
        "directoryName": "/Enterprise/Dir"
      }
    }
  ],
  "continuationUri": "https://api.fabric.microsoft.com/v1/admin/workspaces/discoverGitConnections?continuationToken=eyJMYXN0U2VlbkNvbm5lY3Rpb25JZCI6NX0=",
  "continuationToken": "eyJMYXN0U2VlbkNvbm5lY3Rpb25JZCI6NX0="
}

Definitions

Name Description
AzureDevOpsDetails

Azure DevOps provider details.

ErrorRelatedResource

The error related resource details object.

ErrorResponse

The error response.

ErrorResponseDetails

The error response details.

GitConnectionDetails

Represents the details of a Git connection for a workspace.

GitConnections

A response wrapper for a list of all the Git connections for a given tenant with a continuous token.

GitHubDetails

GitHub provider details.

GitProviderType

A Git provider type. Additional provider types may be added over time.

AzureDevOpsDetails

Azure DevOps provider details.

Name Type Description
branchName

string

maxLength: 250

The branch name. Maximum length is 250 characters.

directoryName

string

maxLength: 256

The relative path to the directory. Maximum length is 256 characters.

gitProviderType string:

AzureDevOps

A Git provider type. Additional provider types may be added over time.

organizationName

string

maxLength: 100

The organization name. Maximum length is 100 characters.

projectName

string

maxLength: 100

The project name. Maximum length is 100 characters.

repositoryName

string

maxLength: 128

The repository name. Maximum length is 128 characters.

ErrorRelatedResource

The error related resource details object.

Name Type Description
resourceId

string

The resource ID that's involved in the error.

resourceType

string

The type of the resource that's involved in the error.

ErrorResponse

The error response.

Name Type Description
errorCode

string

A specific identifier that provides information about an error condition, allowing for standardized communication between our service and its users.

message

string

A human readable representation of the error.

moreDetails

ErrorResponseDetails[]

List of additional error details.

relatedResource

ErrorRelatedResource

The error related resource details.

requestId

string (uuid)

ID of the request associated with the error.

ErrorResponseDetails

The error response details.

Name Type Description
errorCode

string

A specific identifier that provides information about an error condition, allowing for standardized communication between our service and its users.

message

string

A human readable representation of the error.

relatedResource

ErrorRelatedResource

The error related resource details.

GitConnectionDetails

Represents the details of a Git connection for a workspace.

Name Type Description
gitProviderDetails GitProviderDetails:

The provider details.

workspaceId

string (uuid)

The workspace ID.

GitConnections

A response wrapper for a list of all the Git connections for a given tenant with a continuous token.

Name Type Description
continuationToken

string

The token for the next result set batch. If there are no more records, it's removed from the response.

continuationUri

string

The URI of the next result set batch. If there are no more records, it's removed from the response.

value

GitConnectionDetails[]

The list of Git connections for a given tenant.

GitHubDetails

GitHub provider details.

Name Type Description
branchName

string

maxLength: 250

The branch name. Maximum length is 250 characters.

customDomainName

string

maxLength: 100

Note

Support for GitHub Enterprise with Data residency (ghe.com) is currently in Preview.(learn more).

The name of the enterprise github domain if it's not github.com. Only GitHub Enterprise with data residency domains (ghe.com) are supported. Maximum length is 100 characters.

directoryName

string

maxLength: 256

The relative path to the directory. Maximum length is 256 characters.

gitProviderType string:

GitHub

A Git provider type. Additional provider types may be added over time.

ownerName

string

maxLength: 100

The owner name. Maximum length is 100 characters.

repositoryName

string

maxLength: 128

The repository name. Maximum length is 128 characters.

GitProviderType

A Git provider type. Additional provider types may be added over time.

Value Description
AzureDevOps

Azure DevOps provider

GitHub

GitHub provider