Dashboards API - POST a dashboard

Creates a new dashboard.

The request consumes and produces an application/json payload.

Early Adopter

This request is an Early Adopter release and may be changed in non-compatible way.

POST
  • Managed https://{your-domain}/e/{your-environment-id}/api/config/v1/dashboards
  • SaaS https://{your-environment-id}.live.dynatrace.com/api/config/v1/dashboards

Parameters

Refer to Tile JSON models to find JSON models for each tile type.

Parameter Type Description In Required
body Dashboard

The JSON body of the request. Contains parameters of the new dashboard.

body optional

The Dashboard object

Configuration of a dashboard.

Element Type Description Required
metadata ConfigurationMetadata optional
id string

The ID of the dashboard.

optional
dashboardMetadata DashboardMetadata required
tiles Tile[]

The list of tiles on the dashboard.

required

The Tile object

Configuration of a tile.

The actual set of fields depends on the type of the tile. See the description of the tileType field.

Element Type Description Required
name string

The name of the tile.

required
tileType string

Defines the actual set of fields depending on the value. See one of the following objects:

  • CUSTOM_CHARTING -> CustomChartingTile
  • DTAQL -> UserSessionQueryTile
  • MARKDOWN -> MarkdownTile
  • HOSTS -> FilterableEntityTile
  • APPLICATIONS -> FilterableEntityTile
  • SERVICES -> FilterableEntityTile
  • DATABASES_OVERVIEW -> FilterableEntityTile
  • SYNTHETIC_TESTS -> FilterableEntityTile
  • APPLICATION_WORLDMAP -> AssignedEntitiesWithMetricTile
  • RESOURCES -> AssignedEntitiesWithMetricTile
  • THIRD_PARTY_MOST_ACTIVE -> AssignedEntitiesWithMetricTile
  • UEM_CONVERSIONS_PER_GOAL -> AssignedEntitiesWithMetricTile
  • HOST -> AssignedEntitiesWithMetricTile
  • PROCESS_GROUPS_ONE -> AssignedEntitiesWithMetricTile
  • SYNTHETIC_SINGLE_WEBCHECK -> SyntheticSingleWebcheckTile
  • APPLICATION -> AssignedEntitiesTile
  • VIRTUALIZATION -> AssignedEntitiesTile
  • AWS -> AssignedEntitiesTile
  • SERVICE_VERSATILE -> AssignedEntitiesTile
  • SESSION_METRICS -> AssignedEntitiesTile
  • USERS -> AssignedEntitiesTile
  • UEM_KEY_USER_ACTIONS -> AssignedEntitiesTile
  • BOUNCE_RATE -> AssignedEntitiesTile
  • UEM_CONVERSIONS_OVERALL -> AssignedEntitiesTile
  • UEM_JSERRORS_OVERALL -> AssignedEntitiesTile
  • MOBILE_APPLICATION -> AssignedEntitiesTile
  • SYNTHETIC_SINGLE_EXT_TEST -> AssignedEntitiesTile
  • SYNTHETIC_HTTP_MONITOR -> AssignedEntitiesTile
  • DATABASE -> AssignedEntitiesTile
  • CUSTOM_APPLICATION -> AssignedEntitiesTile
  • APPLICATION_METHOD -> AssignedEntitiesTile
  • LOG_ANALYTICS -> AssignedEntitiesTile
  • OPENSTACK -> AssignedEntitiesTile
  • OPENSTACK_PROJECT -> AssignedEntitiesTile
  • OPENSTACK_AV_ZONE -> AssignedEntitiesTile
  • DEVICE_APPLICATION_METHOD -> AssignedEntitiesTile
  • DEM_KEY_USER_ACTION -> AssignedEntitiesTile
The tileType element can hold these values.
required
configured boolean

The tile is configured and ready to use (true) or just placed on the dashboard (false).

optional
bounds TileBounds required
tileFilter TileFilter optional

The TileFilter object

A filter applied to a tile.

It overrides dashboard's filter.

Element Type Description Required
timeframe string

The default timeframe of the tile.

optional
managementZone EntityShortRepresentation optional

The TileBounds object

The position and size of a tile.

Element Type Description Required
top integer

The vertical distance from the top left corner of the dashboard to the top left corner of the tile, in pixels.

optional
left integer

The horizontal distance from the top left corner of the dashboard to the top left corner of the tile, in pixels.

optional
width integer

The width of the tile, in pixels.

optional
height integer

The height of the tile, in pixels.

optional

The DashboardMetadata object

Parameters of a dashboard.

Element Type Description Required
name string

The name of the dashboard.

required
shared boolean

The dashboard is shared (true) or private (false).

optional
owner string

The owner of the dashboard.

optional
sharingDetails SharingInfo optional
dashboardFilter DashboardFilter optional
tags string[]

A set of tags assigned to the dashboard.

optional
template boolean[]

The dashboard is a template (true)

optional

The DashboardFilter object

Filters, applied to a dashboard.

Element Type Description Required
timeframe string

The default timeframe of the dashboard.

optional
managementZone EntityShortRepresentation optional

The EntityShortRepresentation object

The short representation of a Dynatrace entity.

Element Type Description Required
id string

The ID of the Dynatrace entity.

required
name string

The name of the Dynatrace entity.

optional
description string

A short description of the Dynatrace entity.

optional

The SharingInfo object

Sharing configuration of a dashboard.

Element Type Description Required
linkShared boolean

If true, the dashboard is shared via link and authenticated users with the link can view.

optional
published boolean

If true, the dashboard is published to anyone on this environment.

optional

The ConfigurationMetadata object

Metadata useful for debugging

Element Type Description Required
clusterVersion string

Dynatrace server version.

optional
configurationVersions integer[]

A Sorted list of the version numbers of the configuration.

optional

Possible values

Possible values for the tileType element in the Tile object:

  • APPLICATION
  • APPLICATIONS
  • APPLICATION_METHOD
  • APPLICATION_WORLDMAP
  • AWS
  • BOUNCE_RATE
  • CUSTOM_APPLICATION
  • CUSTOM_CHARTING
  • DATABASE
  • DATABASES_OVERVIEW
  • DEM_KEY_USER_ACTION
  • DEVICE_APPLICATION_METHOD
  • DTAQL
  • HOST
  • HOSTS
  • LOG_ANALYTICS
  • MARKDOWN
  • MOBILE_APPLICATION
  • OPENSTACK
  • OPENSTACK_AV_ZONE
  • OPENSTACK_PROJECT
  • PROCESS_GROUPS_ONE
  • RESOURCES
  • SERVICES
  • SERVICE_VERSATILE
  • SESSION_METRICS
  • SYNTHETIC_HTTP_MONITOR
  • SYNTHETIC_SINGLE_EXT_TEST
  • SYNTHETIC_SINGLE_WEBCHECK
  • SYNTHETIC_TESTS
  • THIRD_PARTY_MOST_ACTIVE
  • UEM_CONVERSIONS_OVERALL
  • UEM_CONVERSIONS_PER_GOAL
  • UEM_JSERRORS_OVERALL
  • UEM_KEY_USER_ACTIONS
  • USERS
  • VIRTUALIZATION

Response format

The EntityShortRepresentation object

The short representation of a Dynatrace entity.

Element Type Description
id string

The ID of the Dynatrace entity.

name string

The name of the Dynatrace entity.

description string

A short description of the Dynatrace entity.

Validate payload

We recommend that you validate the payload before submitting it with an actual request. A response code of 204 indicates a valid payload.

The request consumes an application/json payload.

The request consumes an application/json payload.

Early Adopter

This request is an Early Adopter release and may be changed in non-compatible way.

POST
  • Managed https://{your-domain}/e/{your-environment-id}/api/config/v1/dashboards/validator
  • SaaS https://{your-environment-id}.live.dynatrace.com/api/config/v1/dashboards/validator

Response code

Code Description
204 Validated. The submitted dashboard is valid. The response doesn't have a body.
400 Failed. The input is invalid

Example

In this example, the request creates a new dashboard with the REST example name. The dashboard shows data for the Easytravel management zone in the time frame of last 2 hours.

The dashboard contains just one tile—a User Session Query tile that queries for all user actions that, according to their Apdex status, are either tolerating or frustrated.

The API token is passed in the Authorization header.

Since the request body is lengthy, it is truncated in this example Curl section. See the full body in the Request body section. You can download or copy the example request body to try it out on your own. Be sure to replace the ID and name of the Easytravel management zone to a management zone that exists in your environment or set this field to null.

Curl

curl -X POST \
  https://mySampleEnv.live.dynatrace.com/api/config/v1/dashboards \
  -H 'Authorization: Api-token abcdefjhij1234567890' \
  -H 'Content-Type: application/json' \  
  -d '{<truncated - see the Request body section >}'

Request URL

https://mySampleEnv.live.dynatrace.com/api/config/v1/dashboards

Request body

Download
{
  "dashboardMetadata": {
    "name": "REST example",
    "shared": true,
    "sharingDetails": {
      "linkShared": true,
      "published": true
    },
    "dashboardFilter": {
      "timeframe": "l_2_HOURS",
      "managementZone": {
        "id": "9130632296508575249",
        "name": "Easytravel"
      }
    }
  },
  "tiles": [
    {
      "name": "User Sessions Query",
      "tileType": "DTAQL",
      "configured": true,
      "bounds": {
        "top": 0,
        "left": 0,
        "width": 1200,
        "height": 450
      },
      "tileFilter": {
        "managementZone": null
      },
      "customName": "User sessions query results",
      "query": "select * FROM useraction where (apdexCategory IS 'TOLERATING' OR apdexCategory IS 'FRUSTRATED')",
      "type": "TABLE",
      "chartConfig": {
        "xAxis": [
          "apdexCategory"
        ],
        "yAxis": [
          "application"
        ]
      }
    }
  ]
}

Response body

{
  "id": "7dd386fe-f91d-42e3-a2ec-0c88070933f4",
  "name": "REST example"
}

Response code

204

Result

New dashboard