<?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: How to update/create Dashboard using document service of dynatrace in Automations</title>
    <link>https://community.dynatrace.com/t5/Automations/How-to-update-create-a-Dashboard-using-document-service-of/m-p/223533#M81</link>
    <description>&lt;P&gt;Hey Heramb,&lt;/P&gt;&lt;P&gt;Hopefully you've already come across the solution. I was unable to find anything regarding that exact error or reproduce it but as for the optimisticLockingVersion field, if you first GET the document you'll get a version returned. This is NOT the version in the document JSON but in it's metadata. The optimisticLockingVersion field needs to be this latest version. Every time a document is updated, this version will update and to update it through the API you'll need this latest version every time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Fin_Ubels_1-1695261037334.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/14218i887CA1B4A710109E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Fin_Ubels_1-1695261037334.png" alt="Fin_Ubels_1-1695261037334.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 21 Sep 2023 01:51:38 GMT</pubDate>
    <dc:creator>Fin_Ubels</dc:creator>
    <dc:date>2023-09-21T01:51:38Z</dc:date>
    <item>
      <title>How to update/create a Dashboard using document service of Dynatrace?</title>
      <link>https://community.dynatrace.com/t5/Automations/How-to-update-create-a-Dashboard-using-document-service-of/m-p/218045#M76</link>
      <description>&lt;P&gt;Hi Team,&lt;BR /&gt;I am creating a workflow in the new Dynatrace; this workflow has a DQL query as 1st task, and then in 2nd task(js code)&amp;nbsp; I want to add this DQL result to the dashboard. Here I want to update the dashboard by DQL results.&lt;BR /&gt;&lt;BR /&gt;How to do that? Somebody, please provide some examples.&lt;BR /&gt;&lt;BR /&gt;I read somewhere using document service, we can create a notebook, similarly, I want to create a dashboard using js code.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Heramb&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Heramb Sawant&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2023 11:48:27 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/How-to-update-create-a-Dashboard-using-document-service-of/m-p/218045#M76</guid>
      <dc:creator>heramb_sawant</dc:creator>
      <dc:date>2023-09-11T11:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to update/create Dashboard using document service of dynatrace</title>
      <link>https://community.dynatrace.com/t5/Automations/How-to-update-create-a-Dashboard-using-document-service-of/m-p/218326#M77</link>
      <description>&lt;P&gt;Hey Heramb,&lt;/P&gt;
&lt;P&gt;You can use the new platform API for this. To get there you would go to &lt;A href="https://Your.Tenant.Address.com/platform/swagger-ui/index.html?urls.primaryName=Document%20Service#/" target="_blank"&gt;https://Your.Tenant.Address.com/platform/swagger-ui/index.html?urls.primaryName=Document%20Service#/&lt;/A&gt;. Currently this is documented in our developer docs here&amp;nbsp;&lt;A href="https://developer.dynatrace.com/platform-services/#swagger-ui" target="_blank"&gt;https://developer.dynatrace.com/platform-services/#swagger-ui&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Then from there you could follow the following steps to see how the document creation and editing process works as well as the format for requests:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;GET /documents to find the ID of an example dashboard or notebook you want to use as a template.&lt;/LI&gt;
&lt;LI&gt;GET /documents/{id}/content to get the layout that you would need to mimic.&lt;/LI&gt;
&lt;LI&gt;POST /documents to then post an example document.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Once you have a template setup you would then in your script just do POST /documents to create a new document with your desired DQL OR do PUT /documents/{id}/content to update an already existing document with your DQL query.&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 03:47:29 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/How-to-update-create-a-Dashboard-using-document-service-of/m-p/218326#M77</guid>
      <dc:creator>Fin_Ubels</dc:creator>
      <dc:date>2023-07-18T03:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to update/create Dashboard using document service of dynatrace</title>
      <link>https://community.dynatrace.com/t5/Automations/How-to-update-create-a-Dashboard-using-document-service-of/m-p/218330#M78</link>
      <description>&lt;P&gt;Hey thanks Fin for your help. This will definitely help to move forward.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Heramb&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 05:12:08 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/How-to-update-create-a-Dashboard-using-document-service-of/m-p/218330#M78</guid>
      <dc:creator>heramb_sawant</dc:creator>
      <dc:date>2023-07-18T05:12:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to update/create Dashboard using document service of dynatrace</title>
      <link>https://community.dynatrace.com/t5/Automations/How-to-update-create-a-Dashboard-using-document-service-of/m-p/222713#M79</link>
      <description>&lt;P&gt;Hey ,&lt;BR /&gt;I m trying to update my own dashboard( having id&amp;nbsp;&lt;STRONG&gt;f3592b6d-XXXXXXXX411ae35)&lt;/STRONG&gt; using&amp;nbsp; "updateDocumentContent" method but getting below exception&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Uncaught (in promise) 409: Share of type 'environment' with access 'read' already exists for document 'f3592b6d-XXXXXXXX411ae35'. errorRef: 282afd6c-2125-435b-8af5-f92fd10d670a&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;What needs to be changed?? and What should be the value of&amp;nbsp;&lt;STRONG&gt;optimisticLockingVersion&lt;/STRONG&gt;???&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Heramb&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2023 10:04:38 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/How-to-update-create-a-Dashboard-using-document-service-of/m-p/222713#M79</guid>
      <dc:creator>heramb_sawant</dc:creator>
      <dc:date>2023-09-11T10:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to update/create Dashboard using document service of dynatrace</title>
      <link>https://community.dynatrace.com/t5/Automations/How-to-update-create-a-Dashboard-using-document-service-of/m-p/222764#M80</link>
      <description>&lt;P&gt;Hey ,&lt;BR /&gt;Somebody please help me on this.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Heramb&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 06:44:27 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/How-to-update-create-a-Dashboard-using-document-service-of/m-p/222764#M80</guid>
      <dc:creator>heramb_sawant</dc:creator>
      <dc:date>2023-09-12T06:44:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to update/create Dashboard using document service of dynatrace</title>
      <link>https://community.dynatrace.com/t5/Automations/How-to-update-create-a-Dashboard-using-document-service-of/m-p/223533#M81</link>
      <description>&lt;P&gt;Hey Heramb,&lt;/P&gt;&lt;P&gt;Hopefully you've already come across the solution. I was unable to find anything regarding that exact error or reproduce it but as for the optimisticLockingVersion field, if you first GET the document you'll get a version returned. This is NOT the version in the document JSON but in it's metadata. The optimisticLockingVersion field needs to be this latest version. Every time a document is updated, this version will update and to update it through the API you'll need this latest version every time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Fin_Ubels_1-1695261037334.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/14218i887CA1B4A710109E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Fin_Ubels_1-1695261037334.png" alt="Fin_Ubels_1-1695261037334.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2023 01:51:38 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/How-to-update-create-a-Dashboard-using-document-service-of/m-p/223533#M81</guid>
      <dc:creator>Fin_Ubels</dc:creator>
      <dc:date>2023-09-21T01:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to update/create Dashboard using document service of dynatrace</title>
      <link>https://community.dynatrace.com/t5/Automations/How-to-update-create-a-Dashboard-using-document-service-of/m-p/268699#M2016</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/47376"&gt;@Fin_Ubels&lt;/a&gt;,&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/46340"&gt;@heramb_sawant&lt;/a&gt;,&amp;nbsp;I'm trying to do a similar thing. I want to automatically create a new tile and append it to an existing dashboard. Everything ok until I want to update the document with&amp;nbsp;&lt;STRONG&gt;updateDocumentContent&lt;/STRONG&gt; method, where I should attach the updated dashboard JSON in the body. The body is a&amp;nbsp;&lt;STRONG&gt;UpdateDocumentContentBody&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.dynatrace.com/develop/sdks/client-document/#updatedocumentcontent" target="_blank" rel="noopener"&gt;Document | Dynatrace Developer&lt;/A&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const data = await documentsClient.updateDocumentContent({
id: "...",
optimisticLockingVersion: "...",
body: { content: "..." },
});&lt;/LI-CODE&gt;&lt;P&gt;How can I convert my updated JSON such that I can assign it to body.content correctly?&lt;/P&gt;&lt;P&gt;thanks&lt;BR /&gt;Paolo&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2025 11:37:33 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/How-to-update-create-a-Dashboard-using-document-service-of/m-p/268699#M2016</guid>
      <dc:creator>paolo_fumanelli</dc:creator>
      <dc:date>2025-01-29T11:37:33Z</dc:date>
    </item>
  </channel>
</rss>

