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

# List charts

> Returns a paginated list of charts. Filter by viewer role to enforce visibility.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/charts
openapi: 3.1.0
info:
  title: apowerb API
  description: REST API of the apowerb agentic framework (open-source edition).
  version: 0.1.2
  license:
    name: MIT
    url: https://github.com/apowerb/apowerb/blob/main/LICENSE
servers:
  - url: https://api.example.com
    description: Your apowerb instance
  - url: http://localhost:8000
    description: Local stack
security: []
paths:
  /api/v1/charts:
    get:
      tags:
        - charts
      summary: List charts
      description: >-
        Returns a paginated list of charts. Filter by viewer role to enforce
        visibility.
      operationId: list_charts_api_v1_charts_get
      parameters:
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
            title: Page
        - name: page_size
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 20
            title: Page Size
        - name: role
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Viewer role for permission filtering
            title: Role
          description: Viewer role for permission filtering
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChartListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    ChartListResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/ChartResponse'
          type: array
          title: Items
        total:
          type: integer
          title: Total
        page:
          type: integer
          title: Page
        page_size:
          type: integer
          title: Page Size
        has_next:
          type: boolean
          title: Has Next
      type: object
      required:
        - items
        - total
        - page
        - page_size
        - has_next
      title: ChartListResponse
      description: Paginated list of charts.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ChartResponse:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
        id:
          type: string
          title: Id
        title:
          type: string
          title: Title
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        chart_type:
          $ref: '#/components/schemas/ChartType'
        source:
          $ref: '#/components/schemas/DataSource'
        theme:
          $ref: '#/components/schemas/Theme'
        dimensions:
          $ref: '#/components/schemas/Dimensions'
        refresh_interval:
          anyOf:
            - type: integer
            - type: 'null'
          title: Refresh Interval
        filters:
          items:
            $ref: '#/components/schemas/Filter'
          type: array
          title: Filters
        permissions:
          items:
            type: string
          type: array
          title: Permissions
        config:
          additionalProperties: true
          type: object
          title: Config
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        created_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Created By
        organization_id:
          type: string
          title: Organization Id
        project_id:
          type: string
          title: Project Id
          default: thaink2
      type: object
      required:
        - name
        - id
        - title
        - description
        - chart_type
        - source
        - theme
        - dimensions
        - refresh_interval
        - filters
        - permissions
        - created_at
        - updated_at
        - created_by
        - organization_id
      title: ChartResponse
      description: Single chart returned by the API.
    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
    ChartType:
      type: string
      enum:
        - bar
        - line
        - pie
        - donut
        - scatter
        - area
        - heatmap
        - table
        - stat
        - histogram
      title: ChartType
    DataSource:
      properties:
        source_type:
          $ref: '#/components/schemas/SourceType'
          default: database
        query:
          type: string
          title: Query
          description: SQL snippet, query key, or endpoint path
        aggregation:
          anyOf:
            - $ref: '#/components/schemas/AggregationFunc'
            - type: 'null'
        group_by:
          items:
            type: string
          type: array
          title: Group By
        sort:
          anyOf:
            - $ref: '#/components/schemas/SortConfig'
            - type: 'null'
        limit:
          anyOf:
            - type: integer
              maximum: 100000
              exclusiveMinimum: 0
            - type: 'null'
          title: Limit
          default: 1000
        time_field:
          anyOf:
            - type: string
            - type: 'null'
          title: Time Field
        connection_config_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Connection Config Id
        source_options:
          additionalProperties: true
          type: object
          title: Source Options
          description: Provider specific properties
      type: object
      required:
        - query
      title: DataSource
    Theme:
      properties:
        color_palette:
          items:
            type: string
          type: array
          title: Color Palette
          default:
            - '#6366f1'
            - '#22d3ee'
            - '#f59e0b'
            - '#10b981'
            - '#ef4444'
        font_family:
          type: string
          title: Font Family
          default: Inter, sans-serif
        dark_mode:
          type: boolean
          title: Dark Mode
          default: false
        show_legend:
          type: boolean
          title: Show Legend
          default: true
        show_grid:
          type: boolean
          title: Show Grid
          default: true
        show_tooltip:
          type: boolean
          title: Show Tooltip
          default: true
      type: object
      title: Theme
    Dimensions:
      properties:
        width:
          type: integer
          exclusiveMinimum: 0
          title: Width
          default: 600
        height:
          type: integer
          exclusiveMinimum: 0
          title: Height
          default: 400
        responsive:
          type: boolean
          title: Responsive
          default: true
      type: object
      title: Dimensions
    Filter:
      properties:
        field:
          type: string
          title: Field
        operator:
          $ref: '#/components/schemas/FilterOperator'
        value:
          title: Value
      type: object
      required:
        - field
        - operator
      title: Filter
    SourceType:
      type: string
      enum:
        - database
        - csv
        - google_drive
        - onedrive_excel
        - agent
      title: SourceType
    AggregationFunc:
      type: string
      enum:
        - count
        - sum
        - avg
        - min
        - max
        - p50
        - p95
        - p99
      title: AggregationFunc
    SortConfig:
      properties:
        field:
          type: string
          title: Field
        order:
          $ref: '#/components/schemas/SortOrder'
          default: desc
      type: object
      required:
        - field
      title: SortConfig
    FilterOperator:
      type: string
      enum:
        - eq
        - neq
        - gt
        - gte
        - lt
        - lte
        - in
        - not_in
        - contains
        - is_null
        - is_not_null
      title: FilterOperator
    SortOrder:
      type: string
      enum:
        - asc
        - desc
      title: SortOrder
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````

## Related topics

- [Delete a chart](/api-reference/charts/delete-a-chart.md)
- [Create a chart](/api-reference/charts/create-a-chart.md)
- [Partially update a chart](/api-reference/charts/partially-update-a-chart.md)
- [Get a single chart](/api-reference/charts/get-a-single-chart.md)
- [Fetch paginated data for a chart](/api-reference/chart-data/fetch-paginated-data-for-a-chart.md)
