- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization scopes
- IAM Permissions
- BranchFilter
- BranchMetadata
- Try it!
Fetches branches in a workspace.
HTTP request
GET https://dataform.googleapis.com/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchBranches The URLs use gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
name |
Required. The workspace resource name. Format: |
Query parameters
| Parameters | |
|---|---|
filter |
Optional. Filter for the returned list. |
pageSize |
Optional. Maximum number of branches to return. The server may return fewer items than requested. If unspecified, the server picks an appropriate default. The maximum value is |
pageToken |
Optional. Page token received from a previous When paginating, all other parameters provided to |
Request body
The request body must be empty.
Response body
Response message for workspaces.fetchBranches method.
If successful, the response body contains data with the following structure:
| JSON representation |
|---|
{
"branches": [
{
object ( |
| Fields | |
|---|---|
branches[] |
The branches in the workspace. |
nextPageToken |
A token, which can be sent as |
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/cloud-platformhttps://www.googleapis.com/auth/bigquery
For more information, see the Authentication Overview.
IAM Permissions
Requires the following IAM permission on the name resource:
dataform.workspaces.fetchBranches
For more information, see the IAM documentation.
BranchFilter
Filter for the returned list.
| Enums | |
|---|---|
BRANCH_FILTER_UNSPECIFIED |
Default value. If unspecified, LOCAL_ONLY is used. |
LOCAL_ONLY |
Returns local branches. |
REMOTE_ONLY |
Returns remote branches. |
ALL |
Returns all branches. |
BranchMetadata
Contains metadata about a branch.
| JSON representation |
|---|
{
"branchName": string,
"lastCommit": {
object ( |
| Fields | |
|---|---|
branchName |
The branch name. |
lastCommit |
The last commit on the branch. |