- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization scopes
- IAM Permissions
- RefType
- Try it!
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 | |
---|---|
git |
Required. The resource name of GitRepositoryLink in the format |
Query parameters
Parameters | |
---|---|
ref |
Required. Type of refs to fetch. |
page |
Optional. Number of results to return in the list. Default to 20. |
page |
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 | |
---|---|
ref |
Name of the refs fetched. |
next |
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. |