List all charts

Retrieves a list of all charts on a specific dashboard.

GET https://telemetry.betterstack.com/api/v2/dashboards/{dashboard_id}/charts

URL parameters

dashboard_id
required integer

Headers

Authorization
required string
200

Response body

{
  "data": [
    {
      "id": "567",
      "type": "chart",
      "attributes": {
        "chart_type": "line_chart",
        "name": "CPU Usage",
        "description": "Average CPU usage over time.",
        "x": 0,
        "y": 0,
        "w": 6,
        "h": 4,
        "settings": {
          "unit": "percent",
          "y_axis_scale": "linear"
        },
        "queries": [
          {
            "id": 890,
            "name": "CPU Query",
            "query_type": "sql_expression",
            "source_variable": "source",
            "sql_query": "SELECT {{time}} as time, avg(cpu) as value FROM metrics GROUP BY time"
          }
        ]
      }
    }
  ]
}
404

Example Request

cURL
curl --request GET \
     --url https://telemetry.betterstack.com/api/v2/dashboards/1234/charts \
     --header "Authorization: Bearer $TOKEN"