- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization scopes
- IAM Permissions
- RefType
- Ref
Fetches git references from a repository.
HTTP request
GET https://securesourcemanager.asia-east1.rep.googleapis.com/v1/{repository=projects/*/locations/*/repositories/*}:fetchRefs The URLs use gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
repository |
Required. The format is |
Query parameters
| Parameters | |
|---|---|
type |
Optional. The type of reference to fetch (eg. branch, tag). By default, all references are returned. |
pageSize |
Optional. Requested page size. If unspecified, a default size of 30 will be used. The maximum value is 100; values above 100 will be coerced to 100. |
pageToken |
Optional. A token identifying a page of results the server should return. |
Request body
The request body must be empty.
Response body
Response message containing a list of git references.
If successful, the response body contains data with the following structure:
| JSON representation |
|---|
{
"refs": [
{
object ( |
| Fields | |
|---|---|
refs[] |
The list of git references. |
nextPageToken |
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 repository resource:
securesourcemanager.repositories.fetch
For more information, see the IAM documentation.
RefType
The derived type of the reference (e.g., branch or tag) from the name.
| Enums | |
|---|---|
REF_TYPE_UNSPECIFIED |
Unspecified ref type. |
REF_TYPE_BRANCH |
Represents a branch. |
REF_TYPE_TAG |
Represents a tag. |
Ref
Ref represents a git reference within a repository.
| JSON representation |
|---|
{
"name": string,
"target": string,
"type": enum ( |
| Fields | |
|---|---|
name |
Identifier. Name of the git reference (e.g., 'refs/heads/foo' or 'refs/tags/v1.0'). |
target |
Output only. The target of the reference, which is a commit SHA. |
type |
Output only. The type of the reference. |