Method: projects.locations.repositories.workspaces.searchFiles

Finds the contents of a given Workspace directory by filter.

HTTP request

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

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.searchFiles

Query parameters

Parameters
pageSize

integer

Optional. Maximum number of search results to return. The server may return fewer items than requested. If unspecified, the server will pick an appropriate default.

pageToken

string

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

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

filter

string

Optional. Optional filter for the returned list in filtering format. Filtering is only currently supported on the path field. See https://google.aip.dev/160 for details.

Request body

The request body must be empty.

Response body

Client-facing representation of a file search response.

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

JSON representation
{
  "searchResults": [
    {
      object (SearchResult)
    }
  ],
  "nextPageToken": string
}
Fields
searchResults[]

object (SearchResult)

List of matched results.

nextPageToken

string

Optional. 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 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.searchFiles

For more information, see the IAM documentation.

SearchResult

Client-facing representation of a search result entry.

JSON representation
{

  // Union field entry can be only one of the following:
  "file": {
    object (FileSearchResult)
  },
  "directory": {
    object (DirectorySearchResult)
  }
  // End of list of possible types for union field entry.
}
Fields

Union field entry.

entry can be only one of the following:

file

object (FileSearchResult)

Details when search result is a file.

directory

object (DirectorySearchResult)

Details when search result is a directory.

FileSearchResult

Client-facing representation of a file entry in search results.

JSON representation
{
  "path": string
}
Fields
path

string

File system path relative to the workspace root.

DirectorySearchResult

Client-facing representation of a directory entry in search results.

JSON representation
{
  "path": string
}
Fields
path

string

File system path relative to the workspace root.