Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 

44 rindas
1.1 KiB

  1. #!/bin/bash
  2. BASE_URL="http://localhost:1902"
  3. echo "1. Adding a Zone with Groups (JSON Array)..."
  4. curl -X POST "$BASE_URL/reslevis/postZone" \
  5. -H "Content-Type: application/json" \
  6. -d '{
  7. "id": "zone_A",
  8. "name": "Warehouse North",
  9. "groups": ["security", "logistics", "staff"],
  10. "floor": "1",
  11. "building": "B1"
  12. }'
  13. sleep 1
  14. echo -e "\n\n2. Listing Zones (Check if groups are restored as slice)..."
  15. curl -X GET "$BASE_URL/reslevis/getZones"
  16. sleep 1
  17. echo -e "\n\n3. Updating Zone (Adding a group)..."
  18. curl -X PUT "$BASE_URL/reslevis/updateZone" \
  19. -H "Content-Type: application/json" \
  20. -d '{
  21. "id": "Zone_A",
  22. "name": "Warehouse North Updated",
  23. "groups": ["security", "logistics", "staff", "admin"]
  24. }'
  25. sleep 1
  26. echo -e "\n\n2. Listing Zones (Check if groups are restored as slice)..."
  27. curl -X GET "$BASE_URL/reslevis/getZones"
  28. sleep 1
  29. echo -e "\n\n4. Deleting Zone..."
  30. curl -X DELETE "$BASE_URL/reslevis/removeZone/zone_A"
  31. sleep 1
  32. echo -e "\n\n2. Listing Zones (Check if groups are restored as slice)..."
  33. curl -X GET "$BASE_URL/reslevis/getZones"