Update a dashboard

Updates an existing dashboard by its ID. You only need to provide the fields you want to change.

When updating variables, the entire array of custom variables will be replaced with the one you provide. System variables (time, start_time, end_time, source) are preserved.

PATCH https://telemetry.betterstack.com/api/v2/dashboards/{id}

URL parameters

id
required integer

Headers

Authorization
required string

Body parameters

name
string
dashboard_group_id
integer
refresh_interval
integer
date_range_from
string
date_range_to
string
source_eligibility_sql
string
variables
array
200

Response body

{
  "data": {
    "id": "1234",
    "type": "dashboard",
    "attributes": {
      "name": "Updated API Dashboard",
      "refresh_interval": 120,
      "variables": [
        {
          "name": "environment",
          "variable_type": "string",
          "values": [
            "staging"
          ],
          "default_values": [
            "staging"
          ]
        }
      ]
    }
  }
}
404

Example Request

cURL
curl --request PATCH \
  --url https://telemetry.betterstack.com/api/v2/dashboards/1234 \
  --header "Authorization: Bearer $TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
    "name": "Updated API Dashboard",
    "refresh_interval": 120,
    "variables": [
      {
        "name": "environment",
        "variable_type": "string",
        "values": ["staging"],
        "default_values": ["staging"]
      }
    ]
  }'