# Login and get token $loginBody = @{ username = "admin" password = "admin123" } | ConvertTo-Json $loginResponse = Invoke-RestMethod -Uri "http://localhost:8000/api/v1/auth/login" -Method Post -Body $loginBody -ContentType "application/json" $token = $loginResponse.access_token Write-Host "Got token: $token" Write-Host "" # Test cameras endpoint $headers = @{ "Authorization" = "Bearer $token" } Write-Host "Testing /api/v1/cameras endpoint..." $camerasResponse = Invoke-RestMethod -Uri "http://localhost:8000/api/v1/cameras" -Method Get -Headers $headers $camerasResponse | ConvertTo-Json -Depth 5