Big-IQ snapshot management
Hello community, I have an interesting situation that I want to run by you guys and hopefully somebody/someone can give me a hand.
We have in our environment 20 Big-IQ devices, handling nearly 500 devices (between LTMs, ASMs, DNSs and combination of them).
Internally we have configured Big-IQs to trigger snapshots for all of them, the only difference we have is that we only keep snapshot files storaged in the Big-IQ is for ASMs. The rest of the modules keep their snapshots locally.
Now, we want (need) to create a python script (basically because we make it run from a 3rd party solution that ssh into the Big-IQs and run that python script) to delete snapshots older than 30 days, for example.
For that purpose, I have searched for several documentation regarding API for snapshot management on Big IQ , basically there are 2 API calls relevant for me:
1.- Snapshot checkup: GET /cm/<module>/tasks/snapshot-config/<id>
2.- Snapshot deletion: DELETE mgmt/cm/<module>/tasks/snapshot-config/<id>
Now the values between <>, which are: 'module' and 'id', in our case module = asm and 'id' is for the snapshot we want to checkup and delete if meets the criteria.
The thing here is that, we do not have any 'id' number, because the snapshots are created by several business units outside our team, where they log into the Big-IQ's GUI and deploy the snapshot manually.
I have tried to send a GET request (via POSTMAN) using these variations (hoping some sort of response):
- GET /cm/<module>/tasks/snapshot-config/
- GET /cm/<module>/tasks/snapshot-config/*
But logically is expecting the 'id' value so it shoots back an error.
NOTE: the 'id' is provided when you try the API call for snapshot creation: POST mgmt/cm/<module>/tasks/snapshot-config.
That particular POST, only request the name of the snapshot as parameter and then provides the precious 'id' in return.
So you can see my dilemma and where I am missing data.
QUESTIONS:
1.- Is there any way to fetch the 'id' using any resource?
2.- where exactly is located the repository for these snapshots in the Big-IQ? I mean the Linux's bash prompt for each Big-IQ, I have searched and searched but I haven't found them... This would be a great peace of information.
3.- Is this the right approach? I found some information about 'restcurl' but I am not completely sure about this resource.
Thanks.-