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

# List Widgets

> List dashboard widgets with optional filtering.



## OpenAPI

````yaml get /analytics/widgets
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /analytics/widgets:
    get:
      tags:
        - provider
        - analytics
        - analytics
      summary: List Widgets
      description: List dashboard widgets with optional filtering.
      operationId: list_widgets_analytics_widgets_get
      parameters:
        - name: TENANT
          in: header
          required: true
          schema:
            type: string
            title: Tenant
          description: The tenant you are making this request on behalf of
        - name: API-KEY
          in: header
          required: true
          schema:
            type: string
            title: Api-Key
          description: Your api key
        - name: page
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Page
        - name: per_page
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Per Page
        - name: sort_by
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Sort By
        - name: sort_direction
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                enum:
                  - asc
                  - desc
              - type: 'null'
            title: Sort Direction
        - name: location_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Location Id
        - name: dashboard_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by dashboard ID
            title: Dashboard Id
          description: Filter by dashboard ID
        - name: chart_type
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by chart type
            title: Chart Type
          description: Filter by chart type
        - name: is_archived
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            description: Filter by archived status
            title: Is Archived
          description: Filter by archived status
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DashboardWidgetSchema'
                title: Response List Widgets Analytics Widgets Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    DashboardWidgetSchema:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier for the widget
        dashboardId:
          type: string
          title: Dashboardid
          description: ID of the dashboard this widget belongs to
        title:
          type: string
          title: Title
          description: Title of the widget
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Description of the widget
        chartType:
          type: string
          title: Charttype
          description: Type of chart
        queryConfig:
          $ref: '#/components/schemas/QueryConfigSchema'
          description: Query builder configuration
        chartConfig:
          anyOf:
            - type: object
            - type: 'null'
          title: Chartconfig
          description: Chart-specific configuration
        layoutPosition:
          type: object
          title: Layoutposition
          description: Grid position and size
        isArchived:
          type: boolean
          title: Isarchived
          description: Whether the widget is archived
        orderIndex:
          type: integer
          title: Orderindex
          description: Order index for widget positioning
        createdDate:
          type: string
          format: date-time
          title: Createddate
          description: When the widget was created
        updatedDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updateddate
          description: When the widget was last updated
      type: object
      required:
        - id
        - dashboardId
        - title
        - chartType
        - queryConfig
        - layoutPosition
        - isArchived
        - orderIndex
        - createdDate
      title: DashboardWidgetSchema
      description: Schema for dashboard widget response.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    QueryConfigSchema:
      properties:
        table:
          type: string
          title: Table
          description: Table name to query
        fields:
          items:
            type: string
          type: array
          title: Fields
          description: List of fields to select
        filters:
          anyOf:
            - items:
                type: object
              type: array
            - type: 'null'
          title: Filters
          description: Optional filters to apply
        aggregations:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Aggregations
          description: Optional aggregations to apply
        groupBy:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Groupby
          description: Optional fields to group by
        temporalGrouping:
          anyOf:
            - additionalProperties:
                type: string
                enum:
                  - hour
                  - day
                  - week
                  - month
                  - quarter
                  - year
              type: object
            - type: 'null'
          title: Temporalgrouping
          description: Optional temporal grouping for date fields
        orderBy:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Orderby
          description: Optional ordering configuration
      type: object
      required:
        - table
        - fields
      title: QueryConfigSchema
      description: Schema for query configuration.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````