---
name: metabase_get_dashboard
kind: function
lang: go
domain: infra
version: "1.0.0"
purity: impure
signature: "func MetabaseGetDashboard(client MetabaseClient, dashboardID int) (map[string]any, error)"
description: "Obtiene un dashboard completo de Metabase incluyendo todas sus dashcards (cards posicionadas en el dashboard), tabs y parametros. Endpoint: GET /api/dashboard/:id."
tags: [metabase, dashboard, get, api, pendiente-usar]
uses_functions: []
uses_types: [MetabaseClient_go_infra]
returns: []
returns_optional: false
error_type: "error_go_core"
imports: [fmt]
params:
  - name: client
    desc: "cliente MetabaseClient autenticado"
  - name: dashboardID
    desc: "ID del dashboard"
output: "mapa con dashboard completo incluyendo dashcards, tabs, parametros"
tested: false
tests: []
test_file_path: ""
file_path: "functions/infra/metabase_get_dashboard.go"
---

## Ejemplo

```go
dashboard, err := MetabaseGetDashboard(client, 1)
if err != nil {
    log.Fatal(err)
}
fmt.Println(dashboard["name"])

// Acceder a las cards del dashboard
dashcards := dashboard["dashcards"].([]any)
for _, dc := range dashcards {
    card := dc.(map[string]any)
    fmt.Printf("Card ID: %v, Position: (%v, %v)\n",
        card["card_id"], card["col"], card["row"])
}
```

## Notas

### Campos principales

| Campo | Tipo | Descripcion |
|-------|------|-------------|
| id | float64 | ID del dashboard |
| name | string | Nombre |
| description | string | Descripcion |
| dashcards | []map | Array de dashcards (cards posicionadas) |
| parameters | []map | Filtros del dashboard |
| tabs | []map | Tabs del dashboard |
| collection_id | float64 | Coleccion contenedora |
| archived | bool | Archivado |

### Estructura de cada dashcard

| Campo | Tipo | Descripcion |
|-------|------|-------------|
| id | float64 | ID del dashcard (positivo) |
| card_id | float64 | ID de la card/pregunta asociada |
| card | map | Objeto card completo |
| size_x | float64 | Ancho en grid (1-18) |
| size_y | float64 | Alto en grid |
| col | float64 | Columna en grid (0-based) |
| row | float64 | Fila en grid (0-based) |
| dashboard_tab_id | float64 | Tab al que pertenece (null = sin tabs) |
| parameter_mappings | []map | Mapeo de filtros a la card |
| visualization_settings | map | Settings de visualizacion |

Usar estos datos para construir el payload de MetabaseUpdateDashboard.
