# 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 refresh endpoint (bypasses cache) $headers = @{ "Authorization" = "Bearer $token" } Write-Host "Testing /api/v1/cameras/refresh endpoint (bypasses cache)..." $refreshResponse = Invoke-RestMethod -Uri "http://localhost:8000/api/v1/cameras/refresh" -Method Post -Headers $headers $refreshResponse | ConvertTo-Json -Depth 5