$token = "fzz2xL0UUwpeVB1mObEwxE9GO8sTV8z2OHiOojmdf0e428be"
$apps = @(
    @{name="gohorsejobs-backend"; uuid="iw4sow8s0kkg4cccsk08gsoo"},
    @{name="gohorsejobs-frontend"; uuid="ao8g40scws0w4cgo8coc8o40"},
    @{name="gohorsejobs-backoffice"; uuid="hg48wkw4wggwsswcwc8sooo4"},
    @{name="gohorsejobs-seeder"; uuid="q4w48gos8cgssso00o8w8gck"},
    @{name="rodiziosdaqui-backend"; uuid="ecso4woo4woo0ks84888k8ck"},
    @{name="rodiziosdaqui-frontend"; uuid="l4g4cc884gc04kg8s480gs48"},
    @{name="rodiziosdaqui-backoffice"; uuid="s4kskw08400wcw8g40ossggo"},
    @{name="rodiziosdaqui-seeder"; uuid="ko0kkw4kw8g80scksg8sk0wc"},
    @{name="q1food-backend"; uuid="eosgwscc4g044c884k0ws4gc"},
    @{name="q1food-frontend"; uuid="g8w440g0w0oowo8skss440wk"},
    @{name="obramarket-backend"; uuid="ws08owk8ocog0gswg8ogo8c4"}
)

foreach ($app in $apps) {
    $response = Invoke-RestMethod -Uri "https://redbull.rede5.com.br/api/v1/applications/$($app.uuid)" -Headers @{Authorization="Bearer $token"}
    Write-Host "=== $($app.name) ==="
    Write-Host "  UUID: $($app.uuid)"
    Write-Host "  Status: $($response.status)"
    Write-Host "  URL: $($response.fqdn)"
    Write-Host "  GitHub Webhook: $($response.manual_webhook_secret_github)"
    Write-Host ""
}
