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

# Create dashboard from YAML

`POST /internal/v1/dashboards/{project_id}/yaml`

Create a new dashboard from YAML definition. Use this to create visualization dashboards for spans, events, logs, and metrics. Supports grid-based and table-based layouts with PromQL-style metric queries. The YAML body must include: schema (v2 or v3) and name. Optional fields: version, tags. Use get_dashboard_yaml on an existing dashboard to see the exact YAML format before creating. The API strictly rejects unknown fields. Table and table_grid_items overrides use column (required, must match a query alias) + properties (array of {name, value}). Grid item overrides (in grid_rows) use matchers + properties (array of {name, value}). Sparkline is a table column property ({name: sparkline, value: true}), not a top-level field. Documentation: https://uptrace.dev/features/dashboards

## Path parameters

- `project_id` integer, required

## Response `200`

Dashboard created.

- 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
- `500` — Internal server error

---

[API](https://skmtc.net/uptrace/apis/uptrace-json-api.md) · [All operations](https://skmtc.net/uptrace/apis/uptrace-json-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/uptrace/uptrace-json-api/revisions/550c8881ab9a/schema)
