<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How do I query genie space's actual conversation messages? (Genie space API) in Generative AI</title>
    <link>https://community.databricks.com/t5/generative-ai/how-do-i-query-genie-space-s-actual-conversation-messages-genie/m-p/160467#M1890</link>
    <description>&lt;P&gt;&amp;nbsp;Hi I'm creating a databricks app and I want to show genie space conversations messages both from users and genie.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the api i'm using : GET&amp;nbsp;&lt;SPAN&gt;/api/2.0/genie/spaces/{space_id}/conversations/{conversation_id}/messages/{message_id}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.databricks.com/api/azure/workspace/genie/getmessage" target="_blank" rel="noopener"&gt;Get conversation message | Genie API | REST API reference | Azure Databricks&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I could get user questions but I can't really get genie's response. Only things I get is query data which I don't really need. So far best I could do was to use query title. But on messages that didn't use SQL query it doesn't even show any response from genie.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Here is an example of data I got :&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
   "id":"asfsadf21312",
   "space_id":"asdf123123",
   "conversation_id":"sdaf123123",
   "user_id":1231241235,
   "created_timestamp":1782291337250,
   "last_updated_timestamp":1782291413342,
   "status":"COMPLETED",
   "content":"Describe this dataset and the important KPIs/categories I can analyze",
   "attachments":[
      {
         "query":{
            "title":"Stock breakdown by logistic status",
            "query":"\nSELECT \n MEASURE(`Total Stock`) AS total_stock",
            "statement_id":"01f16fasasdsadf3",
            "thoughts":[
               {
                  "thought_type":"THOUGHT_TYPE_DATA_SOURCING",
                  "content":"stocks"
               }
            ]
         },
         "attachment_id":"12312sadasdf"
      }
   ],
   "auto_regenerate_count":0,
   "message_id":"123asf"
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;According to API docs it should also return text object but I haven't gotten one. Is there any other way around that I could get the genie's actual response that I see on databricks UI?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Any help would be appreciated!!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 25 Jun 2026 00:52:39 GMT</pubDate>
    <dc:creator>Cobs</dc:creator>
    <dc:date>2026-06-25T00:52:39Z</dc:date>
    <item>
      <title>How do I query genie space's actual conversation messages? (Genie space API)</title>
      <link>https://community.databricks.com/t5/generative-ai/how-do-i-query-genie-space-s-actual-conversation-messages-genie/m-p/160467#M1890</link>
      <description>&lt;P&gt;&amp;nbsp;Hi I'm creating a databricks app and I want to show genie space conversations messages both from users and genie.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the api i'm using : GET&amp;nbsp;&lt;SPAN&gt;/api/2.0/genie/spaces/{space_id}/conversations/{conversation_id}/messages/{message_id}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.databricks.com/api/azure/workspace/genie/getmessage" target="_blank" rel="noopener"&gt;Get conversation message | Genie API | REST API reference | Azure Databricks&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I could get user questions but I can't really get genie's response. Only things I get is query data which I don't really need. So far best I could do was to use query title. But on messages that didn't use SQL query it doesn't even show any response from genie.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Here is an example of data I got :&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
   "id":"asfsadf21312",
   "space_id":"asdf123123",
   "conversation_id":"sdaf123123",
   "user_id":1231241235,
   "created_timestamp":1782291337250,
   "last_updated_timestamp":1782291413342,
   "status":"COMPLETED",
   "content":"Describe this dataset and the important KPIs/categories I can analyze",
   "attachments":[
      {
         "query":{
            "title":"Stock breakdown by logistic status",
            "query":"\nSELECT \n MEASURE(`Total Stock`) AS total_stock",
            "statement_id":"01f16fasasdsadf3",
            "thoughts":[
               {
                  "thought_type":"THOUGHT_TYPE_DATA_SOURCING",
                  "content":"stocks"
               }
            ]
         },
         "attachment_id":"12312sadasdf"
      }
   ],
   "auto_regenerate_count":0,
   "message_id":"123asf"
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;According to API docs it should also return text object but I haven't gotten one. Is there any other way around that I could get the genie's actual response that I see on databricks UI?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Any help would be appreciated!!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2026 00:52:39 GMT</pubDate>
      <guid>https://community.databricks.com/t5/generative-ai/how-do-i-query-genie-space-s-actual-conversation-messages-genie/m-p/160467#M1890</guid>
      <dc:creator>Cobs</dc:creator>
      <dc:date>2026-06-25T00:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: How do I query genie space's actual conversation messages? (Genie space API)</title>
      <link>https://community.databricks.com/t5/generative-ai/how-do-i-query-genie-space-s-actual-conversation-messages-genie/m-p/165115#M1994</link>
      <description>&lt;P&gt;Hi Cobs, I hit the same wall building on the Genie API. The key is that content in the message object is the &lt;STRONG&gt;user's&lt;/STRONG&gt; message, not Genie's answer. The actual response lives in the attachments array, and there are several attachment types:&lt;/P&gt;&lt;BLOCKQUOTE&gt;- attachments[].query - the SQL query Genie generated (what you're seeing now)&lt;BR /&gt;- attachments[].text -&amp;nbsp;&lt;STRONG&gt;Genie's natural-language response, including the final summary when available,&lt;/STRONG&gt;&amp;nbsp;this is what the UI renders as the answer&lt;BR /&gt;- attachments[].suggested_questions&amp;nbsp; follow-up suggestions&lt;BR /&gt;- attachments[].viz - visualization (beta, when enabled)&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;So for a message like your example, you'd pull attachments[].text (and fall back to attachments[].query when text is absent, e.g. SQL-only responses). For messages where Genie didn't run a query at all, the text attachment is the only place the answer exists.&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;Two practical tips:&lt;BR /&gt;1. &lt;STRONG&gt;Poll &lt;/STRONG&gt;status until it's COMPLETED before reading attachments, the text attachment isn't guaranteed to be present while Genie is still working (and watch for error.type on failure).&lt;BR /&gt;2. To render a full conversation like the UI, use the &lt;STRONG&gt;List messages&lt;/STRONG&gt; endpoint (GET /api/2.0/genie/spaces/{space_id}/conversations/{conversation_id}/messages) and iterate: user question from content, assistant answer from attachments[].text / attachments[].query.&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;Dump the full JSON of a known-good message to see all attachment types in your workspace - the docs list them but seeing the real shape helps.&lt;BR /&gt;Hope that unblocks you.&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Fri, 07 Aug 2026 23:51:02 GMT</pubDate>
      <guid>https://community.databricks.com/t5/generative-ai/how-do-i-query-genie-space-s-actual-conversation-messages-genie/m-p/165115#M1994</guid>
      <dc:creator>empire_labs</dc:creator>
      <dc:date>2026-08-07T23:51:02Z</dc:date>
    </item>
  </channel>
</rss>

