Dashboards API - PUT a dashboard
Updates the specified dashboard.
The request consumes and produces an application/json
payload.
PUT | Managed | https://{your-domain}/e/{your-environment-id}/api/config/v1/dashboards/{id} |
SaaS | https://{your-environment-id}.live.dynatrace.com/api/config/v1/dashboards/{id} | |
Environment ActiveGate | https://{your-activegate-domain}/e/{your-environment-id}/api/config/v1/dashboards/{id} |
Authentication
To execute this request, you need an access token with Write configuration (WriteConfig
) scope. To learn how to obtain and use it, see Tokens and authentication.
Parameters
Refer to Tile JSON models to find JSON models for each tile type.
Parameter | Type | Description | In | Required |
---|---|---|---|---|
id | string | The ID of the dashboard to be updated. The ID in the request body must match this ID. | path | required |
body | Dashboard | The JSON body of the request. Contains updated parameters of the dashboard. | body | optional |
Request body objects
The Dashboard
object
Configuration of a dashboard.
Element | Type | Description |
---|---|---|
metadata | Configuration | Metadata useful for debugging Can be |
id | string | The ID of the dashboard. Can be |
dashboardMetadata | Dashboard | Parameters of a dashboard. |
tiles | Tile[] | The list of tiles on the dashboard. |
The ConfigurationMetadata
object
Metadata useful for debugging
Element | Type | Description |
---|---|---|
configurationVersions | integer[] | A sorted list of the version numbers of the configuration. Can be |
currentConfigurationVersions | string[] | A sorted list of version numbers of the configuration. Can be |
clusterVersion | string | Dynatrace version. Can be |
The DashboardMetadata
object
Parameters of a dashboard.
Element | Type | Description |
---|---|---|
name | string | The name of the dashboard. |
shared | boolean | The dashboard is shared ( Can be |
owner | string | The owner of the dashboard. |
dashboardFilter | Dashboard | Filters, applied to a dashboard. Can be |
tags | string[] | A set of tags assigned to the dashboard. Can be |
preset | boolean | The dashboard is a preset ( Can be |
dynamicFilters | Dynamic | Dashboard filter configuration of a dashboard. Can be |
tilesNameSize | string | The general size of the tiles tile. Default value is medium Can be |
The DashboardFilter
object
Filters, applied to a dashboard.
Element | Type | Description |
---|---|---|
timeframe | string | The default timeframe of the dashboard. Can be |
managementZone | Entity | The short representation of a Dynatrace entity. Can be |
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. Can be |
description | string | A short description of the Dynatrace entity. Can be |
The DynamicFilters
object
Dashboard filter configuration of a dashboard.
Element | Type | Description |
---|---|---|
filters | string[] | A set of all possible global dashboard filters that can be applied to a dashboard Currently supported values are:
|
tagSuggestionTypes | string[] | A set of entities applied for tag filter suggestions. You can fetch the list of possible values with the GET all entity typesrequest. Only applicable if the filters set includes Can be |
The Tile
object
Configuration of a tile.
The actual set of fields depends on the type of the tile. Find the list of actual objects in the description of the tileType field or see Dashboards API - Tile JSON models.
Element | Type | Description |
---|---|---|
name | string | The name of the tile. |
nameSize | string | The size of the tile name. Default value is null. Can be |
tileType | string | Defines the actual set of fields depending on the value. See one of the following objects:
|
configured | boolean | The tile is configured and ready to use ( Can be |
bounds | Tile | The position and size of a tile. |
tileFilter | Tile | A filter applied to a tile. It overrides dashboard's filter. Can be |
The TileBounds
object
The position and size of a tile.
Element | Type | Description |
---|---|---|
top | integer | The vertical distance from the top left corner of the dashboard to the top left corner of the tile, in pixels. Can be |
left | integer | The horizontal distance from the top left corner of the dashboard to the top left corner of the tile, in pixels. Can be |
width | integer | The width of the tile, in pixels. Can be |
height | integer | The height of the tile, in pixels. Can be |
The TileFilter
object
A filter applied to a tile.
It overrides dashboard's filter.
Element | Type | Description |
---|---|---|
timeframe | string | The default timeframe of the tile. Can be |
managementZone | Entity | The short representation of a Dynatrace entity. Can be |
Request body JSON model
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{
"metadata": {
"configurationVersions": [
4,
2
],
"clusterVersion": "Mock version"
},
"dashboardMetadata": {
"name": "Example Dashboard",
"owner": "Example Owner",
"shared": true,
"dashboardFilter": {
"timeframe": "l_72_HOURS",
"managementZone": {
"id": "3438779970106539862",
"name": "Example Management Zone"
}
},
"dynamicFilters": {
"filters": [
"SERVICE_TYPE"
],
"tagSuggestionTypes": [
"HOST_LIKE"
]
}
},
"tiles": [
{
"name": "Hosts",
"tileType": "HEADER",
"configured": true,
"bounds": {
"top": 0,
"left": 0,
"width": 304,
"height": 38
},
"tileFilter": {}
},
{
"name": "Applications",
"tileType": "HEADER",
"configured": true,
"bounds": {
"top": 0,
"left": 304,
"width": 304,
"height": 38
},
"tileFilter": {}
},
{
"name": "Host health",
"tileType": "HOSTS",
"configured": true,
"bounds": {
"top": 38,
"left": 0,
"width": 304,
"height": 304
},
"tileFilter": {
"managementZone": {
"id": "3438779970106539862",
"name": "Example Management Zone"
}
},
"chartVisible": true
},
{
"name": "Application health",
"tileType": "APPLICATIONS",
"configured": true,
"bounds": {
"top": 38,
"left": 304,
"width": 304,
"height": 304
},
"tileFilter": {
"managementZone": {
"id": "3438779970106539862",
"name": "Example Management Zone"
}
},
"chartVisible": true
}
]
}
Response
Response codes
Code | Type | Description |
---|---|---|
201 | Entity | Success. The new dashboard has been created. Response doesn't have a body. |
204 | - | Success. The dashboard has been updated. Response doesn't have a body |
400 | Error | Failed. The input is invalid |
Response body objects
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. Can be |
description | string | A short description of the Dynatrace entity. Can be |
Response body JSON model
{
"id": "6a98d7bc-abb9-44f8-ae6a-73e68e71812a",
"name": "Dynatrace entity",
"description": "Dynatrace entity for the REST API example"
}
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.
POST | Managed | https://{your-domain}/e/{your-environment-id}/api/config/v1/dashboards/{id}/validator |
SaaS | https://{your-environment-id}.live.dynatrace.com/api/config/v1/dashboards/{id}/validator | |
Environment ActiveGate | https://{your-activegate-domain}/e/{your-environment-id}/api/config/v1/dashboards/{id}/validator |
Authentication
To execute this request, you need an access token with Write configuration (WriteConfig
) scope. To learn how to obtain and use it, see Tokens and authentication.
Response
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 | |
Environment ActiveGate | https://{your-activegate-domain}/e/{your-environment-id}/api/config/v1/dashboards/validator |
Authentication
To execute this request, you need an access token with Write configuration (WriteConfig
) scope. To learn how to obtain and use it, see Tokens and authentication.
Example
In this example, the request adds the Service health tile to the Sample dashboard in the GET request example.
The tile shows the health of all services belonging to the Easytravel management zone. It is located next to the existing Host health tile and has the same size (304x304 pixels).
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 change 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 PUT \
https://mySampleEnv.live.dynatrace.com/api/config/v1/dashboards/2768e6ca-e199-4433-9e0d-2922aec2099b \
-H 'Authorization: Api-Token dt0c01.abc123.abcdefjhij1234567890' \
-H 'Content-Type: application/json' \
-d '{<truncated - see the Request body section >}'
Request URL
https://mySampleEnv.live.dynatrace.com/api/config/v1/dashboards/2768e6ca-e199-4433-9e0d-2922aec2099b
Request body
{
"id": "2768e6ca-e199-4433-9e0d-2922aec2099b",
"dashboardMetadata": {
"name": "Sample dashboard",
"shared": true,
"owner": "john.smith",
"sharingDetails": {
"linkShared": true,
"published": true
},
"dashboardFilter": {
"timeframe": "l_2_HOURS",
"managementZone": null
}
},
"tiles": [
{
"name": "Host health",
"tileType": "HOSTS",
"configured": true,
"bounds": {
"top": 0,
"left": 304,
"width": 304,
"height": 304
},
"tileFilter": {
"managementZone": {
"id": "9130632296508575249",
"name": "Easytravel"
}
},
"filterConfig": null,
"chartVisible": true
},
{
"name": "User behavior",
"tileType": "SESSION_METRICS",
"configured": true,
"bounds": {
"top": 0,
"left": 0,
"width": 304,
"height": 304
},
"tileFilter": {
"managementZone": null
},
"assignedEntities": ["APPLICATION-8E41C8C247910758"]
},
{
"name": "Service health",
"tileType": "SERVICES",
"configured": true,
"bounds": {
"top": 0,
"left": 608,
"width": 304,
"height": 304
},
"tileFilter": {
"managementZone": {
"id": "9130632296508575249",
"name": "Easytravel"
}
},
"filterConfig": null,
"chartVisible": true
}
]
}
Response code
204