Open ArqamFarooqui110719 opened 3 months ago
Maybe this can be useful:
https://github.com/telefonicaid/fiware-orion/blob/master/scripts/utils/delete_entities_by_list.py https://github.com/telefonicaid/fiware-orion/blob/master/scripts/utils/delete_entities_by_query.py
I think the code is pretty straightforward, but if you some doubt, just ask it :)
Ah, sorry... those scripts are for entities and you are asking for subscriptions
I think we don't have such script. Maybe a delete_subscriptions.py script (based on the previous ones) could be useful. It would be an interesting contribution :)
Ah, sorry... those scripts are for entities and you are asking for subscriptions
Yes, for subscriptions:)
I think we don't have such script. Maybe a delete_subscriptions.py script (based on the previous ones) could be useful. It would be an interesting contribution :)
Yes, I am looking into it.
Before starting, I want to confirm few point:
@fgalan, Please confirm above steps. And if you have any suggestion please let me know.
That's correct!
I'd suggest to implement the script in Python, with his the tooling language that we use in this repository.
Regarding step 2, to collect subscription IDs, the GET /v2/subscriptions
operation has to be used. Note that you could have a large number of subscription, so you should use the pagination options, as delete_entities_by_query.py does. Details of the API operation can be found at https://github.com/telefonicaid/fiware-orion/blob/master/doc/manuals/orion-api.md#list-subscriptions-get-v2subscriptions
Finally, as an extra feature of your script it would be interesting to include filtering capabilities, based in the JSON of each subscription obtained. For instance, delete subscription which match a given description
, etc.
Bug description I have thousands of subscription created in my orion setup. Is there any script available, using which I can delete all subscriptions using IDs.
If not, shouldn't we have a script (python/shell) which can delete multiple subscription on single click.