Method: projects.locations.repositories.workspaces.fetchFileDiff

Fetches Git diff for an uncommitted file in a Workspace.

HTTP request

GET https://dataform.googleapis.com/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileDiff

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
workspace

string

Required. The workspace's name.

Authorization requires the following IAM permission on the specified resource workspace:

  • dataform.workspaces.fetchFileDiff

Query parameters

Parameters
path

string

Required. The file's full path including filename, relative to the workspace root.

Request body

The request body must be empty.

Response body

workspaces.fetchFileDiff response message.

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

JSON representation
{
  "formattedDiff": string
}
Fields
formattedDiff

string

The raw formatted Git diff for the file.

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 workspace resource:

  • dataform.workspaces.fetchFileDiff

For more information, see the IAM documentation.