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

# List charts on a dashboard

> Lists all active (non-archived) charts on a dashboard, including the content of each chart’s latest version (name, SQL query, chart type, axes). Requires admin access to the organization. Results are paginated and ordered by creation date (newest first).



## OpenAPI

````yaml https://charts.basedash.com/api/public/openapi get /api/public/organizations/{orgId}/dashboards/{dashboardId}/charts
openapi: 3.1.0
info:
  title: Basedash Public API
  version: 0.0.0
  description: >-
    API for programmatic access to Basedash features. Use API keys for
    authentication.
  contact:
    name: Basedash Support
    url: https://basedash.com
    email: support@basedash.com
servers:
  - url: https://charts.basedash.com
    description: Production
security: []
tags:
  - name: Organizations
    description: Manage organizations
  - name: Groups
    description: Manage organization groups and memberships
  - name: Data Sources
    description: Manage database connections and data sources
  - name: MCP servers
    description: Manage MCP server data sources
  - name: Insights
    description: Manage generated insights
  - name: Automations
    description: Manage automations and automation runs
  - name: Skills
    description: Manage organization skills
  - name: Definitions
    description: Manage reusable SQL definitions
  - name: Dashboards
    description: Manage dashboards and their tabs
  - name: Charts
    description: Manage charts and their SQL queries
paths:
  /api/public/organizations/{orgId}/dashboards/{dashboardId}/charts:
    get:
      tags:
        - Dashboards
      summary: List charts on a dashboard
      description: >-
        Lists all active (non-archived) charts on a dashboard, including the
        content of each chart’s latest version (name, SQL query, chart type,
        axes). Requires admin access to the organization. Results are paginated
        and ordered by creation date (newest first).
      parameters:
        - schema:
            type: string
            description: Organization ID
          required: true
          description: Organization ID
          name: orgId
          in: path
        - schema:
            type: string
            description: Dashboard ID
          required: true
          description: Dashboard ID
          name: dashboardId
          in: path
        - schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
            description: Maximum number of items to return (1-100, default 50)
          required: false
          description: Maximum number of items to return (1-100, default 50)
          name: limit
          in: query
        - schema:
            type: string
            description: Cursor for pagination (ID of the last item from previous page)
          required: false
          description: Cursor for pagination (ID of the last item from previous page)
          name: cursor
          in: query
      responses:
        '200':
          description: Charts retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ChartResponse'
                  pagination:
                    $ref: '#/components/schemas/PaginationMeta'
                required:
                  - data
                  - pagination
        '401':
          description: Unauthorized - Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found - Dashboard not found or no admin access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded - Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    ChartResponse:
      type: object
      properties:
        id:
          type: string
          description: Chart ID
        createdAt:
          type: string
          format: date-time
          description: Chart creation timestamp
        updatedAt:
          type: string
          format: date-time
          description: Timestamp of the last content or placement change
        dashboardId:
          type: string
          description: ID of the dashboard the chart is on
        dashboardTabId:
          type: string
          description: ID of the dashboard tab the chart is on
        organizationId:
          type: string
          description: Organization ID
        name:
          type: string
          description: Name of the chart
        description:
          type:
            - string
            - 'null'
          description: Description of the chart
        chartType:
          $ref: '#/components/schemas/SqlChartType'
        sqlQuery:
          type: string
          description: SQL query powering the chart
        drilldownSqlQuery:
          type:
            - string
            - 'null'
          description: SQL query used for chart drill-downs
        databaseConnectionId:
          type:
            - string
            - 'null'
          description: ID of the data source the SQL query runs against
        xAxisProperty:
          type:
            - string
            - 'null'
          description: Result column used for the x-axis
        xAxisSecondaryProperty:
          type:
            - string
            - 'null'
          description: Result column used to break down the x-axis into segments
        yAxisProperty:
          type:
            - string
            - 'null'
          description: Result column used for the y-axis
        staticContent:
          type:
            - string
            - 'null'
          description: Static content for DASHBOARD_HEADER and DASHBOARD_TEXT chart types
        layout:
          $ref: '#/components/schemas/ChartLayout'
      required:
        - id
        - createdAt
        - updatedAt
        - dashboardId
        - dashboardTabId
        - organizationId
        - name
        - description
        - chartType
        - sqlQuery
        - drilldownSqlQuery
        - databaseConnectionId
        - xAxisProperty
        - xAxisSecondaryProperty
        - yAxisProperty
        - staticContent
        - layout
    PaginationMeta:
      type: object
      properties:
        nextCursor:
          type:
            - string
            - 'null'
          description: Cursor for the next page (null if no more pages)
        hasMore:
          type: boolean
          description: Whether there are more items after this page
      required:
        - nextCursor
        - hasMore
    ErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ApiError'
      required:
        - error
    RateLimitErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/RateLimitError'
      required:
        - error
    SqlChartType:
      anyOf:
        - type: string
          enum:
            - TABLE
        - type: string
          enum:
            - LINE
        - type: string
          enum:
            - VERTICAL_BAR
        - type: string
          enum:
            - HORIZONTAL_BAR
        - type: string
          enum:
            - SCATTER
        - type: string
          enum:
            - FUNNEL
        - type: string
          enum:
            - NUMBER
        - type: string
          enum:
            - PROGRESS
        - type: string
          enum:
            - IMAGE
        - type: string
          enum:
            - RECORD
        - type: string
          enum:
            - TEXT
        - type: string
          enum:
            - PIE
        - type: string
          enum:
            - ACTIVITY
        - type: string
          enum:
            - MAP
        - type: string
          enum:
            - SANKEY
        - type: string
          enum:
            - DASHBOARD_HEADER
        - type: string
          enum:
            - DASHBOARD_TEXT
        - type: 'null'
      description: Type of the chart
    ChartLayout:
      type: object
      properties:
        x:
          type: integer
          minimum: 0
          description: Column position on the dashboard grid
        'y':
          type: integer
          minimum: 0
          description: Row position on the dashboard grid
        width:
          type: integer
          minimum: 1
          description: Width of the chart in grid units
        height:
          type: integer
          minimum: 1
          description: Height of the chart in grid units
      required:
        - x
        - 'y'
        - width
        - height
    ApiError:
      type: object
      properties:
        title:
          type: string
          description: Error type identifier
        detail:
          type: string
          description: Human-readable error description
      required:
        - title
        - detail
    RateLimitError:
      allOf:
        - $ref: '#/components/schemas/ApiError'
        - type: object
          properties:
            title:
              type: string
              enum:
                - RateLimitExceeded
            retryAfterMs:
              type: number
              description: Milliseconds until the rate limit window resets
          required:
            - retryAfterMs
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key authentication using Bearer token format: `Bearer
        <basedash_api_key>`

````