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

# Change a dashboard

> Changes a dashboard's name, variables, or widgets. `variables` and `widgets` each replace the whole list, so include everything to keep. Read the dashboard first to get its widget IDs.



## OpenAPI

````yaml /api-reference/openapi.json patch /dashboards/{dashboardId}
openapi: 3.1.0
info:
  description: >-
    Manage a Superlog workspace's automations, runs, tag mode, model access, and
    secrets, read its telemetry, build dashboards and alerts over it, run
    synthetic checks, and export them to Terraform. Every request acts as the
    member who created the API key.
  title: Superlog management API
  version: 1.0.0
servers:
  - url: https://superlog.sh/api/v1
security:
  - bearerAuth: []
tags:
  - description: Connected integrations and the IDs automations and tag mode use.
    name: Integrations
  - description: The workspace and its members.
    name: Workspace
  - description: Keys that authenticate the management API and MCP server.
    name: API keys
  - description: Create and change automations.
    name: Automations
  - description: Start, follow, and cancel automation runs.
    name: Runs
  - description: What Superlog can use and change when someone mentions it in Slack.
    name: Tag mode
  - description: Model API keys, subscriptions, and available models.
    name: Models
  - description: Credentials agents can use without seeing them.
    name: Secrets
  - description: Read the workspace's logs, traces, and metrics.
    name: Telemetry
  - description: >-
      Exceptions in the workspace's telemetry, grouped into issues by
      fingerprint.
    name: Errors
  - description: Create and change dashboards over the workspace's telemetry.
    name: Dashboards
  - description: Threshold alerts on the workspace's telemetry that post to Slack.
    name: Alerts
  - description: HTTP checks that request a URL on a schedule and post failures to Slack.
    name: Synthetics
  - description: Configuration for the superloglabs/superlog Terraform provider.
    name: Terraform
paths:
  /dashboards/{dashboardId}:
    patch:
      tags:
        - Dashboards
      summary: Change a dashboard
      description: >-
        Changes a dashboard's name, variables, or widgets. `variables` and
        `widgets` each replace the whole list, so include everything to keep.
        Read the dashboard first to get its widget IDs.
      operationId: update_dashboard
      parameters:
        - description: Dashboard ID.
          in: path
          name: dashboardId
          required: true
          schema:
            type: string
            format: uuid
            description: Dashboard ID.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 120
                variables:
                  maxItems: 50
                  type: array
                  items:
                    type: object
                    properties:
                      attributeKey:
                        type: string
                        maxLength: 200
                      defaultValue:
                        type: string
                        maxLength: 500
                      label:
                        type: string
                        maxLength: 120
                      multi:
                        type: boolean
                      name:
                        type: string
                        maxLength: 60
                        pattern: ^[a-zA-Z][a-zA-Z0-9_]*$
                      options:
                        maxItems: 200
                        type: array
                        items:
                          type: string
                          maxLength: 500
                    required:
                      - name
                      - options
                  description: >-
                    Dropdowns shown on the dashboard. A widget filter uses the
                    selected value when its value is `$name` or `${name}`, such
                    as `{ key: "deployment.environment", value: "$env" }`.
                    `options` lists the choices; leave it empty to type a value.
                    `defaultValue` must be one of `options` when there are any.
                    `multi` allows several values. `attributeKey` is the
                    attribute the variable usually filters.
                widgets:
                  maxItems: 200
                  type: array
                  items:
                    type: object
                    properties:
                      config:
                        type: object
                        properties:
                          aggregation:
                            type: string
                            enum:
                              - count
                              - count_distinct
                              - sum
                              - avg
                              - min
                              - max
                              - p50
                              - p90
                              - p95
                              - p99
                          chartType:
                            type: string
                            enum:
                              - line
                              - bar
                          compare:
                            type: string
                            enum:
                              - previous_period
                          description:
                            type: string
                            maxLength: 500
                          display:
                            type: string
                            enum:
                              - timeseries
                              - number
                              - bar_list
                              - table
                          field:
                            type: string
                            maxLength: 200
                          filter:
                            default: {}
                            type: object
                            properties:
                              resourceAttrs:
                                maxItems: 50
                                type: array
                                items:
                                  type: object
                                  properties:
                                    key:
                                      type: string
                                      minLength: 1
                                      maxLength: 200
                                    op:
                                      type: string
                                      enum:
                                        - eq
                                        - neq
                                        - not_contains
                                    value:
                                      type: string
                                      maxLength: 500
                                  required:
                                    - key
                                    - value
                          groupBy:
                            type: string
                            maxLength: 200
                          legendPosition:
                            type: string
                            enum:
                              - side
                              - bottom
                          limit:
                            type: integer
                            exclusiveMinimum: 0
                            maximum: 500
                          markdown:
                            type: string
                            maxLength: 20000
                          metricKind:
                            type: string
                            enum:
                              - gauge
                              - sum
                              - histogram
                              - exponential_histogram
                              - summary
                          metricName:
                            type: string
                            maxLength: 200
                          metricUnit:
                            type: string
                            maxLength: 100
                          showLegend:
                            type: boolean
                          showXAxis:
                            type: boolean
                          showYAxis:
                            type: boolean
                          source:
                            type: string
                            enum:
                              - logs
                              - traces
                          unit:
                            type: string
                            enum:
                              - none
                              - duration_ms
                              - duration_s
                              - bytes
                              - percent
                              - usd
                        description: >-
                          What the widget reads and how it shows it. `source` is
                          `logs` or `traces`. `filter.resourceAttrs` keys may
                          start with `resource.`, `span.`, `log.`, or `field.`;
                          a bare key is a resource attribute. `aggregation`
                          defaults to `count`; other aggregations read `field`,
                          which is `duration` or an attribute key. `groupBy`
                          splits the result into series by an attribute key.
                          `display` is `timeseries`, `number`, `bar_list`, or
                          `table`. Metric widgets need `metricName`.
                      id:
                        description: >-
                          Keeps the widget with this ID. Leave it out to add a
                          new widget.
                        type: string
                        format: uuid
                      layout:
                        description: >-
                          Position on a 12-column grid: `x` 0 to 11, `w` 1 to
                          12, and `y` and `h` in rows. Charts are usually 6 wide
                          and 4 high, tables 12 by 6, and text 4 by 5. Defaults
                          to the standard size for the type, below the others.
                        type: object
                        properties:
                          h:
                            type: integer
                            minimum: 1
                            maximum: 100
                          w:
                            type: integer
                            minimum: 1
                            maximum: 12
                          x:
                            type: integer
                            minimum: 0
                            maximum: 11
                          'y':
                            type: integer
                            minimum: 0
                            maximum: 100000
                        required:
                          - h
                          - w
                          - x
                          - 'y'
                      title:
                        type: string
                        minLength: 1
                        maxLength: 200
                      type:
                        type: string
                        enum:
                          - timeseries_count
                          - timeseries_metric
                          - log_table
                          - trace_table
                          - markdown
                        description: >-
                          `timeseries_count` counts or aggregates logs or spans,
                          `timeseries_metric` charts one metric, `log_table` and
                          `trace_table` list matching logs or traces, and
                          `markdown` shows text.
                    required:
                      - config
                      - title
                      - type
                  description: >-
                    Every widget on the dashboard, in order. The list replaces
                    the dashboard's widgets: widgets left out are removed.
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  dashboard:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        description: Dashboard ID.
                      name:
                        type: string
                      updatedAt:
                        type: string
                        format: date-time
                      url:
                        type: string
                        format: uri
                        description: The dashboard in Superlog.
                      variables:
                        type: array
                        items:
                          type: object
                          propertyNames:
                            type: string
                          additionalProperties: {}
                      widgets:
                        type: array
                        items:
                          type: object
                          properties:
                            config:
                              type: object
                              propertyNames:
                                type: string
                              additionalProperties: {}
                              description: The widget's settings.
                            id:
                              type: string
                              format: uuid
                              description: Widget ID.
                            layout:
                              type: object
                              properties:
                                h:
                                  type: number
                                w:
                                  type: number
                                x:
                                  type: number
                                'y':
                                  type: number
                              required:
                                - h
                                - w
                                - x
                                - 'y'
                              additionalProperties: false
                            position:
                              type: integer
                            title:
                              type: string
                            type:
                              type: string
                              enum:
                                - timeseries_count
                                - timeseries_metric
                                - log_table
                                - trace_table
                                - markdown
                          required:
                            - config
                            - id
                            - layout
                            - position
                            - title
                            - type
                          additionalProperties: false
                    required:
                      - id
                      - name
                      - updatedAt
                      - url
                      - variables
                      - widgets
                    additionalProperties: false
                required:
                  - dashboard
                additionalProperties: false
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: The request is invalid. `issues` lists each invalid field.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: The API key is missing, revoked, or its creator left the workspace.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: >-
            The resource does not exist in this workspace, or the feature it
            belongs to is not enabled.
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: >-
            The request conflicts with the current state, such as a name already
            in use.
      security:
        - bearerAuth: []
components:
  schemas:
    Error:
      type: object
      properties:
        code:
          description: A stable machine-readable error code, when there is one.
          type: string
        error:
          type: string
          description: What went wrong.
        issues:
          description: Validation problems, one per invalid field.
          type: array
          items:
            type: object
            properties:
              message:
                type: string
              path:
                type: array
                items:
                  anyOf:
                    - type: string
                    - type: number
            required:
              - message
              - path
            additionalProperties: false
      required:
        - error
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      description: A workspace API key, created in Superlog under Settings → API keys.
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.