Dear Databricks Community,
I am trying to programmatically access the narrative text summary that Databricks Genie displays in the UI, but I cannot find it in the public API responses.
What I see in the UI: When I ask Genie a question, the UI displays a helpful narrative summary like:
"The top 10 records from the sales order lines table have been retrieved. Examples include:- OrderLineID: 231412, CustomerName: Example Customer, StockItemName: Example Stock Item, Quantity: 8, LineNetAmount: 252.0"
What I've tried:
- Using the public API endpoint: /api/2.0/genie/spaces/{space_id}/conversations/{conversation_id}/messages/{message_id}
- This returns attachments with query.description (e.g., "You want to see the top 10 sales order lines...") but NOT the full narrative summary
- Checked the Databricks SDK (WorkspaceClient().genie.start_conversation_and_wait())
- Same issue - only returns query description, not the narrative text
- Used browser network inspection and found the text in: /ajax-api/2.0/data-rooms/{space_id}/conversations/{conversation_id}/messages/{message_id}
- This endpoint returns attachments[].final_summary.result_summary with the full narrative
- However, this endpoint requires CSRF tokens and is meant for browser use only (returns 403 error from Python)
What I have discovered: The narrative summary exists in a final_summary field that appears in the /ajax-api/ endpoint but not in the public /api/ endpoints.
Question: Is there a supported way to retrieve Genie's final_summary narrative text programmatically? Or is this feature only available through the web UI currently?
Thank you for the help!