365 B
365 B
- Read from service and put to curl delete #JQ Code Snippet
curl "http://hierarchy.pp.k8s-c1t.vicosrv.de/api/hierarchy/806/categories?topCatID=0&items=false&properties=false&depth=1" | jq '.subCategories | map({"h":.hierarchyID, "c":.catID})[] | "http://hierarchy.pp.k8s-c1t.vicosrv.de/api/hierarchy/\(.h)/categories/\(.c)"' | xargs -n1 curl -X 'DELETE'