<?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 adding generic data center object in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/adding-generic-data-center-object/m-p/150832#M6868</link>
    <description>&lt;P&gt;i've been working on migrating a lot of our app groups from standard groups with host objects inside them to be generic data center objects.&amp;nbsp; I've got a front end api written that our dev ops groups are adding to which looks in several json files, finds the right group in the right file, adds a new host IP to the group.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;for the firewall groups that originated before we did the R81 upgrades im running a sync program to find the Checkpoint group, read the json contents, and add IP's where need.&lt;/P&gt;&lt;P&gt;I want to convert these traditional groups to gdc objects which is fine if i've imported it all etc ...&lt;/P&gt;&lt;P&gt;i'd like to have something do a search and see if it's imported and if not import it.&lt;/P&gt;&lt;P&gt;i thought the add-data-center-object would do it but i keep running into errors with key pairs or wrong content.&lt;/P&gt;&lt;P&gt;i know the name and uid of the generic data center file in Checkpoint.&amp;nbsp; &amp;nbsp;I can get the uid of the group i want to import. but so far it's a no go on usability.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;has anyone had any success with this ?&lt;/P&gt;</description>
    <pubDate>Tue, 14 Jun 2022 18:38:58 GMT</pubDate>
    <dc:creator>Greg_Dunlap</dc:creator>
    <dc:date>2022-06-14T18:38:58Z</dc:date>
    <item>
      <title>adding generic data center object</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/adding-generic-data-center-object/m-p/150832#M6868</link>
      <description>&lt;P&gt;i've been working on migrating a lot of our app groups from standard groups with host objects inside them to be generic data center objects.&amp;nbsp; I've got a front end api written that our dev ops groups are adding to which looks in several json files, finds the right group in the right file, adds a new host IP to the group.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;for the firewall groups that originated before we did the R81 upgrades im running a sync program to find the Checkpoint group, read the json contents, and add IP's where need.&lt;/P&gt;&lt;P&gt;I want to convert these traditional groups to gdc objects which is fine if i've imported it all etc ...&lt;/P&gt;&lt;P&gt;i'd like to have something do a search and see if it's imported and if not import it.&lt;/P&gt;&lt;P&gt;i thought the add-data-center-object would do it but i keep running into errors with key pairs or wrong content.&lt;/P&gt;&lt;P&gt;i know the name and uid of the generic data center file in Checkpoint.&amp;nbsp; &amp;nbsp;I can get the uid of the group i want to import. but so far it's a no go on usability.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;has anyone had any success with this ?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 18:38:58 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/adding-generic-data-center-object/m-p/150832#M6868</guid>
      <dc:creator>Greg_Dunlap</dc:creator>
      <dc:date>2022-06-14T18:38:58Z</dc:date>
    </item>
    <item>
      <title>Re: adding generic data center object</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/adding-generic-data-center-object/m-p/150833#M6869</link>
      <description>&lt;P&gt;It would help if you could share an actual example of what you are trying to do. Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 19:34:42 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/adding-generic-data-center-object/m-p/150833#M6869</guid>
      <dc:creator>Art_Zalenekas</dc:creator>
      <dc:date>2022-06-14T19:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: adding generic data center object</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/adding-generic-data-center-object/m-p/150835#M6870</link>
      <description>&lt;P&gt;i've got a Data Center object names group999&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"objects" : [ {&lt;BR /&gt;"uid" : "64e16ac4-84c3-46b7-bd00-8d453b983c0b",&lt;BR /&gt;"name" : "group999",&lt;BR /&gt;"type" : "data-center-server",&lt;BR /&gt;"domain" : {&lt;BR /&gt;"uid" : "d0f9678c-e3dc-498e-be00-2238123af99d",&lt;BR /&gt;"name" : "IPv6-TestLab",&lt;BR /&gt;"domain-type" : "domain"&lt;BR /&gt;},&lt;BR /&gt;"icon" : "NetworkObjects/ExternalDataSource",&lt;BR /&gt;"color" : "black"&lt;BR /&gt;} ],&lt;BR /&gt;"from" : 1,&lt;BR /&gt;"to" : 1,&lt;BR /&gt;"total" : 1&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in it i've got several groups present.&amp;nbsp; my test case is to import group test_1&lt;/P&gt;&lt;P&gt;inside the json file on my web server the the test_1 group has uid&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;a98f8356-64b7-4a36-b65c-f1bbc068a9fe&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;i tried to run&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;import_data_center_json = {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "data-center-uid" : "64e16ac4-84c3-46b7-bd00-8d453b983c0b",&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "uid-in-data-center" : "&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;a98f8356-64b7-4a36-b65c-f1bbc068a9fe"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;when i send this via web api call to the add-data-center-object&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;get as a result&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;{"code": "generic_error", "message": "Parameter [uid-in-data-center] with value [a98f8356-64b7-4a36-b65c-f1bbc068a9fe] not found."}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 Jun 2022 19:51:35 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/adding-generic-data-center-object/m-p/150835#M6870</guid>
      <dc:creator>Greg_Dunlap</dc:creator>
      <dc:date>2022-06-14T19:51:35Z</dc:date>
    </item>
  </channel>
</rss>

