CODEX_ADK/BACKEND/test-endpoints.sh
Svrnty 229a0698a3 Initial commit: CODEX_ADK monorepo
Multi-agent AI laboratory with ASP.NET Core 8.0 backend and Flutter frontend.
Implements CQRS architecture, OpenAPI contract-first API design.

BACKEND: Agent management, conversations, executions with PostgreSQL + Ollama
FRONTEND: Cross-platform UI with strict typing and Result-based error handling

Co-Authored-By: Jean-Philippe Brule <jp@svrnty.io>
2025-10-26 23:12:32 -04:00

32 lines
817 B
Bash
Executable File

#!/bin/bash
set +e
echo "Starting API..."
dotnet run --project Codex.Api/Codex.Api.csproj > /tmp/api.log 2>&1 &
API_PID=$!
echo "Waiting for API to start..."
sleep 7
echo ""
echo "Testing GET /api/agents..."
curl -s http://localhost:5246/api/agents | jq '.[0:1]' 2>/dev/null || echo "FAILED"
echo ""
echo "Testing POST /api/command/createConversation..."
curl -s -w "\nHTTP Status: %{http_code}\n" http://localhost:5246/api/command/createConversation \
-X POST \
-H "Content-Type: application/json" \
-d '{"title":"Test"}' 2>/dev/null || echo "FAILED"
echo ""
echo "Testing GET /api/conversations..."
curl -s http://localhost:5246/api/conversations | jq '.[0:1]' 2>/dev/null || echo "FAILED"
echo ""
echo "Stopping API (PID: $API_PID)..."
kill $API_PID 2>/dev/null
wait $API_PID 2>/dev/null
echo "Done!"