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

# List a team's datasources

> The databases you may query on this team, filtered to the ones your role or explicit access reaches.



## OpenAPI

````yaml /openapi.json get /teams/{teamId}/datasources
openapi: 3.1.0
info:
  title: TeamDuo REST API
  version: 1.0.0
  description: >-
    The subset of TeamDuo's REST API that an API key may call. Most of TeamDuo's
    backend is session-only by design — connecting a database, changing
    exposure, and managing your team all require a signed-in browser session.
    These five endpoints are the ones a key can reach, matching the read-only
    surface the MCP connector uses. See [Overview](/api-reference/introduction)
    before using this reference.
servers:
  - url: https://api.teamduo.ai
    description: Production
security:
  - bearerAuth: []
paths:
  /teams/{teamId}/datasources:
    get:
      tags:
        - Datasources
      summary: List a team's datasources
      description: >-
        The databases you may query on this team, filtered to the ones your role
        or explicit access reaches.
      operationId: listDataSources
      parameters:
        - name: teamId
          in: path
          required: true
          schema:
            type: string
          description: Team id from `GET /teams`.
      responses:
        '200':
          description: Datasources on this team.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DataSource'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: No such team, or you're not on it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth:
            - data:schema
components:
  schemas:
    DataSource:
      type: object
      properties:
        id:
          type: string
        teamId:
          type: string
        name:
          type: string
        type:
          type: string
          enum:
            - POSTGRES
            - MONGODB
            - BIGQUERY
        status:
          type: string
          enum:
            - PENDING
            - CONNECTED
            - ERROR
            - DISABLED
        connectionMode:
          type: string
        host:
          type:
            - string
            - 'null'
        port:
          type:
            - integer
            - 'null'
        database:
          type:
            - string
            - 'null'
          description: The database name, or the BigQuery project id.
        username:
          type:
            - string
            - 'null'
        sslMode:
          type:
            - string
            - 'null'
        config:
          type: object
          description: Non-secret, per-type settings.
        accessMode:
          type: string
          enum:
            - ROLE_BASED
            - EXPLICIT
        minRole:
          type: string
          enum:
            - OWNER
            - ADMIN
            - MEMBER
        lastTestedAt:
          type:
            - string
            - 'null'
          format: date-time
        lastError:
          type:
            - string
            - 'null'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        exposedTableCount:
          type: integer
      required:
        - id
        - teamId
        - name
        - type
        - status
        - createdAt
        - updatedAt
        - exposedTableCount
    Error:
      type: object
      properties:
        error:
          type: string
          description: Human-readable explanation. Always safe to show a user or an agent.
        code:
          type: string
          description: Stable machine-readable code, when the error has one.
      required:
        - error
    ScopeError:
      allOf:
        - $ref: '#/components/schemas/Error'
        - type: object
          properties:
            code:
              type: string
              const: SCOPE_REQUIRED
            requiredScope:
              type: string
              description: >-
                The scope this key is missing, when the route needs a specific
                one.
  responses:
    Unauthorized:
      description: Missing or invalid bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: The token is valid but its scopes don't cover this route.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ScopeError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        An API key (`sk_live_...`) created under Settings → API keys, or a
        short-lived JWT access token from a browser session. A key only reaches
        the scope it was granted; see [API keys and
        scopes](/reference/api-keys).

````