#!/bin/bash BASE_URL="http://localhost:1902" echo "1. Adding a Zone with Groups (JSON Array)..." curl -X POST "$BASE_URL/reslevis/postZone" \ -H "Content-Type: application/json" \ -d '{ "id": "zone_A", "name": "Warehouse North", "groups": ["security", "logistics", "staff"], "floor": "1", "building": "B1" }' sleep 1 echo -e "\n\n2. Listing Zones (Check if groups are restored as slice)..." curl -X GET "$BASE_URL/reslevis/getZones" sleep 1 echo -e "\n\n3. Updating Zone (Adding a group)..." curl -X PUT "$BASE_URL/reslevis/updateZone" \ -H "Content-Type: application/json" \ -d '{ "id": "Zone_A", "name": "Warehouse North Updated", "groups": ["security", "logistics", "staff", "admin"] }' sleep 1 echo -e "\n\n2. Listing Zones (Check if groups are restored as slice)..." curl -X GET "$BASE_URL/reslevis/getZones" sleep 1 echo -e "\n\n4. Deleting Zone..." curl -X DELETE "$BASE_URL/reslevis/removeZone/zone_A" sleep 1 echo -e "\n\n2. Listing Zones (Check if groups are restored as slice)..." curl -X GET "$BASE_URL/reslevis/getZones"