# List all charts

Retrieves a list of all charts on a specific dashboard.

[endpoint]
base_url = "https://telemetry.betterstack.com"
path = "/api/v2/dashboards/{dashboard_id}/charts"
method = "GET"

[[path_param]]
name = "dashboard_id"
description = "The unique identifier of the dashboard."
required = true
type = "integer"

[[header]]
name = "Authorization"
description = "Bearer `$TOKEN`"
required = true
type = "string"
[/endpoint]

[responses]
[[response]]
status = 200
description = "A list of charts for the specified dashboard."
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"
          }
        ]
      }
    }
  ]
}
'''

[[response]]
status = 404
description = "A dashboard with the specified ID was not found."
[/responses]

## Example request

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