Method: projects.locations.connections.gitRepositoryLinks.fetchGitRefs

Fetch the list of branches or tags for a given repository.

HTTP request

GET https://developerconnect.googleapis.com/v1/{gitRepositoryLink=projects/*/locations/*/connections/*/gitRepositoryLinks/*}:fetchGitRefs

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters

Query parameters

Parameters
refType

enum (RefType)

Required. Type of refs to fetch.

pageSize

integer

Optional. Number of results to return in the list. Default to 20.

pageToken

string

Optional. Page start.

Request body

The request body must be empty.

Response body

Response for fetching git refs.

If successful, the response body contains data with the following structure:

JSON representation
{
  "refNames": [
    string
  ],
  "nextPageToken": string
}
Fields
refNames[]

string

Name of the refs fetched.

nextPageToken

string

A token identifying a page of results the server should return.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the gitRepositoryLink resource:

  • developerconnect.gitRepositoryLinks.fetchGitRefs

For more information, see the IAM documentation.

RefType

Type of refs.

Enums
REF_TYPE_UNSPECIFIED No type specified.
TAG To fetch tags.
BRANCH To fetch branches.