30 May 2024 08:42 AM - last edited on 31 May 2024 08:39 AM by MaciejNeumann
I have been trying to fetch logs using the /logs/aggregate, /logs/export and /logs/search and I'm getting the exact same error in search and export:
{
"error": {
"code": 401,
"message": "OAuth token is missing"
}
}
and I'm getting this for /aggregate:
Error: response status is 501
Response headers
cache-control: must-revalidate,no-cache,no-store
content-length: 0
pragma: no-cache
server: ruxit server
server-timing: dtRpid;desc="-554874041",dtSInfo;desc="0"
strict-transport-security: max-age=31536000;includeSubDomains
x-oneagent-js-injection: true
x-robots-tag: noindex
the token I'm using has all the necessary scopes, and it works for every other api I've tested. I noticed that the 3 above apis have been marked as 'Early Adopter', is it being updated/changed right now?
I've also tried generating an oauth token and using that as a bearer token, but it simply returns an empty response, or fails
for /search:
{
"results": [],
"sliceSize": 0,
"nextSliceKey": null
}
for /aggregate:
{
"aggregationResult": {}
}
for /export
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1" />
<title>Error 501 Not Implemented</title>
</head>
<body>
<h2>HTTP ERROR 501 Not Implemented</h2>
<table>
<tr>
<th>URI:</th>
<td>/api/v2/logs/export</td>
</tr>
<tr>
<th>STATUS:</th>
<td>501</td>
</tr>
<tr>
<th>MESSAGE:</th>
<td>Not Implemented</td>
</tr>
</table>
</body>
</html>
if the endpoint in being changed, where can I see more info on it?
20 Jun 2024 07:50 PM
I have the same problem.
Is there other way to export logs?
21 Jun 2024 02:33 PM
hey, I wasnt able to solve the issue, but I did get a response from dynatrace support about this. It looks like they are making changes to the above endpoints to accept only oauth tokens for auth, but its not documented anywhere. I am also not sure why it is returning no data when using oauth, as the support agent completely ghosted me when I mentioned this. Hopefully they update the endpoints and docs in a way that makes them usable in the future. Good luck.
30 Jul 2024 10:23 AM
Hi Joshua,
Is the issue resolved for you now?....Did you get to know any other approach to read log records from DT.
31 Jul 2024 05:16 AM
Hi ifreire,
Ae you facing this issue yet......Can you suggest/Have you tried for any other ways to fetch log records from DT
31 Jul 2024 06:04 AM
Running into same issue here. Has anyone gotten a reply/solution yet? ( Or a timeframe for a fix ? )
31 Jul 2024 11:53 AM
Encountering same issue from those API endpoints.....Can anyone provide latest update on this. And also, any other suggested way to implement this
06 Aug 2024 10:15 AM
Anybody solved the issue?
01 Nov 2024 12:38 PM
I've been running into this same issue as well. Same token I use for all the other endpoints works fine. Made sure it had the logs.read scope for search endpoint, but am only getting a 401 response from logs/search. Any update?
{
"error": {
"code": 401,
"message": "OAuth token is missing"
}
}
13 Nov 2024 04:31 PM
Hello dears,
It's easy Gents, Just a matter of careful reading , you will get it sorted.
PFA Documentation URLs for review and guidance:
Hoping it helps.
KR,
Peter.