get_document
Retrieve a document's metadata, including title, type, status, and custom fields. Optionally get raw HTML content for lossless round-trip editing.
Instructions
Get a document's metadata (and optionally its raw body source).
Returns title, type, status, and custom fields. With
include_homepage_content_html=True the content_html field
carries homePageContent as raw Polarion HTML — the exact shape
that round-trips through update_document(home_page_content_html=...)
losslessly (no Markdown conversion, no sanitization).
homePageContent is the inline prose only — heading text and
embedded work-item bodies live in separate work items. For end-to-end
reading use read_document; for structural metadata
use read_document_parts. Only feed content_html back to
update_document when the read flag was True (a False read blanks
the field, and the empty string is rejected at the write side).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | Polarion project ID. | |
| space_id | Yes | Space ID containing the document (e.g. '_default'). | |
| document_name | Yes | Document name within the space (spaces handled automatically). | |
| include_homepage_content_html | No | When True, fill ``content_html`` with raw HTML for round-trip editing. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | Document title. | |
| type | No | Document type (e.g. 'req_specification'). | |
| status | No | Document workflow status (e.g. 'draft', 'approved'). | |
| content_html | No | Raw Polarion HTML body; empty unless the read flag was True. | |
| custom_fields | No | Project-defined custom fields keyed by field ID. |