Method: projects.locations.repositories.workspaces.fetchBranches

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

string

Required. The workspace resource name. Format: projects/{project}/locations/{location}/repositories/{repository}/workspaces/{workspace}

Query parameters

Parameters
filter

enum (BranchFilter)

Optional. Filter for the returned list.

pageSize

integer

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 1000; values above 1000 are coerced to 1000.

pageToken

string

Optional. Page token received from a previous workspaces.fetchBranches call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to workspaces.fetchBranches, with the exception of pageSize, must match the call that provided the page token.

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 (BranchMetadata)
    }
  ],
  "nextPageToken": string
}
Fields
branches[]

object (BranchMetadata)

The branches in the workspace.

nextPageToken

string

A token, which can be sent as pageToken to retrieve the next page. If this field is omitted, there are no subsequent pages.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloud-platform
  • https://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 (CommitLogEntry)
  }
}
Fields
branchName

string

The branch name.

lastCommit

object (CommitLogEntry)

The last commit on the branch.