Start fixing forecast service API 5

This commit is contained in:
Urtzi Alfaro
2025-07-29 17:24:56 +02:00
parent c8e0e1299e
commit fd5d701221
6 changed files with 17 additions and 16 deletions

View File

@@ -572,13 +572,16 @@ log_step "5.1. Testing basic dashboard functionality"
# Use a real product name from our CSV for forecasting
FIRST_PRODUCT=$(echo "$REAL_PRODUCTS" | sed 's/"//g' | cut -d',' -f1)
FORECAST_RESPONSE=$(curl -s -X POST "$API_BASE/api/v1/tenants/$TENANT_ID/forecast/single" \
FORECAST_RESPONSE=$(curl -s -X POST "$API_BASE/api/v1/tenants/$TENANT_ID/forecasts/single" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d "{
\"products\": [\"$FIRST_PRODUCT\"],
\"forecast_days\": 7,
\"date\": \"2025-09-15\"
\"product_name\": [\"$FIRST_PRODUCT\"],
\"forecast_date\": "2025-11-30",
\"forecast_days\": 1,
\"date\": \"2025-09-15\",
\"location\": \"madrid_centro\",
\"confidence_level\": 0.85
}")
if echo "$FORECAST_RESPONSE" | grep -q '"predictions"\|"forecast"'; then