NeahStable/test-n8n-curl-precise.sh
2026-01-14 11:15:51 +01:00

38 lines
1.1 KiB
Bash

#!/bin/bash
# Version curl simple et précise
# Charge .env.local automatiquement
if [ -f .env.local ]; then
export $(grep -v '^#' .env.local | xargs)
fi
MISSION_ID="${1:-3103ec1a-acde-4025-9ead-4e1a0ddc047c}"
API_URL="${NEXT_PUBLIC_API_URL:-https://hub.slm-lab.net/api}"
curl -X POST "https://brain.slm-lab.net/webhook-test/mission-created" \
-H "Content-Type: application/json" \
-d "{
\"name\": \"SEFFIR\",
\"oddScope\": [\"odd-4\"],
\"niveau\": \"s\",
\"intention\": \"\",
\"missionType\": \"remote\",
\"donneurDOrdre\": \"group\",
\"projection\": \"long\",
\"services\": [],
\"participation\": \"ouvert\",
\"profils\": [],
\"guardians\": {},
\"volunteers\": [],
\"creatorId\": \"203cbc91-61ab-47a2-95d2-b5e1159327d7\",
\"missionId\": \"${MISSION_ID}\",
\"logoPath\": \"missions/${MISSION_ID}/logo.png\",
\"logoUrl\": \"https://hub.slm-lab.net/api/missions/image/missions/${MISSION_ID}/logo.png\",
\"config\": {
\"N8N_API_KEY\": \"${N8N_API_KEY}\",
\"MISSION_API_URL\": \"${API_URL}\"
}
}" \
-s | jq '.'