cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Issue in fetching logs through API

joshua_joseph
Newcomer_

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?

9 REPLIES 9

lfreire
Visitor

I have the same problem.

Is there other way to export logs?

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.

Hi Joshua,

Is the issue resolved for you now?....Did you get to know any other approach to read log records from DT.

Hi ifreire,

Ae you facing this issue yet......Can you suggest/Have you tried for any other ways to fetch log records from DT

PeterDrenth
Frequent Guest

Running into same issue here. Has anyone gotten a reply/solution yet?  ( Or a timeframe for a fix ? )

 

Neetam
Visitor

Encountering same issue from those API endpoints.....Can anyone provide latest update on this. And also, any other suggested way to implement this

Neetam
Visitor

Anybody solved the issue?

jRosenholm
Newcomer

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"
    }
}

 

Peter_Youssef
Champion

Featured Posts