--- name: metabase_update_dashboard kind: function lang: py domain: infra version: "1.0.0" purity: impure signature: "def metabase_update_dashboard(client: MetabaseClient, dashboard_id: int, **fields) -> dict" description: "Actualiza dashboard incluyendo metadata, cards y tabs via kwargs. dashcards es el estado completo deseado: nuevas con ID negativo, existentes con positivo, omitidas se eliminan. Endpoint: PUT /api/dashboard/:id." tags: [metabase, dashboard, update, cards, api, python] uses_functions: [] uses_types: [] returns: [] returns_optional: false error_type: "error_go_core" imports: [httpx] tested: false tests: [] test_file_path: "" file_path: "python/functions/metabase/dashboards.py" --- ## Ejemplo ```python # Agregar card dash = metabase_get_dashboard(client, 1) cards = list(dash["dashcards"]) cards.append({"id": -1, "card_id": 55, "size_x": 6, "size_y": 4, "col": 0, "row": 0}) metabase_update_dashboard(client, 1, dashcards=cards) # Archivar metabase_update_dashboard(client, 1, archived=True) ``` ## Notas dashcards = estado completo. ID negativo = nueva, positivo = existente, omitida = eliminada. Campos: name, description, archived, dashcards, tabs, parameters, collection_id.