- Products
- Learn
- Local User Groups
- Partners
- More
Check Point Jump-Start Online Training
Now Available on CheckMates for Beginners!
Why do Hackers Love IoT Devices so Much?
Join our TechTalk on Aug 17, at 5PM CET | 11AM EST
Welcome to Maestro Masters!
Talk to Masters, Engage with Masters, Be a Maestro Master!
ZTNA Buyer’s Guide
Zero Trust essentials for your most valuable assets
The SMB Cyber Master
Boost your knowledge on Quantum Spark SMB gateways!
As YOU DESERVE THE BEST SECURITY
Upgrade to our latest GA Jumbo
CheckFlix!
All Videos In One Space
Hello,
I am working on a script which uses the show-unused-objects and delete-objects-batch api commands. My plan is to gather all the unused objects with an show-unused-objects call and use the response for the delete-objects-batch call. I am coding the script in python and cant find a way to create the required JSON file for the delete-objects-batch request.
According to the management api reference following structure is required:
{
"objects" : [ {
"type" : "host",
"list" : [ {
"name" : "New Host 1"
}, {
"name" : "New Host 2"
} ]
}, {
"type" : "address-range",
"list" : [ {
"name" : "New Address Range 1"
}, {
"name" : "New Address Range 2"
} ]
} ]
}
As mentioned before, I am struggling to create this structure. Does anyone have an idea how to create this structure?
Kind regards,
Peter
Like you know already, this is a JSON format, so you can build your list into an CSV or smth similar, and then convert it to JSON.
But doesn't the response from the show-unused-objects gets you a JSON file ?
Ty,
Hello,
Maybe that post can help you:
You might adjust this script adding diferents objects types to reach your goal, delete all unused objects. In the other hand, from smartConsole you can filter for unused objects and delete them.
About CheckMates
Learn Check Point
Advanced Learning
YOU DESERVE THE BEST SECURITY