---
title: "Update dashboard from YAML"
method: PUT
path: "/internal/v1/dashboards/{project_id}/{dashboard_id}/yaml"
tags: ["Dashboards"]
---

# Update dashboard from YAML

`PUT /internal/v1/dashboards/{project_id}/{dashboard_id}/yaml`

## Request

- Base URL: `https://api.uptrace.dev`
- URL: `https://api.uptrace.dev/internal/v1/dashboards/{project_id}/{dashboard_id}/yaml`
- Auth: one of:
  - HTTP bearer
  - API key in query parameter `auth_token`
- TypeScript: <https://skmtc.dev/uptrace/apis/uptrace-json-api/docs/internal/v1/dashboards/:project_id/:dashboard_id/yaml/put.ts> (a function with typed inputs; its response is checked against the schema)

Update an existing dashboard from YAML definition. Use get_dashboard_yaml first to retrieve the current YAML, then modify and submit. The API strictly rejects unknown fields. Table overrides use column + properties (array of {name, value}). Grid item overrides use matchers + properties (array of {name, value}). Documentation: https://uptrace.dev/features/dashboards

## Path parameters

- `project_id` integer, required
- `dashboard_id` integer, required

## Request body `text/yaml`

- string: YAML dashboard definition.

## Response `200`

Dashboard updated.

- DashboardResponse
  - `dashboard` Dashboard, required
    - `id` integer, required
    - `projectId` integer, required
    - `templateId` string: ID of the dashboard template this dashboard was created from, if any.
    - `name` string, required
    - `version` string: Dashboard schema version, set when the dashboard is created from a template.
    - `pinned` boolean
    - `tags` string[]: Tags used to categorize and filter dashboards.
    - `sortingOrder` integer: Manual sort order applied when listing dashboards.
    - `minInterval` number: Minimum query interval in nanoseconds.
    - `timeOffset` number: Default time offset applied to queries in nanoseconds.
    - `tooltipsConnected` boolean: When true, hovering a chart highlights the same timestamp on all charts in the dashboard.
    - `defaultTimePeriod` number: Default time period in nanoseconds applied when the dashboard is opened without an explicit range.
    - `table` TableGridItemParams: Configuration for the Table tab of a dashboard.
      - `metrics` MetricAlias[]
        - `name` string, required
        - `alias` string, required
      - `query` string
      - `groupingAttrs` string[]: Grouping attributes extracted from the query.
      - `overrides` object[]: Per-column visual overrides.
      - `variables` string[]
      - `itemsPerPage` integer
      - `compactTable` boolean
      - `linesPerRow` integer
      - `nullsMode` string: How null values are rendered in the table.
      - `sortBy` object[]: Column sort order applied to the table.
    - `gridMaxWidth` integer
    - `gridQuery` string
    - `gridVariables` string[]: Attribute names used as filter variables in the Grid tab. When empty, the grouping attributes from the table are used instead.
    - `createdAt` number
    - `updatedAt` number

## Other responses

- `400`: Invalid request
- `401`: Authentication required
- `403`: Insufficient permissions
- `404`: Resource not found
- `500`: Internal server error

---

[API](https://skmtc.dev/uptrace/apis/uptrace-json-api.md) - [All operations](https://skmtc.dev/uptrace/apis/uptrace-json-api/llms.txt) - [OpenAPI document](https://skmtc.dev/uptrace/apis/uptrace-json-api/revisions/550c8881ab9a?raw)
