Dashboards API - POST a dashboard
Creates a new dashboard.
The request consumes and produces an application/json
payload.
POST | SaaS | https://{your-environment-id}.live.dynatrace.com/api/config/v1/dashboards |
Environment ActiveGate | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/config/v1/dashboards |
Authentication
To execute this request, you need an access token with WriteConfig
scope.
To learn how to obtain and use it, see Tokens and authentication.
Parameters
The body must not provide an ID. An ID is assigned automatically by Dynatrace.
Refer to Tile JSON models to find JSON models for each tile type.
Request body objects
The Dashboard
object
Configuration of a dashboard.
The ID of the dashboard.
The DashboardMetadata
object
Parameters of a dashboard.
The tile uses consistent colors when rendering its content.
The name of the dashboard.
The owner of the dashboard.
The dashboard is a preset (true
) or a custom (false
) dashboard.
The dashboard is shared (true
) or private (false
).
A set of tags assigned to the dashboard.
The general size of the tiles tile. Default value is medium
small
medium
large
The DashboardFilter
object
Filters, applied to a dashboard.
The default timeframe of the dashboard.
The EntityShortRepresentation
object
The short representation of a Dynatrace entity.
A short description of the Dynatrace entity.
The ID of the Dynatrace entity.
The name of the Dynatrace entity.
The DynamicFilters
object
Dashboard filter configuration of a dashboard.
A set of all possible global dashboard filters that can be applied to a dashboard
Currently supported values are:
OS_TYPE,SERVICE_TYPE,DEPLOYMENT_TYPE,APPLICATION_INJECTION_TYPE,PAAS_VENDOR_TYPE,DATABASE_VENDOR,HOST_VIRTUALIZATION_TYPE,HOST_MONITORING_MODE,KUBERNETES_CLUSTER,RELATED_CLOUD_APPLICATION,RELATED_NAMESPACE,SERVICE_TAG_KEY:<tagname>,HOST_TAG_KEY:<tagname>,APPLICATION_TAG_KEY:<tagname>,CUSTOM_DIMENSION:<key>,PROCESS_GROUP_TAG_KEY:<tagname>,PROCESS_GROUP_INSTANCE_TAG_KEY:<tagname>
A set of generic tag filters that can be applied to a dashboard
The DashboardGenericTagFilter
object
Generic tag filters that can be applied to a dashboard.
The display name used to identify this generic filter.
Entity types affected by tag.
The entity type for which the suggestions should be provided.
The tag key for this filter.
The ConfigurationMetadata
object
Metadata useful for debugging
Dynatrace version.
A sorted list of the version numbers of the configuration.
A sorted list of version numbers of the configuration.
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.
The tile is configured and ready to use (true
) or just placed on the dashboard (false
).
The tile auto refresh is disabled. Only works for certain tile types.
The name of the tile.
The size of the tile name. Default value is null.
small
medium
large
Defines the actual set of fields depending on the value. See one of the following objects:
DATA_EXPLORER
-> DataExplorerTileCUSTOM_CHARTING
-> CustomChartingTileDTAQL
-> UserSessionQueryTileMARKDOWN
-> MarkdownTileIMAGE
-> ImageTileHOSTS
-> FilterableEntityTileAPPLICATIONS
-> FilterableEntityTileSERVICES
-> FilterableEntityTileDATABASES_OVERVIEW
-> FilterableEntityTileSYNTHETIC_TESTS
-> FilterableEntityTileAPPLICATION_WORLDMAP
-> AssignedEntitiesWithMetricTileRESOURCES
-> AssignedEntitiesWithMetricTileTHIRD_PARTY_MOST_ACTIVE
-> AssignedEntitiesWithMetricTileUEM_CONVERSIONS_PER_GOAL
-> AssignedEntitiesWithMetricTileHOST
-> AssignedEntitiesWithMetricTilePROCESS_GROUPS_ONE
-> AssignedEntitiesWithMetricTileSYNTHETIC_SINGLE_WEBCHECK
-> SyntheticSingleWebcheckTileAPPLICATION
-> AssignedEntitiesTileVIRTUALIZATION
-> AssignedEntitiesTileAWS
-> AssignedEntitiesTileSERVICE_VERSATILE
-> AssignedEntitiesTileSESSION_METRICS
-> AssignedEntitiesTileUSERS
-> AssignedEntitiesTileUEM_KEY_USER_ACTIONS
-> AssignedEntitiesTileBOUNCE_RATE
-> AssignedEntitiesTileUEM_CONVERSIONS_OVERALL
-> AssignedEntitiesTileUEM_JSERRORS_OVERALL
-> AssignedEntitiesTileMOBILE_APPLICATION
-> AssignedEntitiesTileSYNTHETIC_SINGLE_EXT_TEST
-> AssignedEntitiesTileSYNTHETIC_HTTP_MONITOR
-> AssignedEntitiesTileDATABASE
-> AssignedEntitiesTileCUSTOM_APPLICATION
-> AssignedEntitiesTileAPPLICATION_METHOD
-> AssignedEntitiesTileLOG_ANALYTICS
-> AssignedEntitiesTileOPENSTACK
-> AssignedEntitiesTileOPENSTACK_PROJECT
-> AssignedEntitiesTileOPENSTACK_AV_ZONE
-> AssignedEntitiesTileDEVICE_APPLICATION_METHOD
-> AssignedEntitiesTileDEM_KEY_USER_ACTION
-> AssignedEntitiesTileSLO
-> AssignedEntitiesWithMetricTileSCALABLE_LIST
-> ScalableListTileHEADER
-> TileOPEN_PROBLEMS
-> ProblemTilePURE_MODEL
-> TileDOCKER
-> TileNETWORK_MEDIUM
-> TileAPPLICATIONS_MOST_ACTIVE
-> TileNETWORK
-> TileUEM_ACTIVE_SESSIONS
-> TileDCRUM_SERVICES
-> Tile
APPLICATION
APPLICATIONS
APPLICATIONS_MOST_ACTIVE
APPLICATION_METHOD
APPLICATION_WORLDMAP
AWS
BOUNCE_RATE
CUSTOM_APPLICATION
CUSTOM_CHARTING
DATABASE
DATABASES_OVERVIEW
DATA_EXPLORER
DCRUM_SERVICES
DEM_KEY_USER_ACTION
DEVICE_APPLICATION_METHOD
DOCKER
DTAQL
HEADER
HOST
HOSTS
IMAGE
LOG_ANALYTICS
MARKDOWN
MOBILE_APPLICATION
NETWORK
NETWORK_MEDIUM
OPENSTACK
OPENSTACK_AV_ZONE
OPENSTACK_PROJECT
OPEN_PROBLEMS
PROCESS_GROUPS_ONE
PURE_MODEL
RESOURCES
SCALABLE_LIST
SERVICES
SERVICE_VERSATILE
SESSION_METRICS
SLO
SYNTHETIC_HTTP_MONITOR
SYNTHETIC_SINGLE_EXT_TEST
SYNTHETIC_SINGLE_WEBCHECK
SYNTHETIC_TESTS
THIRD_PARTY_MOST_ACTIVE
UEM_ACTIVE_SESSIONS
UEM_CONVERSIONS_OVERALL
UEM_CONVERSIONS_PER_GOAL
UEM_JSERRORS_OVERALL
UEM_KEY_USER_ACTIONS
USERS
VIRTUALIZATION
The TileBounds
object
The position and size of a tile.
The height of the tile, in pixels.
The horizontal distance from the top left corner of the dashboard to the top left corner of the tile, in pixels.
The vertical distance from the top left corner of the dashboard to the top left corner of the tile, in pixels.
The width of the tile, in pixels.
The TileFilter
object
A filter applied to a tile.
It overrides dashboard's filter.
The default timeframe of the tile.
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.
{"dashboardMetadata": {"dashboardFilter": {"managementZone": {"id": "3438779970106539862","name": "Example Management Zone"},"timeframe": "l_72_HOURS"},"dynamicFilters": {"filters": ["SERVICE_TYPE"]},"name": "Example Dashboard","owner": "Example Owner","shared": true},"metadata": {"clusterVersion": "Mock version","configurationVersions": [4,2]},"tiles": [{"bounds": {"height": 38,"left": 0,"top": 0,"width": 304},"configured": true,"name": "Hosts","tileFilter": {},"tileType": "HEADER"},{"bounds": {"height": 38,"left": 304,"top": 0,"width": 304},"configured": true,"name": "Applications","tileFilter": {},"tileType": "HEADER"},{"bounds": {"height": 304,"left": 0,"top": 38,"width": 304},"chartVisible": true,"configured": true,"name": "Host health","tileFilter": {"managementZone": {"id": "3438779970106539862","name": "Example Management Zone"}},"tileType": "HOSTS"},{"bounds": {"height": 304,"left": 304,"top": 38,"width": 304},"chartVisible": true,"configured": true,"name": "Application health","tileFilter": {"managementZone": {"id": "3438779970106539862","name": "Example Management Zone"}},"tileType": "APPLICATIONS"}]}
Response
Response codes
Success. The new dashboard has been created. The response body contains the generated ID.
Response body objects
The EntityShortRepresentation
object
The short representation of a Dynatrace entity.
A short description of the Dynatrace entity.
The ID of the Dynatrace entity.
The name of the Dynatrace entity.
Response body JSON model
{"description": "Dynatrace entity for the REST API example","id": "6a98d7bc-abb9-44f8-ae6a-73e68e71812a","name": "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.
POST | SaaS | https://{your-environment-id}.live.dynatrace.com/api/config/v1/dashboards/validator |
Environment ActiveGate | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/config/v1/dashboards/validator |
Authentication
To execute this request, you need an access token with WriteConfig
scope.
To learn how to obtain and use it, see Tokens and authentication.
Response
Response codes
Validated. The submitted dashboard is valid. The response doesn't have a body.
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 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
Request body
{"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