forked from Hitarth2510/Cloudify
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-api.ps1
More file actions
25 lines (21 loc) · 980 Bytes
/
test-api.ps1
File metadata and controls
25 lines (21 loc) · 980 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Test API endpoints for CloudPilot AI
Write-Host "Testing CloudPilot AI API Endpoints..." -ForegroundColor Green
# Test real-time status
Write-Host "`nTesting real-time status..." -ForegroundColor Cyan
try {
$response = Invoke-RestMethod -Uri "http://localhost:3000/api/dashboard/realtime" -Method GET
Write-Host "Real-time Status:" -ForegroundColor Yellow
$response | ConvertTo-Json -Depth 3
} catch {
Write-Host "Error testing real-time endpoint: $($_.Exception.Message)" -ForegroundColor Red
}
# Test Supabase seed status
Write-Host "`nTesting Supabase seed status..." -ForegroundColor Cyan
try {
$response = Invoke-RestMethod -Uri "http://localhost:3000/api/supabase/seed" -Method GET
Write-Host "Supabase Status:" -ForegroundColor Yellow
$response | ConvertTo-Json -Depth 3
} catch {
Write-Host "Error testing Supabase endpoint: $($_.Exception.Message)" -ForegroundColor Red
}
Write-Host "`nAPI testing completed!" -ForegroundColor Green