Dashboards

Create Dashboard

Creates a new dashboard

post/api/v2/dashboards

Request body

namestring required

Dashboard name.

tagsstring[]

Tags for organizing and filtering dashboards.

savedQuerystring nullable

Optional default dashboard query to persist on the dashboard.

savedQueryLanguage'sql' | 'lucene'

Query language for the where clause.

Example request

{
  "name": "New Dashboard",
  "tiles": [
    {
      "name": "Error Rate",
      "w": 6,
      "h": 3,
      "config": {
        "displayType": "line",
        "sourceId": "65f5e4a3b9e77c001a111111",
        "select": [
          {
            "valueExpression": "Duration",
            "alias": "Request Duration",
            "where": "service:api",
            "metricName": "http.server.duration",
            "periodAggFn": "delta"
          }
        ],
        "groupBy": "host",
        "numberFormat": {
          "mantissa": 2,
          "thousandSeparated": true,
          "factor": 1,
          "currencySymbol": "$",
          "numericUnit": "bytes_iec",
          "unit": "ms"
        }
      },
      "id": "65f5e4a3b9e77c001a901234",
      "series": [
        {
          "type": "time",
          "sourceId": "65f5e4a3b9e77c001a567890",
          "level": 0.95,
          "field": "duration",
          "alias": "Request Duration",
          "where": "service:api",
          "groupBy": [
            "host"
          ],
          "numberFormat": {
            "mantissa": 2,
            "thousandSeparated": true,
            "factor": 1,
            "currencySymbol": "$",
            "numericUnit": "bytes_iec",
            "unit": "ms"
          },
          "metricName": "http.server.duration"
        }
      ]
    }
  ],
  "tags": [
    "development"
  ],
  "filters": [
    {
      "type": "QUERY_EXPRESSION",
      "name": "Environment",
      "expression": "environment",
      "sourceId": "65f5e4a3b9e77c001a111111",
      "sourceMetricType": "gauge",
      "where": "ServiceName:api",
      "whereLanguage": "lucene"
    }
  ],
  "savedQuery": "service.name = 'api'",
  "savedFilterValues": [
    {
      "type": "sql",
      "condition": "ServiceName IN ('hdx-oss-dev-api')"
    }
  ]
}

Response

Successfully created dashboard

Changes