sastre icon indicating copy to clipboard operation
sastre copied to clipboard

run API call against "device", if it is all devices or devices deffined in txt/csv

Open pmraz123 opened this issue 11 months ago • 3 comments

This would be absolutely great feature. I have it in my scripts it is called like this

python3 viptela_api.py --customer az get-api-devices-all-csv --api "dataservice/device/cellular/modem?deviceId=" --device_type vedge --csv_filename cellular_info_az2.csv

here i run API "dataservice/device/cellular/modem?deviceId=" against all rechable devices, which are vedge type (type is deffined by --device_type vedge

I have other function which is running the same not against all reachable devices but against devices deffined in other file so 2 type of script, run api against all or all API against devices I define for the script.

Such enhancement would be absolutely wonderful.

Potentially ...list of "aviable" APIs can be also shown via some --help. Sure some can be vedge type, other cedge type, some can work well for both vedge and cedge. It can be some simple csv printed by the script, including what codes are supported by that API (I know API list can be more work to collect/maintain) :)

Thanks a lot, great job with sastre i use it several years and i use it a lot!

pmraz123 avatar Mar 13 '24 14:03 pmraz123