<?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 Re: Trouble retrieving notebook results (or even notebook as a whole) via API in Dynatrace API</title>
    <link>https://community.dynatrace.com/t5/Dynatrace-API/Trouble-retrieving-notebook-results-or-even-notebook-as-a-whole/m-p/296709#M3964</link>
    <description>&lt;P&gt;Thanks for responding!&lt;BR /&gt;&lt;BR /&gt;HHmm.. that gives me a 403 forbidden, error. However, I noted I accidentally deleted the build of headers in my original code.&amp;nbsp; Including:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;Authorization&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;Bearer &lt;/SPAN&gt;&lt;SPAN&gt;$Apitoken&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;Content-Type&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;application/json&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Applying them did not change the response though.&amp;nbsp; I'm wlking though it a bit more closely, I'll update again, just wanted to give a quick thanks, and note my other error.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 25 Mar 2026 17:26:52 GMT</pubDate>
    <dc:creator>dcbarry</dc:creator>
    <dc:date>2026-03-25T17:26:52Z</dc:date>
    <item>
      <title>Trouble retrieving notebook results (or even notebook as a whole) via API</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Trouble-retrieving-notebook-results-or-even-notebook-as-a-whole/m-p/296699#M3962</link>
      <description>&lt;P&gt;I'm having trouble determining how to retrieve the results of an already defined DQL query in a notebook. I've reviewed docs everywhere, but can seem to get it functional.&amp;nbsp; &amp;nbsp;My token has full read rights everywhere, and is the owner of the notebook (my personal api).&amp;nbsp;&lt;FONT color="#FF0000"&gt;The UUIDs are triple confirmed as valid. (Short and long form).&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I keep getting 404 (not found) error, although the docs imply this is the way.&amp;nbsp; ("api/v1/documents").&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;My code looks like this: (Fake tenant IDs)&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;I am aware I'm supposed to be able to invoke DQL from my API call directly, this is not a desirable solution.&amp;nbsp; &amp;nbsp;Wish to use what is already in the notebook.&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;$DynaHost = "&lt;A href="https://{environmentid}.live.dynatrace.com/" target="_blank" rel="noopener nofollow noreferrer"&gt;https://{environmentid}.live.dynatrace.com&lt;/A&gt;"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;#Note: I've tried both the extended and short forms of the ID&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;#$NotebookId = "27268a8e-4667-4373-beda-dddb427f0ead#9b9fde91-f574-47bd-b89a-7c4584d1e02d"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;$NotebookId = "27268a8e-4667-4373-beda-dddb427f0ead"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;$ApiUrl = "$DynaHost/api/v1/documents/$NotebookId"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;try {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;nbsp; &amp;nbsp; $notebookContent = Invoke-RestMethod -Uri $ApiUrl -Headers $Headers -Method Get&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;nbsp; &amp;nbsp; Write-Host "Content for Notebook $NotebookId"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;nbsp; &amp;nbsp; $notebookContent | ConvertTo-Json -Depth 99 | Out-File -FilePath "C:\temp\$NotebookId.json"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;} catch {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;nbsp; &amp;nbsp; Write-Host 'Error retrieving notebook content: $_.Exception.Message'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;}&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Mar 2026 07:55:13 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Trouble-retrieving-notebook-results-or-even-notebook-as-a-whole/m-p/296699#M3962</guid>
      <dc:creator>dcbarry</dc:creator>
      <dc:date>2026-03-26T07:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble retrieving notebook results (or even notebook as a whole) via API</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Trouble-retrieving-notebook-results-or-even-notebook-as-a-whole/m-p/296701#M3963</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/102724"&gt;@dcbarry&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me see if I can help you with this one...&lt;/P&gt;&lt;P&gt;I was checking your code and maybe miss the "platform" in the endpoint.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;$DynaHost   = "https://{environmentid}.live.dynatrace.com"
$NotebookId = "27268a8e-4667-4373-beda-dddb427f0ead"

# Metadata
$MetaUrl = "$DynaHost/platform/document/v1/documents/$NotebookId"

# Content download
$ContentUrl = "$DynaHost/platform/document/v1/documents/$NotebookId/content"

try {
    $notebookMeta = Invoke-RestMethod -Uri $MetaUrl -Headers $Headers -Method Get
    $notebookMeta | ConvertTo-Json -Depth 99 | Out-File "C:\temp\$NotebookId-meta.json"

    Invoke-WebRequest -Uri $ContentUrl -Headers $Headers -Method Get -OutFile "C:\temp\$NotebookId-content.bin"

    Write-Host "Notebook metadata retrieved successfully."
    Write-Host "Notebook content downloaded to C:\temp\$NotebookId-content.bin"
}
catch {
    Write-Host ("Error retrieving notebook: " + $_.Exception.Message)
    if ($_.ErrorDetails.Message) {
        Write-Host $_.ErrorDetails.Message
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;And in my POV&amp;nbsp;there is not a supported “give me the already-rendered result set from this notebook section” endpoint, unfortunately. The supported path is to read the notebook content, extract the DQL from the section, and execute that DQL through the Grail Query API.&lt;/P&gt;&lt;P&gt;I hope this helps you&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Mar 2026 17:10:42 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Trouble-retrieving-notebook-results-or-even-notebook-as-a-whole/m-p/296701#M3963</guid>
      <dc:creator>MaximilianoML</dc:creator>
      <dc:date>2026-03-25T17:10:42Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble retrieving notebook results (or even notebook as a whole) via API</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Trouble-retrieving-notebook-results-or-even-notebook-as-a-whole/m-p/296709#M3964</link>
      <description>&lt;P&gt;Thanks for responding!&lt;BR /&gt;&lt;BR /&gt;HHmm.. that gives me a 403 forbidden, error. However, I noted I accidentally deleted the build of headers in my original code.&amp;nbsp; Including:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;Authorization&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;Bearer &lt;/SPAN&gt;&lt;SPAN&gt;$Apitoken&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;Content-Type&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;application/json&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Applying them did not change the response though.&amp;nbsp; I'm wlking though it a bit more closely, I'll update again, just wanted to give a quick thanks, and note my other error.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Mar 2026 17:26:52 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Trouble-retrieving-notebook-results-or-even-notebook-as-a-whole/m-p/296709#M3964</guid>
      <dc:creator>dcbarry</dc:creator>
      <dc:date>2026-03-25T17:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble retrieving notebook results (or even notebook as a whole) via API</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Trouble-retrieving-notebook-results-or-even-notebook-as-a-whole/m-p/296710#M3965</link>
      <description>&lt;P&gt;My pleasure, happy to help. Keep us updated this topic is really interesting, actually&lt;/P&gt;</description>
      <pubDate>Wed, 25 Mar 2026 17:29:28 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Trouble-retrieving-notebook-results-or-even-notebook-as-a-whole/m-p/296710#M3965</guid>
      <dc:creator>MaximilianoML</dc:creator>
      <dc:date>2026-03-25T17:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble retrieving notebook results (or even notebook as a whole) via API</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Trouble-retrieving-notebook-results-or-even-notebook-as-a-whole/m-p/297407#M3981</link>
      <description>&lt;P&gt;hey, just thought you'd like to know, i decided to take the other approach, and directly do a DQL query as suggested.&amp;nbsp; &amp;nbsp; However, now Im having token troubles. LOL.&amp;nbsp; &amp;nbsp; so, i reposted with examples.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Apr 2026 19:55:31 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Trouble-retrieving-notebook-results-or-even-notebook-as-a-whole/m-p/297407#M3981</guid>
      <dc:creator>dcbarry</dc:creator>
      <dc:date>2026-04-08T19:55:31Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble retrieving notebook results (or even notebook as a whole) via API</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Trouble-retrieving-notebook-results-or-even-notebook-as-a-whole/m-p/297424#M3983</link>
      <description>&lt;P&gt;Heyy! Nice to know, could you gently attach the link to this new post, please? If this helped you, and if you think it's fair, Kudos helps me&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Apr 2026 07:51:16 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Trouble-retrieving-notebook-results-or-even-notebook-as-a-whole/m-p/297424#M3983</guid>
      <dc:creator>MaximilianoML</dc:creator>
      <dc:date>2026-04-09T07:51:16Z</dc:date>
    </item>
  </channel>
</rss>

