Share via


Forks - List

Retrieve all forks of a repository in the collection.

GET https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryNameOrId}/forks/{collectionId}?api-version=7.1
GET https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryNameOrId}/forks/{collectionId}?includeLinks={includeLinks}&api-version=7.1

URI Parameters

Name In Required Type Description
collectionId
path True

string (uuid)

Team project collection ID.

organization
path True

string

The name of the Azure DevOps organization.

repositoryNameOrId
path True

string

The name or ID of the repository.

project
path

string

Project ID or project name

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.

includeLinks
query

boolean

True to include links.

Responses

Name Type Description
200 OK

GitRepositoryRef[]

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.code Grants the ability to read source code and metadata about commits, changesets, branches, and other version control artifacts. Also grants the ability to search code and get notified about version control events via service hooks.

Definitions

Name Description
GitRepositoryRef
ProjectState

Project state.

ProjectVisibility

Project visibility.

TeamProjectCollectionReference

Reference object for a TeamProjectCollection.

TeamProjectReference

Represents a shallow reference to a TeamProject.

GitRepositoryRef

Name Type Description
collection

TeamProjectCollectionReference

Team Project Collection where this Fork resides

id

string (uuid)

isFork

boolean

True if the repository was created as a fork

name

string

project

TeamProjectReference

Represents a shallow reference to a TeamProject.

remoteUrl

string

sshUrl

string

url

string

ProjectState

Project state.

Value Description
all

All projects regardless of state except Deleted.

createPending

Project has been queued for creation, but the process has not yet started.

deleted

Project has been deleted.

deleting

Project is in the process of being deleted.

new

Project is in the process of being created.

unchanged

Project has not been changed.

wellFormed

Project is completely created and ready to use.

ProjectVisibility

Project visibility.

Value Description
private

The project is only visible to users with explicit access.

public

The project is visible to all.

TeamProjectCollectionReference

Reference object for a TeamProjectCollection.

Name Type Description
avatarUrl

string

Collection avatar Url.

id

string (uuid)

Collection Id.

name

string

Collection Name.

url

string

Collection REST Url.

TeamProjectReference

Represents a shallow reference to a TeamProject.

Name Type Description
abbreviation

string

Project abbreviation.

defaultTeamImageUrl

string

Url to default team identity image.

description

string

The project's description (if any).

id

string (uuid)

Project identifier.

lastUpdateTime

string (date-time)

Project last update time.

name

string

Project name.

revision

integer (int64)

Project revision.

state

ProjectState

Project state.

url

string

Url to the full version of the object.

visibility

ProjectVisibility

Project visibility.