Share via


Source Providers - List Repositories

Gets a list of source code repositories.

GET https://dev.azure.com/{organization}/{project}/_apis/sourceProviders/{providerName}/repositories?api-version=7.1
GET https://dev.azure.com/{organization}/{project}/_apis/sourceProviders/{providerName}/repositories?serviceEndpointId={serviceEndpointId}&repository={repository}&resultSet={resultSet}&pageResults={pageResults}&continuationToken={continuationToken}&api-version=7.1

URI Parameters

Name In Required Type Description
organization
path True

string

The name of the Azure DevOps organization.

project
path True

string

Project ID or project name

providerName
path True

string

The name of the source provider.

api-version
query True

string

Version of the API to use. This should be set to '7.1' to use this version of the api.

continuationToken
query

string

When paging results, this is a continuation token, returned by a previous call to this method, that can be used to return the next set of repositories.

pageResults
query

boolean

If set to true, this will limit the set of results and will return a continuation token to continue the query.

repository
query

string

If specified, the vendor-specific identifier or the name of a single repository to get.

resultSet
query

ResultSet

'top' for the repositories most relevant for the endpoint. If not set, all repositories are returned. Ignored if 'repository' is set.

serviceEndpointId
query

string (uuid)

If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.

Responses

Name Type Description
200 OK

SourceRepositories

successful operation

Security

oauth2

Type: oauth2
Flow: accessCode
Authorization URL: https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
Token URL: https://app.vssps.visualstudio.com/oauth2/token?client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer

Scopes

Name Description
vso.build Grants the ability to access build artifacts, including build results, definitions, and requests, and the ability to receive notifications about build events via service hooks.

Definitions

Name Description
ResultSet

'top' for the repositories most relevant for the endpoint. If not set, all repositories are returned. Ignored if 'repository' is set.

SourceRepositories

A set of repositories returned from the source provider.

SourceRepository

Represents a repository returned from a source provider.

ResultSet

'top' for the repositories most relevant for the endpoint. If not set, all repositories are returned. Ignored if 'repository' is set.

Value Description
all

Include all repositories

top

Include most relevant repositories for user

SourceRepositories

A set of repositories returned from the source provider.

Name Type Description
continuationToken

string

A token used to continue this paged request; 'null' if the request is complete

pageLength

integer (int32)

The number of repositories requested for each page

repositories

SourceRepository[]

A list of repositories

totalPageCount

integer (int32)

The total number of pages, or '-1' if unknown

SourceRepository

Represents a repository returned from a source provider.

Name Type Description
defaultBranch

string

The name of the default branch.

fullName

string

The full name of the repository.

id

string

The ID of the repository.

name

string

The friendly name of the repository.

properties

object

sourceProviderName

string

The name of the source provider the repository is from.

url

string

The URL of the repository.