---
title: "Replace layout configuration."
method: PUT
path: "/layouts/{id}"
tags: ["layouts"]
---

# Replace layout configuration.

`PUT /layouts/{id}`

## Path parameters

- `id` string, required

## Request body

- Layout
  - `id` string — ID is an opaque string that uniquely identifies this layout.
  - `app` string, required — App is the user facing name of this Layout
  - `measurement` string, required — Measurement is the descriptive name of the time series data.
  - `cells` Cell[], required — Cells are the individual visualization elements.
    - `i` string, uuid4, required — Unique ID of Cell
    - `x` integer, required — X-coordinate of Cell in the Dashboard
    - `y` integer, required — Y-coordinate of Cell in the Dashboard
    - `w` integer, required — Width of Cell in the Dashboard
    - `h` integer, required — Height of Cell in the Dashboard
    - `name` string — Title of Cell in the Dashboard
    - `queries` DashboardQuery[] — Time-series data queries for Cell
      - `label` string — Optional Y-axis user-facing label for this query
      - `range` object — Optional default range of the Y-axis
        - `upper` integer, required — Upper bound of the display range of the Y-axis
        - `lower` integer, required — Lower bound of the display range of the Y-axis
      - `query` string, required
      - `source` string, url — Optional URI for data source for this query
      - `type` string — The language used by the query (either influxql or flux
      - `queryConfig` QueryConfig
        - `id` string
        - `database` string, required
        - `measurement` string, required
        - `retentionPolicy` string, required
        - `areTagsAccepted` boolean, required
        - `rawText` string
        - `tags` object, required
        - `groupBy` object, required
          - `time` string, required
          - `tags` string[], required
        - `fields` Field[], required
          - `value` string, required — value is the value of the field. Meaning of the value is implied by the `type` key
          - `type` 'func' | 'field' | 'integer' | 'number' | 'regex' | 'wildcard', required — type describes the field type. func is a function; field is a field reference
          - `alias` string — Alias overrides the field name in the returned response. Applies only if type is `func`
          - `args` Field[] — Args are the arguments to the function
        - `range` object
          - `lower` string, required
          - `upper` string, required
    - `axes` object — The viewport for a Cell's visualizations
      - `x` Axis — A description of a particular axis for a visualization
        - `bounds` integer[] — The extents of an axis in the form [lower, upper]. Clients determine whether bounds are to be inclusive or exclusive of their limits
        - `label` string — label is a description of this Axis
        - `prefix` string — Prefix represents a label prefix for formatting axis values.
        - `suffix` string — Suffix represents a label suffix for formatting axis values.
        - `base` string — Base represents the radix for formatting axis values.
        - `scale` string — Scale is the axis formatting scale. Supported: "log", "linear"
      - `y` Axis — A description of a particular axis for a visualization
        - `bounds` integer[] — The extents of an axis in the form [lower, upper]. Clients determine whether bounds are to be inclusive or exclusive of their limits
        - `label` string — label is a description of this Axis
        - `prefix` string — Prefix represents a label prefix for formatting axis values.
        - `suffix` string — Suffix represents a label suffix for formatting axis values.
        - `base` string — Base represents the radix for formatting axis values.
        - `scale` string — Scale is the axis formatting scale. Supported: "log", "linear"
      - `y2` Axis — A description of a particular axis for a visualization
        - `bounds` integer[] — The extents of an axis in the form [lower, upper]. Clients determine whether bounds are to be inclusive or exclusive of their limits
        - `label` string — label is a description of this Axis
        - `prefix` string — Prefix represents a label prefix for formatting axis values.
        - `suffix` string — Suffix represents a label suffix for formatting axis values.
        - `base` string — Base represents the radix for formatting axis values.
        - `scale` string — Scale is the axis formatting scale. Supported: "log", "linear"
    - `type` 'single-stat' | 'line' | 'line-plus-single-stat' | 'line-stacked' | 'line-stepplot' | 'bar' | 'gauge' | 'table' — Cell visualization type
    - `colors` DashboardColor[] — Colors define encoding data into a visualization
      - `id` string — ID is the unique id of the cell color
      - `type` 'min' | 'max' | 'threshold' — Type is how the color is used.
      - `hex` string — Hex is the hex number of the color
      - `name` string — Name is the user-facing name of the hex color
      - `value` string — Value is the data value mapped to this color
    - `legend` object — Legend define encoding of the data into a cell's legend
      - `type` 'static' — type is the style of the legend
      - `orientation` 'top' | 'bottom' | 'left' | 'right' — orientation is the location of the legend with respect to the cell graph
    - `tableOptions` unknown
    - `fieldOptions` RenamableField[] — fieldOptions represent the fields retrieved by the query with customization options
      - `internalName` string — This is the calculated name of a field
      - `displayName` string — This is the name that a field is renamed to by the user
      - `visible` boolean — Indicates whether this field should be visible on the table
    - `timeFormat` string — timeFormat describes the display format for time values according to moment.js date formatting
    - `decimalPoints` object — decimal points indicates whether and how many digits to show after decimal point
      - `isEnforced` unknown
      - `digits` integer — The number of digits after decimal to display
    - `links` object
      - `self` string, url — Self link mapping to this resource
  - `link` Link — URI of resource.
    - `rel` string, required
    - `href` string, url, required

## Response `200`

Layout has been replaced and the new layout is returned.

- Layout
  - `id` string — ID is an opaque string that uniquely identifies this layout.
  - `app` string, required — App is the user facing name of this Layout
  - `measurement` string, required — Measurement is the descriptive name of the time series data.
  - `cells` Cell[], required — Cells are the individual visualization elements.
    - `i` string, uuid4, required — Unique ID of Cell
    - `x` integer, required — X-coordinate of Cell in the Dashboard
    - `y` integer, required — Y-coordinate of Cell in the Dashboard
    - `w` integer, required — Width of Cell in the Dashboard
    - `h` integer, required — Height of Cell in the Dashboard
    - `name` string — Title of Cell in the Dashboard
    - `queries` DashboardQuery[] — Time-series data queries for Cell
      - `label` string — Optional Y-axis user-facing label for this query
      - `range` object — Optional default range of the Y-axis
        - `upper` integer, required — Upper bound of the display range of the Y-axis
        - `lower` integer, required — Lower bound of the display range of the Y-axis
      - `query` string, required
      - `source` string, url — Optional URI for data source for this query
      - `type` string — The language used by the query (either influxql or flux
      - `queryConfig` QueryConfig
        - `id` string
        - `database` string, required
        - `measurement` string, required
        - `retentionPolicy` string, required
        - `areTagsAccepted` boolean, required
        - `rawText` string
        - `tags` object, required
        - `groupBy` object, required
          - `time` string, required
          - `tags` string[], required
        - `fields` Field[], required
          - `value` string, required — value is the value of the field. Meaning of the value is implied by the `type` key
          - `type` 'func' | 'field' | 'integer' | 'number' | 'regex' | 'wildcard', required — type describes the field type. func is a function; field is a field reference
          - `alias` string — Alias overrides the field name in the returned response. Applies only if type is `func`
          - `args` Field[] — Args are the arguments to the function
        - `range` object
          - `lower` string, required
          - `upper` string, required
    - `axes` object — The viewport for a Cell's visualizations
      - `x` Axis — A description of a particular axis for a visualization
        - `bounds` integer[] — The extents of an axis in the form [lower, upper]. Clients determine whether bounds are to be inclusive or exclusive of their limits
        - `label` string — label is a description of this Axis
        - `prefix` string — Prefix represents a label prefix for formatting axis values.
        - `suffix` string — Suffix represents a label suffix for formatting axis values.
        - `base` string — Base represents the radix for formatting axis values.
        - `scale` string — Scale is the axis formatting scale. Supported: "log", "linear"
      - `y` Axis — A description of a particular axis for a visualization
        - `bounds` integer[] — The extents of an axis in the form [lower, upper]. Clients determine whether bounds are to be inclusive or exclusive of their limits
        - `label` string — label is a description of this Axis
        - `prefix` string — Prefix represents a label prefix for formatting axis values.
        - `suffix` string — Suffix represents a label suffix for formatting axis values.
        - `base` string — Base represents the radix for formatting axis values.
        - `scale` string — Scale is the axis formatting scale. Supported: "log", "linear"
      - `y2` Axis — A description of a particular axis for a visualization
        - `bounds` integer[] — The extents of an axis in the form [lower, upper]. Clients determine whether bounds are to be inclusive or exclusive of their limits
        - `label` string — label is a description of this Axis
        - `prefix` string — Prefix represents a label prefix for formatting axis values.
        - `suffix` string — Suffix represents a label suffix for formatting axis values.
        - `base` string — Base represents the radix for formatting axis values.
        - `scale` string — Scale is the axis formatting scale. Supported: "log", "linear"
    - `type` 'single-stat' | 'line' | 'line-plus-single-stat' | 'line-stacked' | 'line-stepplot' | 'bar' | 'gauge' | 'table' — Cell visualization type
    - `colors` DashboardColor[] — Colors define encoding data into a visualization
      - `id` string — ID is the unique id of the cell color
      - `type` 'min' | 'max' | 'threshold' — Type is how the color is used.
      - `hex` string — Hex is the hex number of the color
      - `name` string — Name is the user-facing name of the hex color
      - `value` string — Value is the data value mapped to this color
    - `legend` object — Legend define encoding of the data into a cell's legend
      - `type` 'static' — type is the style of the legend
      - `orientation` 'top' | 'bottom' | 'left' | 'right' — orientation is the location of the legend with respect to the cell graph
    - `tableOptions` unknown
    - `fieldOptions` RenamableField[] — fieldOptions represent the fields retrieved by the query with customization options
      - `internalName` string — This is the calculated name of a field
      - `displayName` string — This is the name that a field is renamed to by the user
      - `visible` boolean — Indicates whether this field should be visible on the table
    - `timeFormat` string — timeFormat describes the display format for time values according to moment.js date formatting
    - `decimalPoints` object — decimal points indicates whether and how many digits to show after decimal point
      - `isEnforced` unknown
      - `digits` integer — The number of digits after decimal to display
    - `links` object
      - `self` string, url — Self link mapping to this resource
  - `link` Link — URI of resource.
    - `rel` string, required
    - `href` string, url, required

## Other responses

- `404` — Happens when trying to access a non-existent layout.
- `default` — A processing or an unexpected error.

---

[API](https://skmtc.net/influxdata/apis/chronograf.md) · [All operations](https://skmtc.net/influxdata/apis/chronograf/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/influxdata/chronograf/versions/ce55d963b4ac/schema)
