---
title: "List Widgets"
method: GET
path: "/analytics/widgets"
tags: ["provider", "analytics", "analytics"]
---

# List Widgets

`GET /analytics/widgets`

List dashboard widgets with optional filtering.

## Query parameters

- `page` integer, nullable
- `per_page` integer, nullable
- `sort_by` string, nullable
- `sort_direction` 'asc' | 'desc', nullable
- `location_id` string, nullable
- `dashboard_id` string, nullable — Filter by dashboard ID
- `chart_type` string, nullable — Filter by chart type
- `is_archived` boolean, nullable — Filter by archived status

## Headers

- `TENANT` string, required
- `API-KEY` string, required

## Response `200`

Successful Response

- DashboardWidgetSchema[]
  - `id` string, required — Unique identifier for the widget
  - `dashboardId` string, required — ID of the dashboard this widget belongs to
  - `title` string, required — Title of the widget
  - `description` string, nullable — Description of the widget
  - `chartType` string, required — Type of chart
  - `queryConfig` QueryConfigSchema, required — Schema for query configuration.
    - `table` string, required — Table name to query
    - `fields` string[], required — List of fields to select
    - `filters` object[], nullable — Optional filters to apply
    - `aggregations` object, nullable — Optional aggregations to apply
    - `groupBy` string[], nullable — Optional fields to group by
    - `temporalGrouping` object, nullable — Optional temporal grouping for date fields
    - `orderBy` object, nullable — Optional ordering configuration
  - `chartConfig` object, nullable — Chart-specific configuration
  - `layoutPosition` object, required — Grid position and size
  - `isArchived` boolean, required — Whether the widget is archived
  - `orderIndex` integer, required — Order index for widget positioning
  - `createdDate` string, date-time, required — When the widget was created
  - `updatedDate` string, date-time, nullable — When the widget was last updated

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/decodahealth/apis/decoda-api.md) · [All operations](https://skmtc.dev/decodahealth/apis/decoda-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/decodahealth/decoda-api/revisions/4939a65a89d2/schema)
