<?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: POST multiple Objects into one API request in Network Security</title>
    <link>https://community.cisco.com/t5/network-security/post-multiple-objects-into-one-api-request/m-p/3305282#M926380</link>
    <description>&lt;P&gt;Hello Orhan,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have same problem...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I put the JSON format in FMC's API to POST more then one object host and I get an error: &lt;SPAN class="error" style="display: inline;"&gt;JSON parse error&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;{&lt;BR /&gt;"name": "Test108",&lt;BR /&gt;"value": "1.1.2.108",&lt;BR /&gt;"type": "Host",&lt;BR /&gt;"description" : "Teste"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"name": "Test109",&lt;BR /&gt;"value": "1.1.2.109",&lt;BR /&gt;"type": "Host",&lt;BR /&gt;"description" : "Teste"&lt;BR /&gt;}&lt;/P&gt;</description>
    <pubDate>Wed, 03 Jan 2018 13:05:17 GMT</pubDate>
    <dc:creator>ronei.amorim</dc:creator>
    <dc:date>2018-01-03T13:05:17Z</dc:date>
    <item>
      <title>POST multiple Objects into one API request</title>
      <link>https://community.cisco.com/t5/network-security/post-multiple-objects-into-one-api-request/m-p/3225003#M926379</link>
      <description>&lt;P&gt;Dear Support,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to&amp;nbsp;open a new case about this subject because I have to put over 1500 objects (url, network, host, range) into an FMC (v 6.2.2).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The goal is to migrate from an ASA cluster to a Firepower 9300 cluster. And for that, I use the API for extract the data from the ASA, formats it for the Firepower and use the Firepower API for inject the formatted objects&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My problem is:&lt;/P&gt;
&lt;P&gt;-&amp;nbsp;All the examples that I found on the Cisco site show how to post a single object&lt;/P&gt;
&lt;P&gt;- The limitation of 120 requests by minutes break my loop&lt;/P&gt;
&lt;P&gt;- I'm unable to find a correct and a exact syntax of the&amp;nbsp;JSON body that I need to insert into my API request for post some objects.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First of all I would like to know if it's definitely possible to insert some objects in the same API request.&lt;/P&gt;
&lt;P&gt;If it's possible,&amp;nbsp;&lt;SPAN&gt;can someone give me the simplest possible example in python language or the syntax in JSON that I&amp;nbsp;have to insert in my python code.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tanks for all.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2020 14:52:30 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/post-multiple-objects-into-one-api-request/m-p/3225003#M926379</guid>
      <dc:creator>Orhan.T</dc:creator>
      <dc:date>2020-02-21T14:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: POST multiple Objects into one API request</title>
      <link>https://community.cisco.com/t5/network-security/post-multiple-objects-into-one-api-request/m-p/3305282#M926380</link>
      <description>&lt;P&gt;Hello Orhan,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have same problem...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I put the JSON format in FMC's API to POST more then one object host and I get an error: &lt;SPAN class="error" style="display: inline;"&gt;JSON parse error&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;{&lt;BR /&gt;"name": "Test108",&lt;BR /&gt;"value": "1.1.2.108",&lt;BR /&gt;"type": "Host",&lt;BR /&gt;"description" : "Teste"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"name": "Test109",&lt;BR /&gt;"value": "1.1.2.109",&lt;BR /&gt;"type": "Host",&lt;BR /&gt;"description" : "Teste"&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 13:05:17 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/post-multiple-objects-into-one-api-request/m-p/3305282#M926380</guid>
      <dc:creator>ronei.amorim</dc:creator>
      <dc:date>2018-01-03T13:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: POST multiple Objects into one API request</title>
      <link>https://community.cisco.com/t5/network-security/post-multiple-objects-into-one-api-request/m-p/3305287#M926381</link>
      <description>I found a solution that consists of creating a dictionary that contains all the objects in JSON format and create a loop into this dictionary for post each elements&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 03 Jan 2018 13:11:39 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/post-multiple-objects-into-one-api-request/m-p/3305287#M926381</guid>
      <dc:creator>Orhan.T</dc:creator>
      <dc:date>2018-01-03T13:11:39Z</dc:date>
    </item>
    <item>
      <title>Re: POST multiple Objects into one API request</title>
      <link>https://community.cisco.com/t5/network-security/post-multiple-objects-into-one-api-request/m-p/3305329#M926382</link>
      <description>&lt;P&gt;Hi Orhan,&lt;/P&gt;
&lt;P&gt;Thanks for idea.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Well...&amp;nbsp; Do you create a script and a file using as argument of scritp?&lt;/P&gt;
&lt;P&gt;like that?&lt;BR /&gt;script.py file.txt&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 13:51:50 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/post-multiple-objects-into-one-api-request/m-p/3305329#M926382</guid>
      <dc:creator>ronei.amorim</dc:creator>
      <dc:date>2018-01-03T13:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: POST multiple Objects into one API request</title>
      <link>https://community.cisco.com/t5/network-security/post-multiple-objects-into-one-api-request/m-p/3305341#M926383</link>
      <description>I my case, I created a script that get all the objects and ACL stored in the ASA via the API and convert them into the FMC format and post it with the FMC API.&lt;BR /&gt;</description>
      <pubDate>Wed, 03 Jan 2018 14:01:39 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/post-multiple-objects-into-one-api-request/m-p/3305341#M926383</guid>
      <dc:creator>Orhan.T</dc:creator>
      <dc:date>2018-01-03T14:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: POST multiple Objects into one API request</title>
      <link>https://community.cisco.com/t5/network-security/post-multiple-objects-into-one-api-request/m-p/3305417#M926385</link>
      <description>&lt;P&gt;Very nice!!&lt;BR /&gt;I'm trying to convert SonicWall objects to Firepower...&lt;/P&gt;
&lt;P&gt;But, I need treat this objects in the excel before...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm migrating one Checkpoint and one SonicWall to Firepower...&lt;/P&gt;
&lt;P&gt;For the Checkpoint, I'm using the migration tool of site &lt;A href="https://fwmig.cisco.com" target="_blank"&gt;https://fwmig.cisco.com&lt;/A&gt; and after I convert ASA config to Firepower via FMC.&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>Wed, 03 Jan 2018 16:06:24 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/post-multiple-objects-into-one-api-request/m-p/3305417#M926385</guid>
      <dc:creator>ronei.amorim</dc:creator>
      <dc:date>2018-01-03T16:06:24Z</dc:date>
    </item>
    <item>
      <title>Re: POST multiple Objects into one API request</title>
      <link>https://community.cisco.com/t5/network-security/post-multiple-objects-into-one-api-request/m-p/3305520#M926386</link>
      <description>&lt;P&gt;Hello Orhan,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried to do a loop...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;file.txt&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;{"name":"Test110","value":"1.1.2.110","type":"Host","description":"Teste"}&lt;BR /&gt;{"name":"Test111","value":"1.1.2.111","type":"Host","description":"Teste"}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I did:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;for i in `cat arq.txt`; do perl script.pl admin password $i; done&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But I get&amp;nbsp;&lt;FONT color="#FF0000"&gt;Response code: 401&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;If I do filling the variable with content it's works fine:&lt;BR /&gt;&lt;STRONG&gt;my $data&lt;/STRONG&gt; =&amp;nbsp;&lt;SPAN&gt;{"name":"Test112","value":"1.1.2.112","type":"Host","description":"Teste"}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Let me know if you have some help...&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards!!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 19:12:36 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/post-multiple-objects-into-one-api-request/m-p/3305520#M926386</guid>
      <dc:creator>ronei.amorim</dc:creator>
      <dc:date>2018-01-03T19:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: POST multiple Objects into one API request</title>
      <link>https://community.cisco.com/t5/network-security/post-multiple-objects-into-one-api-request/m-p/4617951#M1090426</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to import objects on to an FTD, are there any options to import multiple objects via the api-explorer apart from writing your own scripts? As of now only a single object appears to work&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2022 01:40:39 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/post-multiple-objects-into-one-api-request/m-p/4617951#M1090426</guid>
      <dc:creator>Arun2022</dc:creator>
      <dc:date>2022-05-26T01:40:39Z</dc:date>
    </item>
  </channel>
</rss>

