<?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: Creating and Restoring Management Zones in Open Q&amp;A</title>
    <link>https://community.dynatrace.com/t5/Open-Q-A/Creating-and-Restoring-Management-Zones/m-p/232497#M30150</link>
    <description>&lt;P&gt;Monaco is just an alternative way to call the API I believe...&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 20 Dec 2023 14:49:00 GMT</pubDate>
    <dc:creator>HeadScratcher</dc:creator>
    <dc:date>2023-12-20T14:49:00Z</dc:date>
    <item>
      <title>Creating and Restoring Management Zones</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Creating-and-Restoring-Management-Zones/m-p/232381#M30144</link>
      <description>&lt;P&gt;In our tenant we have approx 400 management zones, many created in error.&amp;nbsp; My job is to to remove the unnecessary ones.&amp;nbsp; I have prepared my list to delete (those with no hosts, no processes etc) which I can delete manually (boring) or via the API (preferred as I am lazy programmer type).&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I wanted like to know if it is possible, to restore a deleted management zone in case I make a mistake and I can, again using the API.&amp;nbsp; However in the API docs &lt;A href="https://docs.dynatrace.com/docs/dynatrace-api/configuration-api/management-zones-api/post-mz" target="_blank"&gt;Management zones API - POST a management zone - Dynatrace Docs&lt;/A&gt;&amp;nbsp;it says that the MZ ID field is optional but actually if I create the MZ with the previously used ID, then the API complains about a constraint violation and if I remove that ID field then it gets created fine.&amp;nbsp; So I think optional means that the value should not be there... and perhaps ID can be there but with a blank value.&lt;/P&gt;&lt;P&gt;So maybe the docs could do with a correction...&amp;nbsp; &amp;nbsp;but that aside, my question is really whether it is possible to re-create the same MZ config on a tenant somehow?&amp;nbsp; &amp;nbsp;I want to use the same ID in case it is referenced somewhere else that&amp;nbsp; I forgot to check before I deleted in the first place.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope my question is clear...&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2023 15:50:13 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Creating-and-Restoring-Management-Zones/m-p/232381#M30144</guid>
      <dc:creator>HeadScratcher</dc:creator>
      <dc:date>2023-12-19T15:50:13Z</dc:date>
    </item>
    <item>
      <title>Re: Creating and Restoring Management Zones</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Creating-and-Restoring-Management-Zones/m-p/232428#M30145</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/69708"&gt;@HeadScratcher&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;You can use Monaco, for more details please check the following Link&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.dynatrace.com/docs/shortlink/configuration-as-code-monaco" target="_blank" rel="noopener"&gt;https://docs.dynatrace.com/docs/shortlink/configuration-as-code-monaco&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Mohamed&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 05:29:39 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Creating-and-Restoring-Management-Zones/m-p/232428#M30145</guid>
      <dc:creator>Mohamed_Hamdy</dc:creator>
      <dc:date>2023-12-20T05:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: Creating and Restoring Management Zones</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Creating-and-Restoring-Management-Zones/m-p/232457#M30147</link>
      <description>&lt;P&gt;Exactly that is the best way to go&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 10:10:15 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Creating-and-Restoring-Management-Zones/m-p/232457#M30147</guid>
      <dc:creator>radek_jasinski</dc:creator>
      <dc:date>2023-12-20T10:10:15Z</dc:date>
    </item>
    <item>
      <title>Re: Creating and Restoring Management Zones</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Creating-and-Restoring-Management-Zones/m-p/232497#M30150</link>
      <description>&lt;P&gt;Monaco is just an alternative way to call the API I believe...&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 14:49:00 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Creating-and-Restoring-Management-Zones/m-p/232497#M30150</guid>
      <dc:creator>HeadScratcher</dc:creator>
      <dc:date>2023-12-20T14:49:00Z</dc:date>
    </item>
    <item>
      <title>Re: Creating and Restoring Management Zones</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Creating-and-Restoring-Management-Zones/m-p/232498#M30151</link>
      <description>&lt;P&gt;I am not sure that it is... see above reply.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 14:49:41 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Creating-and-Restoring-Management-Zones/m-p/232498#M30151</guid>
      <dc:creator>HeadScratcher</dc:creator>
      <dc:date>2023-12-20T14:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: Creating and Restoring Management Zones</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Creating-and-Restoring-Management-Zones/m-p/232571#M30165</link>
      <description>&lt;P&gt;I had some suggestions from live support chat to suggest alternative API methods etc... posting the findings in case anyone finds useful in the future.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Assuming original MZ ID number of&amp;nbsp; '-2800715523779578223' and this management zone is deleted.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Using post to create (including previous id) response=400 "Constraints violated." "The payload must not have an id set.&lt;/LI&gt;&lt;LI&gt;Using Put as suggested by Dynatrace Live Chat response=405 'Method Not Allowed' "Not allowed HTTP method, expected one of [POST, GET, OPTIONS]"&lt;/LI&gt;&lt;LI&gt;Using post (including tag but no value)&amp;nbsp;response=400 "Constraints violated." "The payload must not have an id set&lt;/LI&gt;&lt;LI&gt;Using post (with id tag but value set to blank string ie no id value present)&amp;nbsp;response=400, Constraints violated Not a valid 64-bit number.&lt;/LI&gt;&lt;LI&gt;Using post (without id key / value present) response=201 Created&amp;nbsp;id: -1185889278300505254 name:blah (OK MZ recreated with a new ID number)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Conclusion is that post works fine for creating a new MZ but with a proviso that DT will not allow re-use of ID numbers. With this in mind it is not possible to back up management zones fully, just the names/config.&lt;/P&gt;&lt;P&gt;In my scenario If I need to back up I will need to fix any dependent resources like alert profiles&lt;BR /&gt;Others have suggested Monaco but I don't think that will help any differently since that is just the API behind a different interface (confirmed by DT Live support).&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2023 11:42:23 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Creating-and-Restoring-Management-Zones/m-p/232571#M30165</guid>
      <dc:creator>HeadScratcher</dc:creator>
      <dc:date>2023-12-21T11:42:23Z</dc:date>
    </item>
  </channel>
</rss>

