Firepower Management Center that supports REST APIs (version 6.1 or higher) with REST API enabled
REST API interactions using Python.
FMC does not accept the name of the object to be greater than 64 characters.
Object Name should not have space at the beginning of the object name and semicolon at the end.
The payload cannot contain more than 1,000 entries in a single Bulk Push.
Payload size cannot be more than 2MB in a single Bulk Push.
REST APIs are increasingly popular due to the lightweight programmable approach that network managers can use to configure and manage their networks. FMC supports configuration and management using any REST Client and also using the in-built API explorer.
The example in this document takes a CSV file as an input and pushes the objects to FMC via the REST API interface. The document covers only the Host Network Bulk push and a similar logic can be extended for the other objects. A sample code is attached to the document for URL and Port objects.
Here is the API reference for the POST on network hosts that are used, as shown in the image:
Step 2.Convert the CSV File provided to a Dictionary to be used as JSON Payload for the request. Sample CSV File for each Object Type is attached to the document.
csvFilePath = input("Please enter the CSV Filepath (For eg. : path/to/file/objects.csv) :")
host = 
with open(csvFilePath, encoding='utf-8-sig') as csvf:
csvReader = csv.DictReader(csvf)
for rows in csvReader:
if rows['type'] == "Host":
host_payload = json.dumps(host)
The host_payload at this stage looks the same as shown in the image:
All REST requests are logged into these two log files on FMC. Search for your URL (ex. .../object/hosts) with the correct operation(If you are looking for error for GET operation, ensure that your log starts something like GET ...object/hosts)