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