11-30-2017 03:35 AM - edited 02-21-2020 06:52 AM
Dear Support,
I would like to 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).
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
My problem is:
- All the examples that I found on the Cisco site show how to post a single object
- The limitation of 120 requests by minutes break my loop
- I'm unable to find a correct and a exact syntax of the JSON body that I need to insert into my API request for post some objects.
First of all I would like to know if it's definitely possible to insert some objects in the same API request.
If it's possible, can someone give me the simplest possible example in python language or the syntax in JSON that I have to insert in my python code.
Tanks for all.
01-03-2018 05:05 AM
Hello Orhan,
I have same problem...
I put the JSON format in FMC's API to POST more then one object host and I get an error: JSON parse error
{
"name": "Test108",
"value": "1.1.2.108",
"type": "Host",
"description" : "Teste"
},
{
"name": "Test109",
"value": "1.1.2.109",
"type": "Host",
"description" : "Teste"
}
01-03-2018 05:11 AM
01-03-2018 05:51 AM
Hi Orhan,
Thanks for idea.
Well... Do you create a script and a file using as argument of scritp?
like that?
script.py file.txt
01-03-2018 06:01 AM
01-03-2018 08:06 AM
Very nice!!
I'm trying to convert SonicWall objects to Firepower...
But, I need treat this objects in the excel before...
I'm migrating one Checkpoint and one SonicWall to Firepower...
For the Checkpoint, I'm using the migration tool of site https://fwmig.cisco.com and after I convert ASA config to Firepower via FMC.
01-03-2018 11:12 AM
Hello Orhan,
I tried to do a loop...
file.txt
{"name":"Test110","value":"1.1.2.110","type":"Host","description":"Teste"}
{"name":"Test111","value":"1.1.2.111","type":"Host","description":"Teste"}
I did:
for i in `cat arq.txt`; do perl script.pl admin password $i; done
But I get Response code: 401
If I do filling the variable with content it's works fine:
my $data = {"name":"Test112","value":"1.1.2.112","type":"Host","description":"Teste"}
Let me know if you have some help...
Best Regards!!
05-25-2022 06:40 PM
Hi Experts,
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide