Read logs whit the API and powershell
Hi,
tested several scripts and urls to read the log.
what ever I do I can't get it to work because the API is not authorized to read the logs.
Also deleted all the API keys and configs like abc123.
created new API's & config it just won't work.
$response = Invoke-RestMethod -Uri $uri -Headers $headers -Method GET
if ($null -eq $response) {
Write-Host " No response received from the API."
} elseif ($response.logs.Count-eq 0) {
Write-Host " ⁇ ️ Reply received, but no logs available."
} else {
Write-Host " $($response.logs.Count) logs retrieved."
# Show example
$response.logs | Select-Object -First 3 | Format Table
}
} catch {
Write-Host " Error retrieving logs:"
Write-Host $_.Exception.Message
}
I get an answer but there are no logs available.
according internet you have to connect the API to the ID
If I call the API through the browser I get access denied.
I have the paid version.
does somebody knows why I can't use the API for reading the logs?
Reply
Content aside
- 16 hrs agoLast active
- 7Views
-
1
Following