---
title: "GET /v1/projects/{projectsId}/locations/{locationsId}:queryUserRootContents"
method: GET
path: "/v1/projects/{projectsId}/locations/{locationsId}:queryUserRootContents"
tags: ["projects"]
---

# GET /v1/projects/{projectsId}/locations/{locationsId}:queryUserRootContents

`GET /v1/projects/{projectsId}/locations/{locationsId}:queryUserRootContents`

## Request

- Base URL: `https://dataform.googleapis.com`
- URL: `https://dataform.googleapis.com/v1/projects/{projectsId}/locations/{locationsId}:queryUserRootContents`
- Auth: one of:
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/bigquery`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/bigquery`
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/cloud-platform`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/cloud-platform`

Returns the contents of a caller's root folder in a given location. The root folder contains all resources that are created by the user and not contained in any other folder.

## Path parameters

- `projectsId` string, required
- `locationsId` string, required

## Query parameters

- `filter` string
- `orderBy` string
- `pageSize` integer
- `pageToken` string

## Response `200`

Successful response

- QueryUserRootContentsResponse: `QueryUserRootContents` response message.
  - `entries` RootContentsEntry[]: List of entries in the folder.
    - `folder` Folder: Represents a Dataform Folder. This is a resource that is used to organize Files and other Folders and provide hierarchical access controls.
      - `containingFolder` string: Optional. The containing Folder resource name. This should take the format: projects/{project}/locations/{location}/folders/{folder}, projects/{project}/locations/{location}/teamFolders/{teamFolder}, or just "" if this is a root Folder. This field can only be updated through MoveFolder.
      - `createTime` string, google-datetime: Output only. The timestamp of when the Folder was created.
      - `creatorIamPrincipal` string: Output only. The IAM principal identifier of the creator of the Folder.
      - `displayName` string: Required. The Folder's user-friendly name.
      - `internalMetadata` string: Output only. All the metadata information that is used internally to serve the resource. For example: timestamps, flags, status fields, etc. The format of this field is a JSON string.
      - `name` string: Identifier. The Folder's name.
      - `teamFolderName` string: Output only. The resource name of the TeamFolder that this Folder is associated with. This should take the format: projects/{project}/locations/{location}/teamFolders/{teamFolder}. If this is not set, the Folder is not associated with a TeamFolder and is a UserFolder.
      - `updateTime` string, google-datetime: Output only. The timestamp of when the Folder was last updated.
    - `repository` Repository: Represents a Dataform Git repository.
      - `containingFolder` string: Optional. The name of the containing folder of the repository. The field is immutable and it can be modified via a MoveRepository operation. Format: `projects/*/locations/*/folders/*`. or `projects/*/locations/*/teamFolders/*`.
      - `createTime` string, google-datetime: Output only. The timestamp of when the repository was created.
      - `dataEncryptionState` DataEncryptionState: Describes encryption state of a resource.
        - `kmsKeyVersionName` string: Required. The KMS key version name with which data of a resource is encrypted.
      - `displayName` string: Optional. The repository's user-friendly name.
      - `endUserAuthConfig` EndUserAuthConfig: Includes configuration options for repository end user authentication.
        - `oauthConfig` OAuthConfig: OAuth configuration for end user authentication.
          - `additionalOauthScopes` string[]: Optional. Additional OAuth scopes to use for BigQuery executions. Scopes always in use: `https://www.googleapis.com/auth/bigquery`
      - `gitRemoteSettings` GitRemoteSettings: Controls Git remote configuration for a repository.
        - `authenticationTokenSecretVersion` string: Optional. The name of the Secret Manager secret version to use as an authentication token for Git operations. Must be in the format `projects/*/secrets/*/versions/*`.
        - `defaultBranch` string: Optional. The Git remote's default branch name. If not set, `main` will be used.
        - `effectiveDefaultBranch` string: Output only. The Git remote's effective default branch name. This is the default branch name of the Git remote if it is set, otherwise it is `main`.
        - `gitRepositoryLink` string: Optional. Resource name for the `GitRepositoryLink` used for machine credentials. Must be in the format `projects/*/locations/*/connections/*/gitRepositoryLinks/*`
        - `sshAuthenticationConfig` SshAuthenticationConfig: Configures fields for performing SSH authentication.
          - `hostPublicKey` string: Required. Content of a public SSH key to verify an identity of a remote Git host.
          - `userPrivateKeySecretVersion` string: Required. The name of the Secret Manager secret version to use as a ssh private key for Git operations. Must be in the format `projects/*/secrets/*/versions/*`.
        - `tokenStatus` 'TOKEN_STATUS_UNSPECIFIED' | 'NOT_FOUND' | 'INVALID' | 'VALID': Output only. Deprecated: The field does not contain any token status information.
        - `url` string: Required. The Git remote's URL.
      - `internalMetadata` string: Output only. All the metadata information that is used internally to serve the resource. For example: timestamps, flags, status fields, etc. The format of this field is a JSON string.
      - `kmsKeyName` string: Optional. The reference to a KMS encryption key. If provided, it will be used to encrypt user data in the repository and all child resources. It is not possible to add or update the encryption key after the repository is created. Example: `projects/{kms_project}/locations/{location}/keyRings/{key_location}/cryptoKeys/{key}`
      - `labels` object: Optional. Repository user labels.
      - `name` string: Identifier. The repository's name.
      - `npmrcEnvironmentVariablesSecretVersion` string: Optional. The name of the Secret Manager secret version to be used to interpolate variables into the .npmrc file for package installation operations. Must be in the format `projects/*/secrets/*/versions/*`. The file itself must be in a JSON format.
      - `serviceAccount` string: Optional. The service account to run workflow invocations under.
      - `setAuthenticatedUserAdmin` boolean: Optional. Input only. If set to true, the authenticated user will be granted the roles/dataform.admin role on the created repository.
      - `teamFolderName` string: Output only. The resource name of the TeamFolder that this Repository is associated with. This should take the format: projects/{project}/locations/{location}/teamFolders/{teamFolder}. If this is not set, the Repository is not associated with a TeamFolder.
      - `workspaceCompilationOverrides` WorkspaceCompilationOverrides: Configures workspace compilation overrides for a repository.
        - `defaultDatabase` string: Optional. The default database (Google Cloud project ID).
        - `schemaSuffix` string: Optional. The suffix that should be appended to all schema (BigQuery dataset ID) names.
        - `tablePrefix` string: Optional. The prefix that should be prepended to all table names.
  - `nextPageToken` string: A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.

## Changes

- **2026-11-03** `aa7c2fe4d752`: 4 info
  - the security scope `https://www.googleapis.com/auth/bigquery` was added to the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/bigquery` was added to the endpoint's security scheme `Oauth2c`
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was removed from the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was removed from the endpoint's security scheme `Oauth2c`

[Operation history](https://skmtc.dev/google/apis/dataform/changes/v1/projects/:projectsId/locations/:locationsId:queryUserRootContents/get.md)

---

[API](https://skmtc.dev/google/apis/dataform.md) - [All operations](https://skmtc.dev/google/apis/dataform/llms.txt) - [OpenAPI document](https://skmtc.dev/google/apis/dataform/revisions/aa7c2fe4d752?raw)
