---
title: "Get Widget"
method: GET
path: "/api/v1/public/widgets/{widget_id}"
tags: ["Widgets"]
---

# Get Widget

`GET /api/v1/public/widgets/{widget_id}`

## Request

- Base URL: `https://app.traceroot.ai`
- URL: `https://app.traceroot.ai/api/v1/public/widgets/{widget_id}`
- Auth: HTTP bearer

Get one saved widget's definition, with its dashboard, for the caller's project.

## Path parameters

- `widget_id` string, required

## Query parameters

- `project_id` string, nullable: Target project for the request. Required when authenticating with a user session token (a user credential is only meaningful scoped to a project); for an API key it is optional and, if given, must match the key's project.

## Response `200`

Successful Response

- WidgetDetail: One saved widget, as stored, with the dashboard it belongs to. ``spec`` is exactly what the create parsed (defaults filled, unknown keys stripped), so what a caller reads is what the engine runs. ``dashboard_id`` and ``dashboard_name`` let a caller holding only a widget id climb to the dashboard without a second read. Widgets record no creator.
  - `create_time` string, date-time, required
  - `dashboard_id` string, required
  - `dashboard_name` string, required
  - `display_config` unknown, required
  - `id` string, required
  - `spec` unknown, required
  - `title` string, required
  - `type` string, required
  - `update_time` string, date-time, required

## Other responses

- `401`: Authentication failed
- `404`: Widget not found
- `422`: Validation Error
- `503`: Authentication service unavailable

---

[API](https://skmtc.dev/traceroot/apis/traceroot-public-api.md) - [All operations](https://skmtc.dev/traceroot/apis/traceroot-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/traceroot/apis/traceroot-public-api/revisions/ce6aef96c0d6?raw)
