14 lines
525 B
PowerShell
14 lines
525 B
PowerShell
$token = Get-Content 'c:\Users\Administrator\.ssh\coolify-redbull-token'
|
|
$baseUrl = "https://redbull.rede5.com.br/api/v1"
|
|
$serviceUuid = "cs80o4sgo440gkwkogo4c44k"
|
|
|
|
$startUrl = "$baseUrl/services/$serviceUuid/start"
|
|
try {
|
|
Invoke-RestMethod -Uri $startUrl -Headers @{Authorization = "Bearer $token" } -Method Post
|
|
}
|
|
catch {
|
|
$stream = $_.Exception.Response.GetResponseStream()
|
|
$reader = New-Object System.IO.StreamReader($stream)
|
|
$responseBody = $reader.ReadToEnd()
|
|
Write-Host "Error Body: $responseBody"
|
|
}
|