$token = Get-Content 'c:\Users\Administrator\.ssh\coolify-redbull-token'
$baseUrl = "https://redbull.rede5.com.br/api/v1"
$backendUuid = "eosgwscc4g044c884k0ws4gc"

Write-Host "Buscando deployments do backend..."
$deps = Invoke-RestMethod -Uri "$baseUrl/deployments" -Headers @{Authorization = "Bearer $token" } -Method Get

# Filter by application UUID if possible
$filteredDeps = $deps.data | Where-Object { $_.application_id -in @("eosgwscc4g044c884k0ws4gc-1654363294711", "eosgwscc4g044c884k0ws4gc", 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20) } 
$deps.data | Select-Object -First 10 | ConvertTo-Json -Depth 2
