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,
            "query_type": "sql_expression",
            "source_variable": "source",
            "sql_query": "SELECT {{time}} as time, avg(cpu) as value FROM metrics GROUP BY time"
          }
        ]
      }
    }
  ]
}
404

Response attributes

id
string
type
string
attributes.chart_type
string
attributes.name
string
attributes.description
string or null
attributes.x
integer
attributes.y
integer
attributes.w
integer
attributes.h
integer
attributes.settings
object
attributes.queries
array
attributes.queries[].id
integer
attributes.queries[].name
string
attributes.queries[].query_type
string
attributes.queries[].source_variable
string
attributes.queries[].sql_query
string
attributes.queries[].pql_query
string
attributes.queries[].where_condition
string
attributes.queries[].static_text
string
attributes.queries[].funnel_query
object
attributes.queries[].x_axis
array
attributes.queries[].y_axis
array
attributes.queries[].point_size
array
attributes.queries[].coordinates
array
attributes.queries[].filters
array
attributes.queries[].where
array
attributes.queries[].group_by
array
attributes.queries[].having
array
attributes.queries[].order_by
array

Example request

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