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

# List datasets

> Get all datasets for a team



## OpenAPI

````yaml GET /team/{team_id}/datasets
openapi: 3.0.1
info:
  title: Chartbrew API reference
  description: The OpenAPI specification for Chartbrew
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.chartbrew.com
security:
  - bearerAuth: []
paths:
  /team/{team_id}/datasets:
    get:
      description: Get all datasets for a team
      parameters:
        - name: team_id
          in: path
          description: ID of the team
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Array of datasets
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Dataset'
        '400':
          description: Error response
        '403':
          description: Access denied
      security:
        - bearerAuth: []
components:
  schemas:
    Dataset:
      type: object
      properties:
        id:
          type: integer
        team_id:
          type: integer
        project_ids:
          type: array
          items:
            type: integer
        chart_id:
          type: integer
        connection_id:
          type: integer
        draft:
          type: boolean
          default: true
        name:
          type: string
          description: >-
            Canonical dataset name. Prefer this over legend when referring to
            the reusable dataset itself.
        query:
          type: string
        xAxis:
          type: string
          description: >-
            [Legacy compatibility] Dataset-level binding fallback. New chart
            bindings should be stored on ChartDatasetConfig.
        xAxisOperation:
          type: string
          description: >-
            [Legacy compatibility] Dataset-level binding fallback. New chart
            bindings should be stored on ChartDatasetConfig.
        yAxis:
          type: string
          description: >-
            [Legacy compatibility] Dataset-level binding fallback. New chart
            bindings should be stored on ChartDatasetConfig.
        yAxisOperation:
          type: string
          default: none
          description: >-
            [Legacy compatibility] Dataset-level binding fallback. New chart
            bindings should be stored on ChartDatasetConfig.
        dateField:
          type: string
          description: >-
            [Legacy compatibility] Dataset-level binding fallback. New chart
            bindings should be stored on ChartDatasetConfig.
        dateFormat:
          type: string
          description: >-
            [Legacy compatibility] Dataset-level binding fallback. New chart
            bindings should be stored on ChartDatasetConfig.
        legend:
          type: string
          description: >-
            [Legacy compatibility] Previous dataset name field. Prefer
            Dataset.name for reusable dataset naming.
        fieldsSchema:
          type: object
        excludedFields:
          type: array
          items:
            type: string
        configuration:
          type: object
        joinSettings:
          type: object
          properties:
            joins:
              type: array
              items:
                type: object
                properties:
                  dr_id:
                    type: integer
                    description: DataRequest ID
                  join_id:
                    type: integer
                  dr_field:
                    type: string
                  join_field:
                    type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````