> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mixpeek.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# List Google Drive Folders

> List folders in Google Drive for folder selection in sync configuration.

Enables users to browse and select folders when configuring sync operations.
Only available for Google Drive connections.

**Use Cases:**
- Browse available folders for sync configuration
- Select source folder for bucket sync
- Navigate nested folder structures

**Example:**
```bash
curl -X GET "http://localhost:8000/v1/organizations/connections/conn_abc123/folders?path=/Marketing" \
  -H "Authorization: Bearer YOUR_API_KEY"
```



## OpenAPI

````yaml get /v1/organizations/connections/{connection_identifier}/folders
openapi: 3.1.0
info:
  title: Mixpeek API
  description: >-
    This is the Mixpeek API, providing access to various endpoints for data
    processing and retrieval.
  termsOfService: https://mixpeek.com/terms
  contact:
    name: Mixpeek Support
    url: https://mixpeek.com/contact
    email: info@mixpeek.com
  version: '0.82'
servers:
  - url: https://api.mixpeek.com
    description: Production
security: []
paths:
  /v1/organizations/connections/{connection_identifier}/folders:
    get:
      tags:
        - Organization Connections
      summary: List Google Drive Folders
      description: >-
        List folders in Google Drive for folder selection in sync configuration.


        Enables users to browse and select folders when configuring sync
        operations.

        Only available for Google Drive connections.


        **Use Cases:**

        - Browse available folders for sync configuration

        - Select source folder for bucket sync

        - Navigate nested folder structures


        **Example:**

        ```bash

        curl -X GET
        "http://localhost:8000/v1/organizations/connections/conn_abc123/folders?path=/Marketing"
        \
          -H "Authorization: Bearer YOUR_API_KEY"
        ```
      operationId: >-
        list_google_drive_folders_v1_organizations_connections__connection_identifier__folders_get
      parameters:
        - name: connection_identifier
          in: path
          required: true
          schema:
            type: string
            description: >-
              Connection identifier - either connection ID (conn_...) or name.
              The system will automatically resolve names to IDs.
            examples:
              - conn_abc123def456ghi
              - Marketing Google Drive
            title: Connection Identifier
          description: >-
            Connection identifier - either connection ID (conn_...) or name. The
            system will automatically resolve names to IDs.
        - name: path
          in: query
          required: false
          schema:
            type: string
            description: Parent folder path to list from
            default: /
            title: Path
          description: Parent folder path to list from
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListFoldersResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ListFoldersResponse:
      properties:
        results:
          items:
            $ref: '#/components/schemas/FolderItem'
          type: array
          title: Results
          description: >-
            List of folders found at the specified parent path. Only includes
            folders (not files). Empty list if no folders found or path doesn't
            exist.
        parent_path:
          type: string
          title: Parent Path
          description: >-
            The parent folder path that was queried. This is the path specified
            in the request (or '/' for root). Use this to show breadcrumb
            navigation in UI.
          examples:
            - /
            - /Marketing
            - /Marketing/2024 Campaigns
      type: object
      required:
        - results
        - parent_path
      title: ListFoldersResponse
      description: >-
        Response payload for listing Google Drive folders.


        Returns a list of folders available at the specified path, enabling
        users

        to browse and select folders for sync configuration.
      examples:
        - description: List of folders at root
          folders:
            - id: 0AH-Xabc123
              mime_type: application/vnd.google-apps.folder
              name: Marketing
              path: /Marketing
            - id: 0AH-Xdef456
              mime_type: application/vnd.google-apps.folder
              name: Sales
              path: /Sales
          parent_path: /
    ErrorResponse:
      properties:
        success:
          type: boolean
          title: Success
          description: Always false for error responses
          default: false
        status:
          type: integer
          title: Status
          description: HTTP status code for this error
        error:
          $ref: '#/components/schemas/ErrorDetail'
          description: Error details payload
      type: object
      required:
        - status
        - error
      title: ErrorResponse
      description: Error response model.
      examples:
        - error:
            details:
              id: ns_123
              resource: namespace
            message: Namespace not found
            type: NotFoundError
          status: 404
          success: false
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    FolderItem:
      properties:
        id:
          type: string
          title: Id
          description: >-
            REQUIRED. Folder ID in Google Drive. Use this ID when configuring
            sync operations. Format: Google Drive folder identifier (e.g.,
            '0AH-Xabc123').
          examples:
            - 0AH-Xabc123
            - 1ABCdef456GHI
        name:
          type: string
          title: Name
          description: >-
            REQUIRED. Display name of the folder. Human-readable name shown in
            the Google Drive UI.
          examples:
            - Marketing
            - 2024 Campaigns
            - Assets
        path:
          type: string
          title: Path
          description: >-
            REQUIRED. Full path from root to this folder. Format: '/' for root,
            '/FolderName' for first level, '/Parent/Child' for nested folders.
          examples:
            - /
            - /Marketing
            - /Marketing/2024 Campaigns
        mime_type:
          type: string
          title: Mime Type
          description: >-
            REQUIRED. MIME type identifier for folders. Always
            'application/vnd.google-apps.folder' for folders.
          examples:
            - application/vnd.google-apps.folder
      type: object
      required:
        - id
        - name
        - path
        - mime_type
      title: FolderItem
      description: >-
        Represents a folder in Google Drive for folder selection in sync
        configuration.


        Used by the list folders endpoint to help users browse and select
        folders

        for sync operations. Only available for Google Drive connections.
      examples:
        - description: Root folder
          id: root
          mime_type: application/vnd.google-apps.folder
          name: My Drive
          path: /
        - description: Nested folder
          id: 0AH-Xabc123
          mime_type: application/vnd.google-apps.folder
          name: Marketing
          path: /Marketing
    ErrorDetail:
      properties:
        message:
          type: string
          title: Message
          description: Human-readable error message
        type:
          type: string
          title: Type
          description: Stable error type identifier (machine-readable)
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
          description: >-
            Fine-grained error code for programmatic handling (e.g.,
            namespace_name_taken, feature_extractor_not_found). Present only
            when consumers may need to branch on a specific error condition.
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
          description: >-
            Optional structured details to help debugging (validation errors,
            IDs, etc.)
      type: object
      required:
        - message
        - type
      title: ErrorDetail
      description: Error detail model.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````