---
name: metabase_get_document
kind: function
lang: py
domain: infra
version: "1.0.0"
purity: impure
signature: "def metabase_get_document(client: MetabaseClient, document_id: int) -> dict"
description: "Obtiene un document completo con su arbol ProseMirror (campo document). Endpoint: GET /api/document/:id."
tags: [metabase, document, get, api, python]
uses_functions: []
uses_types: []
returns: []
returns_optional: false
error_type: "error_go_core"
imports: [httpx]
params:
  - name: client
    desc: "instancia autenticada de MetabaseClient"
  - name: document_id
    desc: "ID del document a obtener"
output: "dict: objeto document con name, document (ProseMirror tree), collection_id, archived, creator, created_at, updated_at, entity_id, content_type"
tested: false
tests: []
test_file_path: ""
file_path: "python/functions/metabase/documents.py"
---

## Ejemplo

```python
doc = metabase_get_document(client, 1)
tree = doc["document"]  # {"type": "doc", "content": [...]}
```

## Notas

`content_type` siempre es `application/json+vnd.prose-mirror`.
