47fac22230
- .claude/CLAUDE.md - .claude/commands/subagentes.md - .claude/rules/INDEX.md - .mcp.json - bash/functions/cybersecurity/analyze_dns.md - bash/functions/cybersecurity/audit_http_headers.md - bash/functions/cybersecurity/audit_ssh_config.md - bash/functions/cybersecurity/check_firewall.md - bash/functions/cybersecurity/detect_suspicious_users.md - bash/functions/cybersecurity/encrypt_file.md - ... Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2.3 KiB
2.3 KiB
name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, params, output, tested, tests, test_file_path, file_path
| name | kind | lang | domain | version | purity | signature | description | tags | uses_functions | uses_types | returns | returns_optional | error_type | imports | params | output | tested | tests | test_file_path | file_path | |||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| metabase_get_dashboard | function | go | infra | 1.0.0 | impure | func MetabaseGetDashboard(client MetabaseClient, dashboardID int) (map[string]any, error) | Obtiene un dashboard completo de Metabase incluyendo todas sus dashcards (cards posicionadas en el dashboard), tabs y parametros. Endpoint: GET /api/dashboard/:id. |
|
|
false | error_go_core |
|
|
mapa con dashboard completo incluyendo dashcards, tabs, parametros | false | functions/infra/metabase_get_dashboard.go |
Ejemplo
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.