v1

latestOpenAPI 3.0.02026-07-142351,1971.3 MB
Dashboards

Create a new dashboard

Create a dashboard using the specified options. When defining queries in your widgets, take note of which queries should have the as_count() or as_rate() modifiers appended. Refer to the following documentation for more information on these modifiers.

post/api/v1/dashboard

Request body

author_handlestring

Identifier of the dashboard author.

author_namestring nullable

Name of the dashboard author.

created_atstring date-time

Creation date of the dashboard.

descriptionstring nullable

Description of the dashboard.

idstring

ID of the dashboard.

is_read_onlyboolean

Whether this dashboard is read-only. If True, only the author and admins can make changes to it.

This property is deprecated; please use the Restriction Policies API instead to manage write authorization for individual dashboards.

layout_type'ordered' | 'free' required

Layout type of the dashboard.

modified_atstring date-time

Modification date of the dashboard.

notify_liststring[] nullable

List of handles of users to notify when changes are made to this dashboard.

reflow_type'auto' | 'fixed'

Reflow type for a new dashboard layout dashboard. Set this only when layout type is 'ordered'. If set to 'fixed', the dashboard expects all widgets to have a layout, and if it's set to 'auto', widgets should not have layouts.

restricted_rolesstring[]

A list of role identifiers. Only the author and users associated with at least one of these roles can edit this dashboard.

tagsstring[] nullable

List of team names representing ownership of a dashboard.

titlestring required

Title of the dashboard.

urlstring

The URL of the dashboard.

Example request

{
  "author_handle": "test@datadoghq.com",
  "author_name": "John Doe",
  "id": "123-abc-456",
  "layout_type": "ordered",
  "tabs": [
    {
      "name": "L",
      "widget_ids": [
        0
      ]
    }
  ],
  "template_variables": [
    {
      "available_values": [
        "my-host",
        "host1",
        "host2"
      ],
      "default": "my-host",
      "defaults": [
        "my-host-1",
        "my-host-2"
      ],
      "name": "host1",
      "prefix": "host",
      "type": "group"
    }
  ],
  "url": "/dashboard/123-abc-456/example-dashboard-title",
  "widgets": [
    {
      "definition": {
        "requests": {
          "fill": {
            "q": "avg:system.cpu.user{*}"
          }
        },
        "type": "hostmap"
      }
    }
  ]
}

Response

OK

author_handlestring

Identifier of the dashboard author.

author_namestring nullable

Name of the dashboard author.

created_atstring date-time

Creation date of the dashboard.

descriptionstring nullable

Description of the dashboard.

idstring

ID of the dashboard.

is_read_onlyboolean

Whether this dashboard is read-only. If True, only the author and admins can make changes to it.

This property is deprecated; please use the Restriction Policies API instead to manage write authorization for individual dashboards.

layout_type'ordered' | 'free' required

Layout type of the dashboard.

modified_atstring date-time

Modification date of the dashboard.

notify_liststring[] nullable

List of handles of users to notify when changes are made to this dashboard.

reflow_type'auto' | 'fixed'

Reflow type for a new dashboard layout dashboard. Set this only when layout type is 'ordered'. If set to 'fixed', the dashboard expects all widgets to have a layout, and if it's set to 'auto', widgets should not have layouts.

restricted_rolesstring[]

A list of role identifiers. Only the author and users associated with at least one of these roles can edit this dashboard.

tagsstring[] nullable

List of team names representing ownership of a dashboard.

titlestring required

Title of the dashboard.

urlstring

The URL of the dashboard.

Example response

{
  "author_handle": "test@datadoghq.com",
  "author_name": "John Doe",
  "id": "123-abc-456",
  "layout_type": "ordered",
  "tabs": [
    {
      "name": "L",
      "widget_ids": [
        0
      ]
    }
  ],
  "template_variables": [
    {
      "available_values": [
        "my-host",
        "host1",
        "host2"
      ],
      "default": "my-host",
      "defaults": [
        "my-host-1",
        "my-host-2"
      ],
      "name": "host1",
      "prefix": "host",
      "type": "group"
    }
  ],
  "url": "/dashboard/123-abc-456/example-dashboard-title",
  "widgets": [
    {
      "definition": {
        "requests": {
          "fill": {
            "q": "avg:system.cpu.user{*}"
          }
        },
        "type": "hostmap"
      }
    }
  ]
}